The get_customer_balance function returns
the current amount owing on a specified customer's account.
p_customer_id: The ID of the customer
to check, from the customer_id column
of the customer table.
p_effective_date: The cutoff date for
items that will be applied to the balance. Any rentals,
payments, and so forth after this date are not counted.
This function returns the amount owing on the customer's account.
mysql> SELECT get_customer_balance(298,NOW());
+---------------------------------+
| get_customer_balance(298,NOW()) |
+---------------------------------+
| 22.00 |
+---------------------------------+
1 row in set (0.00 sec)
