diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-07-22 23:27:50 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-07-22 23:27:50 +0000 |
commit | ecf56eca694d9606ffe56d3cab13a6614efc6aa4 (patch) | |
tree | 84fc7c9a763a97ef1c633a885b80456fc93559a0 /sql/modules | |
parent | 12a0239ccda7e2bd68cae034e916c6a664c3c430 (diff) |
Added format option to LedgerSMB::format_amount
Added batch information options for check template
Added batch default_date field
Corrected issues with payment batches not preserving post dates when adding vouchers to existing batch.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2219 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules')
-rw-r--r-- | sql/modules/Voucher.sql | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/modules/Voucher.sql b/sql/modules/Voucher.sql index f4a30595..6ae6a5e2 100644 --- a/sql/modules/Voucher.sql +++ b/sql/modules/Voucher.sql @@ -310,13 +310,16 @@ END; $$ LANGUAGE PLPGSQL; CREATE OR REPLACE FUNCTION batch_create( -in_batch_number text, in_description text, in_batch_class text) RETURNS int AS +in_batch_number text, in_description text, in_batch_class text, +in_batch_date date) +RETURNS int AS $$ BEGIN INSERT INTO - batch (batch_class_id, description, control_code, created_by) + batch (batch_class_id, default_date, description, control_code, + created_by) VALUES ((SELECT id FROM batch_class WHERE class = in_batch_class), - in_description, in_batch_number, + in_batch_date, in_description, in_batch_number, (select entity_id FROM users WHERE username = session_user)); return currval('batch_id_seq'); |