Closed patkan closed 2 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.)
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
.
Feature is removed /close
Simple implementation: