summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/RP.pm5
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)