<table cellpadding="2">
    <?php 
        if($productos && count($productos)):
            $striped = false;
            foreach($productos as $producto):
    ?>
        <?php if($tipoDte == '01' || $tipoDte == '03' || $tipoDte == '04' || $tipoDte == '05' || $tipoDte == '06'): ?>
        <tr style="font-size:10px; background-color: <?= $striped ? '#f2f2f2' : '#FFF'?>;">
            <td width="3%"  style="border-left: solid 1px #ccc; border-right: solid 1px #ccc; text-align:center;"><?= isset($producto['numItem']) ? $producto['numItem'] : '';?></td>
            <td width="5%"  style="border-right: solid 1px #ccc;"><?php echo isset($producto['cantidad']) ? $producto['cantidad'] : '';?></td>
            <td width="11%" style="border-right: solid 1px #ccc;"><?php echo isset($producto['codigo']) ? $producto['codigo'] : '';?></td>
            <td width="39%" style="border-right: solid 1px #ccc;"><?php echo isset($producto['descripcion']) ? $producto['descripcion'] : '';?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= isset($producto['precioUni']) ? number_format($producto['precioUni'], 4, '.',',') : '';?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= isset($producto['montoDescu']) ? number_format($producto['montoDescu'], 2, '.',',') : '';?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= isset($producto['ventaNoSuj']) ? number_format($producto['ventaNoSuj'], 2, '.',',') : '';?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= isset($producto['ventaExenta']) ? number_format($producto['ventaExenta'], 2, '.',',') : '';?></td>
            <td width="10%" style="border-right: solid 1px #ccc; text-align: right;"><?= isset($producto['ventaGravada']) ? number_format($producto['ventaGravada'], 2, '.',',') : '';?></td>
        </tr>
        <?php elseif ($tipoDte == '07'): ?>
            <tr style="font-size:10px; background-color: <?= $striped ? '#f2f2f2' : '#FFF'?>;">
                <td width="3%" style="border-bottom: 1px solid #CCC; text-align:center;"><?= $producto['numItem'];?></td>
                <td width="32%" style="border-bottom: 1px solid #CCC; text-align:center;"><?= $producto['numDocumento'];?></td>
                <td width="10%" style="border-bottom: 1px solid #CCC; text-align:center;"><?= $producto['fechaEmision'];?></td>
                <td width="35%" style="border-bottom: 1px solid #CCC;"><?= $producto['descripcion'];?></td>
                <td width="10%" style="border-bottom: 1px solid #CCC; text-align: right;"><?= number_format($producto['montoSujetoGrav'], 2, '.',',')?></td>
                <td width="10%" style="border-bottom: 1px solid #CCC; text-align: right;"><?= number_format($producto['ivaRetenido'], 2, '.',',')?></td>
            </tr>
        <?php elseif ($tipoDte == '11'): ?>
        <tr style="font-size:10px; background-color: <?= $striped ? '#f2f2f2' : '#FFF'?>;">
            <td width="3%"  style="border-right: solid 1px #ccc; text-align:center;"><?= $producto['numItem'];?></td>
            <td width="5%"  style="border-right: solid 1px #ccc;"><?php echo $producto['cantidad'];?></td>
            <td width="10%" style="border-right: solid 1px #ccc;"><?php echo $producto['codigo']?></td>
            <td width="48%" style="border-right: solid 1px #ccc;"><?php echo $producto['descripcion']?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= number_format($producto['precioUni'], 2, '.',',')?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= number_format($producto['montoDescu'], 2, '.',',')?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= number_format($producto['noGravado'], 2, '.',',')?></td>
            <td width="10%" style="text-align: right;"><?= number_format($producto['ventaGravada'], 2, '.',',')?></td>
        </tr>
        <?php elseif ($tipoDte == '14'): ?>
        <tr style="font-size:10px; background-color: <?= $striped ? '#f2f2f2' : '#FFF'?>;">
            <td width="3%"  style="border-right: solid 1px #ccc; text-align:center;"><?= $producto['numItem'];?></td>
            <td width="5%"  style="border-right: solid 1px #ccc;"><?php echo $producto['cantidad'];?></td>
            <td width="10%" style="border-right: solid 1px #ccc;"><?php echo $producto['codigo']?></td>
            <td width="56%" style="border-right: solid 1px #ccc;"><?php echo $producto['descripcion']?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= number_format($producto['precioUni'], 2, '.',',')?></td>
            <td width="8%"  style="border-right: solid 1px #ccc; text-align: right;"><?= number_format($producto['montoDescu'], 2, '.',',')?></td>
            <td width="10%" style="text-align: right;"><?= number_format($producto['compra'], 2, '.',',')?></td>
        </tr>
        <?php elseif ($tipoDte == '15'): ?>
        <tr style="font-size:10px; background-color: <?= $striped ? '#f2f2f2' : '#FFF'?>;">
            <td width="3%"  style="border-right: solid 1px #ccc; text-align:center;"><?= $producto['numItem'];?></td>
            <td width="5%"  style="border-right: solid 1px #ccc;"><?= $producto['cantidad'];?></td>
            <td width="62%" style="border-right: solid 1px #ccc;"><?= $producto['descripcion']?></td>
            <td width="10%" style="border-right: 1px solid #CCC;"><?= number_format($producto['depreciacion'], 2, '.',',')?></td>
            <td width="10%" style="border-right: 1px solid #CCC;"><?= number_format($producto['valorUni'], 2, '.',',')?></td>
            <td width="10%" style="border-right: 1px solid #CCC;"><?= number_format($producto['valor'], 2, '.',',')?></td>
            
        </tr>
        
        <?php endif;?>
    <?php
            $striped = !$striped;
        endforeach; endif;
    ?>
</table>