Merge pull request #11265 from frederic34/patch-2

Update tpl linked invoices
This commit is contained in:
Laurent Destailleur 2019-05-29 13:54:09 +02:00 committed by GitHub
commit 03feb3604c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,10 +47,31 @@ foreach($linkedObjectBlock as $key => $objectlink)
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
?>
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
<td class="linkedcol-element"><?php echo $langs->trans("CustomerInvoice"); ?></td>
<td class="linkedcol-element"><?php
switch ($objectlink->type) {
case Facture::TYPE_REPLACEMENT:
echo $langs->trans("InvoiceReplacement");
break;
case Facture::TYPE_CREDIT_NOTE:
echo $langs->trans("InvoiceAvoir");
break;
case Facture::TYPE_DEPOSIT:
echo $langs->trans("InvoiceDeposit");
break;
case Facture::TYPE_PROFORMA:
echo $langs->trans("InvoiceProForma");
break;
case Facture::TYPE_SITUATION:
echo $langs->trans("InvoiceSituation");
break;
default:
echo $langs->trans("CustomerInvoice");
break;
}
?></td>
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
<td class="linkedcol-ref" align="center"><?php echo $objectlink->ref_client; ?></td>
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
<td class="linkedcol-ref left"><?php echo $objectlink->ref_client; ?></td>
<td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
<td class="linkedcol-amount right"><?php
if ($user->rights->facture->lire) {
$sign = 1;
@ -76,8 +97,8 @@ if (count($linkedObjectBlock) > 1)
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
<td><?php echo $langs->trans("Total"); ?></td>
<td></td>
<td align="center"></td>
<td align="center"></td>
<td class="center"></td>
<td class="center"></td>
<td class="right"><?php echo price($total); ?></td>
<td class="right"></td>
<td class="right"></td>