Price after vado discount is not rounded

Created on 22 November 2022, over 1 year ago
Updated 17 February 2023, over 1 year ago

Problem/Motivation

Price after Vado applies discount on items is not rounded.

For instance, PayPal does not support more than two decimals in the price.
All Promotions are rounding prices.

Steps to reproduce

Add discount on Parent variation.

Proposed resolution

Add rounding of price inside:
1) \Drupal\commerce_vado\VadoOrderProcessor::process
2) \Drupal\commerce_vado\EventSubscriber\VadoEventSubscriber::cartEntityAddEvent

I've tested it and seems that there is not a big difference when rounding the price so I choose VadoOrderProcessor::process.

Remaining tasks

Write tests.

User interface changes

No changes

API changes

No changes

Data model changes

No changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine dinazaur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024