Show
Ignore:
Timestamp:
06/25/03 21:52:31 (21 years ago)
Author:
jalet
Message:

Should be ready for testing :-)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r1041 r1043  
    2323# 
    2424# $Log$ 
     25# Revision 1.48  2003/06/25 19:52:30  jalet 
     26# Should be ready for testing :-) 
     27# 
    2528# Revision 1.47  2003/06/25 14:10:01  jalet 
    2629# Hey, it may work (edpykota --reset excepted) ! 
     
    479482                                if changed[entry.Name].get("balance") is None : 
    480483                                    if balance.startswith("+") or balance.startswith("-") : 
    481                                         entry.consumeAccountBalance(-balancevalue) 
     484                                        newbalance = float(entry.AccountBalance or 0.0) + balancevalue 
     485                                        newlifetimepaid = float(entry.LifeTimePaid or 0.0) + balancevalue 
     486                                        entry.setAccountBalance(newbalance, newlifetimepaid) 
    482487                                    else : 
    483                                         entry.consumeAccountBalance(float(entry.AccountBalance or 0.0) - balancevalue) 
     488                                        diff = balancevalue - float(entry.AccountBalance or 0.0) 
     489                                        newlifetimepaid = float(entry.LifeTimePaid or 0.0) + diff 
     490                                        entry.setAccountBalance(balancevalue, newlifetimepaid) 
    484491                                    changed[entry.Name]["balance"] = balance 
    485492                            for groupname in groupnames :