X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fbank_accounts.php;h=5ec75616d7df1d181e5c751def602f260454b5af;hb=cc9972b02f2bf4ece12da3431266e85e96872fb1;hp=64a96f8f0f5245c36a141378ec3c7f57ff3a5c81;hpb=9dab04be9d81766f1878d3688ee73d0bcf29f5d2;p=fa-stable.git diff --git a/gl/manage/bank_accounts.php b/gl/manage/bank_accounts.php index 64a96f8f..5ec75616 100644 --- a/gl/manage/bank_accounts.php +++ b/gl/manage/bank_accounts.php @@ -66,13 +66,13 @@ elseif( $Mode == 'Delete') $acc = db_escape($selected_id); // PREVENT DELETES IF DEPENDENT RECORDS IN 'bank_trans' - if (bank_account_in_transactions($acc)) + if (key_in_foreign_table($acc, 'bank_trans', 'bank_act', true)) { $cancel_delete = 1; display_error(_("Cannot delete this bank account because transactions have been created using this account.")); } - if (bank_account_in_sales_pos($acc)) + if (key_in_foreign_table($acc, 'sales_pos', 'pos_account', true)) { $cancel_delete = 1; display_error(_("Cannot delete this bank account because POS definitions have been created using this account."));