Clean syntax of code
This commit is contained in:
parent
b995dc87fa
commit
0fbde14b33
@ -21,7 +21,6 @@
|
|||||||
* \ingroup takepos
|
* \ingroup takepos
|
||||||
* \brief Setup page for TakePos module
|
* \brief Setup page for TakePos module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php'; // Load $user and permissions
|
require '../../main.inc.php'; // Load $user and permissions
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
||||||
@ -30,8 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/takepos.lib.php";
|
require_once DOL_DOCUMENT_ROOT . "/core/lib/takepos.lib.php";
|
||||||
|
|
||||||
// If socid provided by ajax company selector
|
// If socid provided by ajax company selector
|
||||||
if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id']))
|
if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
|
||||||
{
|
|
||||||
$_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
|
$_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
|
||||||
$_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
|
$_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
|
||||||
$_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
|
$_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
|
||||||
@ -56,11 +54,12 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if (GETPOST('action', 'alpha') == 'set')
|
|
||||||
{
|
if (GETPOST('action', 'alpha') == 'set') {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (GETPOST('socid', 'int') < 0) $_POST["socid"] = '';
|
if (GETPOST('socid', 'int') < 0) $_POST["socid"] = '';
|
||||||
|
|
||||||
@ -85,8 +84,7 @@ if (GETPOST('action', 'alpha') == 'set')
|
|||||||
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_AFFILIATE", GETPOST('TAKEPOS_SUMUP_AFFILIATE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "TAKEPOS_SUMUP_APPID", GETPOST('TAKEPOS_SUMUP_APPID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
if ($conf->global->TAKEPOS_ORDER_NOTES == 1)
|
if ($conf->global->TAKEPOS_ORDER_NOTES == 1) {
|
||||||
{
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
|
$extrafields->addExtraField('order_notes', 'Order notes', 'varchar', 0, 255, 'facturedet', 0, 0, '', '', 0, '', 0, 1);
|
||||||
}
|
}
|
||||||
@ -95,25 +93,20 @@ if (GETPOST('action', 'alpha') == 'set')
|
|||||||
|
|
||||||
if (!$res > 0) $error++;
|
if (!$res > 0) $error++;
|
||||||
|
|
||||||
if (!$error)
|
if (!$error) {
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
|
||||||
$formproduct = new FormProduct($db);
|
|
||||||
|
|
||||||
llxHeader('', $langs->trans("CashDeskSetup"));
|
llxHeader('', $langs->trans("CashDeskSetup"));
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||||
@ -133,14 +126,15 @@ print '<div class="div-table-responsive-no-min">';
|
|||||||
|
|
||||||
// Marketplace
|
// Marketplace
|
||||||
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print '<tr class="liste_titre">' . "\n";
|
||||||
print '<td colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
|
print '<td class="titlefield" colspan="2">' . $langs->trans("WebSiteDesc") . '</td>';
|
||||||
print '<td>' . $langs->trans("URL") . '</td>';
|
print '<td>' . $langs->trans("URL") . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "<tr class=\"oddeven\">\n";
|
|
||||||
$url = 'https://www.dolistore.com/45-pos';
|
$url = 'https://www.dolistore.com/45-pos';
|
||||||
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
|
||||||
|
print '<tr class="oddeven">' . "\n";
|
||||||
|
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>';
|
||||||
print '<td>' . $langs->trans("DolistorePosCategory") . '</td>';
|
print '<td>' . $langs->trans("DolistorePosCategory") . '</td>';
|
||||||
print '<td><a href="' . $url . '" target="_blank" rel="external">' . $url . '</a></td>';
|
print '<td><a href="' . $url . '" target="_blank" rel="external">' . $url . '</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -152,19 +146,18 @@ print '</div>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
|
||||||
// Support
|
// Support
|
||||||
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print '<tr class="liste_titre">' . "\n";
|
||||||
print '<td colspan="2">TakePOS Support</td>';
|
print '<td colspan="2">TakePOS Support</td>';
|
||||||
print '<td>' . $langs->trans("URL") . '</td>';
|
print '<td>' . $langs->trans("URL") . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "<tr class=\"oddeven\">\n";
|
|
||||||
$url = 'http://www.takepos.com';
|
$url = 'http://www.takepos.com';
|
||||||
|
|
||||||
|
print '<tr class="oddeven">' . "\n";
|
||||||
print '<td class="left"><a href="' . $url . '" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
|
print '<td class="left"><a href="' . $url . '" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
|
||||||
print '<td>TakePOS original developers</td>';
|
print '<td>TakePOS original developers</td>';
|
||||||
print '<td><a href="' . $url . '" target="_blank" rel="external">' . $url . '</a></td>';
|
print '<td><a href="' . $url . '" target="_blank" rel="external">' . $url . '</a></td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user