ekmungai / eloquent-ifrs

Eloquent Double Entry Accounting with a focus on IFRS Compliant Reporting
MIT License
334 stars 68 forks source link

Assigning transactions to cost centers #106

Closed kchizi closed 2 years ago

kchizi commented 2 years ago

How can a transaction be assigned to a cost center? For example, an invoice to a branch or expense to a department or staff? Later the financial statements can be filtered using this center

ekmungai commented 2 years ago

You can use the categories mechanism for that, but only accounts are allowed to have categories so you must ensure to post transactions to those accounts.

Cheers

kchizi commented 2 years ago

Thank you, this approach has not worked because the accounts belonging to a category must be of the same type as the category. Trying to figure out how to use the reference field for this case. Would appreciate your guidance.

ekmungai commented 2 years ago

Hey @kchizi,

My apologies for the long absence. What I could suggest is setting up a seperate model, say CostCenter then extending the Transaction model to have a reference to it. That way you can be filtering transactions using a simple join.

Cheers