PageRenderTime 47ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/movil/paginas/detalle.php

https://bitbucket.org/webdev_pe/dmejiasoft
PHP | 81 lines | 72 code | 9 blank | 0 comment | 1 complexity | 40429cc9f186c4b22d6d4a9316a84870 MD5 | raw file
  1. <?php
  2. require("../../poo/clases/getConection.php");
  3. $cod = $_GET['c'];
  4. $cn=new getConection();
  5. $sql="select p.id_pre, p.cod_pre, p.mnt_pre, p.id_cli, p.tip_pre, p.est_pre
  6. from si_clientes c, si_prestamos p
  7. where c.id_cli=p.id_cli and est_pre='a' and
  8. cod_cli='".$cod."'";
  9. $cn->ejecutar_sql(base64_encode($sql));
  10. ?>
  11. <!DOCTYPE html>
  12. <html class="ui-mobile-rendering">
  13. <head>
  14. <meta charset="utf-8">
  15. <meta name="viewport" content="width=device-width, initial-scale=1">
  16. <title>SIPC - PR&Eacute;STAMOS/COBRANZAS</title>
  17. <link rel="stylesheet" href="../jquery_mobile/css/themes/default/jquery.mobile.css" />
  18. <link rel="stylesheet" href="../jquery_mobile/docs/_assets/css/jqm-docs.css"/>
  19. <script data-main="../jquery_mobile/js/jquery.mobile.docs" src="../jquery_mobile/external/requirejs/require.js"></script>
  20. <script src="../jquery_mobile/js/jquery.js"></script>
  21. </head>
  22. <body>
  23. <div data-role="page" class="type-interior">
  24. <div data-role="header" data-theme="f">
  25. <h1>Detalle de pr&eacute;stamos</h1>
  26. <a href="../index.php" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Inicio</a>
  27. </div><!-- /header -->
  28. <div data-role="content">
  29. <div class="content-primary">
  30. <?php
  31. $cn2=new getConection();
  32. $sql2="select concat(nom_cli,' ',ape_cli) as 'nombres' from si_clientes where cod_cli='".$cod."'";
  33. $cn2->ejecutar_sql(base64_encode($sql2));
  34. $cel2=$cn2->resultado_sql();
  35. ?>
  36. <strong>CLIENTE:</strong> <?=strtoupper($cel2['nombres'])?><br/>
  37. <strong>C&Oacute;DIGO:</strong> <?=strtoupper($cod)?><hr/>
  38. <br/>
  39. <a href="prestamo.php?c=<?=$cod?>" data-role='button' data-icon='plus' data-iconpos='top' data-theme='b'>NUEVO CR&Eacute;DITO PARA <?=strtoupper($cod)?></a>
  40. <br/>
  41. <?php
  42. while($cel=$cn->resultado_sql()){
  43. $p=($cel['tip_pre']=="p")?"C/MES":"C/D&Iacute;A";
  44. $m=($cel['moroso']=="m")?"MOROSO":"";
  45. $idp=$cel['id_pre'];
  46. if($cel['tip_pre']=="p"){
  47. $detalle_cobranza="porcentual.php?i=$idp&c=$cod";
  48. $formulario_cobro="formulario.php?i=$idp&c=$cod&p=".$cel['tip_pre'];
  49. }else{
  50. $detalle_cobranza="arrebatir.php?i=$idp&c=$cod";
  51. $formulario_cobro="formulario.php?i=$idp&c=$cod&p=".$cel['tip_pre'];
  52. }
  53. $buttons.="
  54. <a href='$formulario_cobro' data-role='button' data-icon='grid' data-iconpos='top' data-theme='a'>".$cel['cod_pre']." (".number_format($cel['mnt_pre'],2,'.',',').") - $p $m</a>
  55. <a href='$detalle_cobranza' data-role='button' data-icon='search' data-iconpos='left' data-theme='b'>Ver detalle</a>
  56. <hr/>
  57. ";
  58. }
  59. echo $buttons;
  60. ?><br/>
  61. </div>
  62. <div class="content-secondary">
  63. <a href="modulos.php?c=<?=$cod?>" data-role='button' data-icon='arrow-l' data-iconpos='left' data-theme='a'>Regresar</a>
  64. </div>
  65. </div><!-- /content -->
  66. <div data-role="footer" class="footer-docs" data-theme="c">
  67. <p>&copy; <?=date("Y")?> SIPC: Sistema Integral de Pr&eacute;stamos y Cobranzas</p>
  68. </div>
  69. </div><!-- /content -->
  70. </div><!-- /page -->
  71. </body>
  72. </html>