Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table id="areceber" class="table table-hover table-responsive" >
- <thead>
- <tr>
- <th>Nota</th>
- <th>Vencimento</th>
- <th>Cedente</th>
- <th>Destinario</th>
- <th>Valor</th>
- <th>Status</th>
- <th>Ações</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach ($inscritos as $key => $cada):
- $dadosdestinatario = $cada->nomedest_xml." <br/>".
- (strpos($cada->documento_xml, '/') !== false ? "<b>CNPJ: </b>" : "<b>CPF: </b>").$cada->documento_xml."<br/>".
- "<b>CEP: </b>".$cada->cep_xml."<br/> ".
- "".$cada->endereco_xml.", ".$cada->numero_xml." - ".$cada->bairro_xml."<br/>".
- $cada->cidade_xml." - ".$cada->uf_xml."<br/>".
- "<b>Telefone: </b>".$cada->telefone_xml;
- ;
- $nfid_xml = intval(substr($cada->nfid_xml, 28, 9));
- ?>
- <tr>
- <td><?php echo $nfid_xml .'-'. $cada->sequencia_bxml ?></td>
- <td><?php echo Mysql_to_Data($cada->vencimento_bxml); ?></td>
- <td><?php echo $cada->fantasia_usu ?></td>
- <td><?php echo $dadosdestinatario ?></td>
- <td id="valor"><?php echo $cada->valor_bxml ?></td>
- <td><?php echo (empty($cada->datarecebido_bxml) ? "Pendente" : "Recebido <br/>" . Mysql_to_Data($cada->datarecebido_bxml)) ?></td>
- <td>
- <a data-toggle='tooltip' data-placement='top' data-original-title='Baixar Pagamento' href='Javascript: void(0)' class='baixa-pagamento'
- data-cod="<?php echo $cada->codigo_bxml; ?>"data-url='painel/sistema/baixarPagamento'>
- <svg class='icone-acao-tabela'><use xlink:href='#icone_check'></use></svg>
- </a>
- <a data-toggle='tooltip' data-placement='top' data-original-title='Excluir' href='Javascript: void(0)'
- data-cod="<?php echo $cada->codigo_bxml; ?>" data-cod="<?php echo $cada->codigo_bxml; ?>" data-url='painel/sistema/excluiPagamento' class="inscrito-exclui">
- <svg class='icone-acao-tabela'><use xlink:href='#icone_deletar'></use></svg>
- </a>
- </td>
- </tr>
- <?php endforeach;?>
- </tbody>
- </table>
- var oTable = $('#areceber').dataTable({
- "pageLength": 30,
- "footerCallback": function ( row, data, start, end,
- display ) {
- var api = this.api(), data;
- // Remove the formatting to get integer data for summation
- var intVal = function ( i ) {
- return typeof i === 'string' ? i.replace(/[$,]/g, '') * 1 : typeof i === 'number' ? i : 0;
- };
- // total_salary over all pages
- total_salary = api.column( 4 ).data().reduce( function (a, b) {
- return intVal(a) + intVal(b);
- },0 );
- // total_page_salary over this page
- total_page_salary = api.column( 4 , { page: 'current'} ).data().reduce( function (a, b) {
- return intVal(a) + intVal(b);
- }, 0 );
- console.log(total_salary);
- total_page_salary = parseFloat(total_page_salary);
- total_salary = parseFloat(total_salary);
- // Update footer
- $('#totalSalary').html(total_page_salary+"/"+total_salary);
- },
- "order": [[ 0, 'desc' ], [ 1, 'asc' ]],
- searchPlaceholder: "Procurar Registros",
- dom: 'Bfrtip',
- buttons: [
- 'copyHtml5',
- 'excelHtml5',
- 'csvHtml5',
- 'pdfHtml5'
- ],
- "oLanguage": {
- "sLengthMenu": "Display _MENU_ records per page",
- "sZeroRecords": "Nenhum resultado encontrado - Tente Novamente",
- "sInfo": "Mostrando _START_ até _END_ de _TOTAL_ Resultados",
- "sInfoEmpty": "Mostrando 0 to 0 of 0 records",
- "sInfoFiltered": "(Filtrado de _MAX_ totais de registros)",
- "sSearch":"Procurar:",
- "oPaginate": {
- "Previous": "Anterior"
- }
- }
- });
- $('#dataInicial').on("keyup" function() {oTable.draw(); });
- $('#dataFinal').on("keyup" ,function() { oTable.draw(); } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement