X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdata_checks.inc;h=0b94f9328723b49f80317879c8cfa5c2b919285d;hb=45e45a854c40a7a2f9cc8f11e07a259c6923babd;hp=89d57d6345db521c90d791c8d30f9fdb3c9511cc;hpb=193f28f3518aae0fbf3b0ce523a5ac13dc8074f4;p=fa-stable.git diff --git a/includes/data_checks.inc b/includes/data_checks.inc index 89d57d63..0b94f932 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -111,25 +111,9 @@ function check_db_has_movement_types($msg) } } -function db_has_bank_trans_types() -{ - return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."bank_trans_types"); -} - -function check_db_has_bank_trans_types($msg) -{ - global $path_to_root; - if (!db_has_bank_trans_types()) - { - display_error($msg, true); - end_page(); - exit; - } -} - function db_customer_has_branches($customer_id) { - return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE debtor_no=$customer_id"); + return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE debtor_no='$customer_id'"); } function db_has_customer_branches() @@ -420,6 +404,11 @@ function check_db_has_gl_account_groups($msg) } } +function db_has_quick_entries() +{ + return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."quick_entries"); +} + function check_empty_result($sql) { $result = db_query($sql, "could not do check empty query");