Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. <table id="areceber" class="table table-hover table-responsive" >
  2. <thead>
  3. <tr>
  4. <th>Nota</th>
  5. <th>Vencimento</th>
  6. <th>Cedente</th>
  7. <th>Destinario</th>
  8. <th>Valor</th>
  9. <th>Status</th>
  10. <th>Ações</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14.  
  15. <?php
  16. foreach ($inscritos as $key => $cada):
  17.  
  18. $dadosdestinatario = $cada->nomedest_xml." <br/>".
  19. (strpos($cada->documento_xml, '/') !== false ? "<b>CNPJ: </b>" : "<b>CPF: </b>").$cada->documento_xml."<br/>".
  20. "<b>CEP: </b>".$cada->cep_xml."<br/> ".
  21. "".$cada->endereco_xml.", ".$cada->numero_xml." - ".$cada->bairro_xml."<br/>".
  22. $cada->cidade_xml." - ".$cada->uf_xml."<br/>".
  23. "<b>Telefone: </b>".$cada->telefone_xml;
  24. ;
  25.  
  26. $nfid_xml = intval(substr($cada->nfid_xml, 28, 9));
  27.  
  28. ?>
  29. <tr>
  30. <td><?php echo $nfid_xml .'-'. $cada->sequencia_bxml ?></td>
  31. <td><?php echo Mysql_to_Data($cada->vencimento_bxml); ?></td>
  32. <td><?php echo $cada->fantasia_usu ?></td>
  33. <td><?php echo $dadosdestinatario ?></td>
  34. <td id="valor"><?php echo $cada->valor_bxml ?></td>
  35. <td><?php echo (empty($cada->datarecebido_bxml) ? "Pendente" : "Recebido <br/>" . Mysql_to_Data($cada->datarecebido_bxml)) ?></td>
  36. <td>
  37. <a data-toggle='tooltip' data-placement='top' data-original-title='Baixar Pagamento' href='Javascript: void(0)' class='baixa-pagamento'
  38. data-cod="<?php echo $cada->codigo_bxml; ?>"data-url='painel/sistema/baixarPagamento'>
  39. <svg class='icone-acao-tabela'><use xlink:href='#icone_check'></use></svg>
  40. </a>
  41. <a data-toggle='tooltip' data-placement='top' data-original-title='Excluir' href='Javascript: void(0)'
  42. data-cod="<?php echo $cada->codigo_bxml; ?>" data-cod="<?php echo $cada->codigo_bxml; ?>" data-url='painel/sistema/excluiPagamento' class="inscrito-exclui">
  43. <svg class='icone-acao-tabela'><use xlink:href='#icone_deletar'></use></svg>
  44. </a>
  45. </td>
  46. </tr>
  47.  
  48. <?php endforeach;?>
  49.  
  50. </tbody>
  51. </table>
  52.  
  53. var oTable = $('#areceber').dataTable({
  54. "pageLength": 30,
  55. "footerCallback": function ( row, data, start, end,
  56. display ) {
  57.  
  58. var api = this.api(), data;
  59. // Remove the formatting to get integer data for summation
  60. var intVal = function ( i ) {
  61. return typeof i === 'string' ? i.replace(/[$,]/g, '') * 1 : typeof i === 'number' ? i : 0;
  62. };
  63.  
  64. // total_salary over all pages
  65. total_salary = api.column( 4 ).data().reduce( function (a, b) {
  66. return intVal(a) + intVal(b);
  67. },0 );
  68.  
  69. // total_page_salary over this page
  70. total_page_salary = api.column( 4 , { page: 'current'} ).data().reduce( function (a, b) {
  71. return intVal(a) + intVal(b);
  72. }, 0 );
  73.  
  74. console.log(total_salary);
  75.  
  76. total_page_salary = parseFloat(total_page_salary);
  77. total_salary = parseFloat(total_salary);
  78.  
  79. // Update footer
  80. $('#totalSalary').html(total_page_salary+"/"+total_salary);
  81. },
  82. "order": [[ 0, 'desc' ], [ 1, 'asc' ]],
  83. searchPlaceholder: "Procurar Registros",
  84. dom: 'Bfrtip',
  85. buttons: [
  86. 'copyHtml5',
  87. 'excelHtml5',
  88. 'csvHtml5',
  89. 'pdfHtml5'
  90. ],
  91. "oLanguage": {
  92. "sLengthMenu": "Display _MENU_ records per page",
  93. "sZeroRecords": "Nenhum resultado encontrado - Tente Novamente",
  94. "sInfo": "Mostrando _START_ até _END_ de _TOTAL_ Resultados",
  95. "sInfoEmpty": "Mostrando 0 to 0 of 0 records",
  96. "sInfoFiltered": "(Filtrado de _MAX_ totais de registros)",
  97. "sSearch":"Procurar:",
  98. "oPaginate": {
  99. "Previous": "Anterior"
  100. }
  101. }
  102. });
  103.  
  104. $('#dataInicial').on("keyup" function() {oTable.draw(); });
  105. $('#dataFinal').on("keyup" ,function() { oTable.draw(); } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement