From aa3b6533f11a90518285ef549250e4a56d8550d7 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 27 Nov 2019 02:45:43 +0100 Subject: [PATCH] Look & Feel v11 --- htdocs/salaries/list.php | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 51fd8462180..e9014e423c6 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -150,9 +150,7 @@ if ($result) $newcardbutton=''; if (! empty($user->rights->salaries->write)) { - $newcardbutton=''.$langs->trans('NewSalaryPayment').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton .= dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/salaries/card.php?action=create'); } print '
'; @@ -234,14 +232,24 @@ if ($result) // Ref print "".$salstatic->getNomUrl(1)."\n"; + if (! $i) $totalarray['nbfield']++; + // Employee print "".$userstatic->getNomUrl(1)."\n"; + if (! $i) $totalarray['nbfield']++; + // Label payment print "".dol_trunc($obj->label, 40)."\n"; + if (! $i) $totalarray['nbfield']++; + // Date payment print ''.dol_print_date($db->jdate($obj->datep), 'day')."\n"; + if (! $i) $totalarray['nbfield']++; + // Type print ''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''; + if (! $i) $totalarray['nbfield']++; + // Account if (! empty($conf->banque->enabled)) { @@ -267,22 +275,26 @@ if ($result) } else print ' '; print ''; + if (! $i) $totalarray['nbfield']++; } - // Amount - print ''.price($obj->amount).''; - print ''; - print "\n"; - $total = $total + $obj->amount; + // Amount + print ''.price($obj->amount).''; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalttcfield'; + $totalarray['val']['totalttcfield'] += $obj->amount; + + print ''; + + if (! $i) $totalarray['nbfield']++; + + print "\n"; $i++; } - $colspan=5; - if (! empty($conf->banque->enabled)) $colspan++; - print ''.$langs->trans("Total").''; - print ''.price($total).""; - print ""; + // Show total line + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; print ""; print '';