Problem/Motivation

If tax amount is 0 in the method ::calculateTaxAmount we can end up calling bcdiv with 0, which gives us these nice things:

bcdiv(): Division by zero Calculator.php:96

So let's avoid doing that?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3319436.patch702 byteseiriksm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eiriksm created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
FileSize
702 bytes

d.o is having some gitlab problems, so here is a good ol patch

This issue should be possible to write a test for as well, but I do not have that time atm

Status: Needs review » Needs work

The last submitted patch, 2: 3319436.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • jsacksick committed a98114b on 8.x-2.x
    Issue #3319436 by eiriksm: Ensure the shipping tax type plugin supports...
jsacksick’s picture

Status: Needs work » Fixed

Patch looks good, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.