diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index 230c588f7e4..a229f3c985d 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -248,11 +248,8 @@ class Dolistore
// phpcs:enable
global $langs, $conf;
$html = "";
- $parity = "pair";
$last_month = time() - (30 * 24 * 60 * 60);
foreach ($this->products as $product) {
- $parity = ($parity == "impair") ? 'pair' : 'impair';
-
// check new product ?
$newapp = '';
if ($last_month < strtotime($product->date_add)) {
@@ -267,7 +264,7 @@ class Dolistore
// add image or default ?
if ($product->id_default_image != '') {
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
- $images = '';
+ $images = ' ';
$images .= ' ';
} else {
$images = ' ';
@@ -306,16 +303,16 @@ class Dolistore
//.''.$langs->trans("SeeInMarkerPlace").'
//output template
- $html .= '
+ $html .= '
'.$newapp.$images.'
'.$product->name->language[$this->lang - 1]
.''.$version.'
- '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.' '.$product->description_short->language[$this->lang - 1].'
- '.$product->description->language[$this->lang - 1].'
- '.$price.'
-
- '.$download_link.'
- ';
+ '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.' '.$product->description_short->language[$this->lang - 1].'';
+ // do not load if display none
+ //$html .= ''.$product->description->language[$this->lang - 1].' ';
+ $html .= ''.$price.' ';
+ $html .= ''.$download_link.' ';
+ $html .= '';
}
return $html;
}
diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css
index 49d833ade17..0f3606071f0 100644
--- a/htdocs/takepos/css/phone.css
+++ b/htdocs/takepos/css/phone.css
@@ -79,3 +79,31 @@ button.phonebutton {
height:90%;
font-weight: bold;
}
+
+button.publicphonebutton {
+ display: inline-block;
+ position: relative;
+ padding: 0;
+ line-height: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ text-align: center;
+ overflow: visible; /* removes extra width in IE */
+ width:33%;
+ height:90%;
+ font-weight: bold;
+}
+
+button.publicphonebutton2 {
+ display: inline-block;
+ position: relative;
+ padding: 0;
+ line-height: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ text-align: center;
+ overflow: visible; /* removes extra width in IE */
+ width:33%;
+ font-weight: bold;
+ padding: 8px 16px;
+}
diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php
index c4d60a52c1b..3aca3b22ebf 100644
--- a/htdocs/takepos/genimg/qr.php
+++ b/htdocs/takepos/genimg/qr.php
@@ -29,5 +29,8 @@ 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("http://www.takepos.com", 'QRCODE', 'Y');
+$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y');
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 9f0e6649cf6..3d6cec96319 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -32,7 +32,7 @@ if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); }
if (!defined('NOREQUIREHTML')) { define('NOREQUIREHTML', '1'); }
if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); }
-require '../main.inc.php';
+if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
@@ -47,16 +47,11 @@ $idproduct = GETPOST('idproduct', 'int');
$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant
$placeid = 0; // $placeid is ID of invoice
-if ($_SESSION["publicterminal"]) {
- $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers
-}
-elseif (empty($user->rights->takepos->run)) {
+if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
accessforbidden();
}
-
-
-if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || $_SESSION["publicterminal"])
+if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))
{
// DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED
if ($_SESSION["takeposterminal"] == "")
@@ -629,6 +624,12 @@ $(document).ready(function() {
if (selectedline==this.id) return; // If is already selected
else selectedline=this.id;
selectedtext=$('#'+selectedline).find("td:first").html();
+
});
/* Autoselect the line */
@@ -913,7 +914,7 @@ if ($_SESSION["basiclayout"] == 1)
$htmlforlines .= '" onclick="AddProduct(\''.$place.'\', '.$row->id.')">';
$htmlforlines .= '';
$htmlforlines .= $row->label;
- $htmlforlines .= ' ';
+ $htmlforlines .= ''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
';
$htmlforlines .= ''."\n";
}
$htmlforlines .= '';
@@ -990,6 +991,7 @@ if ($placeid > 0)
}
$htmlforlines .= '" id="'.$line->id.'">';
$htmlforlines .= '';
+ if ($_SESSION["basiclayout"] == 1) $htmlforlines .= $line->qty." x ";
//if ($line->product_label) $htmlforlines.= ''.$line->product_label.' ';
if (isset($line->product_type))
{
diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php
index eac1f40bfd1..8714173e45f 100644
--- a/htdocs/takepos/phone.php
+++ b/htdocs/takepos/phone.php
@@ -45,6 +45,7 @@ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant
$action = GETPOST('action', 'alpha');
$setterminal = GETPOST('setterminal', 'int');
+$idproduct = GETPOST('idproduct', 'int');
if ($setterminal > 0)
{
@@ -53,14 +54,10 @@ if ($setterminal > 0)
$langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter"));
-if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
- $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers
-}
-elseif (empty($user->rights->takepos->run)) {
+if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
accessforbidden();
}
-
/*
* View
*/
@@ -74,48 +71,82 @@ $head = '
';
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
-?>
-
-
-global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print ''.$langs->trans('TerminalSelect').'
';
-?>
+ global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print ''.$langs->trans('TerminalSelect').'
';
+ ?>
'.strtoupper(substr($langs->trans('Floors'), 0, 3)).'';
- print ''.strtoupper(substr($langs->trans('Categories'), 0, 3)).' ';
- print ''.strtoupper(substr($langs->trans('Order'), 0, 3)).' ';
- print ''.strtoupper(substr($langs->trans('Logout'), 0, 3)).' ';
- if ($_SESSION["publicterminal"]) print ''.strtoupper(substr($langs->trans('Payment'), 0, 3)).' ';
+ if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')){
+ print ''.strtoupper(substr($langs->trans('Floors'), 0, 3)).' ';
+ print ''.strtoupper(substr($langs->trans('Categories'), 0, 3)).' ';
+ print ''.strtoupper(substr($langs->trans('Order'), 0, 3)).' ';
+ print ''.strtoupper(substr($langs->trans('Logout'), 0, 3)).' ';
+ }
+ else{
+ print ''.strtoupper(substr($langs->trans('Categories'), 0, 5)).' ';
+ print ''.strtoupper(substr($langs->trans('Order'), 0, 5)).' ';
+ print ''.strtoupper(substr($langs->trans('Payment'), 0, 5)).' ';
+ }
?>
@@ -207,7 +315,8 @@ if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"]
-global->TAKEPOS_AUTO_ORDER) accessforbidden(); // If Auto Order is disabled never allow NO LOGIN access
+
$_SESSION["basiclayout"] = 1;
-$_SESSION["publicterminal"] = true; // Is a public customer
+$_SESSION["takeposterminal"] = 1;
define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1);
-include '../phone.php';
+if (GETPOSTISSET("mobilepage")) require '../invoice.php';
+else require '../phone.php';