X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdata_checks.inc;h=f50e94540319f94d40b1a684c2e93f7de3751081;hb=7840540918bfd37c886877a5d52e3ba0b3373289;hp=798e84c4b5c10070a4526a2ccbc7a2ad987b0898;hpb=46c5f7a65a7659a44ae8254c63152074363d3987;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; + } +}