now displays deposit corectly

This commit is contained in:
Florian Streibelt 2011-10-13 23:58:47 +02:00
parent f880ec04ea
commit f0fa719d9f
1 changed files with 12 additions and 1 deletions

View File

@ -161,7 +161,18 @@ class Status:
show_bar() show_bar()
if isinstance(command, BuyCommand): if isinstance(command, BuyCommand):
print_display('\x0b%-15s %4.2f' % (command.commodity_label()[:15],abs(command.difference()))); muff = 0;
if (command.includes_commodity()):
muff+=1;
if (command.includes_deposit()):
muff+=2;
if (muff==1):
mylabel=command.item_name()
if (muff==2):
mylabel="Pfand "+command.commodity_label()[:9]
if (muff==3):
mylabel=("%-13s" % (command.commodity_label()[:13]))+"+P"
print_display('\x0b%-15s %4.2f' % (mylabel[:15],abs(command.difference())));
print_display('\x0b\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance)); print_display('\x0b\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance));
else: else:
print_display('\x0b%-15s %4.2f' % (command.label()[:15],abs(command.difference()))); print_display('\x0b%-15s %4.2f' % (command.label()[:15],abs(command.difference())));