Commit 08d50d97 authored by Christian Dresen's avatar Christian Dresen
Browse files

Added Limit of 50 Euro

parent 796f1023
......@@ -357,6 +357,20 @@ public class MainManager {
public void chargeAmount(double amount) {
User currentUser = this.dataManager.getCurrentUser();
if(amount < 0) {
NotificationDialog ndTransfer = new NotificationDialog(MainManager.getInstance().getMainActivity());
ndTransfer.setWarning();
ndTransfer.setMessage("Error Charging your account");
ndTransfer.show(4000);
return;
}
if(currentUser.getCredit()+amount > 50) {
NotificationDialog ndTransfer = new NotificationDialog(MainManager.getInstance().getMainActivity());
ndTransfer.setWarning();
ndTransfer.setMessage("Maximal 50 Euro Guthaben erlaubt!");
ndTransfer.show(5000);
return;
}
RestTransaction t = new RestTransaction();
t.setAmount(amount);
t.setTrans_type(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment