- πΊπΈUnited States AaronBauman Philadelphia
Closing all 7.x issues. Please reopen if this issue still pertains to D10 version
I have products that use rules that fire "Set the unit price to a specific amount" actions to adjust the base price of products on "Calculating the sell price of a product" events. This works by adding a 2nd 'base_price' component to the line item, but code in _commerce_taxjar_request_add_lines() is assuming a single 'base_price' component which means that as it loops through components it uses the last one. In most cases, the rules I have are lowering the price and this means the used 'base_price' component is negative and is displaying a negative sales tax.
In _commerce_taxjar_request_add_lines() at line 214 as this loops through price components and checks for 'base_price', change:
$unit_price = ($component['price']['amount'] / (int) $line_item->quantity) / 100;
to
$unit_price += ($component['price']['amount'] / (int) $line_item->quantity) / 100;
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Closing all 7.x issues. Please reopen if this issue still pertains to D10 version