Skip to content

Commit

Permalink
FAUCardPayment: re-enable receipt printing
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmax committed Apr 14, 2017
1 parent 81ee3e8 commit e786bcb
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions FabLabKasse/shopping/payment_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,9 @@ def is_enabled(cfg):
return cfg.getboolean('payup_methods', 'FAUcard')

def _show_dialog(self):
isNoReceiptOk = QtGui.QMessageBox.question(self.parent, u"FAUCardPayment", u"Benötigst du eine Quittung?", QtGui.QMessageBox.Yes, QtGui.QMessageBox.No);
if isNoReceiptOk == QtGui.QMessageBox.Yes:
QtGui.QMessageBox.information(self.parent, u"FAUCardPayment", u"Leider ist eine Quittung bei Zahlung mit der FAU-Karte nicht möglich. Bitte weichen Sie auf Bargeldzahlung aus.");
self.successful = False;
self.amount_paid = Decimal(0);
self.amount_returned = Decimal(0);
self.print_receipt = False;
return;

pay_func = PayupFAUCard(parent=self.parent, amount=self.amount_to_pay)

print_receipt = QtGui.QMessageBox.question(self.parent, u"FAUCardPayment", u"Benötigst du eine Quittung?", QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
self.print_receipt = print_receipt == QtGui.QMessageBox.Yes;
self.successful = pay_func.executePayment()
self.amount_paid= pay_func.getPaidAmount()
self.print_receipt = False;
Expand Down

0 comments on commit e786bcb

Please sign in to comment.