summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-09 23:15:17 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-09 23:15:17 +0000
commit539f90a8bcee8366e3d17a921fc02d8c94dc1b6c (patch)
tree3da9035bdd54ac8107e3e436d11ca5c3d1d2553f
parentcd78581fa2d16e3d712b7a44580c60ac1fc63f86 (diff)
Fixing error when deleting accounts...
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@870 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/AM.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm
index 0cd39e71..387d9d8b 100755
--- a/LedgerSMB/AM.pm
+++ b/LedgerSMB/AM.pm
@@ -251,10 +251,10 @@ sub delete_account {
# set inventory_accno_id, income_accno_id, expense_accno_id to defaults
$query = qq|
UPDATE parts
- SET inventory_accno_id = (SELECT value
+ SET inventory_accno_id = (SELECT value::int
FROM defaults
WHERE setting_key =
- 'inventory_accno_id')
+ 'inventory_accno_id')::
WHERE inventory_accno_id = ?|;
$sth = $dbh->prepare($query);
@@ -263,7 +263,7 @@ sub delete_account {
for (qw(income_accno_id expense_accno_id)){
$query = qq|
UPDATE parts
- SET $_ = (SELECT value
+ SET $_ = (SELECT value::int
FROM defaults
WHERE setting_key = '$_')
WHERE $_ = ?|;