Moved all SQL statements from PHP files into relevant *_db.inc files.
[fa-stable.git] / gl / includes / db / gl_db_accounts.inc
index 3c29cd3ab6efccce205d3932231b1c6acf738052..279a55bee2fb93dd42b71a6b3c831cbd8a3900a2 100644 (file)
@@ -104,15 +104,6 @@ function get_gl_account_name($code)
        display_db_error("could not retreive the account name for $code", $sql, true);
 }
 
-function gl_account_in_transactions($acc)
-{
-       $sql= "SELECT COUNT(*) FROM ".TB_PREF."gl_trans WHERE account=$acc";
-       $result = db_query($sql,"Couldn't test for existing transactions");
-
-       $myrow = db_fetch_row($result);
-       return ($myrow[0] > 0); 
-}
-
 function gl_account_in_company_defaults($acc)
 {
        $sql= "SELECT COUNT(*) FROM ".TB_PREF."company WHERE debtors_act=$acc 
@@ -137,15 +128,6 @@ function gl_account_in_company_defaults($acc)
        return ($myrow[0] > 0); 
 }
 
-function gl_account_in_bank_accounts($acc)
-{
-       $sql= "SELECT COUNT(*) FROM ".TB_PREF."bank_accounts WHERE account_code=$acc";
-       $result = db_query($sql,"Couldn't test for bank accounts");
-
-       $myrow = db_fetch_row($result);
-       return ($myrow[0] > 0); 
-}
-
 function gl_account_in_stock_category($acc)
 {
        $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_category WHERE