Skip to content

Compute total of price from unit price (including price) #37658

@lvessiller-opendsi

Description

@lvessiller-opendsi

Bug

In proposal, there is a round problem of price total when you add /update a product in proposal card.

Dolibarr Version

develop and 22.0 and 18.0

Environment PHP

8.4

Environment Database

MariaDB 10.11.14

Steps to reproduce the behavior and expected behavior

The MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND was not set (or set to 0 : same results).

  1. Create a product as below :
Image
  1. Create a proposal and add this product line : (unit price including tax is 3.35 and qty is 680)
Image
  1. Add this product line

  2. Add a new free product with the same unit price including tax and the same quantity

Image

5. Difference between this two products
Image

-> Bug 1 : there is a different way to compute total without tax when you add a product and a free product
-> Wish 1 : to have the same total price when we have the same unit prices and quantities

6. Update the first product line
Image
Remove the unit price (without taxt
And click on save button

-> Bug 2
The total without tax has been updated with a different way to compute the total VAT
Image
-> Wish 2 : to not change the total price without tax if we keep the same quantities and the same unit price including price (the computed total price should be the same when this proudct line was added)

->Bug 3
Si on met la constante "MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND" à 1 alors on a :
Image
-> mismatch with the value of unit price put by the user : 3.35

Attached files

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis is a bug (something does not work as expected)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions