$datos_cmp_base_64 = json_encode([
"ver" => 1,
"fecha" => substr($venta['fecha'], 0, 10),
"cuit" => (int) $_SESSION['configuracion_cuit'],
"ptoVta" => (int) $tipoventa['puntodeventa'],
"tipoCmp" => (int) $tipoventa['idcomportamiento'],
"nroCmp" => (int) $venta['numero'],
"importe" => (float) $venta['total'],
"moneda" => "PES",
"ctz" => (float) 1,
"tipoDocRec" => (int) $venta['tipo_doc'],
"nroDocRec" => (int) $venta['cuit'],
"tipoCodAut" => "E",
"codAut" => (int) $venta['cae']
]);
$datos_cmp_base_64 = base64_encode($datos_cmp_base_64);
$to_qr = $url.'?p='.$datos_cmp_base_64;
$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
'QRCODE,H',
$to_qr,
-4,
-4,
'black',
array(-2, -2, -2, -2)
)->setBackgroundColor('white');
$qr_div = base64_encode($bobj->getPngData());
return $qr_div;