Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Models and Relationships #46

Open
andrewdwallo opened this issue May 1, 2024 · 2 comments
Open

Refactor Models and Relationships #46

andrewdwallo opened this issue May 1, 2024 · 2 comments
Assignees
Labels

Comments

@andrewdwallo
Copy link
Owner

andrewdwallo commented May 1, 2024

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.

@andrewdwallo andrewdwallo self-assigned this May 1, 2024
@willwhitelaw94
Copy link

Accountant here who is building some fintech products. I can give you some advice on the db structure. Will send you email to arrange a call. Great project btw.

@andrewdwallo
Copy link
Owner Author

@willwhitelaw94 Okay cool. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants