X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdata_checks.inc;h=54f9dbb5683fb2270079605c6ddb4d73c12626eb;hb=09f11ae8dda656ddc48b3d6916f34b93033d9136;hp=7cc5586d4652e6c370109a3c668aebad75a47fee;hpb=fd069bba86276f15311ff6ab10b22d4a06a55513;p=fa-stable.git diff --git a/includes/data_checks.inc b/includes/data_checks.inc index 7cc5586d..54f9dbb5 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -153,8 +153,8 @@ function check_db_has_sales_people($msg) { display_error($msg, true); end_page(); - exit; - } + exit; + } } function db_has_sales_areas() @@ -674,3 +674,14 @@ function check_reference($reference, $trans_type, $trans_no=0, $context=null, $l } return true; } + +function check_sys_pref($name, $msg, $empty = '') +{ + global $path_to_root; + + if (get_company_pref($name) === $empty) + { + display_error(menu_link("/admin/gl_setup.php", $msg), true); + display_footer_exit(); + } +}