Jump to content

Edit History

Matteo

Matteo

Hello to all,

 

i'm stuck with this situation:

  1. Product price: 114,99
  2. Discount reduction: 50%
  3. Currency precision: 2
  4. Total amount: 57.49
  5. Prestashop Version: 1.7.8

 

Now everything is "right", but we have an erp that fetch prestashop orders to create&manage our needs.

Where is the problem?

The problem is related to the method of round because that's our situation on erp:

  1. Product price: 114,99
  2. Discount reduction: 50%
  3. Total amount: 114,99 / 2 = 57.495 --> rounded up to 57.5

 

How we can work on Prestashop to allow a situation like the erp one?

I have tried with round configuration but nothing happens cause for sure the precision is the key, but i don't know how to touch it.

 

2° try

Try to figured out with override on variable $precision in Classes/Tools.php to work with 3 decimals but nothing happens.

 

Many thanks,

Matteo

Matteo

Matteo

Hello to all,

 

i'm stuck with this situation:

  1. Product price: 114,99
  2. Discount reduction: 50%
  3. Currency precision: 2
  4. Total amount: 57.49

 

Now everything it's "right", but we have an erp that fetch prestashop orders to create&manage our needs.

Where is the problem?

The problem is related to the method of round because that's our situation on erp:

  1. Product price: 114,99
  2. Discount reduction: 50%
  3. Total amount: 114,99 / 2 = 57.495 --> rounded up to 57.5

 

How we can work on Prestashop to allow a situation like the erp one?

I have tried with round configuration but nothing happens cause for sure the precision is the key, but i don't know how to touch it.

 

2° try

Try to figured out with override on variable $precision in Classes/Tools.php to work with 3 decimals but nothing happens.

 

Many thanks,

Matteo

×
×
  • Create New...