Skip to content

Can't create credit memo - free shipping related (Division by zero exception) #36800

@brian-ebizmarts

Description

@brian-ebizmarts

Preconditions and environment

  • Magento version Commerce 2.4.6-beta2

Steps to reproduce

  1. Enable free shipping from Stores > Configuration > Sales > Delivery Methods.
  2. Use the following Tax calculation settings:
    calulation settings
  3. Use the following display settings (required):
    display settings
  4. Flush cache
  5. Login on the frontend and place an order with Free shipping.
  6. Create the invoice
  7. Attempt to create the credit memo.

Expected result

Credit memo created

Actual result

The CollectTotals throws the exception "Division by zero".
vendor/magento/module-sales/Model/Order/Creditmemo/Total/Tax.php
Line 139

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: OrderComponent: ShippingIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.6Indicates 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

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions