X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdata_checks.inc;h=f50e94540319f94d40b1a684c2e93f7de3751081;hb=90b3d069d96b99671af51726e2953352738abb75;hp=798e84c4b5c10070a4526a2ccbc7a2ad987b0898;hpb=8ecdfec3e664440856af9b205d37e3327c126cfc;p=fa-stable.git diff --git a/includes/data_checks.inc b/includes/data_checks.inc index 798e84c4..f50e9454 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -485,5 +485,16 @@ function check_num($postname, $min=null, $max=null, $dflt=0) { return 1; } - -?> \ No newline at end of file +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; + } +}