3 INSERT INTO config.upgrade_log (version) VALUES ('0141'); -- Scott McKellar
5 CREATE OR REPLACE VIEW acq.fund_debit_total AS
6 SELECT fund.id AS fund,
7 fund_debit.encumbrance AS encumbrance,
8 COALESCE( SUM(fund_debit.amount), 0 ) AS amount
10 LEFT JOIN acq.fund_debit AS fund_debit
11 ON ( fund.id = fund_debit.fund )