Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-05-23 01:47:29 +02:00
commit b02f45e31a
2 changed files with 3 additions and 3 deletions

View file

@ -2267,8 +2267,8 @@ class Commande extends CommonOrder
$line->total_tva = $objp->total_tva;
$line->total_localtax1 = $objp->total_localtax1;
$line->total_localtax2 = $objp->total_localtax2;
$line->subprice = $objp->subprice;
$line->subprice_ttc = $objp->subprice_ttc;
$line->subprice = (float) $objp->subprice;
$line->subprice_ttc = (float) $objp->subprice_ttc;
$line->fk_remise_except = $objp->fk_remise_except;
$line->remise_percent = $objp->remise_percent;
$line->price = $objp->price;

View file

@ -5695,7 +5695,7 @@ abstract class CommonObject
}
// Recalculate unit price with tax if not defined
if (empty($line->subprice_ttc) && $line->qty) { // subprice_ttc may be not stored on old version or not defined for lines with no unit price (like a discount)
if (empty((float) $line->subprice_ttc) && $line->qty) { // subprice_ttc may be not stored on old version or not defined for lines with no unit price (like a discount)
// So we calculate an estimated value just to show something on screen
if ($line->remise_percent != 100) {
$line->subprice_ttc = (float) price2num($line->total_ttc / $line->qty / (1 - $line->remise_percent / 100), 'MU');