1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <?php
function writeItem($result)
{
$isset = function($k) use ($result)
{
return (isset($result['data']['items'][$k])) ? htmlspecialchars($result['data']['items'][$k], ENT_QUOTES, 'utf-8') : '';
};
?>
<tr class="item" style="max-height: 25px;">
<td style="width: 115px; text-align: center; padding-right: 5px;"><?= ($isset('description') !== '') ? '1' : ''; ?></td>
<td style="width: 80%; text-align: left; padding-right: 15px; border-left: 1px solid #27aeb1;"><?= wordwrap($isset('description'), 40, "<br>", true) ?></td>
<td style="text-align: center; width: 75px; padding-right: 5px; border-left: 1px solid #27aeb1;"><?= $isset('quantity') ?></td>
<td style="text-align: center; width: 90px; padding-right: 5px; border-left: 1px solid #27aeb1;"><?= $isset('unit') ?></td>
<td style="text-align: center; width: 95px; padding-right: 5px; padding-left: 5px; border-left: 1px solid #27aeb1;"><?= $isset('price') ?></td>
<td style="text-align: center; width: 125px; padding-right: 5px; border-left: 1px solid #27aeb1;"><?= $isset('discount') ?></td>
<td style="text-align: center; width: 180px; padding-right: 5px; border-left: 1px solid #27aeb1;"><?= $isset('total_ht') ?></td>
<td style="text-align: center; width: 90px; padding-right: 5px; border-left: 1px solid #27aeb1;"><?= $isset('VAT') ?></td>
</tr>
<?php
}
?> |