mostrar2("1"); $Prutas = $Rrutas->fetch_object(); $rutalogo = $Prutas->rutalogo; $datos = $factura->datosemp($_SESSION['idempresa']); $datose = $datos->fetch_object(); //En el objeto $rspta Obtenemos los valores devueltos del método ventacabecera del modelo $rspta = $factura->ventacabecera($_GET["id"], $_SESSION['idempresa']); //$cuotas = $rspta->cuotas; $logo = "../files/logo/" . $datose->logo; $ext_logo = substr($datose->logo, strpos($datose->logo, '.'), -5); $reg = $rspta->fetch_object(); $cuotas = explode(",", $reg->cuotas); // foreach ($cuotas as $cuota) { // $datos_cuota = explode("|", $cuota); // $ncuota = $datos_cuota[0]; // $montocuota = $datos_cuota[1]; // $fechacuota = $datos_cuota[2]; // //aqui podrias imprimir o utilizar los datos de las cuotas como quieras // } if ($reg->nombretrib == "IGV") { $nombretigv = $reg->subtotal; $nombretexo = "0.00"; } else if ($reg->nombretrib == "EXO") { $nombretigv = "0.00"; $nombretexo = $reg->subtotal; } else { // En caso de otros valores, puedes establecer un valor predeterminado o manejarlo como desees $nombretigv = "0.00"; $nombretexo = "0.00"; } ?>
.:: nombre_comercial)) ?> ::.
textolibre; ?>
R.U.C. numero_ruc; ?>
domicilio_fiscal) . ' - ' . $datose->telefono1 . "-" . $datose->telefono2; ?>
correo)); ?>
web)); ?>
-------------------------------------------------------
FACTURA DE VENTA ELECTRÓNICA
numeracion_08; ?>
-------------------------------------------------------
Cliente: cliente; ?>
Documento: RUC - numero_documento; ?>
Dirección: direccion)); ?>
Fec. de emision: fecha; ?>
Fec. de vencimiento: fechavenc; ?>
Moneda: moneda; ?>
Vendedor: vendedorsitio; ?>
Tipo de pago: tipopago; ?>
Obs: descripcion_leyenda_31_2; ?>
tipopago == "Contado") { //echo ""; echo ""; // Abrir fila de los nombres de los tipos de pago if ($reg->yape > 0) { echo ""; } if ($reg->visa > 0) { echo ""; } if ($reg->efectivo > 0) { echo ""; } if ($reg->plin > 0) { echo ""; } if ($reg->masterC > 0) { echo ""; } if ($reg->dep > 0) { echo ""; } echo ""; // Cerrar fila de los nombres echo ""; // Abrir fila de los montos if ($reg->yape > 0) { echo ""; } if ($reg->visa > 0) { echo ""; } if ($reg->efectivo > 0) { echo ""; } if ($reg->plin > 0) { echo ""; } if ($reg->masterC > 0) { echo ""; } if ($reg->dep > 0) { echo ""; } echo ""; // Cerrar fila de los montos } elseif ($reg->tipopago == "Credito") { echo ""; } ?>
Métodos de pago:
YapeVisaEfectivoPlinMasterCDep.
$reg->yape $reg->visa $reg->efectivo $reg->plin $reg->masterC $reg->dep
"; $cuotas = explode(",", $reg->cuotas); echo ""; echo ""; foreach ($cuotas as $c) { $detalles = explode("|", $c); echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
Nro CuotaMontoFecha
" . $detalles[0] . "" . $detalles[1] . "" . $detalles[2] . "
"; echo "
mostrar2($_SESSION['idempresa']); $Prutas = $Rrutas->fetch_object(); $rutafirma = $Prutas->rutafirma; // ruta de la carpeta FIRMA $data[0] = ""; //==================== PARA IMAGEN DEL CODIGO HASH ================================================ //set it to writable location, a place for temp generated PNG files $PNG_TEMP_DIR = dirname(__FILE__) . DIRECTORY_SEPARATOR . '/generador-qr/temp' . DIRECTORY_SEPARATOR; //html PNG location prefix $PNG_WEB_DIR = 'temp/'; include 'generador-qr/phpqrcode.php'; //ofcourse we need rights to create temp dir if (!file_exists($PNG_TEMP_DIR)) { mkdir($PNG_TEMP_DIR); } $filename = $PNG_TEMP_DIR . 'test.png'; //processing form input //remember to sanitize user input in real-life solution !!! $dataTxt = $reg->numero_ruc . "|" . $reg->tipo_documento_07 . "|" . $reg->serie . "|" . $reg->numerofac . "|" . $reg->sumatoria_igv_22_1 . "|" . $reg->importe_total_venta_27 . "|" . $reg->fecha2 . "|" . $reg->tipo_documento . "|" . $reg->numero_documento . "|"; $errorCorrectionLevel = 'H'; $matrixPointSize = '2'; // user data $filename = 'generador-qr/temp/test' . md5($dataTxt . '|' . $errorCorrectionLevel . '|' . $matrixPointSize) . '.png'; QRcode::png($dataTxt, $filename, $errorCorrectionLevel, $matrixPointSize, 2); $PNG_WEB_DIR . basename($filename); // //==================== PARA IMAGEN ================================================ $logoQr = $filename; //$logoQr = "generador-qr/temp/".$datose->logo; $ext_logoQr = substr($filename, strpos($filename, '.'), -4); //ImgQrT($logoQr, $ext_logoQr); //======= PARA EXTRAER EL HASH DEL DOCUMENTO FIRMADO ======================================== $rsptad = $factura->ventadetalle($_GET["id"]); $cantidad = 0; while ($regd = $rsptad->fetch_object()) { if ($regd->nombretribu == "IGV") { $pv = $regd->valor_uni_item_14; $subt = $regd->subtotal; } else { $pv = $regd->precio; $subt = $regd->subtotal2; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $cantidad += $regd->cantidad_item_12; } ?>
-----------------------------------------------------
Cant. Producto V.u. Importe
-----------------------------------------------------
" . $regd->cantidad_item_12 . "" . strtolower($regd->articulo) . "" . number_format($pv, 2) . "" . $subt . "
-----------------------------------------------------
Descuento : tdescuento ?>
Op. Gravada :
Op. Exonerado :
Op. Inafecto : 0.00
I.G.V. : sumatoria_igv_22_1 ?>
Imp. Pagado : ipagado ?>
Vuelto : saldo ?>
Importe a pagar : importe_total_venta_27 ?>
ValorEnLetras($reg->importe_total_venta_27, "NUEVOS SOLES")); echo ""; echo "
-----------------------------------------------------

SON: " . $con_letra . "
"; ?>
hashc; ; ?>
Representación impresa de la Factura de Venta Electrónica puede ser consultada en webconsul)); ?>
::.GRACIAS POR SU COMPRA.::