							<div class="row-fluid">
                                <div class="span12">
                                    
                                    <table id="table" class="table table-striped table-bordered table-hover">
                                        <caption>Registros: <?php echo count($query); ?></caption>
                                        <thead>
                                            <tr>
                                                <th>Clave</th>
                                                <th>EAN</th>
                                                <th>Sec</th>
                                                <th>Descripcíón 1</th>
                                                <th>Descripción 2</th>
                                                <th>Costo</th>
                                                <th>IVA</th>
                                                <th>Pedido</th>
                                                <th>Arribo</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php 

                                            $cans = 0;
                                            $aplica = 0;

                                            foreach($query as $row){

                                                if($row->iva == 1)
                                                {
                                                    $iva = 'SI';
                                                }else
                                                {
                                                    $iva = 'NO';
                                                }

                                            ?>
                                            <tr>
                                                <td><?php echo $row->clagob; ?></td>
                                                <td><?php echo $row->codigo; ?></td>
                                                <td><?php echo $row->sec; ?></td>
                                                <td><?php echo $row->susa1; ?></td>
                                                <td><?php echo $row->susa2; ?></td>
                                                <td><?php echo $row->costo; ?></td>
                                                <td><?php echo $iva; ?></td>
                                                <td style="text-align: right;"><?php echo number_format($row->cans, 0); ?></td>
                                                <td style="text-align: right;"><?php echo number_format($row->aplica, 0); ?></td>
                                            </tr>
                                            <?php 

                                            $cans = $cans + $row->cans;
                                            $aplica = $aplica + $row->aplica;

                                            } 


                                            ?>
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="7" style="text-align: right;">Totales: </td>
                                                <td style="text-align: right;"><?php echo number_format($cans, 0); ?></td>
                                                <td style="text-align: right;"><?php echo number_format($aplica, 0); ?></td>
                                                <td colspan="3"></td>
                                            </tr>
                                        </tfoot>
                                    </table>
                            
                                </div>
                            </div>
