diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-11 00:27:06 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-11 00:27:06 +0000 |
commit | fe15d731f3c7adff59512f937ebdb4a5b565c208 (patch) | |
tree | 972fa73e1e8e3354b8b384a0ba0a403f44f4f84c /LedgerSMB | |
parent | 7affe071d143ba0f8f70054e16badc270b870c06 (diff) |
Fixed trial balance db errors
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@511 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/RP.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/LedgerSMB/RP.pm b/LedgerSMB/RP.pm index f61bb53f..9b349bab 100755 --- a/LedgerSMB/RP.pm +++ b/LedgerSMB/RP.pm @@ -1297,7 +1297,7 @@ sub trial_balance { $dpt_join WHERE $where $dpt_where $project AND ac.amount < 0 AND c.accno = ?) AS debit, - (SELECT SUM(ac.amount FROM acc_trans ac + (SELECT SUM(ac.amount) FROM acc_trans ac JOIN chart c ON (c.id = ac.chart_id) $dpt_join WHERE $where $dpt_where $project AND ac.amount > 0 @@ -1360,7 +1360,8 @@ sub trial_balance { } else { # get DR/CR - $drcr->execute($ref->{accno}, $ref->{accno}); + $drcr->execute($ref->{accno}, $ref->{accno}) + || $form->dberror($query); ($debit, $credit) = (0,0); while (($debit, $credit) |