|
|
@ -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; |
|
|
|
} |