Http error 500 when modifying product price in multi currency

I get an http error 500 when modifying the price in second currency of a product added to a sales order.

  • create new order
  • add product to the order
  • modify the product line
  • change U.P (net) (currency)
  • Blank screen with http error 500
  • commande/card.php?id=712#line_1809

Even after updating to V16.0.3 the problem persists. PHP version 8.0

Does anyone have an idea on how to solve this?

Regards,
Davy

Hi Davy,

Put this at the top of the page after “<?php” where you are facing the issue. Like card.php, list.php, element.php, product.php etc. etc.

Then see what actual error you are getting that particular page and post that here.

Regards
Saikat

Hello,

Error 500 means PHP Error, verify your hosting logs

This is the error :
Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /customers/f/a/6/davantech.co/httpd.www/erp/htdocs/commande/card.php:1072 Stack trace: #0 {main} thrown in /customers/f/a/6/davantech.co/httpd.www/erp/htdocs/commande/card.php on line 1072

Hi,

Sounds like a bug.

Can you create a report on GitHub ?

Thanks.

Could be also link to that : Multicurrency U.P (net) (currency) update error · Issue #22948 · Dolibarr/dolibarr · GitHub

I have Dolibarr running on another domain with Multi Currency active and PHP8.0 and the same problem occurs. It started on 28/11 when the hosting company stopped PHP7.4

Yes, sounds very similar

I had same problem with php 8.0 and above does your host allow you to set it to use 7.4 mine does and this fixed it for me

My host stopped supporting PHP 7.4. PHP also does not support version 7.4 anymore. Most host will follow I guess.

Any suggestions for this problem ? Still there on Version 16.0.4

Hello,

As you can see here : Multicurrency U.P (net) (currency) update error · Issue #22948 · Dolibarr/dolibarr · GitHub
Developers can’t reproduce the fault.
I encourage you to post on GitHub if you want to go further

See my remark on GitHub

casting price2num to float solved the problem for me. Any comments?