<?php
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
function db_has_customers()
{
return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."debtors_master");
}
}
-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'");
}
}
+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");