projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup (missing $row declaration).
[fa-stable.git]
/
gl
/
manage
/
gl_accounts.php
diff --git
a/gl/manage/gl_accounts.php
b/gl/manage/gl_accounts.php
index 5a277c6ae0640d0f020f2317159d3cbee93c2a76..96ba6529d046f326cbb7f832b1fdd4be885a43d2 100644
(file)
--- a/
gl/manage/gl_accounts.php
+++ b/
gl/manage/gl_accounts.php
@@
-108,7
+108,7
@@
function can_delete($selected_account)
return false;
$acc = db_escape($selected_account);
return false;
$acc = db_escape($selected_account);
- if (
gl_account_in_transactions($acc
))
+ if (
key_in_foreign_table($acc, 'gl_trans', 'account', true
))
{
display_error(_("Cannot delete this account because transactions have been created using this account."));
return false;
{
display_error(_("Cannot delete this account because transactions have been created using this account."));
return false;
@@
-119,8
+119,8
@@
function can_delete($selected_account)
display_error(_("Cannot delete this account because it is used as one of the company default GL accounts."));
return false;
}
display_error(_("Cannot delete this account because it is used as one of the company default GL accounts."));
return false;
}
-
- if (
gl_account_in_bank_accounts($acc))
+
+ if (
key_in_foreign_table($acc, 'bank_accounts', 'account_code', true))
{
display_error(_("Cannot delete this account because it is used by a bank account."));
return false;
{
display_error(_("Cannot delete this account because it is used by a bank account."));
return false;
@@
-234,10
+234,10
@@
else
$_POST['account_name'] = $_POST['account_type'] = '';
$_POST['inactive'] = 0;
}
$_POST['account_name'] = $_POST['account_type'] = '';
$_POST['inactive'] = 0;
}
- text_row_ex(_("Account Code:"), 'account_code', 1
1
);
+ text_row_ex(_("Account Code:"), 'account_code', 1
5
);
}
}
-text_row_ex(_("Account Code 2:"), 'account_code2', 1
1
);
+text_row_ex(_("Account Code 2:"), 'account_code2', 1
5
);
text_row_ex(_("Account Name:"), 'account_name', 60);
text_row_ex(_("Account Name:"), 'account_name', 60);