Exemple #1
0
<?php

define('FPDF_FONTPATH', 'font/');
require 'fpdf.php';
//require('code39.php');
include "../../tool.php";
require "qrcode/qrlib.php";
$codigo = $_GET["codigo"];
$IdLocal = getSesionDato("IdTienda");
$descripcion = getDescripcionFromCBMetaProducto($codigo);
$detalle = getDetFromCBMetaProducto($codigo);
$codigobarras = $codigo;
$paginaweb = getPaginaWebLocalId($IdLocal);
$nombrelegal = getNombreLegalLocalId($IdLocal);
$longcadena = strlen($descripcion);
$descripcion1 = $longcadena > 75 ? substr($descripcion, 0, strrpos(substr($descripcion, 0, 75), " ")) : substr($descripcion . ".", 0, 75);
$descripcion2 = $longcadena > 75 ? substr($descripcion . ".", $longcadena + 1, 100) : "";
class PDF extends FPDF
{
    function EAN13($x, $y, $barcode, $h = 40, $w = 0.82)
    {
        $this->Barcode($x, $y, $barcode, $h, $w, 8);
    }
    function UPC_A($x, $y, $barcode, $h = 8, $w = 0.25)
    {
        $this->Barcode($x, $y, $barcode, $h, $w, 12);
    }
    function GetCheckDigit($barcode)
    {
        //Compute the check digit
        $sum = 0;
Exemple #2
0
     $idproducto = CleanID($_GET["Id"]);
     $idlocal = getSesionDato("IdTiendaDependiente");
     $xout = getDetBaseMProducto($idlocal, $idproducto);
     echo $xout;
     exit;
     break;
 case "registraProductoBorrador":
     $xproducto = CleanText($_GET["concepto"]);
     $xusuario = CleanID($_GET["dependiente"]);
     $xlocal = getSesionDato("IdTiendaDependiente");
     echo registraProductoBorrador($xlocal, $xproducto, $xusuario);
     exit;
     break;
 case "mostrardetalleMProducto":
     $CBMP = CleanCadena($_GET["cbmp"]);
     $detalle = getDetFromCBMetaProducto($CBMP);
     $xout = $detalle != '' ? str_replace("<br/>", "\n       -", $detalle) : 0;
     echo $xout;
     exit;
     break;
 case "cargarDetPresupuestoACarritoTPV":
     $tipopresupuesto = CleanText($_GET["tipo"]);
     $idpresupuesto = CleanID($_GET["id"]);
     $idcliente = CleanID($_GET["idcliente"]);
     $xout = obtenerDetPresupuestoTPV($tipopresupuesto, $idpresupuesto, $idcliente);
     echo $xout;
     exit;
     break;
 case "cargarListaBaseMProductosTPV":
     $xout = obtenerListaBaseMProductos();
     echo $xout;