Fixed bug no 1703888 Apostrophes and other unescaped characters
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 20 Apr 2007 07:15:47 +0000 (07:15 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 20 Apr 2007 07:15:47 +0000 (07:15 +0000)
+ another suppliers GL accounts SQL error that was detected.

gl/manage/gl_accounts.php

index 6e309598387efc9c0d32618566d0a721acb29bba..9ff0fa7a73c906d28f88edbf0e81cf70221c0d6f 100644 (file)
@@ -144,7 +144,7 @@ function can_delete($selected_account)
                OR sales_discount_account=$selected_account
                OR receivables_account=$selected_account
                OR payment_discount_account=$selected_account";
-       $result = db_query($sql,"Couldn't test for existing tax GL codes");
+       $result = db_query($sql,"Couldn't test for existing cust branch GL codes");
 
        $myrow = db_fetch_row($result);
        if ($myrow[0] > 0) 
@@ -155,9 +155,9 @@ function can_delete($selected_account)
        
        $sql= "SELECT COUNT(*) FROM ".TB_PREF."suppliers WHERE 
                purchase_account=$selected_account 
-               payment_discount_account=$selected_account 
+               OR payment_discount_account=$selected_account 
                OR payable_account=$selected_account";
-       $result = db_query($sql,"Couldn't test for existing tax GL codes");
+       $result = db_query($sql,"Couldn't test for existing suppliers GL codes");
 
        $myrow = db_fetch_row($result);
        if ($myrow[0] > 0)