2
0
forked from Wavyzz/dolibarr

Fix regression with class="right". Style of amount lost.

This commit is contained in:
Laurent Destailleur
2019-03-31 11:25:29 +02:00
parent fca404e8d5
commit ec9fdc1321
7 changed files with 16 additions and 16 deletions

View File

@@ -4280,7 +4280,7 @@ elseif ($id > 0 || ! empty($ref))
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
else
print $langs->trans('AlreadyPaid');
print ' :</td><td class="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td>&nbsp;</td></tr>';
print ' :</td><td class="right'.(($totalpaye > 0)?' amountalreadypaid':'').'">' . price($totalpaye) . '</td><td>&nbsp;</td></tr>';
$resteapayeraffiche = $resteapayer;
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
@@ -4359,14 +4359,13 @@ elseif ($id > 0 || ! empty($ref))
// Billed
print '<tr><td colspan="' . $nbcols . '" class="right">' . $langs->trans("Billed") . ' :</td><td class="right">' . price($object->total_ttc) . '</td><td>&nbsp;</td></tr>';
// Remainder to pay
print '<tr><td colspan="' . $nbcols . '" class="right">';
print $langs->trans('RemainderToPay');
if ($resteapayeraffiche < 0)
print ' ('.$langs->trans('ExcessReceived').')';
print ' :</td>';
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
print '<td class="right'.($resteapayeraffiche?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">' . price($resteapayeraffiche) . '</td>';
print '<td class="nowrap">&nbsp;</td></tr>';
}
else // Credit note
@@ -4387,7 +4386,7 @@ elseif ($id > 0 || ! empty($ref))
if ($resteapayeraffiche > 0)
print ' ('.$langs->trans('ExcessPaid').')';
print ' :</td>';
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopayback"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
print '<td class="right'.($resteapayeraffiche?' amountremaintopayback':(' '.$cssforamountpaymentcomplete)).'">' . price($sign * $resteapayeraffiche) . '</td>';
print '<td class="nowrap">&nbsp;</td></tr>';
// Sold credit note

View File

@@ -665,7 +665,7 @@ if ($id > 0)
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
print '<td class="right'.($resteapayer?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">'.price($resteapayer)."</td></tr>\n";
print "</table>";
$db->free($resql);

View File

@@ -772,7 +772,7 @@ if ($object->socid) {
$remaintopay = $object->amount - $totalpaid;
print "<tr><td colspan=\"3\" class=\"right\">".$langs->trans("RemainderToPay")." :</td>";
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':'').'><b>'.price($remaintopay)."</b></td></tr>\n";
print '<td class="right'.($resteapayeraffiche?' amountremaintopay':'').'">'.price($remaintopay)."</td></tr>\n";
}
print "</table>";
$db->free($resql);

View File

@@ -1989,7 +1989,7 @@ else
print '<tr><td colspan="' . $nbcols . '" class="right">'.$langs->trans("AmountExpected").':</td><td class="right">'.price($object->total_ttc).'</td><td></td></tr>';
print '<tr><td colspan="' . $nbcols . '" class="right">'.$langs->trans("RemainderToPay").':</td>';
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayeraffiche).'</td><td></td></tr>';
print '<td align="right'.($resteapayeraffiche?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td><td></td></tr>';
$db->free($resql);
}

View File

@@ -2802,7 +2802,7 @@ else
$resteapayer = $object->total_ttc - $totalpaye;
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('RemainderToPay').' :</td>';
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':'').'>'.price($resteapayer).'</td><td></td></tr>';
print '<td class="right'.($resteapayer?' amountremaintopay':'').'">'.price($resteapayer).'</td><td></td></tr>';
}
*/
@@ -2912,7 +2912,7 @@ else
else
print $langs->trans('ExcessPaid');
print ' :</td>';
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
print '<td class="right'.($resteapayeraffiche?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">' . price($resteapayeraffiche) . '</td>';
print '<td class="nowrap">&nbsp;</td></tr>';
}
else // Credit note
@@ -2934,7 +2934,7 @@ else
else
print $langs->trans('ExcessPaid');
print ' :</td>';
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
print '<td class="right'.($resteapayeraffiche?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">' . price($sign * $resteapayeraffiche) . '</td>';
print '<td class="nowrap">&nbsp;</td></tr>';
// Sold credit note

View File

@@ -743,7 +743,7 @@ if ($id > 0)
$staytopay = $object->capital - $totalpaid;
print '<tr><td colspan="5" class="right">'.$langs->trans("RemainderToPay").' :</td>';
print '<td class="right"'.($staytopay?' class="amountremaintopay"':'class="amountpaymentcomplete"').'>';
print '<td class="right'.($staytopay?' amountremaintopay':' amountpaymentcomplete').'">';
print price($staytopay, 0, $langs, 0, 0, -1, $conf->currency);
print '</td></tr>';
}

View File

@@ -291,18 +291,19 @@ if ($action=="valid")
{
$sectionwithinvoicelink.='<!-- Section with invoice link -->'."\n";
$sectionwithinvoicelink.='<input type="hidden" name="invoiceid" id="invoiceid" value="'.$invoice->id.'">';
$sectionwithinvoicelink.='<span style="font-size:120%;" class="center"><b>';
$sectionwithinvoicelink.='<span style="font-size:120%;" class="center">';
$sectionwithinvoicelink.=$invoice->getNomUrl(1, '', 0, 0, '', 0, 0, -1, '_backoffice')." - ";
if ($invoice->getRemainToPay() > 0)
$remaintopay = $invoice->getRemainToPay();
if ($remaintopay > 0)
{
$sectionwithinvoicelink.=$langs->trans('Generated');
$sectionwithinvoicelink.=$langs->trans('RemainToPay').': <span class="amountremaintopay" style="font-size: unset">'.price($remaintopay, 1, $langs, 1, -1, -1, $conf->currency).'</span>';
}
else
{
if ($invoice->paye) $sectionwithinvoicelink.=$langs->trans("Payed");
if ($invoice->paye) $sectionwithinvoicelink.='<span class="amountpaymentcomplete">'.$langs->trans("Payed").'</span>';
else $sectionwithinvoicelink.=$langs->trans('BillShortStatusValidated');
}
$sectionwithinvoicelink.='</b></span>';
$sectionwithinvoicelink.='</span>';
if ($conf->global->TAKEPOSCONNECTOR) $sectionwithinvoicelink.=' <button type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
else $sectionwithinvoicelink.=' <button id="buttonprint" type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink.='<script language="javascript">$("#buttonprint").click();</script>';