From: Chris Sharp Date: Sun, 4 Aug 2013 20:54:35 +0000 (-0400) Subject: Fix typos in both changed files! X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=58fed163ef9a3d6a912cc166fcdbc5d1cb87f648;p=working%2FEvergreen.git Fix typos in both changed files! Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/sql/Pg/080.schema.money.sql b/Open-ILS/src/sql/Pg/080.schema.money.sql index ce1dd0cfd8..ca27109b8b 100644 --- a/Open-ILS/src/sql/Pg/080.schema.money.sql +++ b/Open-ILS/src/sql/Pg/080.schema.money.sql @@ -87,10 +87,10 @@ CREATE OR REPLACE VIEW money.transaction_billing_type_summary AS billing.billing_type AS last_billing_type, LAST_VALUE(billing.note) OVER w AS last_billing_note, MAX(billing.billing_ts) OVER w AS last_billing_ts, - SUM(COALESCE(billing.amount, 0::numeric)) AS total_owed + SUM(COALESCE(billing.amount, 0::numeric)) OVER w AS total_owed FROM money.billing WHERE billing.voided IS FALSE - WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROW BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); + WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); CREATE OR REPLACE VIEW money.transaction_billing_summary AS SELECT DISTINCT billing.xact, @@ -145,7 +145,7 @@ CREATE OR REPLACE VIEW money.open_transaction_billing_type_summary AS SUM(COALESCE(billing.amount, 0::numeric)) OVER w AS total_owed FROM money.billing WHERE billing.voided IS FALSE - WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROW BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); + WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); CREATE OR REPLACE VIEW money.open_transaction_billing_summary AS SELECT DISTINCT xact, @@ -161,7 +161,8 @@ CREATE OR REPLACE VIEW money.open_transaction_payment_summary AS SELECT DISTINCT payment_view.xact, LAST_VALUE(payment_view.payment_type) OVER w AS last_payment_type, LAST_VALUE(payment_view.note) OVER w AS last_payment_note, - MAX(payment_view.payment_ts) OVER w AS last_payment_ts, sum(COALESCE(payment_view.amount, 0::numeric)) AS total_paid + MAX(payment_view.payment_ts) OVER w AS last_payment_ts, + SUM(COALESCE(payment_view.amount, 0::numeric)) OVER w AS total_paid FROM money.payment_view WHERE payment_view.voided IS FALSE WINDOW w AS (PARTITION BY payment_view.xact ORDER BY payment_view.payment_ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.money.replace_views_with_window_functions.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.money.replace_views_with_window_functions.sql index efab910f28..dea52b985e 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.money.replace_views_with_window_functions.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.money.replace_views_with_window_functions.sql @@ -41,7 +41,7 @@ CREATE OR REPLACE VIEW money.open_transaction_billing_type_summary AS SUM(COALESCE(billing.amount, 0::numeric)) OVER w AS total_owed FROM money.billing WHERE billing.voided IS FALSE - WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROW BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); + WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); -- money.open_transaction_payment_summary @@ -49,7 +49,8 @@ CREATE OR REPLACE VIEW money.open_transaction_payment_summary AS SELECT DISTINCT payment_view.xact, LAST_VALUE(payment_view.payment_type) OVER w AS last_payment_type, LAST_VALUE(payment_view.note) OVER w AS last_payment_note, - MAX(payment_view.payment_ts) OVER w AS last_payment_ts, sum(COALESCE(payment_view.amount, 0::numeric)) AS total_paid + MAX(payment_view.payment_ts) OVER w AS last_payment_ts, + SUM(COALESCE(payment_view.amount, 0::numeric)) OVER w AS total_paid FROM money.payment_view WHERE payment_view.voided IS FALSE WINDOW w AS (PARTITION BY payment_view.xact ORDER BY payment_view.payment_ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); @@ -61,10 +62,10 @@ CREATE OR REPLACE VIEW money.transaction_billing_type_summary AS billing.billing_type AS last_billing_type, LAST_VALUE(billing.note) OVER w AS last_billing_note, MAX(billing.billing_ts) OVER w AS last_billing_ts, - SUM(COALESCE(billing.amount, 0::numeric)) AS total_owed + SUM(COALESCE(billing.amount, 0::numeric)) OVER w AS total_owed FROM money.billing WHERE billing.voided IS FALSE - WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROW BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); + WINDOW w AS (PARTITION BY billing.xact, billing.billing_type ORDER BY billing.billing_ts ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); -- money.transaction_billing_with_void_summary