Update linkedobjectblock.tpl.php

This commit is contained in:
Laurent Destailleur 2018-02-12 03:13:12 +01:00 committed by GitHub
parent 67ce71bc48
commit d731857fd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,11 @@ foreach($linkedObjectBlock as $key => $objectlink)
<td></td>
<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
<td align="right"><?php
if ($user->rights->contrat->lire) {
// Price of contract is not shown by default because a contract is a list of service with
// start and end date that change with time andd that may be different that the period of reference for price.
// So price of a contract does often means nothing. Prices is on the different invoices done on same contract.
if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE))
{
$totalcontrat = 0;
foreach ($objectlink->lines as $linecontrat) {
$totalcontrat = $totalcontrat + $linecontrat->total_ht;
@ -65,4 +69,4 @@ foreach($linkedObjectBlock as $key => $objectlink)
</tr>
<?php } ?>
<!-- END PHP TEMPLATE -->
<!-- END PHP TEMPLATE -->