Show amount into popup of payment

This commit is contained in:
Laurent Destailleur 2022-04-09 00:00:57 +02:00
parent 003bcd60fa
commit eecbc05bc3
2 changed files with 13 additions and 2 deletions

View File

@ -1212,6 +1212,9 @@ class Paiement extends CommonObject
$label .= dol_print_date($dateofpayment, 'dayhour', 'tzuser');
}
}
if ($this->amount) {
$label .= '<br><strong>'.$langs->trans("Amount").':</strong> '.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency);
}
if ($mode == 'withlistofinvoices') {
$arraybill = $this->getBillsArray();
if (is_array($arraybill) && count($arraybill) > 0) {

View File

@ -596,6 +596,10 @@ class PaiementFourn extends Paiement
{
global $langs, $conf, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips
}
$result = '';
$text = $this->ref; // Sometimes ref contains label
@ -610,8 +614,12 @@ class PaiementFourn extends Paiement
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Payment").'</u><br>';
$label .= '<strong>'.$langs->trans("Ref").':</strong> '.$text;
if ($this->datepaye ? $this->datepaye : $this->date) {
$label .= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour', 'tzuser');
$dateofpayment = ($this->datepaye ? $this->datepaye : $this->date);
if ($dateofpayment) {
$label .= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($dateofpayment, 'dayhour', 'tzuser');
}
if ($this->amount) {
$label .= '<br><strong>'.$langs->trans("Amount").':</strong> '.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency);
}
$linkclose = '';