diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css
index 0f3606071f0..bdfdf45e116 100644
--- a/htdocs/takepos/css/phone.css
+++ b/htdocs/takepos/css/phone.css
@@ -4,6 +4,7 @@ html,body {
margin:0;
height:100%;
width:100%;
+ background-color: #FFF !important;
}
.container{
@@ -17,14 +18,14 @@ html,body {
.phonerow1{
margin: 0 auto;
width: 100%;
- height: 40%;
+ height: auto;
min-height: 40%;
}
.phonerow2{
margin: 0 auto;
width: 100%;
- height: 40%;
+ height: auto;
}
.phonebuttonsrow{
@@ -90,7 +91,71 @@ button.publicphonebutton {
text-align: center;
overflow: visible; /* removes extra width in IE */
width:33%;
- height:90%;
+ height:50px;
+ font-weight: bold;
+ color: #fff;
+}
+
+.phoneblue{
+ color: #fff;
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+
+.phonegreen{
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+ font-size:20px;
+ text-align:center;
+ width:20px;
+}
+
+.phonetable{
+ width:130px;
+}
+
+.phoneqty{
+ font-size:24px;
+ font-weight: bold;
+
+
+}
+
+.phonered{
+ color: #fff;
+ background-color: #dc3545;
+ border-color: #dc3545;
+ font-size:20px;
+ text-align:center;
+ width:20px;
+}
+
+.phoneorange{
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+
+.total{
+ width:100% !important;
+ font-size:24px;
+}
+
+.width24{
+ font-size:24px;
+}
+
+.leftcat{
+ margin-top:15px;
+ float:left;
+ width: 50%;
+ text-align:center;
+ height:150px;;
+ overflow:hidden;
+ margin-bottom:5px;
+ font-size:18px;
+ color:#5B5858;
font-weight: bold;
}
@@ -107,3 +172,28 @@ button.publicphonebutton2 {
font-weight: bold;
padding: 8px 16px;
}
+
+.div-table-responsive-no-min{
+ margin-top:20px;
+}
+
+.comment {
+ float: left;
+ width: 100%;
+ height: auto;
+}
+
+.comment-text-area {
+ float: left;
+ width: 80%;
+ height: auto;
+}
+
+.textinput {
+ float: left;
+ width: 100%;
+ min-height: 75px;
+ outline: none;
+ resize: none;
+ border: 1px solid grey;
+}
diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php
index a5686054193..ea863374f3c 100644
--- a/htdocs/takepos/genimg/index.php
+++ b/htdocs/takepos/genimg/index.php
@@ -25,7 +25,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
-require '../../main.inc.php'; // Load $user and permissions
+if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions
$id = GETPOST('id', 'int');
$w = GETPOST('w', 'int');
@@ -60,7 +60,7 @@ if ($query == "cat")
{
$filename = $obj['photo'];
}
- $file = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename);
+ $file = DOL_URL_ROOT.'/viewimage.php?cache=1&publictakepos=1&modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename);
header('Location: '.$file);
exit;
}
@@ -72,15 +72,20 @@ elseif ($query == "pro")
$objProd = new Product($db);
$objProd->fetch($id);
- $image = $objProd->show_photos('product', $conf->product->multidir_output[$entity], 'small', 1);
+ $image = $objProd->show_photos('product', $conf->product->multidir_output[$objProd->entity], 'small', 1);
preg_match('@src="([^"]+)"@', $image, $match);
$file = array_pop($match);
- if ($file == "") header('Location: ../../public/theme/common/nophoto.png');
- else header('Location: '.$file.'&cache=1');
-}
-else
-{
+ if ($file == "") {
+ header('Location: ../../public/theme/common/nophoto.png');
+ } else {
+ if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
+ header('Location: '.$file.'&cache=1');
+ } else {
+ header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product');
+ }
+ }
+} else {
// TODO We don't need this. Size of image must be defined on HTML page, image must NOT be resize when downloaded.
// The file
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 3d6cec96319..07006eb5cd1 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -70,10 +70,12 @@ if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout ==
';
+ $arrayofcss = array(
+ '/takepos/css/pos.css.php',
+ '/takepos/js/jquery.colorbox-min.js'
+ );
+ $arrayofjs = array('/takepos/js/jquery.colorbox-min.js');
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
- print '
-
- ';
}
/**
@@ -863,6 +865,9 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT)
print $langs->trans('Place')." ".$label." - ";
print $langs->trans('Floor')." ".$floor." - ";
}
+ elseif (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) print $mysoc->name;
+ elseif ($mobilepage == "cats") print $langs->trans('Category');
+ elseif ($mobilepage == "products") print $langs->trans('Label');
}
// In phone version only show when is invoice page
if ($mobilepage == "invoice" || $mobilepage == "") {
@@ -877,6 +882,7 @@ if ($_SESSION["basiclayout"] != 1)
print '
'.$langs->trans('Qty').' | ';
print ''.$langs->trans('TotalTTCShort').' | ';
}
+elseif ($mobilepage == "invoice") print ''.$langs->trans('Qty').' | ';
print "\n";
@@ -889,12 +895,14 @@ if ($_SESSION["basiclayout"] == 1)
$categories = $categorie->get_full_arbo('product');
$htmlforlines = '';
foreach ($categories as $row) {
- $htmlforlines .= '';
- $htmlforlines .= '';
+ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= ' ';
+ else $htmlforlines .= ' | ';
$htmlforlines .= $row['label'];
- $htmlforlines .= ' | ';
- $htmlforlines .= '
'."\n";
+ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= ''."\n";
+ else $htmlforlines .= ''."\n";
}
$htmlforlines .= '';
$htmlforlines .= '';
@@ -910,12 +918,20 @@ if ($_SESSION["basiclayout"] == 1)
$prods = $object->getObjectsInCateg("product");
$htmlforlines = '';
foreach ($prods as $row) {
- $htmlforlines .= 'id.')">';
- $htmlforlines .= '| ';
- $htmlforlines .= $row->label;
- $htmlforlines .= ' '.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).' ';
- $htmlforlines .= ' |
'."\n";
+ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
+ $htmlforlines .= '
';
+ $htmlforlines .= $row->label.''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency);
+ $htmlforlines .= ''."\n";
+ }
+ else {
+ $htmlforlines .= '';
+ $htmlforlines .= $row->label;
+ $htmlforlines .= ' '.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).' ';
+ $htmlforlines .= ''."\n";
+ }
}
$htmlforlines .= '';
print $htmlforlines;
@@ -991,7 +1007,7 @@ if ($placeid > 0)
}
$htmlforlines .= '" id="'.$line->id.'">';
$htmlforlines .= ' | ';
- if ($_SESSION["basiclayout"] == 1) $htmlforlines .= $line->qty." x ";
+ if ($_SESSION["basiclayout"] == 1) $htmlforlines .= ''.$line->qty." x ";
//if ($line->product_label) $htmlforlines.= ''.$line->product_label.'';
if (isset($line->product_type))
{
@@ -1026,7 +1042,8 @@ if ($placeid > 0)
}
}
if (!empty($line->array_options['options_order_notes'])) $htmlforlines .= " (".$line->array_options['options_order_notes'].")";
- if ($_SESSION["basiclayout"] != 1)
+ if ($_SESSION["basiclayout"] == 1) $htmlforlines .= ' | ';
+ if ($_SESSION["basiclayout"] != 1)
{
$moreinfo = '';
$moreinfo .= $langs->transcountry("TotalHT", $mysoc->country_code).': '.price($line->total_ht);
diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php
index 8714173e45f..0e49eff4ed5 100644
--- a/htdocs/takepos/phone.php
+++ b/htdocs/takepos/phone.php
@@ -39,10 +39,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
// Decode place if it is an order from customer phone
- $key = GETPOST('key');
- $place=dol_decode($key);
+ $place = GETPOSTISSET("key") ? dol_decode(GETPOST('key')) : GETPOST('place', 'aZ09');
+} else {
+ $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant
}
-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');
@@ -62,28 +62,54 @@ if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLI
* View
*/
-// Title
-$title = 'TakePOS - Dolibarr '.DOL_VERSION;
-if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE;
-$head = '
-
-
-';
-top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
-
-print '';
-
-if ($action=="productinfo"){
+if ($action == "productinfo") {
$prod = new Product($db);
$prod->fetch($idproduct);
- print "".$prod->label." ";
- print ' ';
+ print '';
+ print " ".$prod->label." ";
+ print ' ';
print " ".$prod->description;
print " ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."";
print ' ';
- print '';
+} elseif ($action == "publicpreorder") {
+ print '';
+ print "
";
+ print '';
+ print ' ';
+} elseif ($action == "publicpayment") {
+ $langs->loadLangs(array("orders"));
+ print ''.$langs->trans('StatusOrderDelivered').'';
+ print '';
+ print ' ';
}
-elseif ($action=="editline"){
+elseif ($action == "checkplease") {
+ if (GETPOSTISSET("payment")) {
+ print ''.$langs->trans('StatusOrderDelivered').'';
+ require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
+ $printer = new dolReceiptPrinter($db);
+ $printer->initPrinter($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$_SESSION["takeposterminal"]});
+ $printer->printer->feed();
+ $printer->printer->feed();
+ $printer->printer->text($langs->trans('IM'));
+ $printer->printer->feed();
+ $printer->printer->text($langs->trans('Place').": ".$place);
+ $printer->printer->feed();
+ $printer->printer->text($langs->trans('Payment').": ".$langs->trans(GETPOST('payment', 'alpha')));
+ $printer->printer->feed();
+ $printer->printer->feed();
+ $printer->printer->feed();
+ $printer->printer->feed();
+ $printer->printer->feed();
+ $printer->close();
+ } else {
+ print '';
+ print '';
+ print ' ';
+ }
+} elseif ($action == "editline") {
$placeid = GETPOST('placeid', 'int');
$selectedline = GETPOST('selectedline', 'int');
$invoice = new Facture($db);
@@ -95,17 +121,25 @@ elseif ($action=="editline"){
$prod = new Product($db);
$prod->fetch($line->fk_product);
print "".$prod->label." ";
- print ' ';
+ print ' ';
print " ".$prod->description;
print " ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."";
print ' ';
- print '';
- print '';
- print '';
+ print '';
+ print '';
+ print '';
}
}
-}
-else {
+} else {
+ // Title
+ $title = 'TakePOS - Dolibarr '.DOL_VERSION;
+ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE;
+ $head = '
+
+
+';
+ $arrayofcss = array('/takepos/css/phone.css');
+ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
?>
-
+
global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print ''.$langs->trans('TerminalSelect').' ';
?>
@@ -300,19 +363,19 @@ function CheckPlease(){
print '';
print '';
}
- else{
- print '';
- print '';
- print '';
+ else {
+ print '';
+ print '';
+ print '';
}
?>
-
-
|