X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdata_checks.inc;h=95bcb2ca68e5c5f16f29417e63769a99232cec8e;hb=7d3a4880be5ffa54f43920fd681236b6661012f3;hp=57f71e8f634ad1573ce17051c1962d0a46d3dfc7;hpb=818719f38b8327cdca616d58b13913dbd174d96a;p=fa-stable.git diff --git a/includes/data_checks.inc b/includes/data_checks.inc index 57f71e8f..95bcb2ca 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -1,13 +1,13 @@ . + See the License here . ***********************************************************************/ function db_has_customers() { @@ -385,6 +385,7 @@ function db_has_bank_accounts() function check_db_has_bank_accounts($msg) { global $path_to_root; + if (!db_has_bank_accounts()) { display_error($msg, true); @@ -393,6 +394,12 @@ function check_db_has_bank_accounts($msg) } } +function db_has_cash_accounts() +{ + return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."bank_accounts + WHERE account_type=3"); +} + function db_has_gl_accounts() { return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."chart_master");