Skip to content

[Issue] Fix: The Credit Memo Items' base_weee_tax_applied_row_amnt Value is Incorrect #38765

Open
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #38760: Fix: The Credit Memo Items' base_weee_tax_applied_row_amnt Value is Incorrect


The setBaseWeeeTaxAppliedRowAmnt() function should be used instead of setBaseWeeeTaxAppliedRowAmount, as the database table field name is base_weee_tax_applied_row_amnt. Due to this error, the value of the sales_creditmemo_item.base_weee_tax_applied_row_amnt database column is always set to the order item value, which is incorrect.

Manual testing scenarios (*)

  1. Backend: Create a product with a $50 Fixed Product Tax (FPT).
  2. Frontend: add 5 quantities of this product to your cart.
  3. Frontend: Make sure that the FPT are applied and place the order.
  4. Backend: Create a credit memo for only a single quantity.

Expected Result:
Since only a single quantity was credited, the values saved in both the sales_creditmemo_item.base_weee_tax_applied_amount and sales_creditmemo_item.base_weee_tax_applied_row_amnt columns should be 50.

Actual Result:
The values saved in the sales_creditmemo_item.base_weee_tax_applied_amount is 50 and sales_creditmemo_item.base_weee_tax_applied_row_amnt columns is 250 (5x 50).

Questions or comments

A developer must look at the base_weee_tax_applied_row_amnt column of the sales_creditmemo_item database table in order to confirm the result.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: TaxComponent: DBIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions