A Few Little Problems
Karen and her husband started using the new checking web site. The were happy to be able to put checks into the system and see the balance immediately. At the end of the month when they got the statement from the bank they had a few problems.
- There was a $10 bank fee and there was no way to enter that.
- A check for $398.45 had been recorded as $345.98 and there was no way to correct that error.
- They had to cancel payment on a check when the purchase arrived broken. There was no way to mark that check void or delete it.
- They would like to indicate which checks have cleared the bank and which ones are still outstanding so that they can check their balance against the statement balance.
- They would like to print out a day-by-day listing of their transactions for all transactions between two dates. This would make it easy to compare their balance with the statement balance.
Bank Fee
This one is easy to solve. We added the following code to the form:
<label>
<input name="Transaction" type="radio" id="Transaction_1" value="fee" <?php if($Transaction=="fee") echo ' checked="checked"'; ?> />
Bank Fee</label> <br />
However, we looked at all of the error checking to make sure there was nothing that would cause a problem. In particular, we looked at this statement to make sure it wasn't a problem:
if($Transaction!='deposit') $Amount=-1*$Amount; //make anything other than deposits negative
This is OK: a bank fee is a deduction from the account.
INDEX,
Problem Statement,
Useful function for forms with dates,
The Form for new Transactions,
A Few Little Problems,
Which Checks have Cleared: ALTER TABLE,
Optional Arguments,
Creating a table,
Download the Checking ProjectNext lesson:
FilesMAIN INDEX
EXAMPLES INDEX