Fixed get_post() support for numeric fields.
[fa-stable.git] / includes / data_checks.inc
index 7cc5586d4652e6c370109a3c668aebad75a47fee..54f9dbb5683fb2270079605c6ddb4d73c12626eb 100644 (file)
@@ -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();
+       }
+}