Changeset 1043 for pykota/trunk/bin
- Timestamp:
- 06/25/03 21:52:31 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r1041 r1043 23 23 # 24 24 # $Log$ 25 # Revision 1.48 2003/06/25 19:52:30 jalet 26 # Should be ready for testing :-) 27 # 25 28 # Revision 1.47 2003/06/25 14:10:01 jalet 26 29 # Hey, it may work (edpykota --reset excepted) ! … … 479 482 if changed[entry.Name].get("balance") is None : 480 483 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) 482 487 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) 484 491 changed[entry.Name]["balance"] = balance 485 492 for groupname in groupnames :