Skip to content

'Exception' with message 'Warning: Division by zero in vendor/magento/module-sales/Model/Order/Creditmemo/Total/Discount.php on line 32' in vendor/magento/framework/App/ErrorHandler.php:61 #6731

@lsv

Description

@lsv

Preconditions

  1. Magento 2.1.1

Steps to reproduce

  1. Create a order with 0$ in shipment
  2. Complete the order
  3. Create new creditmemo
  4. Add something in "Refund shipping"

Expected result

  1. I would suggest a error "You can not refund shipping when shipping is zero"

With the current error message the admin would try to create this creditmemo for long time, because the error is so "Try again later..."

Many errors around the site is just

try {
  ... massive code ...
} catch {
  ... Try again later ...
}

Actual result

  1. We can't save the credit memo right now.

Metadata

Metadata

Assignees

Labels

Component: SalesEvent: mm18mxFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug reporthelp wantedup for grabs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions