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

[Bug] Cash Flow statement is not flipping signs appropriately. #133

Open
1 of 4 tasks
brandonrf94 opened this issue Jul 5, 2024 · 6 comments
Open
1 of 4 tasks

[Bug] Cash Flow statement is not flipping signs appropriately. #133

brandonrf94 opened this issue Jul 5, 2024 · 6 comments
Labels
error:unforced status:accepted Scoped and accepted into queue type:bug Something is broken or incorrect

Comments

@brandonrf94
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

The cash flow statement is looking at the account balances from the balance sheet and not flipping the signs on the appropriate accounts.

For example, an increase in Accounts Receivable month over month would be a negative impact to the Cash Flow statement, however it shows up as a positive impact.

Other accounts such as Accrued Revenue, Prepaid Expenses etc. would also need to be flipped accordingly.

image

Relevant error log or model output

n.a

Expected behavior

Cash Flow statement accounts should have the proper signs to help accurately calculate cash flows.

dbt Project configurations

std.

Package versions

std.

What database are you using dbt with?

snowflake

dbt Version

std.

Additional Context

No response

Are you willing to open a PR to help address this issue?

  • Yes.
  • Yes, but I will need assistance and will schedule time during our office hours for guidance
  • No.
@brandonrf94 brandonrf94 added the type:bug Something is broken or incorrect label Jul 5, 2024
@fivetran-joemarkiewicz
Copy link
Contributor

@brandonrf94 thanks for raising this issue with our team.

Upon taking a look I can confirm that we are not in fact flipping these amounts in the cash flow statement when pulling from the balance sheet.

Additionally, the example of Accounts Receivable needing to show a negative balance when it increases makes sense to me. I will continue to do some research to understand we have full coverage over which accounts need to be flipped. From your perspective do you know of any other accounts other than the ones listed below need to be flipped?

  • Accounts Receivable
  • Accrued Revenue
  • Prepaid Expenses

Once we have identified all the accounts that need to be flipped for the Cash Flow statement, we can likely apply a case when statement here to achieve the desired end result.

@brandonrf94
Copy link
Author

Based on my research (comparing with a customer's Quickbooks cash flow statement)... I had to flip the sign on any account with "account_class = Asset" for Operating & Investing activities.

@fivetran-joemarkiewicz
Copy link
Contributor

Thanks for the quick response here! From a high level viewpoint that logic seems valid to me. I'm going to run this by our internal finance team to confirm there are no other accounts to take into consideration. Once I have confirmation on all accounts that need to be flipped I believe this will be ready to be included in our upcoming sprint.

@fivetran-joemarkiewicz
Copy link
Contributor

Hi @brandonrf94, just posting an update here that I have shared this with our internal finance team and it seems like it depends based on how the B/S is setup that will determine wether you should flip the Assets or the Liabilities/Equity. In the case of this dbt package, switching the sign for Assets should do the trick to generate an accurate report. Additionally, this makes sense given the example you shared earlier.

We will explore adding this sign flip and do some further testing to ensure the accuracy of the logic. We may have more questions for you as we work to integrate this change to ensure we are providing an accurate SoCF report. Thanks again!

@fivetran-joemarkiewicz
Copy link
Contributor

@brandonrf94 after some more exploration and research we will be moving forward with the following logic update to the Statement of Cash Flows with respect to flipping the signs:

If the account_class is "Asset" and the account is not a Cash account then we will flip the signs in the Statement of Cash Flows.

@fivetran-joemarkiewicz
Copy link
Contributor

The last piece of this puzzle is to understand what identifies a "Cash" account. However, I believe this is ready to be accepted. We will add this to the backlog to be integrated in an upcoming release to the QuickBooks dbt package.

Please note, this will not be included in the next release (likely to be on or before this coming Wednesday), but will be included in the following major update.

@fivetran-joemarkiewicz fivetran-joemarkiewicz added status:accepted Scoped and accepted into queue and removed status:scoping Currently being scoped labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error:unforced status:accepted Scoped and accepted into queue type:bug Something is broken or incorrect
Projects
None yet
Development

No branches or pull requests

2 participants