--- /tmp/dsg/dolibarr/htdocs/reception/tpl/github_19.0.3_linkedobjectblock.tpl.php +++ /tmp/dsg/dolibarr/htdocs/reception/tpl/client_linkedobjectblock.tpl.php @@ -21 +21,2 @@ -if (empty($conf) || !is_object($conf)) { +if (empty($conf) || !is_object($conf)) +{ @@ -28 +29 @@ -<!-- BEGIN PHP TEMPLATE reception/tpl/linkedobjectblock.tpl.php --> +<!-- BEGIN PHP TEMPLATE --> @@ -44,2 +45,3 @@ -foreach ($linkedObjectBlock as $key => $objectlink) { - $ilink++; +foreach ($linkedObjectBlock as $key => $objectlink) +{ + $ilink++; @@ -47,30 +49,28 @@ - $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { - $trclass .= ' liste_sub_total'; - } ?> - <tr class="<?php echo $trclass; ?>"> - <td class="linkedcol-element tdoverflowmax100"><?php echo $langs->trans("Reception"); ?> - <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { - print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; - } ?> - </td> - <td class="linkedcol-name tdoverflowmax150"><?php echo $objectlink->getNomUrl(1); ?></td> - <td class="linkedcol-ref tdoverflowmax100" title="<?php echo dol_escape_htmltag($objectlink->ref_supplier); ?>"><?php echo dol_escape_htmltag($objectlink->ref_supplier); ?></td> - <td class="linkedcol-date"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td> - <td class="linkedcol-amount right"><?php - if ($user->hasRight('reception', 'lire')) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?></td> - <td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td class="linkedcol-action right"> - <?php - // For now, receptions must stay linked to order, so link is not deletable - if ($object->element != 'order_supplier') { - ?> - <a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&token='.newToken().'&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a> - <?php - } ?> - </td> - </tr> - <?php + $trclass = 'oddeven'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + ?> + <tr class="<?php echo $trclass; ?>"> + <td class="linkedcol-element"><?php echo $langs->trans("Reception"); ?> + <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; ?> + </td> + <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td> + <td class="linkedcol-ref center"></td> + <td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td> + <td class="linkedcol-amount right"><?php + if ($user->rights->reception->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?></td> + <td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td> + <td class="linkedcol-action right"> + <?php + // For now, receptions must stay linked to order, so link is not deletable + if ($object->element != 'order_supplier') { + ?> + <a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a> + <?php + } + ?> + </td> + </tr> + <?php @@ -78,12 +78,13 @@ -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 class="center"></td> - <td class="center"></td> - <td class="right"><?php echo price($total); ?></td> - <td class="right"></td> - <td class="right"></td> - </tr> - <?php +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 class="center"></td> + <td class="center"></td> + <td class="right"><?php echo price($total); ?></td> + <td class="right"></td> + <td class="right"></td> + </tr> + <?php