Skip to content

Conversation

brunomiguelpinto
Copy link
Contributor

@brunomiguelpinto brunomiguelpinto commented Jul 2, 2025

Context

This PR addresses a limitation in the logic for voiding invoices that was causing confusion and blocking expected behaviour with some customers. Previously, certain invoice states were not allowed to be voided depending on specific internal validations, even if the user explicitly triggered a void action.

This inconsistency was particularly evident when using generate_credit_note: false, where the system applied legacy rules that no longer make sense from a user perspective.

Description

We removed the conditional logic that prevented invoices from being voided under specific internal states.

The behaviour is now simplified:
➡️ If the user calls void, the system will proceed with the voiding process without rejecting it due to previous state-based restrictions.

Potential Downside

This is a silent breaking change for clients relying on the previous behaviour (i.e. expecting a validation error when trying to void certain invoices). However, the rationale is that if a user explicitly calls void, they intend for the invoice to be voided — so this new behaviour is more consistent and predictable.

@brunomiguelpinto brunomiguelpinto self-assigned this Jul 2, 2025
@brunomiguelpinto brunomiguelpinto force-pushed the feat-remove-void-restrictions branch from 46d6c74 to 098cc09 Compare July 2, 2025 12:42
@brunomiguelpinto brunomiguelpinto force-pushed the feat-remove-void-restrictions branch from 1715330 to 0f43c64 Compare July 2, 2025 14:02
@brunomiguelpinto brunomiguelpinto merged commit 13be317 into main Jul 2, 2025
14 checks passed
@brunomiguelpinto brunomiguelpinto deleted the feat-remove-void-restrictions branch July 2, 2025 14:08
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
## Context

This PR addresses a limitation in the logic for voiding invoices that
was causing confusion and blocking expected behaviour with some
customers. Previously, certain invoice states were not allowed to be
voided depending on specific internal validations, even if the user
explicitly triggered a void action.

This inconsistency was particularly evident when using
generate_credit_note: false, where the system applied legacy rules that
no longer make sense from a user perspective.

## Description

We removed the conditional logic that prevented invoices from being
voided under specific internal states.

The behaviour is now simplified:
➡️ If the user calls void, the system will proceed with the voiding
process without rejecting it due to previous state-based restrictions.

Potential Downside

This is a silent breaking change for clients relying on the previous
behaviour (i.e. expecting a validation error when trying to void certain
invoices). However, the rationale is that if a user explicitly calls
void, they intend for the invoice to be voided — so this new behaviour
is more consistent and predictable.
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