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

Disable cash acceptance after passing a threshold #160

Closed patkan closed 2 years ago

patkan commented 4 years ago

Simple implementation:

patkan commented 4 years ago

@mgmax I think this should be the most simple implementation, even if it is a bit to strict. (Which I would prefer instead of passing over the threshold.)

mgmax commented 4 years ago

The current state can be read from CashStorageList(db).total(), where db=scriptHelper.getDB().

PayupCashDialog controls how much cash is accepted: self.centsToPay + self.allowedOverpay, where allowed overpay is 50€. Due to timing issues, there is possibly the option to pay even one piece of money (100€) more than that.

My suggestion would be to check the threshold in PayupCashDialogCode: Refuse payment if self.centsToPay + self.allowedOverpay + 100*100 + CashStorageList(db).total() >= maxTotal.

patkan commented 2 years ago

Feature is removed /close