Hi all,
we are using a version 5.0.5 of Dolibarr. Today i had to create a new vendor (supplier) and to attach some new materials with all attributes - buying price, supplier ref. and so on. The problem occurs when i have place a purchase order to this new supplier with the new materials. The price in the order to the supplier for each new material was different from this one i set u earlier. When i looked over the PDF form i saw that the system tools randomly for each material the price and reference number from other materials that are already created and we are using them regularly. I didn’t create the new materials by copying them from other already created but from just the begging.
Amy idea what could be the problem?!
Something similar happens to me also. If I create a new product with its supplier price and then I add into a new purchase order, it results into a random prince and discount different from the one I wrote in the product. Then, if I go back to the product I can see the correct price.
It is very weird and very annoying.
It started happening after upgrading from 4.0.2 to 5.0.5. In the database, the table llx_product_fournisseur_price seems to be properly completed.
Any help will be appreciated.
Hi there,
it’s works very well in the test database but in the updates versions it’s a problem. Here, you may see some pics from my real database what goes wrong:
FGL_1.jpg - shows a record for the material in the buying section (a supplier, a material number in my system and in the suppliers system, the price that is from this supplier)
FGL_2.jpg - shows what is happening when i am trying to place an order for this material to the same supplier (price is different)
FGL_3.jpg - shows the PDF order and it seems that the supplier’s material code for this item is not the correct one. The system took a material code for another item that is ordered from another supplier. In the same time the item number that is in our system is correct.
Also i found out that if i place a price request for the same material to the again this supplier and then generate an order everything is correct and as it should be. The thing is that we are not using a price request to have a prices for the materials. We are entering a complete price lists from all of our suppliers and generating a purchase orders directly.
If you can advise us how we can clear this problem it will be great.
I did some investigation and I have found how to fix it.
The error is in the file htdocs/fourn/commande/card.php and was introduced in the version 5.0.5. I have a dolibarr 6 installed and checked it only substituting this file with versions 5.0.4 and 5.0.5. With 5.0.4 price is ok when adding a line in a supply order but is not using 5.0.5 version of the file.
To fix it I have changed the $productsupplier->id by a GETPOST(‘idprodfournprice’) in the line 393 (dolibarr 5.0.5) or 412 (dolibarr 6.0.0).
I hope this helps to someone else.