|
|
|
@ -178,7 +178,8 @@ class Status:
|
|
|
|
|
if self.logged_in():
|
|
|
|
|
print('Eingeloggt als: %s%s%s' % (COLOR_SOME, self.login_name, COLOR_RESET))
|
|
|
|
|
print()
|
|
|
|
|
myDisplay.write('\x0cHallo %-14s' % (self.login_name[:13]+"!") )
|
|
|
|
|
myDisplay.cmd_clear()
|
|
|
|
|
myDisplay.write('Hallo %-14s' % (self.login_name[:13]+"!") )
|
|
|
|
|
if self.transfers:
|
|
|
|
|
initial_command, initial_balance = self.transfers[0]
|
|
|
|
|
|
|
|
|
@ -210,11 +211,15 @@ class Status:
|
|
|
|
|
mylabel="Pfand "+command.commodity_label()[:9]
|
|
|
|
|
if (mycmd==3):
|
|
|
|
|
mylabel=("%-13s" % (command.commodity_label()[:13]))+"+P"
|
|
|
|
|
myDisplay.write('\x0b%-15s %4.2f' % (asciify(mylabel)[:15],abs(command.difference())));
|
|
|
|
|
myDisplay.write('\x0b\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance));
|
|
|
|
|
myDisplay.cmd_home()
|
|
|
|
|
myDisplay.write('%-15s %4.2f' % (asciify(mylabel)[:15],abs(command.difference())));
|
|
|
|
|
myDisplay.cmd_home()
|
|
|
|
|
myDisplay.write('\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance));
|
|
|
|
|
else:
|
|
|
|
|
myDisplay.write('\x0b%-15s %4.2f' % (command.label()[:15],abs(command.difference())));
|
|
|
|
|
myDisplay.write('\x0b\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance));
|
|
|
|
|
myDisplay.cmd_home()
|
|
|
|
|
myDisplay.write('%-15s %4.2f' % (command.label()[:15],abs(command.difference())));
|
|
|
|
|
myDisplay.cmd_home()
|
|
|
|
|
myDisplay.write('\nSUMME: {%02i} %8.2f' % ((i-1),initial_balance - self.balance));
|
|
|
|
|
|
|
|
|
|
if len(self.transfers) > 1:
|
|
|
|
|
show_total(self.balance - initial_balance, plus='+')
|
|
|
|
@ -223,7 +228,8 @@ class Status:
|
|
|
|
|
|
|
|
|
|
if self.balance < 0:
|
|
|
|
|
warn_balance()
|
|
|
|
|
myDisplay.write('\x0b\nKonto: %5.2f!' % (self.balance) )
|
|
|
|
|
myDisplay.cmd_home()
|
|
|
|
|
myDisplay.write('\nKonto: %5.2f!' % (self.balance) )
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
print(COLOR_MUCH + 'Committen nicht vergessen.' + COLOR_RESET)
|
|
|
|
@ -364,11 +370,13 @@ class Status:
|
|
|
|
|
error_page(_PRODUCT_FIRST)
|
|
|
|
|
return
|
|
|
|
|
if prev.includes_deposit():
|
|
|
|
|
myDisplay.write('\x0cFEHLER: schon Pfand %20s' % prev.item_name()[:20])
|
|
|
|
|
myDisplay.cmd_clear()
|
|
|
|
|
myDisplay.write('FEHLER: schon Pfand %20s' % prev.item_name()[:20])
|
|
|
|
|
error_page('FEHLER: Pfand für Produkt "%s" bereits aktiviert' % prev.item_name())
|
|
|
|
|
return
|
|
|
|
|
if prev.deposit_value() <= 0:
|
|
|
|
|
myDisplay.write('\x0cFEHLER: Pfandfrei! %20s' % prev.item_name()[:20])
|
|
|
|
|
myDisplay.cmd_clear()
|
|
|
|
|
myDisplay.write('FEHLER: Pfandfrei! %20s' % prev.item_name()[:20])
|
|
|
|
|
error_page('FEHLER: Produkt "%s" hat kein Pfand' % prev.item_name())
|
|
|
|
|
return
|
|
|
|
|
before = prev.difference()
|
|
|
|
@ -492,7 +500,8 @@ def main():
|
|
|
|
|
print_prompt()
|
|
|
|
|
line = read_line(sys.stdin, timeout=3*60.0, timeout_func=status.logout)
|
|
|
|
|
if line:
|
|
|
|
|
myDisplay.write('\x0cRFID/Barcode:\n%20s' % line[:20])
|
|
|
|
|
myDisplay.cmd_clear()
|
|
|
|
|
myDisplay.write('RFID/Barcode:\n%20s' % line[:20])
|
|
|
|
|
handle(line, status)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|