\n";
+}
+
print '';
print '';
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index d7be7d4e6eb..f4242c616e0 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -158,7 +158,7 @@ if ($ret > 0) {
$placeid = $invoice->id;
}
-$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'. isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
+$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
$soc = new Societe($db);
if ($invoice->socid > 0) {
@@ -879,6 +879,9 @@ if ($action == "valid" || $action == "history" || $action == 'creditnote') {
$sectionwithinvoicelink .= ' ';
} else {
$sectionwithinvoicelink .= ' ';
+ if (getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS')) {
+ $sectionwithinvoicelink .= ' ';
+ }
if (getDolGlobalString('TAKEPOS_GIFT_RECEIPT')) {
$sectionwithinvoicelink .= ' ';
}
@@ -1019,6 +1022,11 @@ function SendTicket(id)
$.colorbox({href:"send.php?facid="+id, width:"70%", height:"30%", transition:"none", iframe:"true", title:'trans("SendTicket")); ?>'});
}
+function PrintBox(id, action) {
+ console.log("Open box before printing");
+ $.colorbox({href:"printbox.php?facid="+id+"&action="+action, width:"80%", height:"200px", transition:"none", iframe:"true", title:"trans("PrintWithoutDetails"); ?>"});
+}
+
function Print(id, gift){
console.log("Call Print() to generate the receipt.");
$.colorbox({href:"receipt.php?facid="+id+"&gift="+gift, width:"40%", height:"90%", transition:"none", iframe:"true", title:'trans("PrintTicket")); ?>'});
diff --git a/htdocs/takepos/printbox.php b/htdocs/takepos/printbox.php
new file mode 100644
index 00000000000..5d612fd19f2
--- /dev/null
+++ b/htdocs/takepos/printbox.php
@@ -0,0 +1,102 @@
+
+ * Copyright (C) 2020 Laurent Destailleur
+ *
+ * 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 .
+ */
+
+/**
+ * \file htdocs/takepos/printbox.php
+ * \ingroup takepos
+ * \brief Popup to enter details before printing
+ */
+
+//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
+//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
+//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
+//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
+if (!defined('NOCSRFCHECK')) {
+ define('NOCSRFCHECK', '1');
+}
+if (!defined('NOTOKENRENEWAL')) {
+ define('NOTOKENRENEWAL', '1');
+}
+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
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
+
+global $langs, $db;
+
+$langs->loadLangs(array("bills", "cashdesk"));
+
+$facid = GETPOST('facid', 'int');
+
+$action = GETPOST('action', 'aZ09');
+
+if (empty($user->rights->takepos->run)) {
+ accessforbidden();
+}
+
+
+/*
+ * View
+ */
+
+$arrayofcss = array('/takepos/css/pos.css.php');
+$arrayofjs = array('/takepos/js/jquery.colorbox-min.js');
+
+$head = '';
+top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss);
+?>
+
+
+
+
+