I am very new to filemaker and have been having some trouble coming up with a good way to keep track of money owed and paid by clients in out database. I hope I have this in the right spot as it deals mostly with calculation and summary fields.
Here is some background on the database. I have three tables (Customers, Jobs, and Accounts Receivable). Customers has a one to many relationship with jobs and jobs has a one to many relationship with accounts receivable
These are the fields I have for Accounts Receivable.
CustomerID
JobID
JobPrice
PaymentStatus
PaymentDate1
PaymentDate2
PaymentType1
PaymentType2
CheckNumber1
CheckNumber2
PaymentAmount1
PaymentAmount2
cBalance = (Balance for the particular job calculated by JobPrice-PaymentAmount1-PaymentAmount2)
BalanceSummary = (Summary Field that should give the outstanding balance for all unpaid dumpster rentals for a particular customer and dispalyed on customer layout.)
cPrepayAdd = (Calculation field that tells the database to either add funds to a prepay balance if the job type is prepay balance or remove funds from the prepay balance if the job is a dumpster rental and the payment method is by prepay purchase.
PrepayBalance = (Summary field that should show the amount of prepaid funds that are left for a particular customer.
We have a setup where clients can order a dumpster rental and they can pay by cash, check, invoice, credit card, or prepay balance. There is also the option to add funds to a prepay balance by buying a prepay purchase job.
This is an example of what I need to have happen and cannot figure out how to do. I am a beginner with this so details would be helpful.
1. Lets say I have customer A and they want to add funds to a prepay purchase job. They currently have no outstanding balance. They want to add $1000 to prepay purchase, but have not yet paid for it.
2. At this point the cBalance field would need to show $1000 owed for that particular job.
The Balance Summary should also show $1000 owed total for that customer.
PrepayBalance field should show $0 currently.
3. When the prepay purchase is paid it should subtract that amount from cBalance and from the Balance summary
4. It they pay the full $1000 it should show $0 for cBalance for the job and $0 for the Balance Summary for that customer.
5.Because this is now a paid for prepay purchase job the $1000 should go into the PrepayBalance field for that customer.
6. Now that same customer wants to order a dumpster that costs $100. When marked as unpaid it should show $100 dollars in the cBalance for that job and BalanceSummary field for that customer.
7. When they pay for the dumpster and want to pay by prepay purchase $100 should be subtracted from the cBalance and BalanceSummary fields and subtracted from the PrepayBalance field as well (leaving $900) in the Prepay Balance for that customer.
8. It should do this for each prepay purchase job until there are no funds left. If there are no funds or insufficient funds left in the PrepayBalance summary field for a job being entered and paid for by prepay purchase it should not allow the user to enter in the job payment as a prepay purchase and give a statement that says "Insufficient funds available in Prepay Balance for Customer A, Customer A has "amount left in prepay balance" left in prepay balance.
I am having the most trouble with getting it to give me a message when the PrepayBalance summary does not have enough funds to support an entered prepay purchase job.
Currently it will let me enter the job and will just give me a negative PrepayBalance for the customer. So if I have $1000 prepay balance and enter a job that is $2000 and mark it as paid by prepay purchase the cbalance for the job goes to $0, the BalanceSummary for the customer goes to $0 and PrepayBalance goes to -$1000.
I really want it to not allow the full $2000 to be entered as a prepay purchase if there is only $1000 left in the PrepayBalance summary field.
I apologize for the long post, but hope this provides enough information to explain my situation. Thanks in advance for any help on this.