fix warning

This commit is contained in:
Frédéric FRANCE 2022-10-14 10:33:34 +02:00
parent 33ef00590f
commit 555f17f846
2 changed files with 2 additions and 2 deletions

View File

@ -5667,7 +5667,7 @@ if ($action == 'create') {
&& $usercancreate
&& !$objectidnext
&& $object->is_last_in_cycle()
&& $conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE
&& getDolGlobalInt('INVOICE_USE_SITUATION_CREDIT_NOTE')
) {
if ($usercanunvalidate) {
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&amp;fac_avoir='.$object->id.'&amp;invoiceAvoirWithLines=1&amp;action=create&amp;type=2'.($object->fk_project > 0 ? '&amp;projectid='.$object->fk_project : '').'">'.$langs->trans("CreateCreditNote").'</a>';

View File

@ -100,7 +100,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
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)) {
|| ($object->element == 'facture' && $object->type == $object::TYPE_CREDIT_NOTE && getDolGlobalInt('INVOICE_USE_SITUATION_CREDIT_NOTE') && $object->situation_counter > 0)) {
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
} else {
$pa = $line->qty * $pa_ht;