|
|
@ -9,7 +9,7 @@ bool sendMoney(int customerID){ |
|
|
|
printf("\nYou have %.2f€ in your account. How much would you like to send?\n",availableAccountBalance); |
|
|
|
scanf("%f",&amountToSend); |
|
|
|
if(amountToSend>0 && amountToSend<availableAccountBalance){ |
|
|
|
printf("\nYour input was %.2f€. Please enter the recipient id.\n"); |
|
|
|
printf("\nYour input was %.2f€. Please enter the recipient id.\n",amountToSend); |
|
|
|
scanf("%d",&recID); |
|
|
|
if(recID>1000){ |
|
|
|
bool recExists=checkCustomerExists(recID); |
|
|
@ -19,6 +19,8 @@ bool sendMoney(int customerID){ |
|
|
|
printf("\nYou have successfuly transfered %.2f€ to [%d]",amountToSend,recID); |
|
|
|
return true; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
printf("\nSomething went wrong with the transfer. Please contact staff."); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(withdrawSpecificAmount(customerID, amountToSend)){ |
|
|
@ -27,6 +29,11 @@ bool sendMoney(int customerID){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
printf("\nThe ID you have entered is not valid. Aborting. \n"); |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
//error |
|
|
|
return false; |
|
|
|