On Monday 15 Mar 2010 2:14:28 pm Roshan Mathews wrote:
> On Mon, Mar 15, 2010 at 13:54, Kenneth Gonsalves wrote:
> >for child in children:
> >getaccbal(child.id,bal)
>
> This line returns a "balance" which is discarded. Maybe it should be:
> bal += getaccbal(...) ?
>
yes. t
Good catch.
On Mon, Mar 15, 2010 at 2:14 PM, Roshan Mathews wrote:
> On Mon, Mar 15, 2010 at 13:54, Kenneth Gonsalves
> wrote:
> >for child in children:
> >getaccbal(child.id,bal)
>
> This line returns a "balance" which is discarded. Maybe it should be:
> bal += getaccbal(.
Kenneth Gonsalves wrote:
hi,
here is a function I have written:
def getaccbal(accnt,bal):
account = Account.objects.get(pk=accnt)
if account.vouch:
bal = bal + getledgerob(account)
else:
children = account.account_set.all()
for child in children:
On Mon, Mar 15, 2010 at 1:54 PM, Kenneth Gonsalves wrote:
> hi,
>
> here is a function I have written:
>
> def getaccbal(accnt,bal):
> account = Account.objects.get(pk=accnt)
>
> if account.vouch:
> bal = bal + getledgerob(account)
> else:
> children = account.account_set.al
On Mon, Mar 15, 2010 at 13:54, Kenneth Gonsalves wrote:
> for child in children:
> getaccbal(child.id,bal)
This line returns a "balance" which is discarded. Maybe it should be:
bal += getaccbal(...) ?
Roshan Mathews
___
BangPypers ma
hi,
here is a function I have written:
def getaccbal(accnt,bal):
account = Account.objects.get(pk=accnt)
if account.vouch:
bal = bal + getledgerob(account)
else:
children = account.account_set.all()
for child in children:
getaccbal(child.id,bal