Skip to content

Commit

Permalink
cut pre-release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-avinash committed Dec 10, 2024
1 parent c57a9c2 commit 1aeab6e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 39 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# dbt_quickbooks v0.17.1-a1

## Bug Fix
- Updated the logic in `int_quickbooks__retained_earnings` to ensure accounting periods with no revenue and expense class lines were accounted for.
- This will ensure the net income adjustment is available regardless of existing revenue or expenses.

# dbt_quickbooks v0.17.0
[PR #146](https://github.com/fivetran/dbt_quickbooks/pull/146) introduces the following updates:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Include the following QuickBooks package version in your `packages.yml` file.
```yaml
packages:
- package: fivetran/quickbooks
version: [">=0.17.0", "<0.18.0"] # we recommend using ranges to capture non-breaking changes automatically
version: 0.17.1-a1 # we recommend using ranges to capture non-breaking changes automatically
```
Do NOT include the `quickbooks_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well.
Expand Down
6 changes: 1 addition & 5 deletions docs/catalog.json

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions docs/manifest.json

Large diffs are not rendered by default.

33 changes: 5 additions & 28 deletions models/intermediate/int_quickbooks__retained_earnings.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,19 @@ with general_ledger_balances as (
from {{ ref('int_quickbooks__general_ledger_balances') }}
),

revenue_starter as (
net_income_loss as (

select
period_first_day,
source_relation,
sum(period_net_change) as revenue_net_change,
sum(period_net_converted_change) as revenue_net_converted_change
sum(case when account_class = 'Revenue' then period_net_change else 0 end) as revenue_net_change,
sum(case when account_class = 'Revenue' then period_net_converted_change else 0 end) as revenue_net_converted_change,
sum(case when account_class = 'Expense' then period_net_change else 0 end) as expense_net_change,
sum(case when account_class = 'Expense' then period_net_converted_change else 0 end) as expense_net_converted_change
from general_ledger_balances

where account_class = 'Revenue'

{{ dbt_utils.group_by(2) }}
),

expense_starter as (

select
period_first_day,
source_relation,
sum(period_net_change) as expense_net_change,
sum(period_net_converted_change) as expense_net_converted_change
from general_ledger_balances

where account_class = 'Expense'

{{ dbt_utils.group_by(2) }}
),

net_income_loss as (

select *
from revenue_starter

join expense_starter
using (period_first_day, source_relation)
),
retained_earnings_starter as (

select
Expand Down

0 comments on commit 1aeab6e

Please sign in to comment.