X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdata_checks.inc;h=543a7d5936edb3767cdef001198cfd60fe343a95;hb=78fe8cb8f56510ba3f6a1720b207a33b5828e071;hp=798e84c4b5c10070a4526a2ccbc7a2ad987b0898;hpb=fdb0ed9e45cc7876ad7a72f78b17f23562593e9e;p=fa-stable.git diff --git a/includes/data_checks.inc b/includes/data_checks.inc index 798e84c4..543a7d59 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -485,5 +485,17 @@ 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