����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.137.172.252 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/t/sae/appsae/core/app/view/ |
Upload File : |
<?php // Ruta del directorio donde están los archivos $path = 'C:/xampp/htdocs/sdk2/timbrados'; // Arreglo con todos los nombres de los archivos $files = array_diff(scandir($path), array('.', '..')); //////////configuracion de servidor y ruta////////////////// $tipoServer = ConfigurationData::getByPreffix('server')->val; if($tipoServer=='W'){ $server = ConfigurationData::getByPreffix('directorioWin')->val; $rutasdk = ConfigurationData::getByPreffix('sdk')->val; $dominio = 'http://localhost/'; }else{ $server = ConfigurationData::getByPreffix('directorioLinux')->val; $rutasdk = ConfigurationData::getByPreffix('sdk')->val; $dominio = ConfigurationData::getByPreffix('dominio')->val; } ?> <section class="content"> <h1>Venta</h1> <p>Verifique los datos del ticket de venta.</p> <?php if(isset($_GET["id"]) && $_GET["id"]!=""):?> <?php $sell = SellData::getByc2($_GET["id"]); if($sell==null){ Core::alert("No se encontro la venta!"); Core::redir("./?view=searchV"); } ?> <?php echo "Folio De Venta de factura: "; ?> <u><b> <?php echo $sell->sale_id; // Obtienes tu variable mediante GET $code = "cfdi_factura_".$_GET["id"]; foreach($files as $file){ // Divides en dos el nombre de tu archivo utilizando el . $data = explode(".", $file); // Nombre del archivo $fileName = $data[0]; // Extensión del archivo $fileExtension = $data[1]; } ?> </b></u> <?php //registros de la ventas $operations = OperationData::getAllProductsBySellId($sell->sale_id); $total = 0; ?> <div class="box box-primary"> <table class="table table-bordered"> <?php if($sell->person_id!=""): $client = $sell->getPerson(); ?> <tr> <td style="width:150px;">Fecha:</td> <td><u><?php echo $sell->created_at;?></u></td> </tr> <tr> <td style="width:150px;">Cliente:</td> <td><?php echo $client->name." ".$client->lastname;?></td> </tr> <?php endif; ?> <?php if($sell->user_id!=""): $user = $sell->getUser(); ?> <tr> <td>Atendido por</td> <td><?php echo $user->name." ".$user->lastname;?></td> </tr> <?php endif; ?> <tr> <td style="width:150px;">Vendedor:</td> <td><?php if($sell->id_seller>0){ $c1= UserData::getById2($sell->id_seller); } echo $sell->id_seller."-".$c1->username;?></td> </tr> <tr> <td style="width:150px;"> Status de la venta </td> <td style="width:30px;"> <?php $facturada = FacturaData::getByIdFacturada($sell->id); //print_r($facturada); if(!isset($facturada->sell_id)){ ?> <a title="Facturar 4.0" href="index.php?view=addfactura&id=<?php echo $sell->id;?>&sale_id=<?php echo $sell->sale_id;?>&client_id=<?php echo $sell->getPerson()->id_cust;?>" class="btn btn-success"><i class="glyphicon glyphicon-file"> Timbrar Factura 4.0</i></a> <?php if($code == $fileName){ $fileName = $fileName."pdf"; echo "Se Encontraron pdf y xml de la factura: ".$fileName; ?> <a title="Registro Manual de Factura(Ya timbrada) en Sistema" href="index.php?view=captureF&id=<?php echo $sell->sell_id;?>&sale_id=<?php echo $sell->sale_id;?>" class="btn btn-warning"><i class="glyphicon glyphicon-pencil"> Capturar Manual(construccion)</i></a> <?php } }else{?> <label>Facturada</label> <?php $nombre_fichero = ''.$rutasdk.'timbrados/cfdi_factura_'.$_GET['id'].'.pdf'; // Obtenemos la ruta al archivo de tu BD if (!file_exists($nombre_fichero)) { $fileName = $fileName."pdf"; echo " ,no se Encontraron pdf y xml de la factura: ".$code.""; ?> <a title="Registro Manual de Factura(Ya timbrada) en Sistema" href="index.php?view=captureF&id=<?php echo $_GET['id'];?>&sale_id=<?php echo $sell->sale_id;?>" class="btn btn-warning"><i class="glyphicon glyphicon-pencil"> Capturar Manual(construccion)</i></a> <?php }else{?> <a href="http://localhost/sdk2/timbrados/cfdi_factura_<?php echo $sell->id; ?>.pdf" class="btn btn-success"><i class="glyphicon glyphicon-file"> Ver Factura</i></a> <a title="Enviar Correo Guardado" href="index.php?view=email&id=<?php echo $sell->id;?>&sale_id=<?php echo $sell->sale_id;?>&mail=<?php echo $sell->image;?>" class="btn btn-info"><i class="glyphicon glyphicon-send"> Enviar</i></a> <?php }?> <?php }?> </td> </tr> </table> </div> <br> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Productos de la venta:_</h3> <h4 class="box-title">Ticket: <?php echo $sell->id?></h4> </div><!-- /.box-header --> <input type="hidden" name="id_seller" value="<?php echo $sell->id_seller; ?>" > <input type="hidden" name="sell_id" value="<?php echo $sell->id; ?>" > <table class="table table-bordered table-hover"> <thead> <th>#</th> <th>Codigo Barras</th> <th>Cantidad</th> <th>Nombre del Producto</th> <th>Precio Unitario</th> <th>Total</th> </thead> <?php $num=0; foreach($operations as $operation){ $product = $operation->getProduct(); $productX = ProductData::getBycode($product->barcode); //registros de la devoluciones $operationsDev = OperationData::getAllByProductIdAndDev($productX->id,1,$_GET["id"]); ?> <tr> <td><?php echo $product->id_item;?></td> <td> <input type="text" name="barcode" value="<?php echo $product->barcode;?>" disabled> </td> <td> <?php echo $operation->qty ; ?></td> <td><?php echo $product->item_name ;?></td> <td>$ <?php echo number_format($operation->price,2,".",",") ;?></td> <td><b>$ <?php echo number_format($operation->qty*$operation->price,2,".",","); $total+=$operation->qty*$operation->price; ?></b></td> </tr> <?php } ?> </table> <tr> <td></td> <td></td> <td></td> <td> Forma de pago Principal(Venta): </td> <td> <div><b> <?php $sellX = SellData::getByIdSale($sell->sale_id); $NameDev = FData::getById($sellX->f_pago1); echo $NameDev->id; echo "-"; echo $NameDev->name; ?></b></div> <td> </tr> <div class="box-body"> </div> </div> <br><br> <!-- <div class="row"> <div class="col-md-4"> <div class="box box-primary"> <table class="table table-bordered"> <tr> <td><h4>Subtotal:</h4></td> <td><h4>$ <?php echo number_format($total,2,'.',','); ?></h4></td> </tr> <tr> <td><h4>Descuento:</h4></td> <td><h4>$ <?php echo number_format($total*($sell->discount/100),2,'.',','); ?></h4></td> </tr> <tr> <td><h4>Total:</h4></td> <td><h4>$ <?php echo number_format($total-$total*($sell->discount/100),2,'.',','); ?></h4></td> </tr> </table> </div> </div> </div> --> <?php else:?> 501 Internal Error no hay id de venta error T001-DEV <?php endif; ?> </section>