Fixed foreign key check on item tax type deletion.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Mon, 7 Mar 2011 13:40:16 +0000 (14:40 +0100)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Mon, 7 Mar 2011 13:40:16 +0000 (14:40 +0100)
taxes/item_tax_types.php

index b03323a0ee0130c23db02fb925430c9da12c819f..ce94cfe4e5c7d0a1603b22ea30bdaa10f2dc2090 100644 (file)
@@ -77,7 +77,7 @@ function can_delete($selected_id)
                display_error(_("Cannot delete this item tax type because items have been created referring to it."));
                return false;
        }
-       if (key_in_foreign_table($selected_id, 'item_tax_types', 'dflt_tax_type'))
+       if (key_in_foreign_table($selected_id, 'stock_category', 'dflt_tax_type'))
        {
                display_error(_("Cannot delete this item tax type because item categories have been created referring to it."));
                return false;