Automated merge from 14.0 to 15.0 by tool pullmerge.sh

This commit is contained in:
Laurent Destailleur 2026-06-08 23:40:28 +02:00
commit b9145e6592

View file

@ -98,7 +98,7 @@ class FormMargin
}
$pv = $line->total_ht;
$pa_ht = ($pv < 0 ? -$line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
$pa_ht = (($pv < 0 && $line->qty > 0) ? -$line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
if (($object->element == 'facture' && $object->type == $object::TYPE_SITUATION)
|| ($object->element == 'facture' && $object->type == $object::TYPE_CREDIT_NOTE && $conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE && $object->situation_counter > 0)) {
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);