projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed supplier payment to accept amount in foreign currency instead of exchange...
[fa-stable.git]
/
gl
/
manage
/
bank_accounts.php
diff --git
a/gl/manage/bank_accounts.php
b/gl/manage/bank_accounts.php
index d8d02ab27b36d4188371618069f178183e4cb5dd..9dda5cd367a1c4e452cfc600226feebd9ff620f8 100644
(file)
--- a/
gl/manage/bank_accounts.php
+++ b/
gl/manage/bank_accounts.php
@@
-34,7
+34,7
@@
if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
set_focus('bank_account_name');
}
if ($Mode=='ADD_ITEM' && (gl_account_in_bank_accounts(get_post('account_code'))
set_focus('bank_account_name');
}
if ($Mode=='ADD_ITEM' && (gl_account_in_bank_accounts(get_post('account_code'))
- || key_in_foreign_table(get_post('account_code'), 'gl_trans', 'account'
, true
))) {
+ || key_in_foreign_table(get_post('account_code'), 'gl_trans', 'account'))) {
$input_error = 1;
display_error(_("The GL account selected is already in use. Select another GL account."));
set_focus('account_code');
$input_error = 1;
display_error(_("The GL account selected is already in use. Select another GL account."));
set_focus('account_code');
@@
-68,16
+68,15
@@
elseif( $Mode == 'Delete')
//the link to delete a selected record was clicked instead of the submit button
$cancel_delete = 0;
//the link to delete a selected record was clicked instead of the submit button
$cancel_delete = 0;
- $acc = db_escape($selected_id);
// PREVENT DELETES IF DEPENDENT RECORDS IN 'bank_trans'
// PREVENT DELETES IF DEPENDENT RECORDS IN 'bank_trans'
- if (key_in_foreign_table($
acc, 'bank_trans', 'bank_act', true
))
+ if (key_in_foreign_table($
selected_id, 'bank_trans', 'bank_act') || key_in_foreign_table(get_post('account_code'), 'gl_trans', 'account'
))
{
$cancel_delete = 1;
display_error(_("Cannot delete this bank account because transactions have been created using this account."));
}
{
$cancel_delete = 1;
display_error(_("Cannot delete this bank account because transactions have been created using this account."));
}
- if (key_in_foreign_table($
acc, 'sales_pos', 'pos_account', true
))
+ if (key_in_foreign_table($
selected_id, 'sales_pos', 'pos_account'
))
{
$cancel_delete = 1;
display_error(_("Cannot delete this bank account because POS definitions have been created using this account."));
{
$cancel_delete = 1;
display_error(_("Cannot delete this bank account because POS definitions have been created using this account."));
@@
-136,7
+135,7
@@
while ($myrow = db_fetch($result))
inactive_control_row($th);
end_table(1);
inactive_control_row($th);
end_table(1);
-$is_used = $selected_id != -1 && key_in_foreign_table($selected_id, 'bank_trans', 'bank_act'
, true
);
+$is_used = $selected_id != -1 && key_in_foreign_table($selected_id, 'bank_trans', 'bank_act');
start_table(TABLESTYLE2);
start_table(TABLESTYLE2);