From: Janusz Dobrowolski Date: Wed, 26 Jan 2011 12:45:31 +0000 (+0000) Subject: Added check for closed transactions. X-Git-Tag: v2.4.2~19^2~398 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=fedd801edd1244b499b7f052c6b4298137563a57;p=fa-stable.git Added check for closed transactions. --- 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