Debug v13

This commit is contained in:
Laurent Destailleur 2021-01-04 15:32:18 +01:00
parent ef76c067e0
commit 7141fa315e
2 changed files with 13 additions and 5 deletions

View File

@ -710,10 +710,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
// Price
print '<td class="right">'.price($sign * $objp->total_ttc).'</td>';
// Received or paid back
// Received + already paid
print '<td class="right">'.price($sign * $paiement);
if ($creditnotes) print '+'.price($creditnotes);
if ($deposits) print '+'.price($deposits);
if ($creditnotes) print '<span class="opacitymedium">+'.price($creditnotes).'</span>';
if ($deposits) print '<span class="opacitymedium">+'.price($deposits).'</span>';
print '</td>';
// Remain to take or to pay back

View File

@ -62,7 +62,11 @@ if ($absolute_discount > 0) {
$text .= ' ('.$addabsolutediscount.')';
}
print '<div class="inline-block clearboth">'.$text.'</div>';
if ($isNewObject) {
print '<br>'.$text;
} else {
print '<div class="inline-block clearboth">'.$text.'</div>';
}
} else {
// Discount available of type fixed amount (not credit note)
$more = '('.$addabsolutediscount.')';
@ -85,7 +89,11 @@ if ($absolute_creditnote > 0) {
$text .= '('.$addabsolutediscount.')';
}
print '<div class="inline-block clearboth">'.$text.'</div>';
if ($isNewObject) {
print '<br>'.$text;
} else {
print '<div class="inline-block clearboth">'.$text.'</div>';
}
} else { // We can add a credit note on a down payment or standard invoice or situation invoice
// There is credit notes discounts available
$more = $isInvoice && !$isNewObject ? ' ('.$viewabsolutediscount.')' : '';