PageRenderTime 89ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/mobile/paginas/detalle.php

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