24 require
'../../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
29 require_once DOL_DOCUMENT_ROOT.
"/core/lib/takepos.lib.php";
32 if (!empty($_REQUEST[
'CASHDESK_ID_THIRDPARTY_id'])) {
33 $_GET[
'CASHDESK_ID_THIRDPARTY'] =
GETPOST(
'CASHDESK_ID_THIRDPARTY_id',
'alpha');
34 $_POST[
'CASHDESK_ID_THIRDPARTY'] =
GETPOST(
'CASHDESK_ID_THIRDPARTY_id',
'alpha');
35 $_REQUEST[
'CASHDESK_ID_THIRDPARTY'] =
GETPOST(
'CASHDESK_ID_THIRDPARTY_id',
'alpha');
41 $langs->loadLangs(array(
"admin",
"cashdesk"));
45 $sql =
"SELECT code, libelle FROM ".MAIN_DB_PREFIX.
"c_paiement";
46 $sql .=
" WHERE entity IN (".getEntity(
'c_paiement').
")";
47 $sql .=
" AND active = 1";
48 $sql .=
" ORDER BY libelle";
52 while ($obj = $db->fetch_object(
$resql)) {
53 array_push($paiements, $obj);
62 if (
GETPOST(
'action',
'alpha') ==
'set') {
64 if (
GETPOST(
'socid',
'int') < 0) $_POST[
"socid"] =
'';
66 $res =
dolibarr_set_const($db,
"CASHDESK_SERVICES",
GETPOST(
'CASHDESK_SERVICES',
'alpha'),
'chaine', 0,
'', $conf->entity);
67 $res =
dolibarr_set_const($db,
"TAKEPOS_ROOT_CATEGORY_ID",
GETPOST(
'TAKEPOS_ROOT_CATEGORY_ID',
'alpha'),
'chaine', 0,
'', $conf->entity);
68 $res =
dolibarr_set_const($db,
"TAKEPOS_BAR_RESTAURANT",
GETPOST(
'TAKEPOS_BAR_RESTAURANT',
'alpha'),
'chaine', 0,
'', $conf->entity);
69 $res =
dolibarr_set_const($db,
"TAKEPOS_TICKET_VAT_GROUPPED",
GETPOST(
'TAKEPOS_TICKET_VAT_GROUPPED',
'alpha'),
'chaine', 0,
'', $conf->entity);
70 $res =
dolibarr_set_const($db,
"TAKEPOS_ORDER_PRINTERS",
GETPOST(
'TAKEPOS_ORDER_PRINTERS',
'alpha'),
'chaine', 0,
'', $conf->entity);
71 $res =
dolibarr_set_const($db,
"TAKEPOS_ORDER_NOTES",
GETPOST(
'TAKEPOS_ORDER_NOTES',
'alpha'),
'chaine', 0,
'', $conf->entity);
72 $res =
dolibarr_set_const($db,
"TAKEPOS_PHONE_BASIC_LAYOUT",
GETPOST(
'TAKEPOS_PHONE_BASIC_LAYOUT',
'alpha'),
'chaine', 0,
'', $conf->entity);
73 $res =
dolibarr_set_const($db,
"TAKEPOS_SUPPLEMENTS",
GETPOST(
'TAKEPOS_SUPPLEMENTS',
'alpha'),
'chaine', 0,
'', $conf->entity);
74 $res =
dolibarr_set_const($db,
"TAKEPOS_SUPPLEMENTS_CATEGORY",
GETPOST(
'TAKEPOS_SUPPLEMENTS_CATEGORY',
'alpha'),
'chaine', 0,
'', $conf->entity);
76 $res =
dolibarr_set_const($db,
"TAKEPOS_SORTPRODUCTFIELD",
GETPOST(
'TAKEPOS_SORTPRODUCTFIELD',
'alpha'),
'chaine', 0,
'', $conf->entity);
77 $res =
dolibarr_set_const($db,
"TAKEPOS_COLOR_THEME",
GETPOST(
'TAKEPOS_COLOR_THEME',
'alpha'),
'chaine', 0,
'', $conf->entity);
78 $res =
dolibarr_set_const($db,
"TAKEPOS_NUM_TERMINALS",
GETPOST(
'TAKEPOS_NUM_TERMINALS',
'alpha'),
'chaine', 0,
'', $conf->entity);
79 $res =
dolibarr_set_const($db,
"TAKEPOS_DIRECT_PAYMENT",
GETPOST(
'TAKEPOS_DIRECT_PAYMENT',
'int'),
'int', 0,
'', $conf->entity);
81 $res =
dolibarr_set_const($db,
"TAKEPOS_EMAIL_TEMPLATE_INVOICE",
GETPOST(
'TAKEPOS_EMAIL_TEMPLATE_INVOICE',
'alpha'),
'chaine', 0,
'', $conf->entity);
82 if (!empty($conf->global->TAKEPOS_ENABLE_SUMUP)) {
83 $res =
dolibarr_set_const($db,
"TAKEPOS_SUMUP_AFFILIATE",
GETPOST(
'TAKEPOS_SUMUP_AFFILIATE',
'alpha'),
'chaine', 0,
'', $conf->entity);
84 $res =
dolibarr_set_const($db,
"TAKEPOS_SUMUP_APPID",
GETPOST(
'TAKEPOS_SUMUP_APPID',
'alpha'),
'chaine', 0,
'', $conf->entity);
89 if (!($res > 0)) $error++;
105 llxHeader(
'', $langs->trans(
"CashDeskSetup"));
107 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php">'.$langs->trans(
"BackToModuleList").
'</a>';
115 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
116 print '<input type="hidden" name="token" value="'.newToken().
'">';
117 print '<input type="hidden" name="action" value="set">';
120 print '<div class="div-table-responsive-no-min">';
123 print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
124 print '<tr class="liste_titre">'.
"\n";
125 print '<td class="titlefield" colspan="2">'.$langs->trans(
"WebSiteDesc").
'</td>';
126 print '<td>'.$langs->trans(
"URL").
'</td>';
129 $url =
'https://www.dolistore.com/45-pos';
131 print '<tr class="oddeven">'.
"\n";
132 print '<td class="titlefield"><a href="'.$url.
'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.
'/theme/dolistore_logo.png"></a></td>';
133 print '<td>'.$langs->trans(
"DolistorePosCategory").
'</td>';
134 print '<td><a href="'.$url.
'" target="_blank" rel="external">'.$url.
'</a></td>';
144 print '<div class="div-table-responsive-no-min">';
147 print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
148 print '<tr class="liste_titre">'.
"\n";
149 print '<td colspan="2">TakePOS Support</td>';
150 print '<td>'.$langs->trans(
"URL").
'</td>';
153 $url =
'http://www.takepos.com';
155 print '<tr class="oddeven">'.
"\n";
156 print '<td class="left"><a href="'.$url.
'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
157 print '<td>TakePOS original developers</td>';
158 print '<td><a href="'.$url.
'" target="_blank" rel="external">'.$url.
'</a></td>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.