<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<body>
<div align="center">
  <form name="frm1" id="frm1" method="post" action="" >
  <br>
  <?php
 

  $sql = mysqli_query($con ,"SELECT * FROM dgcatcli INNER JOIN dxbascpt ON(dxbascpt.codigo=dgcatcli.codigo) where dxbascpt.sal_deu <> 0");
  ?>    
    <table  align="center">
      <tr>
        <th colspan="20">Concepto - Consulta Saldos Cliente </th>
      </tr>
      <tr>
        <th><div align="center">Codigo</div></th>
        <th><div align="center">Nombre / Empresa</div></th>
        <th><div align="center">Sucursal</div></th>
        <th><div align="center">Saldo</div></th>
        <th><div align="center">Limite de Credito</div></th>
        <th><div align="center">Telefono</div></th>
        <th><div align="center">Codigo del Vendedor</div></th>
      </tr>
	<?php

	while($row = mysqli_fetch_array($sql)){
		echo "<tr>";
		echo "<td><div align='center'>" . $row["cod_cli"] . "&nbsp</div></td>";
		echo "<td><div align='left'>" . $row["nom_cli"] . ' ' . $row["ap_pat_cli"] . ' ' . $row["ap_mat_cli"] . ' ' . "&nbsp</div></td>";
		echo "<td><div align='left'>" . $row["no_suc"] . "&nbsp</div></td>";
		echo "<td><div align='right'>" . $row["sal_deu"] . "&nbsp</div></td>";
		echo "<td><div align='right'>" . $row["lim_cred"] . "&nbsp</div></td>";
		echo "<td><div align='right'>" . $row["tel"] . "&nbsp</div></td>";
		echo "<td><div align='right'>" . $row["cod_ven"] . "&nbsp</div></td>";
		echo "</tr>";
	}
	mysqli_close($con);
	?>
    </table>
  </form>
</div>
</body>
</html>