jjeffrey Posted September 27 Share Posted September 27 In this banking script developed with PHP/Laravel want to make a modification. If withdrawals are initiated, Assuming a user has a balance of $500 and wants to withdraw $500, the charges will be deducted from the Balance. What I want is, the charges should be instead added to the balance and not subtracted. For example if a user has $500 and wants to withdraw $500 Assuming the charge is $50, making a total of $550. Since the Total is more than the balance, insufficient funds error message will be displayed. Bottom line is the charge should be added to the balance and not subtracted from the balance. Quote Link to comment https://forums.phpfreaks.com/topic/324404-help-with-phplaravel-banking-script/ Share on other sites More sharing options...
gizmola Posted September 27 Share Posted September 27 What you are asking for makes no sense. Guessing what you meant to say, is that the "charges" should be added to the withdrawal amount prior to the balance check, so that withdrawal will not be allowed. This seems like a very simple change to the logic of the withdrawal check. Since you provided no code, there is nothing more that anyone can do for you at this time. Quote Link to comment https://forums.phpfreaks.com/topic/324404-help-with-phplaravel-banking-script/#findComment-1636350 Share on other sites More sharing options...
requinix Posted September 27 Share Posted September 27 So fix the code to include the charge with the withdrawl amount when attempting to deduct from the balance? Remember that we have no idea what you're working with, let alone any clue about the sorts of code involved, so it's going to hard for us to say much unless you can provide quite a bit more information... Quote Link to comment https://forums.phpfreaks.com/topic/324404-help-with-phplaravel-banking-script/#findComment-1636351 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.