On 22/05/11 12:39 +0200, Paul J Stevens wrote:
> 
> Hi,
> 
> I assume the aged balance report is meant to provide an overview of
> parties that are overdue with payments.
> 
> I noticed that using the default settings, the sum of payables always
> ends up in the first column (30 days).
> 
> Looking into this I noticed something strange. The offset is calculated as:
> 
> account.py (2258):
> 
> term_args = (date_obj.today() + datetime.timedelta(days=term*coef),
>    date_obj.today()
>                     + datetime.timedelta(days=terms[position-1]*coef),
>                     )
> 
> which leads to a query snippet for the 90 days age (today==22 may):
> 
> (l.maturity_date <= '2011-08-20'::date AND l.maturity_date >
> '2011-07-21'::date)
> 
> looks to me like the timedelta should be subtracted rather than added,
> right? Or am I missing something?

No, it computes the delta between the amount at 60 days and the amount at 90
days.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgps9KHSyaeLe.pgp
Description: PGP signature

Reply via email to