From: Janusz Dobrowolski Date: Sun, 6 Mar 2011 18:28:12 +0000 (+0100) Subject: Added missing check for references to item_tax_ype in item_categories X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b8a99f9af5966c0a12e9dce4101e99d4a7a04135;p=textcart.git Added missing check for references to item_tax_ype in item_categories --- diff --git a/taxes/item_tax_types.php b/taxes/item_tax_types.php index 4f93fa5..b03323a 100644 --- a/taxes/item_tax_types.php +++ b/taxes/item_tax_types.php @@ -77,6 +77,11 @@ 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')) + { + display_error(_("Cannot delete this item tax type because item categories have been created referring to it.")); + return false; + } return true; }