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

T1657 - Fix invoice generation for Sub Proposal (1/3) #239

Merged
merged 17 commits into from
Aug 22, 2024

Conversation

Prazn
Copy link
Contributor

@Prazn Prazn commented Aug 15, 2024

Description

There is a bug that occurs when generating the invoices for a new Sub Proposal, some invoices are not generated at all.
When looking into it it seems that the check of if we need to generate the invoice was wrong because it did not take into account for which contract we are generating the invoice for. Meaning that if any other active contract already had an invoice for that month, we would skip it.

Technical Aspects

There area lot of small changes here and there, to make things simple two aspects were changed :

  • When generating invoices, if a specific contract is given we use it as a reference to check and generate invoices
  • Fixed some conditions for when new invoice lines should be generated or "appended" to existing open invoices

Misc

  • Changes in move.py is just related to pre-commit formatting

@Prazn Prazn changed the title T1657 - Fix nvoice generation for Sub Proposal T1657 - Fix invoice generation for Sub Proposal Aug 15, 2024
@Prazn Prazn changed the title T1657 - Fix invoice generation for Sub Proposal T1657 - Fix invoice generation for Sub Proposal (1/3) Aug 15, 2024
@Prazn Prazn marked this pull request as ready for review August 15, 2024 13:53
@Prazn Prazn requested a review from ecino August 15, 2024 13:59
@Prazn Prazn self-assigned this Aug 15, 2024
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
@Prazn Prazn requested a review from ecino August 20, 2024 09:18
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
recurring_contract/models/contract_group.py Outdated Show resolved Hide resolved
@ecino
Copy link
Member

ecino commented Aug 20, 2024

You also have conflicts with the latest 14.0 version.

@Prazn Prazn force-pushed the nip/T1657-Fix_invoice_generation_for_sub_proposal branch from 75837c6 to ee4ba98 Compare August 20, 2024 11:01
Copy link

sonarcloud bot commented Aug 20, 2024

@Prazn Prazn requested a review from ecino August 20, 2024 13:26
@ecino ecino merged commit e3b0e5c into 14.0 Aug 22, 2024
2 checks passed
@ecino ecino deleted the nip/T1657-Fix_invoice_generation_for_sub_proposal branch August 22, 2024 05:13
ecino pushed a commit that referenced this pull request Aug 27, 2024
* might have fixed the bug, still need to test. Changed logic of how invoices are generated, specially in the case where we pass a specific conteact to generate the invoices of.

* handle case where more than one open invoice found,might remove this later

* cleanups

* trying to make code clearer, not fully satisfied...

* removed comment

* ruff-format

* lines too long

* more cleanups

* pre-commit... again...

* clean

* PR suggestions

* improved handling of grouped contracts

* rebased branch and fixed mapping over properties

* moved comment

* removed code specific to sub proposal (moved to compassion-module), cleanups

* raise error instead of logging when more than one open invoice found

* ruff-format, should all be good now, hopefully...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants