25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
30 require_once DOL_DOCUMENT_ROOT.
"/core/lib/takepos.lib.php";
35 $langs->loadLangs(array(
"admin",
"cashdesk",
"printing"));
44 if (
GETPOST(
'action',
'alpha') ==
'set')
50 $suplement_category =
GETPOST(
'TAKEPOS_SUPPLEMENTS_CATEGORY',
'alpha');
51 if ($suplement_category < 0) $suplement_category = 0;
53 $res =
dolibarr_set_const($db,
"TAKEPOS_SUPPLEMENTS_CATEGORY", $suplement_category,
'chaine', 0,
'', $conf->entity);
68 if ($conf->global->TAKEPOS_ORDER_NOTES == 1) {
70 $extrafields->addExtraField(
'order_notes',
'Order notes',
'varchar', 0, 255,
'facturedet', 0, 0,
'',
'', 0,
'', 0, 1);
77 $form =
new Form($db);
80 $arrayofcss = array(
"/takepos/css/colorbox.css");
82 llxHeader(
'', $langs->trans(
"CashDeskSetup"),
'',
'', 0, 0, $arrayofjs, $arrayofcss);
84 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php">'.$langs->trans(
"BackToModuleList").
'</a>';
91 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
92 print '<input type="hidden" name="token" value="'.newToken().
'">';
93 print '<input type="hidden" name="action" value="set">';
96 <script
type=
"text/javascript" src=
"<?php echo DOL_URL_ROOT ?>/takepos/js/jquery.colorbox-min.js"></script> <!-- TODO It seems we don
't need this -->
97 <script type="text/javascript">
99 console.log("Open box to select floor");
100 $.colorbox({href:"<?php echo DOL_URL_ROOT ?>/takepos/floors.php?mode=edit&place=0", width:"90%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Floors"); ?>"});
106 print $langs->trans("EnableBarOrRestaurantFeatures");
107 print ajax_constantonoff("TAKEPOS_BAR_RESTAURANT", array(), $conf->entity, 0, 0, 1, 0);
111 if ($conf->global->TAKEPOS_BAR_RESTAURANT) {
113 print '<a href=
"" onclick=
"Floors(); return false;"><span
class=
"fa fa-glass-cheers"></span>
'.$langs->trans("DefineTablePlan").'</a><br>
';
116 print '<div
class=
"div-table-responsive-no-min">
';
117 print '<table
class=
"noborder centpercent">
';
118 print '<tr
class=
"liste_titre">
';
119 print '<td
class=
"titlefieldcreate">
'.$langs->trans("Parameters").'</td><td>
'.$langs->trans("Value").'</td>
';
122 if ($conf->global->TAKEPOS_PRINT_METHOD != "browser") {
123 print '<tr
class=
"oddeven value"><td>
';
124 print $langs->trans("OrderPrinters").' (<a href=
"'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">
'.$langs->trans("Setup").'</a>)
';
127 print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0);
128 //print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
131 print '<tr
class=
"oddeven value"><td>
';
132 print $langs->trans("OrderNotes");
135 print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0);
136 //print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
140 print '<tr
class=
"oddeven value"><td>
';
141 print $langs->trans("BasicPhoneLayout");
144 //print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1);
145 print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0);
148 print '<tr
class=
"oddeven value"><td>
';
149 print $langs->trans("ProductSupplements");
152 //print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1);
153 print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0);
156 if ($conf->global->TAKEPOS_SUPPLEMENTS)
158 print '<tr
class=
"oddeven"><td>
';
159 print $langs->trans("SupplementCategory");
162 print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY
', 64, 0, 0);
163 print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY
');
164 print "</td></tr>\n";
167 print '<tr
class=
"oddeven value"><td>
';
168 print 'QR -
'.$langs->trans("CustomerMenu");
171 print ajax_constantonoff("TAKEPOS_QR_MENU", array(), $conf->entity, 0, 0, 1, 0);
174 print '<tr
class=
"oddeven value"><td>
';
175 print 'QR -
'.$langs->trans("AutoOrder");
178 print ajax_constantonoff("TAKEPOS_AUTO_ORDER", array(), $conf->entity, 0, 0, 1, 0);
186 print '<div
class=
"center"><input type=
"submit" class=
"button button-save" value=
"'.$langs->trans("Save
").'"></div>
';
189 if ($conf->global->TAKEPOS_BAR_RESTAURANT) {
190 if ($conf->global->TAKEPOS_QR_MENU)
192 $urlwithouturlroot = preg_replace('/
'.preg_quote(DOL_URL_ROOT, '/
').'$/i
', '', trim($dolibarr_main_url_root));
193 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
195 print '<table
class=
"noborder centpercent">
';
196 print '<tr
class=
"liste_titre">
';
197 print '<td>
'.$langs->trans("URL").'</td><td
class=
"right">
'.$langs->trans("QR").'</td>
';
199 print '<tr
class=
"oddeven value"><td>
';
200 print "<a target='_blank
' href='".$urlwithroot."/takepos/
public/menu.php
'>".$urlwithroot."/takepos/public/menu.php</a>";
202 print '<td
class=
"right">
';
203 print "<a target='_blank
' href='printqr.php
'><img src='".DOL_URL_ROOT."/takepos/genimg/qr.php
' height='42
' width='42
'></a>";
208 if ($conf->global->TAKEPOS_AUTO_ORDER)
211 print '<table
class=
"noborder centpercent">
';
212 print '<tr
class=
"liste_titre">
';
213 print '<td>
'.$langs->trans("Table").'</td><td>
'.$langs->trans("URL").'</td><td
class=
"right">
'.$langs->trans("QR").'</td>
';
216 //global $dolibarr_main_url_root;
217 $urlwithouturlroot = preg_replace('/
'.preg_quote(DOL_URL_ROOT, '/
').'$/i
', '', trim($dolibarr_main_url_root));
218 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
219 $sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables";
220 $resql = $db->query($sql);
222 while ($row = $db->fetch_array($resql)) {
223 print '<tr
class=
"oddeven value"><td>
';
224 print $langs->trans("Table")." ".$row['label
'];
227 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>";
229 print '<td
class=
"right">
';
230 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>";
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
</td >< tdcolspan="3">< spanclass="opacitymedium"></span ></td ></tr >< trclass="liste_total"> CREANCES DETTES< tdcolspan="3"class="right"></td >< tdcolspan="3"class="right"></td ></tr > CREANCES DETTES RECETTES DEPENSES trips CREANCES DETTES Y m expensereport p date_valid Y m expensereport pe datep $db idate($date_start)."' AND $column < p rowid
dolibarr_set_const($db, $name, $value, $type= 'chaine', $visible=0, $note= '', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
takepos_admin_prepare_head()
Prepare array with list of tabs.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type