Printable QR

This commit is contained in:
jove@bisquerra.com 2020-06-14 23:39:49 +02:00 committed by Laurent Destailleur
parent 70039d0c41
commit ad432e1e9b
3 changed files with 54 additions and 3 deletions

View File

@ -109,4 +109,6 @@ OrderTemplateToUse=Order template to use
BarRestaurant=Bar Restaurant
AutoOrder=Order by the customer himself
RestaurantMenu=Menu
CustomerMenu=Customer menu
CustomerMenu=Customer menu
ScanToMenu=Scan QR code to see the menu
ScanToOrder=Scan QR code to order

View File

@ -161,7 +161,7 @@ if ($conf->global->TAKEPOS_AUTO_ORDER)
print '<td>';
print "<a target='_blank' href='".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid'])."'>".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid'])."</a>";
print '<td>';
print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode($row['rowid'])."' height='42' width='42'>";
print "<a target='_blank' href='printqr.php?id=".$row['rowid']."'><img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode($row['rowid'])."' height='42' width='42'></a>";
print '</td></tr>';
}
@ -180,7 +180,7 @@ if ($conf->global->TAKEPOS_QR_MENU)
print '<tr class="oddeven value"><td>';
print "<a target='_blank' href='".$urlwithroot."/takepos/public/menu.php'>".$urlwithroot."/takepos/public/menu.php</a>";
print '<td>';
print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' height='42' width='42'>";
print "<a target='_blank' href='printqr.php'><img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' height='42' width='42'></a>";
print '</td></tr>';
print '</table>';
}

View File

@ -0,0 +1,49 @@
<?php
/* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/admin/printqr.php
* \ingroup takepos
* \brief Print QR Menu
*/
require '../../main.inc.php';
$langs->load("cashdesk");
$id = GETPOST('id', 'int');
$_GET['optioncss'] = "print";
print '<center>';
if (GETPOSTISSET("id")) {
print '<h1><b>'.$langs->trans("ScanToOrder").'</b></h1>';
print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode($id)."' width='30%'>";
}
else {
print '<h1><b>'.$langs->trans("ScanToMenu").'</b></h1>';
print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' width='30%'>";
}
print '<h1><b>'.$mysoc->name.'</b></h1>';
print '</center>';
llxFooter();
$db->close();