projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rerun. Stuff forgotten.
[fa-stable.git]
/
admin
/
payment_terms.php
diff --git
a/admin/payment_terms.php
b/admin/payment_terms.php
index c6a98794e792737d799370657f686972ef7cfe4d..a6aa77e77011570f350c40aa6a67594f3bb954a6 100644
(file)
--- a/
admin/payment_terms.php
+++ b/
admin/payment_terms.php
@@
-74,13
+74,13
@@
if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
if ($Mode == 'Delete')
{
// PREVENT DELETES IF DEPENDENT RECORDS IN debtors_master
if ($Mode == 'Delete')
{
// PREVENT DELETES IF DEPENDENT RECORDS IN debtors_master
- if (
customer_has_terms($selected_id
))
+ if (
key_in_foreign_table($selected_id, 'debtors_master', 'payment_terms'
))
{
display_error(_("Cannot delete this payment term, because customer accounts have been created referring to this term."));
}
else
{
{
display_error(_("Cannot delete this payment term, because customer accounts have been created referring to this term."));
}
else
{
- if (
supplier_has_terms($selected_id
))
+ if (
key_in_foreign_table($selected_id, 'suppliers', 'payment_terms'
))
{
display_error(_("Cannot delete this payment term, because supplier accounts have been created referring to this term"));
}
{
display_error(_("Cannot delete this payment term, because supplier accounts have been created referring to this term"));
}