Browse Source

now displays deposit corectly

Florian Streibelt 9 years ago
parent
commit
f0fa719d9f
1 changed files with 12 additions and 1 deletions
  1. 12
    1
      client-barcode/freitagskasse.py

+ 12
- 1
client-barcode/freitagskasse.py View File

@@ -161,7 +161,18 @@ class Status:
161 161
 				show_bar()
162 162
 
163 163
 				if isinstance(command, BuyCommand):
164
-					print_display('\x0b%-15s %4.2f' % (command.commodity_label()[:15],abs(command.difference())));
164
+					muff = 0;
165
+					if (command.includes_commodity()):
166
+						muff+=1;
167
+					if (command.includes_deposit()):
168
+						muff+=2;
169
+					if (muff==1):	
170
+						mylabel=command.item_name()
171
+					if (muff==2):	
172
+						mylabel="Pfand "+command.commodity_label()[:9]
173
+					if (muff==3):	
174
+						mylabel=("%-13s" % (command.commodity_label()[:13]))+"+P"
175
+					print_display('\x0b%-15s %4.2f' % (mylabel[:15],abs(command.difference())));
165 176
 					print_display('\x0b\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance));
166 177
 				else:
167 178
 					print_display('\x0b%-15s %4.2f' % (command.label()[:15],abs(command.difference())));

Loading…
Cancel
Save