projects
/
textcart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9768ae1
)
Added missing check for references to item_tax_ype in item_categories
author
Janusz Dobrowolski
<janusz@frontaccouting.eu>
Sun, 6 Mar 2011 18:28:12 +0000
(19:28 +0100)
committer
Janusz Dobrowolski
<janusz@frontaccouting.eu>
Sun, 6 Mar 2011 18:28:12 +0000
(19:28 +0100)
taxes/item_tax_types.php
patch
|
blob
|
history
diff --git
a/taxes/item_tax_types.php
b/taxes/item_tax_types.php
index 4f93fa59076df1e7e99f4f79d470f8a76a0438c3..b03323a0ee0130c23db02fb925430c9da12c819f 100644
(file)
--- 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;
}