Skip to content

Refactor Models and Relationships #46

@andrewdwallo

Description

@andrewdwallo

Transaction Model

Remove both bank_account_id and account_id. For the Transaction action forms, we would need to find a way to create 2 journal entries even though there would be no attributes on the Transaction model that could signify which one would be for a Bank Account vs Chart Account (nominal account). Repeaters wouldn't work well for the Transaction form either way, and their is no native Filament feature for this. We would possibly need to have 2 placeholder attributes in the Transaction action forms - 1 for bank account, 1 for nominal account, and then possibly in handleRecordCreation(), create 2 journal entries based on those placeholder attribute values.

Account Model

Potentially remove the polymorphic relationship with the Bank Account. It may not be needed and is unnecessary. Alternatively, consider using just a bool flag such as is_bank_account and transfer all current BankAccount model attributes to the Account model and make them nullable. This would make querying much easier and it could lower processing time.

This may require much refactoring. I probably may release the current release-candidate branch considering users have been waiting a while for a new release, and then for the next release start working on this.

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions