Question

I have a problem on accouting, I need to control the cash flow. Actually my schemma is somehing like this:

**invoice_payable** control all my payable invoices
**invoices_receivale** control all my receivale invoices

Also I have other to entities to receive only the payment. They Are :

**invpay_paid** and **invrec_paid**

It receive only the payment coming from the first two tables.

Now I need to generate the daily balance, it is no problem, cause it is done already, but on the fly. I need to save the daily balance in a new table that I have called balance_history .

Now I will try to give more details about my tables.

My invpay_paid looks like this

id | invoiceid | amount_recvs | recv_data | cashier | company

the balance_history looks like this

id | balance | balance_date | cashier | company 

The invrec_paid is a little different. but folow the same logic.

The problem is, I need to down the bill by company and cashier, I really need to do like this 'cause is more then one company and cashier that have registered payment everyday.

I'm really confused about this. How to control all the payment in the same place but for different companies and cashier (banks).

Here follow my data model: http://deepcell.org/app/AccountingDataModel.png sample.

Thanks for everyone, I have edited this topic, I hope to be clearer now.

Was it helpful?

Solution

I'm just answering my own question to give this topic as closed.

The question was solved using the follow data model.

Here follow my data: Model Sample.

Also I have an script workng to me every night (cronjob) generating my daily balance.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top