<?php

date_default_timezone_set("America/Lima"); 

include'conexion1.php';



if(!empty($_POST["id100"])){ $dato1=$_POST["id100"];}else{ $dato1=null;}




$conectar = mysqli_connect($servidor,$nombre,$clave,$base);

$sql="SELECT * FROM venta WHERE ID='$dato1'";
$result=mysqli_query($conectar,$sql);

$total0=0;
$total1=0;
$total2=0;
$total3=0;
$total4=0;
$total5=0;
$total6=0;
$total7=0;
$total8=0;
$total9=0;
$total10=0;

while($mostrar=mysqli_fetch_array($result)){

    $total0=$mostrar["FECHA_REGISTRO"];
    $total1=$mostrar["DNI"];
    $total2=$mostrar["NOMBRE"];
    $total3=$mostrar["DIRECCION"];
    $total4=$mostrar["DESCRIPCION"];
    $total5=$mostrar["PRECIO_UNITARIO"];
    $total6=$mostrar["IGV"];
    $total7=$mostrar["SUB_TOTAL"];
    $total8=$mostrar["TIPO_COMPROBANTE"];
    $total9=$mostrar["SERIE"];
    $total10=$mostrar["SECUENCIAL"];

}



$data = array("cel0"=>$total0,"cel"=>$total1,"cel2"=>$total2,"cel3"=>$total3,"cel4"=>$total4,"cel5"=>$total5,"cel6"=>$total6,"cel7"=>$total7,"cel8"=>$total8,"cel9"=>$total9,"cel10"=>$total10);


echo json_encode($data);

?>
