|
|
@ -2,7 +2,7 @@ |
|
|
|
#include "currentCustomerAccountBalance.c" |
|
|
|
#include "updateCustomerAccountBalance.c" |
|
|
|
|
|
|
|
void notifyCustomer(amountToWithdraw, remainingAccountBalance) { |
|
|
|
void notifyCustomer(float amountToWithdraw, float remainingAccountBalance) { |
|
|
|
char returnToHomeInput; |
|
|
|
|
|
|
|
printf("You have successfully withdrawn %f €.\n", amountToWithdraw); |
|
|
@ -34,7 +34,7 @@ void withdraw(int user_id) { |
|
|
|
if (amountToWithdraw > 0) { |
|
|
|
if (amountToWithdraw <= availableAccountBalance) { |
|
|
|
remainingAccountBalance = initiateWithdraw(amountToWithdraw, availableAccountBalance); |
|
|
|
updateSuccess = updateAccountBalance(user_id, remainingAccountBalance); |
|
|
|
updateSuccess = updateAvailableAccountBalance(user_id, remainingAccountBalance); |
|
|
|
if( updateSuccess ) { |
|
|
|
notifyCustomer(amountToWithdraw, remainingAccountBalance); |
|
|
|
} |
|
|
|