From 47764e9e48ea4d52e70b62f05ba80a5caccc6f06 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 10 Jan 2008 13:59:54 +0000 Subject: [PATCH] Fix aged partner balance - Fix indentation - Fix quote in sql query bzr revid: ced-f77181c998a10440e849e6c2bf5c79f6b1212b3f --- addons/account/report/aged_trial_balance.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/account/report/aged_trial_balance.py b/addons/account/report/aged_trial_balance.py index ef990f72cb1..262e436ac95 100644 --- a/addons/account/report/aged_trial_balance.py +++ b/addons/account/report/aged_trial_balance.py @@ -81,12 +81,12 @@ class aged_trial_report(report_sxw.rml_parse): values[str(i)] = during and during[0] or "" - a3 = "SELECT SUM(debit-credit) \ - FROM account_move_line AS line, account_account \ - WHERE (line.account_id=account_account.id) AND (account_account.type IN (%s)) \ - AND (partner_id = %d) AND (reconcile_id IS NULL) \ - AND (line.state <> 'draft') AND (line.period_id in (SELECT id FROM account_period WHERE fiscalyear_id=%d)) \ - AND (account_account.company_id = %d) AND account_account.active" %(form['computation'], partner['id'], form['fiscalyear'], form['company_id']) + a3 = "SELECT SUM(debit-credit) \ + FROM account_move_line AS line, account_account \ + WHERE (line.account_id=account_account.id) AND (account_account.type IN (%s)) \ + AND (partner_id = %d) AND (reconcile_id IS NULL) \ + AND (line.state <> 'draft') AND (line.period_id in (SELECT id FROM account_period WHERE fiscalyear_id=%d)) \ + AND (account_account.company_id = %d) AND account_account.active" %(form['computation'], partner['id'], form['fiscalyear'], form['company_id']) self.cr.execute(a3) total = self.cr.fetchone() @@ -136,7 +136,7 @@ class aged_trial_report(report_sxw.rml_parse): per = "SELECT SUM(debit-credit) \ FROM account_move_line AS line, account_account \ WHERE (line.account_id=account_account.id) AND (account_account.type IN (%s)) \ - AND reconcile_id IS NULL AND (date >= %s) AND (date <= %s) \ + AND reconcile_id IS NULL AND (date >= '%s') AND (date <= '%s') \ AND (line.state<>'draft') AND partner_id is not null \ AND (line.period_id in (SELECT id FROM account_period WHERE fiscalyear_id = %d)) \ AND (account_account.company_id = %d) AND account_account.active" %(self.form['computation'], period['start'], period['stop'], fiscalyear, company_id)