diff --git a/CHANGELOG.md b/CHANGELOG.md index 63fc8149..5ea8318a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,13 @@ - Corrects the misspelled `customer_vendor_webiste` field to `customer_vendor_website` in `quickbooks__ap_ar_enhanced`. ## Bug Fixes -- Updates the [quickbooks__profit_and_loss](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__profit_and_loss.sql) and [quickbooks__balance_sheet](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__balance_sheet.sql) models to include both `period_first_day` and `period_last_day`. This allows users to have greater flexibility in choosing which date to aggregate records upon. - Updates the logic for the `amount` field in [int_quickbooks__invoice_double_entry](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__invoice_double_entry.sql) to use `invoice.total_amount` only on the condition when a bundle is associated with the invoice and `invoice.total_amount` is 0, otherwise `invoice_lines.amount` is used. - This avoids double counting when aggregating invoice_line items and accounts for the edge cases where a bundle_id is involved. +## Feature Updates +- Updates the [quickbooks__profit_and_loss](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__profit_and_loss.sql) and [quickbooks__balance_sheet](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__balance_sheet.sql) models to include both `period_first_day` and `period_last_day` in addition to `calendar_date`. This allows users to have greater flexibility in choosing which date to aggregate records upon. + - Please note `calendar_date` is slotted to be deprecated, and the fields `period_first_day` and `period_last_day` are both offered as replacements, depending on how your company performs their financial reporting. + # dbt_quickbooks v0.12.4 [PR #123](https://github.com/fivetran/dbt_quickbooks/pull/123) includes the following updates: diff --git a/models/docs.md b/models/docs.md index 7d166a53..731618e9 100644 --- a/models/docs.md +++ b/models/docs.md @@ -52,7 +52,7 @@ The type of account associated {% enddocs %} {% docs calendar_date %} -Timestamp of the first calendar date of the month. +Timestamp of the first calendar date of the month. This is slated to be deprecated, and the fields `period_first_day` and `period_last_day` are both offered as replacements, depending on how your company performs their financial reporting. {% enddocs calendar_date %} {% docs is_sub_account %} diff --git a/models/quickbooks__balance_sheet.sql b/models/quickbooks__balance_sheet.sql index 47d4d166..a1705b0a 100644 --- a/models/quickbooks__balance_sheet.sql +++ b/models/quickbooks__balance_sheet.sql @@ -7,7 +7,7 @@ with general_ledger_by_period as ( final as ( select - period_first_day as calendar_date, + period_first_day as calendar_date, -- Slated to be deprecated; we recommend using `period_first_day` or `period_last_day` period_first_day, period_last_day, source_relation, diff --git a/models/quickbooks__profit_and_loss.sql b/models/quickbooks__profit_and_loss.sql index 16753ff5..608c8669 100644 --- a/models/quickbooks__profit_and_loss.sql +++ b/models/quickbooks__profit_and_loss.sql @@ -7,9 +7,7 @@ with general_ledger_by_period as ( final as ( select - period_first_day as calendar_date, - period_first_day, - period_last_day, + period_first_day as calendar_date, -- Slated to be deprecated; we recommend using `period_first_day` or `period_last_day` source_relation, account_class, class_id,