Файловый менеджер - Редактировать - /home2/cocinasdalloway/public_html/administrador/Home/QuotePrint.php
Назад
<!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>COCINASDALLOWAY | Imprimir Cotizacion</title> <!-- Bootstrap --> <link href="../../public/scripts/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Font Awesome --> <link href="../../public/scripts/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <!-- NProgress --> <link href="../../public/scripts/vendors/nprogress/nprogress.css" rel="stylesheet"> <!-- iCheck --> <link href="../../public/scripts/vendors/iCheck/skins/flat/green.css" rel="stylesheet"> <!-- bootstrap-progressbar --> <link href="../../public/scripts/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"> <!-- JQVMap --> <link href="../../public/scripts/vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/> <!-- bootstrap-daterangepicker --> <link href="../../public/scripts/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet"> <!-- Custom Theme Style --> <link href="../../build/css/custom.min.css" rel="stylesheet"> <!-- Toast --> <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet"> <!-- Select2 --> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <link href="../../public/scripts/vendors/switchery/dist/switchery.min.css" rel="stylesheet"> <link href="../../public/scripts/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet"> <link href="../../public/scripts/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet"> <style> html, body{ height:98% }; @media print { .ocultar-al-imprimir { display: none; } } </style> </head> <body> <?php if(isset($_GET['IdQuote']) and $_GET['IdQuote']!=''){ function sumasdiasemana($fecha,$dias) { $datestart= strtotime($fecha); $datesuma = 15 * 86400; $diasemana = date('N',$datestart); $totaldias = $diasemana+$dias; $findesemana = intval( $totaldias/6) *1 ; $diasabado = $totaldias % 6 ; if ($diasabado==6) $findesemana++; if ($diasabado==0) $findesemana=$findesemana-1; $total = (($dias+$findesemana) * 86400)+$datestart ; return $fechafinal = date('d-m-Y', $total); } ?> <?php date_default_timezone_set("America/Mexico_City"); //Archivo de Configuracion include("../models/connection/config.php"); //Crear Objeto para conexion $conexion = new mysqli($host, $user, $pass, $db); $IdQuote=$_GET['IdQuote']; @session_start(); /*************************************************/ $subtotal=0; $lines="SELECT * FROM quote_lines WHERE id_cotizacion='$IdQuote' AND activo='si'"; $result_lines=$conexion->query($lines);//Ejecutar consulta while($execu_lines = $result_lines -> fetch_array(MYSQLI_BOTH)){ $desc=$execu_lines["descuento"]; $cant=$execu_lines["cantidad"]; if($execu_lines['descuento']>0){ $subtotal=$subtotal+((($execu_lines["subtotal"]*$execu_lines["cantidad"])-(($execu_lines["subtotal"]*$execu_lines["cantidad"])*($desc/100)))); }else{ $execu_lines['subtotal']; $subtotal=round($subtotal+($execu_lines['subtotal']*$execu_lines["cantidad"]),2); } } $iva=$subtotal*.16; $total=$subtotal*1.16; $updatequote="UPDATE quotes SET subtotal='$subtotal',iva='$iva',total='$total' WHERE id_cotizacion='$IdQuote'"; $conexion -> query($updatequote)or die("Error actualizar cotizaciones".mysql_error()); /*************************************************/ $query_quote = " SELECT * FROM quotes WHERE id_cotizacion='$IdQuote'"; $consu_quote = $conexion -> query($query_quote); $execu_quote = $consu_quote->fetch_array(MYSQLI_BOTH); $Cliente=$execu_quote['cliente']; $Direccion=$execu_quote['direccion']; $Telefono=$execu_quote['telefono']; $Email=$execu_quote['email']; $Fecha=$execu_quote['fecha_creacion']; $BDSubtotal=$execu_quote['subtotal']; $BDIva=$execu_quote['iva']; $BDTotal=$execu_quote['total']; $IdCliente=$execu_quote['id_cliente']; $IdEnvio=$execu_quote['id_envio']; $query_cliente = " SELECT * FROM clientes WHERE id='$IdCliente'"; $consu_cliente = $conexion -> query($query_cliente); $execu_cliente = $consu_cliente->fetch_array(MYSQLI_BOTH); $NomCliente=$execu_cliente['nombre'].' '.$execu_cliente['a_paterno'].' '.$execu_cliente['a_materno']; $Email=$execu_cliente['correo']; $query_envio = " SELECT * FROM clientes_ship WHERE id='$IdEnvio'"; $consu_envio = $conexion -> query($query_envio); $execu_envio = $consu_envio->fetch_array(MYSQLI_BOTH); $Calle=$execu_envio['calle'].' '.$execu_envio['numero'].', Col:'.$execu_envio['colonia'].', Estado: '.$execu_envio['estado'].' CP:'.$execu_envio['cp']; //$Colonia=$execu_envio['colonia']; //$Estado=$execu_envio['estado']; //$CP=$execu_envio['cp']; ?> <div class="row" style="height: 100%;"> <div class="col-md-12" > <div class="x_panel" style="height: 100%;"> <div class="x_content" style="height: 100%;"> <section class="content invoice" style="height: 100%; " > <div class="row"> <div class="invoice-header col-sm-12"> <h1> <img src="../../images/Logo.png" style="width:80px; height:80px;"> Cotización <small class="pull-right"> <?php echo date('d-m-Y')?></small> </h1> </div> </div> <div class="row invoice-info"> <div class="col-sm-4 invoice-col"> Nosotros <address> <strong>CED231201HE3</strong> <br><strong>CORTES Y ENCHAPADOS DALLOWAY SA DE CV</strong> <br>Carretera al campo militar No. 6, Col. San Antonio de la Punta <br>Queretaro, CP 76137 <br>Telefono: 4424658075 <br>Email: ventas@cocinasdalloway.com </address> </div> <div class="col-sm-4 invoice-col"> Cliente <address> <strong><?php echo $NomCliente;?></strong> <br><?php echo $Calle;?> <br>Telefono: <?php echo $Telefono;?> <br>Email: <?php echo $Email;?> <br>Creó: <?php echo $Fecha;?> </address> </div> <div class="col-sm-4 invoice-col"> <b>Cotización #C<?php echo str_pad($IdQuote, 6, "0", STR_PAD_LEFT);?></b><br/> <b>Vigencia:</b> <?php echo date('d-m-Y', strtotime($Fecha. ' + 10 days'));?><br/> <b>Entrega estimada:</b> <?php echo sumasdiasemana($Fecha,15);?> </div> </div> <div class="row"> <div class=" table"> <table class="table table-striped"> <thead> <tr> <th>#</th> <th>Codigo</th> <th style="width: 59%">Descripcion</th> <th>Cantidad</th> <th>UM</th> <th>Unitario</th> <th>Descuento</th> <th>Subtotal</th> </tr> </thead> <tbody> <?php $contador=1; $query_quote = " SELECT * FROM quote_lines WHERE id_cotizacion='$IdQuote' AND activo='si'"; $consu_quote = $conexion -> query($query_quote); while ( $execu_quote = $consu_quote->fetch_array(MYSQLI_BOTH) ){ ?> <tr> <td><?php echo $contador;?></td> <td><?php echo $execu_quote['codigo'];?></td> <td><?php echo $execu_quote['descripcion'];?></td> <td><?php echo $execu_quote['cantidad'];?></td> <td><?php echo $execu_quote['um'];?></td> <td>$<?php echo number_format($execu_quote['subtotal'],2);?></td> <td><?php echo ($execu_quote['descuento']);?>%</td> <td>$ <?php if($execu_quote['descuento']>0){ $Porcentaje=$execu_quote['descuento']/100; $totalLinea=Round((($execu_quote['subtotal']*$execu_quote['cantidad'])-(($execu_quote['subtotal']*$execu_quote['cantidad'])*$Porcentaje)),2); $subTotal=$subTotal+($totalLinea); echo number_format(($totalLinea),2); }else{ echo number_format(($execu_quote['subtotal']*$execu_quote['cantidad']),2); $subTotal=$subTotal+($execu_quote['subtotal']*$execu_quote['cantidad']); } ?></td> </tr> <?php $contador++; } ?> </tbody> </table> </div> </div> <div class="" style=" margin:0px;"> <div class="row " style=""> <div class="col-md-6"> <p class="lead">Datos Bancarios:</p> <img src="../images/visa.png" alt="Visa"> <img src="../images/mastercard.png" alt="Mastercard"> <img src="../images/american-express.png" alt="American Express"> <img src="../images/paypal.png" alt="Paypal"> <p class="text-muted well well-sm no-shadow" style="margin-top: 10px;"> <b>Cuenta PYME BBVA: </b>0482407256<br/> <b>CUENTA CLABE: </b>012680004824072563<br/> <b>Depositos en Efectivo: </b>4152 3139 9365 3330<br/> </p> </div> <div class="col-md-6"> <p class="lead">Vigencia <?php echo date('d-m-Y', strtotime($Fecha. ' + 10 days'));?></p> <div class="table-responsive"> <table class="table"> <tbody> <tr> <th style="width:50%">Subtotal:</th> <td>$<?php echo number_format($BDSubtotal,2);?></td> </tr> <tr> <th>IVA:</th> <td>$<?php echo $iva=number_format(($BDIva),2)?></td> </tr> <tr> <th>Total:</th> <td>$<?php echo number_format($BDTotal,2)?></td> </tr> </tbody> </table> </div> </div> </div> <div class="row" > <div class="col-md-12 "> <p class="text-muted well well-sm no-shadow" > <b>IMPORTANTE:</b> <br/> El tiempo de entrega se comienza a partir de fincada la orden, identificación de pago completo y la orden firmada. <b>Precios sujetos a cambios sin previo aviso.</b><br/> Después de terminado su pedido cuenta con 3 días hábiles para recogerlo, después de ese tiempo se hará un cargo del 1% diario del valor de la orden, por concepto de almacenaje.<br/> La empresa no se hace responsable de daños a la mercancía durante el transporte. <b>Verificar políticas de la empresa.</b><br/> La cotización tendrá una vigencia de 10 días hábiles, pasando estos días se generará una nueva cotización con precios actualizados.<br/> Dalloway NO hace trabajos eléctricos, hidráulicos y albañilería.<br/> </p> <table class="text-muted well well-sm no-shadow" border="1" style="width:100%; border: 1px solid gray; border-collapse: collapse;"> <tr style=""> <td style="" class="text-center" style="width:20%"><b>Condiciones</b></td> <td style="" class="text-center" style="width:80%">Después de fincado el pedido <b>NO</b> se aceptan <b>CANCELACIONES NI MODIFICACIONES</b></td> </tr> <tr style=""> <td style="" class="text-center" colspan="2"><a >www.cocinasdalloway.com</a></td> </tr> </table> <br/> </div> </div> </div> <div class="row no-print" style=" bottom: 0; "> <div class=" "> <button class="btn btn-default d-print-none" onclick="window.print();"><i class="fa fa-print"></i> Imprimir</button> </div> </div> </section> </div> </div> </div> </div> </body> <script src="../../plugins/jquery/jquery.min.js"></script> <!-- Bootstrap 4 --> <script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- AdminLTE App --> <script src="../../dist/js/adminlte.min.js"></script> <!-- Toastr --> <script src="../../plugins/toastr/toastr.min.js"></script> </body> <?php }else{ ?> <body class="hold-transition login-page" > <div class="login-box"> <div class="login-box"> <!-- /.login-logo --> <div class="card card card-outline card-danger"> <div class="card-header text-center"> <!--<a href="" class="h1"><b>Admin</b>LTE</a>--> <img src="../../dist/img/negocio/Berata_Logotipo_B.webp"> </div> <div class="card-body"> <p class="login-box-msg"> No se encontro información de la cotización <!-- /.social-auth-links --> </p> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.login-box --> </div> </body> <?php } ?> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.22 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка