fau-fablab / FabLabKasse

FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops
https://fablabkasse.readthedocs.io
GNU General Public License v3.0
15 stars 4 forks source link

(VM) can't pay with cash? #172

Closed phdoerfler closed 1 year ago

phdoerfler commented 1 year ago

I tried paying with cash in the VM, the GUI showed its error dialog. Here's the relevant excerpt from the terminal:

on_order_clicked 0
updateOrder
updateOrder
starting payment for cart: [<ProductBasedOrderLine(id=0, qty=Decimal('2'), unit='Stück', name='Raspberry Pi 3 Modell B', price_per_unit=Decimal('37.5'), price_subtotal=Decimal('75.0'))>]
started payment of 75,00 € with <class 'FabLabKasse.shopping.payment_methods.ClientPayment'>
payment ended. result: <ClientPayment(amount_to_pay=Decimal('75.00'), amount_paid=0, amount_returned=0, successful=False, ...)>
starting payment for cart: [<ProductBasedOrderLine(id=0, qty=Decimal('2'), unit='Stück', name='Raspberry Pi 3 Modell B', price_per_unit=Decimal('37.5'), price_subtotal=Decimal('75.0'))>]
started payment of 75,00 € with <class 'FabLabKasse.shopping.payment_methods.ManualCashPayment'>
stored payment in Rechnung#2
payment ended. result: <ManualCashPayment(amount_to_pay=Decimal('75.00'), amount_paid=Decimal('75'), amount_returned=Decimal('0'), successful=True, ...)>
Entschuldigung, das Programm wird wegen eines Fehlers beendet.
Full exception details (stack limit 50):
Traceback (most recent call last):
  File "/usr/lib/python3.10/configparser.py", line 790, in get
    value = d[option]
  File "/usr/lib/python3.10/collections/__init__.py", line 986, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/lib/python3.10/collections/__init__.py", line 978, in __missing__
    raise KeyError(key)
KeyError: 'profile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/vagrant/FabLabKasse/gui.py", line 587, in payup
    self.shoppingBackend.print_receipt(paymentmethod.receipt_order_id)
  File "/vagrant/FabLabKasse/shopping/backend/legacy_offline_kassenbuch.py", line 314, in print_receipt
    order.rechnung_for_receipt.print_receipt(cfg=scriptHelper.getConfig())
  File "/vagrant/FabLabKasse/kassenbuch.py", line 301, in print_receipt
    profile=cfg.get("receipt", "profile"),
  File "/usr/lib/python3.10/configparser.py", line 793, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'profile' in section: 'receipt'

Branch: development, 04ba92886a990ec7bc6cfac942cafe92c98edcf2

phdoerfler commented 1 year ago

caused by a new option in config.ini