Removed many global variables from config.default.php to GL Setup, Company Setup...
[fa-stable.git] / taxes / db / tax_types_db.inc
index f42470eff9b5b3134a02d70e9520ad44e211510f..87fb661a80c26c04cc7afee0fa9c962524e69380 100644 (file)
@@ -64,7 +64,7 @@ function get_tax_type($type_id)
        return db_fetch($result);
 }
 
-function get_tax_type_default_rate($type_id)
+function get_tax_type_rate($type_id)
 {
        $sql = "SELECT rate FROM ".TB_PREF."tax_types WHERE id=".db_escape($type_id);
 
@@ -83,7 +83,7 @@ function delete_tax_type($type_id)
        db_query($sql, "could not delete tax type");
 
        // also delete any item tax exemptions associated with this type
-       $sql = "DELETE FROM ".TB_PREF."item_tax_type_exemptions WHERE tax_type_id=$type_id";
+       $sql = "DELETE FROM ".TB_PREF."item_tax_type_exemptions WHERE tax_type_id=".db_escape($type_id);
 
        db_query($sql, "could not delete item tax type exemptions");
 
@@ -127,4 +127,4 @@ function is_tax_account($account_code)
 }
 
 
-?>
\ No newline at end of file
+?>