I ... HATE ... JAVASCRIPT KEYWORDS!!!!!!!!!!!!!!!
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 15 Jul 2005 19:15:26 +0000 (19:15 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 15 Jul 2005 19:15:26 +0000 (19:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1215 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/money.pm
Open-ILS/src/sql/Postgres/080.schema.money.sql
Open-ILS/src/support-scripts/generate-fines.pl

index 2ceea75..52b69e8 100644 (file)
@@ -34,7 +34,7 @@ package money::billing;
 use base qw/money/;
 __PACKAGE__->table('money_billing');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/xact amount billing_ts note void/);
+__PACKAGE__->columns(Essential => qw/xact amount billing_ts note voided/);
 #-------------------------------------------------------------------------------
 
 package money::payment;
index 995d00d..df10cf4 100644 (file)
@@ -18,7 +18,7 @@ CREATE TABLE money.billing (
        amount          NUMERIC(6,2)                    NOT NULL,
        billing_ts      TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT NOW(),
        note            TEXT,
-       void            BOOL                            NOT NULL DEFALUT FALSE
+       voided          BOOL                            NOT NULL DEFALUT FALSE
 );
 CREATE INDEX m_b_xact_idx ON money.billing (xact);
 
@@ -28,7 +28,7 @@ CREATE TABLE money.payment (
        amount          NUMERIC(6,2)                    NOT NULL,
        payment_ts      TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT NOW(),
        note            TEXT,
-       void            BOOL                            NOT NULL DEFALUT FALSE
+       voided          BOOL                            NOT NULL DEFALUT FALSE
 );
 CREATE INDEX m_p_xact_idx ON money.payment (xact);
 
@@ -43,8 +43,8 @@ CREATE OR REPLACE VIEW money.billable_xact_summary AS
                MAX(debit.billing_ts) AS last_billing_ts,
                SUM(COALESCE(debit.amount,0) - COALESCE(credit.amount,0)) AS balance_owed
          FROM  money.billable_xact xact
-               LEFT JOIN money.billing debit ON (xact.id = debit.xact AND debit.void IS FALSE)
-               LEFT JOIN money.payment credit ON (xact.id = credit.xact AND credit.void IS FALSE)
+               LEFT JOIN money.billing debit ON (xact.id = debit.xact AND debit.voided IS FALSE)
+               LEFT JOIN money.payment credit ON (xact.id = credit.xact AND credit.voided IS FALSE)
          WHERE xact.xact_finish IS NULL
        GROUP BY 1,2,3,4;
 
index 0c3941e..1c89529 100755 (executable)
@@ -49,7 +49,7 @@ try {
 
                my $fine = $session->request(
                        'open-ils.storage.direct.money.billing.search',
-                       { xact => $c->id, void => 'f' },
+                       { xact => $c->id, voided => 'f' },
                        { order_by => 'billing_ts DESC', limit => '1' }
                )->gather(1);