FIX : $sign is useless

This commit is contained in:
Gauthier PC portable 024 2022-11-23 11:24:29 +01:00
parent d6b77b2404
commit b77f63bc5c

View File

@ -72,13 +72,9 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="linkedcol-amount right">';
if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) {
$sign = 1;
if ($objectlink->type == Facture::TYPE_CREDIT_NOTE) {
$sign = -1;
}
if ($objectlink->statut != 3) {
// If not abandonned
$total = $total + $sign * $objectlink->total_ht;
$total += $objectlink->total_ht;
echo price($objectlink->total_ht);
} else {
echo '<strike>'.price($objectlink->total_ht).'</strike>';