-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Bug] "DescriptionOnly" detail_type causes incorrect profit_and_loss #113
Comments
Hi @CPAanalytics thanks for opening this issue. Do you know why excluding My concern is if I do not exclude these entries for other customers, then we may get inflated P&L's due to the description only invoice entries being erroneously counted. What are your thoughts? |
The root cause is actually multiple accounts with the account type "Accounts Receivable" when int_quickbooks__invoice_double_entry.sql runs it does a join on ar_accounts. If there are multiple accounts with the type Accounts Receivable it results in duplicate entries. The "DescriptionOnly" lines compounded the issue by somehow scrambling the join to retrieve the correct account identifiers. To recap eliminating DescriptionOnly in the filter corrected the P&L but the Balance Sheet will not work due to the duplicate AR type accounts. Not sure of the work around for this as those accounts are inactive and "deleted." |
Hey @CPAanalytics , just to make sure I'm understanding the issue-- the incorrect P&L is caused by a fanout resulting in duplicates, because of a join on ar_accounts. Which is problematic because multiple accounts can have type Accounts Receivable? Could you clarify what you meant by the following?
If it's relevant, I'm curious if you've looked at the account type variable configuration here in line 139 (make sure to expand the drop down) |
Hi @CPAanalytics , just checking up! |
Even after consolidating AR Accounts into one the DescriptionOnly lines cause issue. My suggestion would be to exclude these in the main branch as I've done above. |
Thanks @CPAanalytics for the suggestion! You bring up a good point. And thanks for chiming into #115 as well. We'll look to updating this package to address these two issues in an upcoming sprint. |
Is there an existing issue for this?
Describe the issue
'DescriptionOnly' DETAIL_TYPE on STG_QUICKBOOKS_INVOICE_LINE causes P&L to report incorrect values.
Relevant error log or model output
Expected behavior
The profit and loss should match quickbooks reporting.
dbt Project configurations
Package versions
Forked copy of most recent version
What database are you using dbt with?
snowflake
dbt Version
1.7.4
Additional Context
invoice_filter as (
)
Updating int_quickbooks__invoice_double_entry.sql to exclude descriptiononly lines seems to solve the issue.
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: