Commit graph

58 commits

Author SHA1 Message Date
Joaquin
8235bb5228 Restored schema 2025-04-30 16:54:06 +02:00
Joaquin
8372f4680f restored files 2025-04-30 16:51:25 +02:00
Joaquin
ce63d90a3f Updated exposure 2025-04-30 16:23:03 +02:00
Joaquin
16bf7f1d6c Host Resolution model for report 2025-04-29 11:43:38 +02:00
Joaquin
ab6ea150a8 Excluded host resolutions payments 2025-04-25 12:15:17 +02:00
Joaquin
423457126f refactor xero__net_fees_by_deal 2025-04-25 11:55:14 +02:00
Oriol Roqué Paniagua
5928a198b6 Merged PR 4734: Bugfix - Ensures accounts cannot be duplicated in Xero sales monthly trends
# Description

This fixes the duplication error when the same deal has more than one contact. Impact was not massive, it just affected because of the Home to Host account and this has happened during the past week. There were other cases that contained duplicates but these were not invoiced so it didn't affect the total sum.

Changes:
* Contacts now has a boolean field indicating if a deal exists.
* Contacts now has a boolean field indicating if that contact has a deal informed and it's the last updated one. This is opinionated - it could have been done with creation, for instance.
* Sales monthly trends forces the last updated contact to be true.
* Improved robustness by adding tests.

Note that modifying the logic in intermediate on `int_xero__sales_monthly_trends` by changing `id_deal` per `id_contact` would not have worked - we need to do this compute by deal to ensure that any invoicing is reported MoM and YTD.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #28576
2025-03-19 08:19:20 +00:00
Oriol Roqué Paniagua
3f1e2ea1d9 Merged PR 4572: Applies logic to modify the invoicing cycle date depending on the issuing source
# Description

Hyperline invoices/credit notes have an issuing date that corresponds to the moment in which these are actually created.

This is an issue since it means that an invoice or credit note posted today, 4th March 2025, that is supposed to be related to February 2025 invoicing cycle, will have:

* If the document is posted in Hyperline, an issuing date on the March 2025
* If the document is NOT posted in Hyperline, an issuing date on February 2025

This PR just creates a field that handles the logic effectively, to be used further in other reports/kpis purposes.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #28158
2025-03-04 11:32:52 +00:00
Oriol Roqué Paniagua
dcf0f205a2 Merged PR 4568: Adds flag to identify invoices/credit notes that are posted in Hyperline
# Description

Adds flag to identify invoices/credit notes that are posted in Hyperline.
For Invoices, these need to be ACCREC and follow a convention of 20XX-Y
For Credit Notes, these need to be ACCRECCREDIT and follow a convention of CN-20XX-Y

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #28146
2025-03-04 10:12:03 +00:00
Oriol Roqué Paniagua
353972984e Merged PR 4236: Propagate contact name for reporting purposes only
# Description

Propagates contact name and id_deal + contact name combination for PBI in xero - sales monthly trends

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Propagate contact name for reporting purposes only

Related work items: #26618
2025-01-31 09:53:54 +00:00
Oriol Roqué Paniagua
68952223ca Merged PR 4228: First version of sales - monthly trends
# Description

New model that aggregates in a monthly basis the information from Xero sales. The aggregation is done by several categories, most of them to be included as filters in PBI. Metrics represent the amount without taxes in: 1) the current month, 2) the previous month, 3) twelve months ago, 4) current year YTD (fiscal year) and 5) previous year YTD (fiscal year).

It also propagates the model to reporting

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models. **I was hesitating between table or view. Table should speed up tests, but I intend to create a reporting table with a similar structure so probably a bit of waste of space. Anyway, not a big deal now**

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26618
2025-01-31 08:33:15 +00:00
Oriol Roqué Paniagua
a208541e04 Merged PR 4224: Rework accounting aggregations for Financial Reporting
# Description

This PR reworks the Financial Aggregations based on Nathan's requirements, that can be found in an Excel attached to the board ticket.

Main changes:
- Accounting seed now contains 3 financial aggregations as requested by Finance
- These 3 aggregations are propagated up to reporting. This effectively breaks a WIP report - but it's WIP, not in prod, so it's not a big deal

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [X] Check if a full-refresh is required after this PR is merged. **Need to create the seed manually**

Related work items: #26618
2025-01-30 10:28:49 +00:00
Oriol Roqué Paniagua
437460065e Merged PR 4138: Adds Account Code Name in reporting
# Description

Adds account code name in reporting for sales denom mart in xero

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26618
2025-01-21 16:37:16 +00:00
Oriol Roqué Paniagua
ddc806583c Merged PR 4130: Propagate aggregations to xero sales reporting
# Description

Propagates the xero aggregations to the reporting model of xero__sales_denom_mart

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26618
2025-01-21 13:22:36 +00:00
Oriol Roqué Paniagua
6aafd605b2 Merged PR 4077: Propagate account code and account name for Xero - reporting models
# Description

Propagate account code and account name for Xero reporting models, specifically:
* xero__credit_note_line_items
* xero__invoice_line_items
* xero__sales_denom_mart

These are already available in intermediate models. This is independent from KPIs, but I feel like we should propagate this to reporting since are useful fields for accounting purposes. Happy to discuss if this needs to be reflected in PBI.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #26531
2025-01-16 10:04:41 +00:00
Pablo Martin
c3c628aec4 change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
uri
5620ecbe68 Remove .sql in the xero__bank_transaction_denom_mart 2024-09-18 13:52:55 +02:00
Pablo Martin
df16cdb00c reporting schema 2024-09-12 15:39:49 +02:00
Pablo Martin
1d63e187c2 model and docs 2024-07-09 15:31:47 +02:00
Pablo Martin
42811b6c7e propagate field in reporting layer 2024-07-08 16:48:39 +02:00
Pablo Martin
dd5882a564 propagate transaction sign 2024-07-01 11:44:55 +02:00
Pablo Martin
0e9c608894 more docs 2024-07-01 11:39:40 +02:00
Pablo Martin
f0f6382bbd update docs 2024-07-01 11:34:26 +02:00
Pablo Martin
69ad42af63 model and schema 2024-06-26 15:35:44 +02:00
Pablo Martin
b3263e82b1 docs typos 2024-06-26 13:40:07 +02:00
Pablo Martin
e8f9432507 add docs and tablesfor table 2024-06-26 11:43:29 +02:00
Pablo Martin
a22d85340d reporting model 2024-06-26 11:24:34 +02:00
Pablo Martin
5182a804b2 fix typos 2024-06-25 17:09:02 +02:00
Pablo Martin
be24725b7d remove a couple of wrong tests 2024-06-25 16:44:19 +02:00
Pablo Martin
f9fcb76ed1 schemas 2024-06-25 16:42:40 +02:00
Pablo Martin
86ca7411af remove line items: they have their own tables now 2024-06-25 16:41:41 +02:00
Pablo Martin
5fbf5a76fd add documentation placeholder 2024-06-25 16:25:26 +02:00
Pablo Martin
71278abbb9 remove outdated docs 2024-06-25 16:25:26 +02:00
Pablo Martin
8b1d949f73 add bank transactions to reporting 2024-06-25 16:25:26 +02:00
Oriol Roqué Paniagua
3610c447f5 Merged PR 1949: Fix documentation in DWH and include exposure
Related work items: #16857
2024-05-30 10:37:41 +00:00
uri
f021f3cb29 Changed schema.yaml with the correct field 2024-05-30 10:03:05 +02:00
uri
e360c1c785 Setting xero__net_fees_by_deal as per deal id, not dedicated to guesty 2024-05-30 10:00:39 +02:00
uri
bf0010ceeb Adding model xero__net_fees_by_deal documentation in schema.yaml. Added Waiver Fees in xero__net_fees documentation. 2024-05-30 09:15:53 +02:00
uri
de4ab5b6e5 Created xero__net_fees_by_deal with guesty 2024-05-29 18:03:58 +02:00
Pablo Martin
053024e507 add proper value to waiver_items array 2024-05-29 13:23:05 +02:00
Pablo Martin
7148220061 add net fees 2024-05-29 11:29:56 +02:00
Pablo Martin
1f24965a23 remove outdated denom invoicing mart 2024-05-23 16:14:44 +02:00
Pablo Martin
65f5b7377a use date field instead of breaking things down 2024-05-23 16:13:53 +02:00
Pablo Martin
b0528ec2c0 switch to a single model with a case, docs for it 2024-05-23 15:22:42 +02:00
Pablo Martin
b34da23a94 update docs 2024-05-22 11:45:04 +02:00
Pablo Martin
fcb951211d remove a couple of unnecessary cols 2024-05-22 11:44:59 +02:00
Pablo Martin
93c2de6f03 macro logic, need to clean a bit 2024-05-17 17:54:20 +02:00
Pablo Martin
75fe0e510a kind of done, checkpoint before macro-ing 2024-05-17 15:44:58 +02:00
Pablo Martin
fb89652159 added credit note reporting models 2024-05-17 15:27:58 +02:00
Pablo Martin
08ea22eee9 docs formatting 2024-05-16 16:22:41 +02:00