Merge pull request #15359 from andreubisquerra/master
Update receipt tab in TakePOS setup
This commit is contained in:
commit
0e9100fe75
@ -215,6 +215,8 @@ if ($nbofentries > 0)
|
|||||||
print '</table></td>';
|
print '</table></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
print "</table>";
|
||||||
|
print '<input type="submit" value="'.$langs->trans("Save").'"></form>';
|
||||||
|
|
||||||
//Printer3
|
//Printer3
|
||||||
print '<table class="liste nohover" width="100%">';
|
print '<table class="liste nohover" width="100%">';
|
||||||
|
|||||||
@ -65,6 +65,8 @@ if (GETPOST('action', 'alpha') == 'set')
|
|||||||
} elseif (GETPOST('action', 'alpha') == 'setmethod')
|
} elseif (GETPOST('action', 'alpha') == 'setmethod')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
// TakePOS connector require ReceiptPrinter module
|
||||||
|
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && !$conf->receiptprinter->enabled) activateModule("modReceiptPrinter");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -109,27 +111,25 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser")
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Receipt printer module
|
// Receipt printer module
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1) {
|
print '<tr class="oddeven"><td>';
|
||||||
print '<tr class="oddeven"><td>';
|
print $langs->trans('DolibarrReceiptPrinter');
|
||||||
print $langs->trans('DolibarrReceiptPrinter');
|
print '<td>';
|
||||||
print '<td>';
|
print $langs->trans('ReceiptPrinterMethodDescription');
|
||||||
print $langs->trans('ReceiptPrinterMethodDescription');
|
print '<br>';
|
||||||
print '<br>';
|
print '<a href="'.DOL_URL_ROOT.'/admin/receiptprinter.php">'.$langs->trans("Setup").'</a>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/admin/receiptprinter.php">'.$langs->trans("Setup").'</a>';
|
print '</td><td class="right">';
|
||||||
print '</td><td class="right">';
|
if ($conf->receiptprinter->enabled) {
|
||||||
if ($conf->receiptprinter->enabled) {
|
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
|
||||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
} else {
|
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&token='.newToken().'&value=receiptprinter">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&token='.newToken().'&value=receiptprinter">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print $langs->trans("ModuleReceiptPrinterMustBeEnabled");
|
|
||||||
print '</span>';
|
|
||||||
}
|
}
|
||||||
print "</td></tr>\n";
|
} else {
|
||||||
|
print '<span class="opacitymedium">';
|
||||||
|
print $langs->trans("ModuleReceiptPrinterMustBeEnabled");
|
||||||
|
print '</span>';
|
||||||
}
|
}
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// TakePOS Connector
|
// TakePOS Connector
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user