setup.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. <?php
  2. /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
  4. * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
  5. * Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. */
  20. /**
  21. * \file htdocs/takepos/admin/setup.php
  22. * \ingroup takepos
  23. * \brief Setup page for TakePos module
  24. */
  25. // Load Dolibarr environment
  26. require '../../main.inc.php'; // Load $user and permissions
  27. require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
  28. require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
  29. require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
  30. require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
  31. require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
  32. require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
  33. // If socid provided by ajax company selector
  34. if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
  35. $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
  36. $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
  37. $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
  38. }
  39. // Security check
  40. if (!$user->admin) {
  41. accessforbidden();
  42. }
  43. $langs->loadLangs(array("admin", "cashdesk"));
  44. global $db, $mysoc;
  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";
  49. $resql = $db->query($sql);
  50. $paiements = array();
  51. if ($resql) {
  52. while ($obj = $db->fetch_object($resql)) {
  53. array_push($paiements, $obj);
  54. }
  55. }
  56. $action = GETPOST('action', 'aZ09');
  57. /*
  58. * Actions
  59. */
  60. $error = 0;
  61. if ($action == 'set') {
  62. $db->begin();
  63. $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
  64. $res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
  65. $res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
  66. $res = dolibarr_set_const($db, "TAKEPOS_SORTPRODUCTFIELD", GETPOST('TAKEPOS_SORTPRODUCTFIELD', 'alpha'), 'chaine', 0, '', $conf->entity);
  67. $res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity);
  68. $res = dolibarr_set_const($db, "TAKEPOS_ADDON", GETPOST('TAKEPOS_ADDON', 'alpha'), 'int', 0, '', $conf->entity);
  69. $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity);
  70. if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) {
  71. $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
  72. $res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
  73. }
  74. if (isModEnabled('barcode')) {
  75. $res = dolibarr_set_const($db, 'TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT', GETPOST('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT', 'alpha'), 'chaine', 0, '', $conf->entity);
  76. }
  77. dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
  78. if (!($res > 0)) {
  79. $error++;
  80. }
  81. if (!$error) {
  82. $db->commit();
  83. } else {
  84. $db->rollback();
  85. }
  86. } elseif ($action == 'updateMask') {
  87. $maskconst = GETPOST('maskconst', 'aZ09');
  88. $maskvalue = GETPOST('maskvalue', 'alpha');
  89. if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
  90. $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
  91. }
  92. if (!($res > 0)) {
  93. $error++;
  94. }
  95. } elseif ($action == 'setrefmod') {
  96. $value = GETPOST('value', 'alpha');
  97. dolibarr_set_const($db, "TAKEPOS_REF_ADDON", $value, 'chaine', 0, '', $conf->entity);
  98. }
  99. if ($action != '') {
  100. if (!$error) {
  101. setEventMessage($langs->trans('SetupSaved'));
  102. } else {
  103. setEventMessages($langs->trans('Error'), null, 'errors');
  104. }
  105. }
  106. /*
  107. * View
  108. */
  109. $form = new Form($db);
  110. $formproduct = new FormProduct($db);
  111. $help_url = 'EN:Module_Point_of_sale_(TakePOS)';
  112. llxHeader('', $langs->trans("CashDeskSetup"), $help_url);
  113. $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
  114. print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
  115. $head = takepos_admin_prepare_head();
  116. print dol_get_fiche_head($head, 'setup', 'TakePOS', -1, 'cash-register');
  117. // Numbering modules
  118. $now = dol_now();
  119. $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
  120. print load_fiche_titre($langs->trans('CashDeskRefNumberingModules'), '', '');
  121. print '<table class="noborder centpercent">';
  122. print '<tr class="liste_titre">';
  123. print '<td>'.$langs->trans("Name")."</td>\n";
  124. print '<td>'.$langs->trans("Description")."</td>\n";
  125. print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
  126. print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
  127. print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
  128. print '</tr>'."\n";
  129. clearstatcache();
  130. foreach ($dirmodels as $reldir) {
  131. $dir = dol_buildpath($reldir."core/modules/takepos/");
  132. if (is_dir($dir)) {
  133. $handle = opendir($dir);
  134. if (is_resource($handle)) {
  135. $var = true;
  136. while (($file = readdir($handle)) !== false) {
  137. if (substr($file, 0, 16) == 'mod_takepos_ref_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
  138. $file = substr($file, 0, dol_strlen($file) - 4);
  139. require_once $dir.$file.'.php';
  140. $module = new $file;
  141. // Show modules according to features level
  142. if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
  143. continue;
  144. }
  145. if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
  146. continue;
  147. }
  148. if ($module->isEnabled()) {
  149. print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
  150. print $module->info($langs);
  151. print '</td>';
  152. // Show example of numbering module
  153. print '<td class="nowrap">';
  154. $tmp = $module->getExample();
  155. if (preg_match('/^Error/', $tmp)) {
  156. $langs->load("errors");
  157. print '<div class="error">'.$langs->trans($tmp).'</div>';
  158. } elseif ($tmp == 'NotConfigured') {
  159. print $langs->trans($tmp);
  160. } else {
  161. print $tmp;
  162. }
  163. print '</td>'."\n";
  164. print '<td class="center">';
  165. if (getDolGlobalString('TAKEPOS_REF_ADDON') == "$file") {
  166. print img_picto($langs->trans("Activated"), 'switch_on');
  167. } else {
  168. print '<a href="'.$_SERVER["PHP_SELF"].'?action=setrefmod&token='.newToken().'&value='.urlencode($file).'">';
  169. print img_picto($langs->trans("Disabled"), 'switch_off');
  170. print '</a>';
  171. }
  172. print '</td>';
  173. // example for next value
  174. $invoice = new Facture($db);
  175. $invoice->date = $now;
  176. $invoice->module_source = 'takepos';
  177. $invoice->pos_source = 1;
  178. // Info
  179. $htmltooltip = '';
  180. $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
  181. $nextval = $module->getNextValue($mysoc, $invoice);
  182. if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
  183. $htmltooltip .= ''.$langs->trans("NextValue").': ';
  184. if ($nextval) {
  185. if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
  186. $nextval = $langs->trans($nextval);
  187. }
  188. $htmltooltip .= $nextval.'<br>';
  189. } else {
  190. $htmltooltip .= $langs->trans($module->error).'<br>';
  191. }
  192. }
  193. print '<td align="center">';
  194. print $form->textwithpicto('', $htmltooltip, 1, 0);
  195. print '</td>';
  196. print "</tr>\n";
  197. }
  198. }
  199. }
  200. closedir($handle);
  201. }
  202. }
  203. }
  204. print "</table><br>\n";
  205. print '<br>';
  206. // Mode
  207. print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
  208. print '<input type="hidden" name="token" value="'.newToken().'">';
  209. print '<input type="hidden" name="action" value="set">';
  210. print '<div class="div-table-responsive-no-min">';
  211. print '<table class="noborder centpercent">';
  212. print '<tr class="liste_titre">';
  213. print '<td class="notitlefield">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
  214. print "</tr>\n";
  215. // Terminals
  216. print '<tr class="oddeven"><td>';
  217. print $langs->trans("NumberOfTerminals");
  218. print '<td colspan="2">';
  219. print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="' . (!getDolGlobalString('TAKEPOS_NUM_TERMINALS') ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS) . '">';
  220. print "</td></tr>\n";
  221. // Services
  222. if (isModEnabled("service")) {
  223. print '<tr class="oddeven"><td>';
  224. print $langs->trans("CashdeskShowServices");
  225. print '<td colspan="2">';
  226. print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0);
  227. //print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
  228. print "</td></tr>\n";
  229. }
  230. // Root category for products
  231. print '<tr class="oddeven"><td>';
  232. print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
  233. print '<td colspan="2">';
  234. print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID'), 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0);
  235. print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
  236. print "</td></tr>\n";
  237. // Sort product
  238. print '<tr class="oddeven"><td>';
  239. print $langs->trans("SortProductField");
  240. print '<td colspan="2">';
  241. $prod = new Product($db);
  242. $array = array('rowid' => 'ID', 'ref' => 'Ref', 'label' => 'Label', 'datec' => 'DateCreation', 'tms' => 'DateModification');
  243. print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, (!getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD') ? 'rowid' : $conf->global->TAKEPOS_SORTPRODUCTFIELD), 0, 0, 0, '', 1);
  244. print "</td></tr>\n";
  245. print '<tr class="oddeven"><td>';
  246. print $langs->trans('TakeposGroupSameProduct');
  247. print '<td colspan="2">';
  248. print ajax_constantonoff("TAKEPOS_GROUP_SAME_PRODUCT", array(), $conf->entity, 0, 0, 1, 0);
  249. print "</td></tr>\n";
  250. $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
  251. $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
  252. $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
  253. foreach ($substitutionarray as $key => $val) {
  254. $htmltext .= $key.'<br>';
  255. }
  256. $htmltext .= '</i>';
  257. // Payment numpad
  258. print '<tr class="oddeven"><td>';
  259. print $langs->trans("Paymentnumpad");
  260. print '<td colspan="2">';
  261. $array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad"));
  262. print $form->selectarray('TAKEPOS_NUMPAD', $array, (!getDolGlobalString('TAKEPOS_NUMPAD') ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
  263. print "</td></tr>\n";
  264. // Numpad use payment icons
  265. /*print '<tr class="oddeven"><td>';
  266. print $langs->trans('TakeposNumpadUsePaymentIcon');
  267. print '<td colspan="2">';
  268. print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0);
  269. print "</td></tr>\n";
  270. */
  271. // Direct Payment
  272. print '<tr class="oddeven"><td>';
  273. print $langs->trans('DirectPaymentButton');
  274. print '<td colspan="2">';
  275. print ajax_constantonoff("TAKEPOS_DIRECT_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
  276. //print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
  277. print "</td></tr>\n";
  278. // Head Bar
  279. /*print '<tr class="oddeven"><td>';
  280. print $langs->trans('HeadBar');
  281. print '<td colspan="2">';
  282. print $form->selectyesno("TAKEPOS_HEAD_BAR", $conf->global->TAKEPOS_HEAD_BAR, 1);
  283. print "</td></tr>\n";
  284. */
  285. // Email template for send invoice
  286. print '<tr class="oddeven"><td>';
  287. print $langs->trans('EmailTemplate');
  288. print '<td colspan="2">';
  289. include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
  290. $formmail = new FormMail($db);
  291. $nboftemplates = $formmail->fetchAllEMailTemplate('facture_send', $user, null, -1); // We set lang=null to get in priority record with no lang
  292. //$arraydefaultmessage = $formmail->getEMailTemplate($db, $tmp[1], $user, null, 0, 1, '');
  293. $arrayofmessagename = array();
  294. if (is_array($formmail->lines_model)) {
  295. foreach ($formmail->lines_model as $modelmail) {
  296. //var_dump($modelmail);
  297. $moreonlabel = '';
  298. if (!empty($arrayofmessagename[$modelmail->label])) {
  299. $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
  300. }
  301. $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->topic)).$moreonlabel;
  302. }
  303. }
  304. //var_dump($arraydefaultmessage);
  305. //var_dump($arrayofmessagename);
  306. print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE, 'None', 1, 0, '', 0, 0, 0, '', '', 1);
  307. print "</td></tr>\n";
  308. // Control cash box at opening pos
  309. print '<tr class="oddeven"><td>';
  310. print $langs->trans('ControlCashOpening');
  311. print '<td colspan="2">';
  312. print ajax_constantonoff("TAKEPOS_CONTROL_CASH_OPENING", array(), $conf->entity, 0, 0, 1, 0);
  313. print "</td></tr>\n";
  314. // Gift receipt
  315. print '<tr class="oddeven"><td>';
  316. print $langs->trans('GiftReceiptButton');
  317. print '<td colspan="2">';
  318. print ajax_constantonoff("TAKEPOS_GIFT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0);
  319. print "</td></tr>\n";
  320. // Delayed Pay Button
  321. print '<tr class="oddeven"><td>';
  322. print $langs->trans('AllowDelayedPayment');
  323. print '<td colspan="2">';
  324. print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
  325. print "</td></tr>\n";
  326. // Show price without vat
  327. print '<tr class="oddeven"><td>';
  328. print $langs->trans('ShowPriceHT');
  329. print '<td colspan="2">';
  330. print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0);
  331. print "</td></tr>\n";
  332. // Barcode rule to insert product
  333. if (isModEnabled('barcode')) {
  334. print '<tr class="oddeven"><td>';
  335. print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"));
  336. print '<td colspan="2">';
  337. print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="' . (getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')) . '">';
  338. print "</td></tr>\n";
  339. }
  340. // Numbering module
  341. //print '<tr class="oddeven"><td>';
  342. //print $langs->trans("BillsNumberingModule");
  343. //print '<td colspan="2">';
  344. //$array = array(0=>$langs->trans("Default"), "terminal"=>$langs->trans("ByTerminal"));
  345. //$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
  346. //foreach ($dirmodels as $reldir)
  347. //{
  348. // $dir = dol_buildpath($reldir."core/modules/facture/");
  349. // if (is_dir($dir))
  350. // {
  351. // $handle = opendir($dir);
  352. // if (is_resource($handle))
  353. // {
  354. // while (($file = readdir($handle)) !== false)
  355. // {
  356. // if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
  357. // {
  358. // $filebis = $file;
  359. // $classname = preg_replace('/\.php$/', '', $file);
  360. // // For compatibility
  361. // if (!is_file($dir.$filebis))
  362. // {
  363. // $filebis = $file."/".$file.".modules.php";
  364. // $classname = "mod_facture_".$file;
  365. // }
  366. // // Check if there is a filter on country
  367. // preg_match('/\-(.*)_(.*)$/', $classname, $reg);
  368. // if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue;
  369. //
  370. // $classname = preg_replace('/\-.*$/', '', $classname);
  371. // if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php')
  372. // {
  373. // // Charging the numbering class
  374. // require_once $dir.$filebis;
  375. //
  376. // $module = new $classname($db);
  377. //
  378. // // Show modules according to features level
  379. // if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
  380. // if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
  381. //
  382. // if ($module->isEnabled())
  383. // {
  384. // $array[preg_replace('/\-.*$/', '', preg_replace('/\.php$/', '', $file))] = preg_replace('/\-.*$/', '', preg_replace('/mod_facture_/', '', preg_replace('/\.php$/', '', $file)));
  385. // }
  386. // }
  387. // }
  388. // }
  389. // closedir($handle);
  390. // }
  391. // }
  392. //}
  393. //
  394. //print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0);
  395. //print "</td></tr>\n";
  396. print '</table>';
  397. print '</div>';
  398. // Sumup options
  399. if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) {
  400. print '<br>';
  401. print '<div class="div-table-responsive-no-min">';
  402. print '<table class="noborder centpercent">';
  403. print '<tr class="liste_titre">';
  404. print '<td class="titlefield">'.$langs->trans("Sumup").'</td><td>'.$langs->trans("Value").'</td>';
  405. print "</tr>\n";
  406. print '<tr class="oddeven"><td>';
  407. print $langs->trans("SumupAffiliate");
  408. print '<td colspan="2">';
  409. print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="' . getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE').'"></input>';
  410. print "</td></tr>\n";
  411. print '<tr class="oddeven"><td>';
  412. print $langs->trans("SumupAppId");
  413. print '<td colspan="2">';
  414. print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="' . getDolGlobalString('TAKEPOS_SUMUP_APPID').'"></input>';
  415. print "</td></tr>\n";
  416. print '</table>';
  417. print '</div>';
  418. }
  419. print '<br>';
  420. print $form->buttonsSaveCancel("Save", '');
  421. print "</form>\n";
  422. llxFooter();
  423. $db->close();