summaryrefslogtreecommitdiff
path: root/sql/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sql/modules')
-rw-r--r--sql/modules/Voucher.sql9
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');