From fedd801edd1244b499b7f052c6b4298137563a57 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 26 Jan 2011 12:45:31 +0000 Subject: [PATCH] Added check for closed transactions. --- includes/data_checks.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/includes/data_checks.inc b/includes/data_checks.inc index 798e84c4..a37c91d4 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -485,5 +485,18 @@ function check_num($postname, $min=null, $max=null, $dflt=0) { return 1; } +function check_is_closed($type, $type_no, $msg=null) +{ + global $systypes_array; + + if (($type_no > 0) && is_closed_trans($type, $type_no)) + { + if (!$msg) + $msg = sprintf(_("%s #%s is closed for further edition."), $systypes_array[$type], $type_no); + display_error($msg, true); + end_page(); + exit; + } +} ?> \ No newline at end of file -- 2.30.2