PDA

View Full Version : billing and/or aging


desertdirk
12-11-2005, 02:10 AM
I am working on a database website using PHP and MySql for a self storage rental business. I am looking for tutorials or instructions on how to set up the tables for recording monthly payments.

I would like to show a summary of payments by tenant, which I can already do, but not sure about if a monthly payment is missed etc.

If anybody could point me in the right direction I would appreciate it
Thanks
DD

Creative Insanity
12-11-2005, 05:58 AM
Umm.. how are you going to track what has been paid?
How does the database know if something has or has not been paid?
Is there a client portal or is that added by a accounts person or what?

More info on how things work.

desertdirk
12-11-2005, 03:13 PM
Hi Creative
sorry for not being more forthcoming.
There is a PHP web based front end with input forms for the owner to enter monthly payments. He can add edit and delete tenants, record payments, and when a tenant leaves, receive last month rent based on a deposit recorded at the beginning of the contract. I have these tables:

Tenants

Tid (PK)
fname
lname
address
deposit_amount

Units

Uid (PK)
Tid
unit_number
size
rate

Payments

Pid (PK)
Uid
Tid
payment_date
amount
payment_month

In the payments table the payment_date is the date the payment is entered. The payment_month is the month the payment is for.

I wasn't sure if I should set up a field for each month or not. Seemed like this could be taken care of programatically?

So I guess I am asking how to show that there is no amount due if a payment is entered and makes the tenant current, or how to show that if a payment is entered the tenant is still behind by a month and still owes money.

I am sure this is standard coding, but I haven't been able to find examples.

The owner also wants to see a summary of payments both by tenant and a seprate summary of payments by unit.

DD

Creative Insanity
12-11-2005, 05:23 PM
Let me work on this one as just got up and the head is still a little cloudy. I'll get back here soon.

desertdirk
12-11-2005, 06:04 PM
ok
thanks

Creative Insanity
12-11-2005, 07:24 PM
First I gotta get this server working. Why I change to windows I will never know LOL

desertdirk
12-11-2005, 08:49 PM
Sorry to hear it. I am using WinXP Pro with PHP and MySql with no problems so far. I use this for my testing server before I send my website up to my web host which is actually a unix machine. That does present problems at times
DD

Creative Insanity
12-11-2005, 08:57 PM
Will look in a sec as I have gone back to Linux. Forget windows as that is not what most of the net world use.