itflow-org / itflow

Free and open-source web application for MSPs. Unifies IT documentation, ticketing, invoicing.
https://itflow.org
GNU General Public License v3.0
569 stars 147 forks source link

Update Payments to only show Asset Accounts #777

Closed o-psi closed 1 year ago

o-psi commented 1 year ago

Update any payment account screen to only show accounts in type group 'assets'.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

wrongecho commented 1 year ago

Test these changes at: https://paymentstoassetsaccountsonly777.pr-review.itflow.org
(automatic message)

johnnyq commented 1 year ago

Hey @o-psi Before we get too deep into account types and building reports around them and such. I haven't had a proper amount of time to review code in depth lately. But for the Account types I was thinking instead of using ranges for Parent account types for: Assets - 10-19 Liabilities 20-29 Equity 30-39

Create a separate field called account_type_parent_id 1 being assets 2 being liabilities, 3 being equity

Then we can easily query the accounts based on the parent type.

The Primary key id field is meant to be dynamic in SQL and never meant to be static.

Please let me know your thoughts.

o-psi commented 1 year ago

Thats fine by me

johnnyq commented 1 year ago

excellent that sounds good, I will take action to update the code Accordingly.

johnnyq commented 1 year ago

First Code Commit was pushed out See https://github.com/itflow-org/itflow/commit/fcc49c2b40ec1e1b5a39eb5bf2fd32369a225dd7

Ill update the rest to follow the new account_type_parent Structure

johnnyq commented 1 year ago

I updated the code base to take advantage of the new account_type_parent field, please let me know if you spot anything that may need changed elsewhere because of this change

o-psi commented 1 year ago

Will do!! Nicely done man.