Update QR
This commit is contained in:
parent
5325971517
commit
3cc249a887
@ -27,10 +27,15 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
require '../../main.inc.php'; // Load $user and permissions
|
||||
require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php';
|
||||
|
||||
$key = GETPOST('key');
|
||||
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
|
||||
$module = new modTcpdfbarcode();
|
||||
$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y');
|
||||
if (GETPOSTISSET("key")) {
|
||||
$key = GETPOST('key');
|
||||
$module = new modTcpdfbarcode();
|
||||
$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".$key, 'QRCODE', 'Y');
|
||||
}
|
||||
else {
|
||||
$module = new modTcpdfbarcode();
|
||||
$result = $module->buildBarCode($urlwithroot."/takepos/public/menu.php", 'QRCODE', 'Y');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user