Skip to content

[ECP-8375] Fix invoicing for cases where base currency is used as the charged_currency#2860

Merged
candemiralp merged 2 commits intomainfrom
ECP-8375
Jan 28, 2025
Merged

[ECP-8375] Fix invoicing for cases where base currency is used as the charged_currency#2860
candemiralp merged 2 commits intomainfrom
ECP-8375

Conversation

@candemiralp
Copy link
Contributor

Description

The plugin is using isFullInvoiceAmountManuallyCaptured() to determine if the full amount is captured or not. This bug affects the comparison if the plugin uses base currency as the charged_currency.

This fix implements the usage of AdyenAmountCurrency class for the invoice amounts, which checks the configuration to determine the charged_currency before using getGrandTotal() or getBaseGrandTotal().

Tested scenarios

  • Manual capture invoicing
  • Auto capture invoicing

Fixes #1955

@candemiralp candemiralp requested a review from a team as a code owner January 23, 2025 13:47
@candemiralp candemiralp changed the title [ECP-8375] Use Currency Helper to determine the charged currency [ECP-8375] Fix broken invoicing in the cases of using base currency as charged_currency Jan 23, 2025
@candemiralp candemiralp added the Fix Indicates a bug fix label Jan 23, 2025
@sonarqubecloud
Copy link

@candemiralp candemiralp merged commit fa5a996 into main Jan 28, 2025
15 checks passed
@candemiralp candemiralp deleted the ECP-8375 branch January 28, 2025 12:19
@sena1482 sena1482 changed the title [ECP-8375] Fix broken invoicing in the cases of using base currency as charged_currency [ECP-8375] Fix invoicing for cases where base currency is used as the charged_currencyy Feb 4, 2025
@sena1482 sena1482 changed the title [ECP-8375] Fix invoicing for cases where base currency is used as the charged_currencyy [ECP-8375] Fix invoicing for cases where base currency is used as the charged_currency Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Indicates a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PW-8375] Possible incorrect implementation of isFullInvoiceAmountManuallyCaptured

2 participants