Adding amount_paid columns to acq.invoice_item, acq.invoice_entry.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 8 Apr 2010 23:57:34 +0000 (23:57 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 8 Apr 2010 23:57:34 +0000 (23:57 +0000)
M    Open-ILS/src/sql/Pg/200.schema.acq.sql
M    Open-ILS/src/sql/Pg/002.schema.config.sql
A    Open-ILS/src/sql/Pg/upgrade/0231.schema.acq-inv-amt-paid.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16186 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/200.schema.acq.sql
Open-ILS/src/sql/Pg/upgrade/0231.schema.acq-inv-amt-paid.sql [new file with mode: 0644]

index 57914ad..4940ae3 100644 (file)
@@ -4679,6 +4679,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
                        <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
                        <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
+                       <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
                </fields>
                <links>
                        <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
@@ -4716,6 +4717,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
                        <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
                        <field reporter:label="Fund" name="fund" reporter:datatype="link" />
+                       <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
                </fields>
                <links>
                        <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
index c604289..cbb068c 100644 (file)
@@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0230'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0231'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 16f865b..7df769d 100644 (file)
@@ -815,7 +815,8 @@ CREATE TABLE acq.invoice_entry (
     note            TEXT,
     billed_per_item BOOL,
     cost_billed     NUMERIC(8,2),
-    actual_cost     NUMERIC(8,2)
+    actual_cost     NUMERIC(8,2),
+       amount_paid     NUMERIC (8,2)
 );
 
 CREATE TABLE acq.invoice_item_type (
@@ -836,7 +837,8 @@ CREATE TABLE acq.invoice_item ( -- for invoice-only debits: taxes/fees/non-bib i
     cost_billed     NUMERIC(8,2),
     actual_cost     NUMERIC(8,2),
        fund            INT         REFERENCES acq.fund (id)
-                                   DEFERRABLE INITIALLY DEFERRED
+                                   DEFERRABLE INITIALLY DEFERRED,
+       amount_paid     NUMERIC (8,2)
 );
 
 -- Patron requests
diff --git a/Open-ILS/src/sql/Pg/upgrade/0231.schema.acq-inv-amt-paid.sql b/Open-ILS/src/sql/Pg/upgrade/0231.schema.acq-inv-amt-paid.sql
new file mode 100644 (file)
index 0000000..15b2e9c
--- /dev/null
@@ -0,0 +1,11 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0231'); -- Scott McKellar
+
+ALTER TABLE acq.invoice_item
+       ADD COLUMN amount_paid NUMERIC (8,2);
+
+ALTER TABLE acq.invoice_entry
+       ADD COLUMN amount_paid NUMERIC (8,2);
+
+COMMIT;