Browse Source

Create customer interface for deposit

remotes/origin/feature/transfer-money
fdlt3817 2 years ago
parent
commit
b0b991e856
  1. 4
      src/depositMoney.c

4
src/depositMoney.c

@ -26,11 +26,12 @@ bool depositMoney(int customerID){
float amountToDeposit = 0;
printf("\nPlease enter the amount you want to deposit: ");
scanf("%f", &amountToDeposit);
if(amountToDeposit>0 && amountToDeposit>MINIMUM_DEPOSIT_AMOUNT){
//InitiateDepositMoney(amountToDeposit,availableAccountBalance);
if(updateAvailableAccountBalance(customerID, amountToDeposit, true)==0){
if(updateAvailableAccountBalance(customerID, availableAccountBalance+amountToDeposit)==0){
printf("\nYou have successfully deposited %.2f. New account balance is %.2f", amountToDeposit, availableAccountBalance+amountToDeposit);
askToTryAgain(false);
return true;
@ -47,4 +48,5 @@ bool depositMoney(int customerID){
askToTryAgain(true);
return false; //invalid input
}
return false;
}
Loading…
Cancel
Save