More elegant and easy to understand printer setup
This commit is contained in:
parent
b8171cacb1
commit
2942e85e47
@ -38,13 +38,10 @@ function takepos_prepare_head()
|
||||
$head[$h][2] = 'setup';
|
||||
$h++;
|
||||
|
||||
if ($conf->global->TAKEPOS_CUSTOM_RECEIPT)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/receipt.php';
|
||||
$head[$h][1] = $langs->trans("Receipt");
|
||||
$head[$h][2] = 'receipt';
|
||||
$h++;
|
||||
}
|
||||
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/receipt.php';
|
||||
$head[$h][1] = $langs->trans("Receipt");
|
||||
$head[$h][2] = 'receipt';
|
||||
$h++;
|
||||
|
||||
$numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
|
||||
for ($i = 1; $i <= $numterminals; $i++)
|
||||
|
||||
@ -265,6 +265,10 @@ class modTakePos extends DolibarrModules
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
global $conf,$db;
|
||||
|
||||
dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", "browser", 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$this->_load_tables('/takepos/sql/');
|
||||
|
||||
$sql = array();
|
||||
|
||||
@ -85,3 +85,8 @@ ColorTheme=Color theme
|
||||
Colorful=Colorful
|
||||
HeadBar=Head Bar
|
||||
SortProductField=Field for sorting products
|
||||
Browser=Browser
|
||||
BrowserMethodDescription=Simple and easy receipt printing. Only a few parameters to configure the receipt. Print via browser.
|
||||
TakeposConnectorMethodDescription=External module with extra features. Posibility to print from de cloud.
|
||||
PrintMethod=Print method
|
||||
ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud.
|
||||
@ -46,6 +46,9 @@ if (GETPOST('action', 'alpha') == 'set')
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_RECEIPT_NAME", GETPOST('TAKEPOS_RECEIPT_NAME', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_SHOW_CUSTOMER", GETPOST('TAKEPOS_SHOW_CUSTOMER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_AUTO_PRINT_TICKETS", GETPOST('TAKEPOS_AUTO_PRINT_TICKETS', 'int'), 'int', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
|
||||
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
||||
|
||||
@ -62,6 +65,10 @@ if (GETPOST('action', 'alpha') == 'set')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
elseif (GETPOST('action', 'alpha') == 'setmethod')
|
||||
{
|
||||
dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -79,64 +86,139 @@ $head = takepos_prepare_head();
|
||||
dol_fiche_head($head, 'receipt', 'TakePOS', -1);
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Mode
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?terminal='.(empty($terminal) ? 1 : $terminal).'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="set">';
|
||||
|
||||
print load_fiche_titre($langs->trans("PrintMethod"), '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td><td>'.$langs->trans("Description").'</td><td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Browser method
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('Browser');
|
||||
print '<td>';
|
||||
print $langs->trans('BrowserMethodDescription');
|
||||
print '</td><td class="center">';
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "browser")
|
||||
{
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&value=browser">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Receipt printer module
|
||||
if ($conf->receiptprinter->enabled) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('DolibarrReceiptPrinter');
|
||||
print '<td>';
|
||||
print $langs->trans('ReceiptPrinterMethodDescription');
|
||||
print '</td><td class="center">';
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter")
|
||||
{
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&value=receiptprinter">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// TakePOS Connector
|
||||
print '<tr class="oddeven"><td>';
|
||||
print "TakePOS Connector";
|
||||
print '<td>';
|
||||
print $langs->trans('TakeposConnectorMethodDescription');
|
||||
print '</td><td class="center">';
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector")
|
||||
{
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&value=takeposconnector">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
print '</table>';
|
||||
|
||||
print load_fiche_titre($langs->trans("Setup"), '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>';
|
||||
$htmltext .= '</i>';
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector"){
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("IPAddress").' (<a href="http://en.takepos.com/connector" target="_blank">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
print '<input type="text" size="20" id="TAKEPOS_PRINT_SERVER" name="TAKEPOS_PRINT_SERVER" value="'.$conf->global->TAKEPOS_PRINT_SERVER.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector"){
|
||||
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>';
|
||||
$htmltext .= '</i>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
||||
print '</td><td>';
|
||||
$variablename = 'TAKEPOS_HEADER';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
||||
print '</td><td>';
|
||||
$variablename = 'TAKEPOS_FOOTER';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="receipt_name">'.$langs->trans("ReceiptName").'</label></td><td>';
|
||||
print '<input name="TAKEPOS_RECEIPT_NAME" id="TAKEPOS_RECEIPT_NAME" class="minwidth200" value="'.(!empty($conf->global->TAKEPOS_RECEIPT_NAME) ? $conf->global->TAKEPOS_RECEIPT_NAME : '').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Customer information
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowCustomer');
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_SHOW_CUSTOMER", $conf->global->TAKEPOS_SHOW_CUSTOMER, 1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Auto print tickets
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
||||
print '</td><td>';
|
||||
$variablename = 'TAKEPOS_HEADER';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
||||
print '</td><td>';
|
||||
$variablename = 'TAKEPOS_FOOTER';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="receipt_name">'.$langs->trans("ReceiptName").'</label></td><td>';
|
||||
print '<input name="TAKEPOS_RECEIPT_NAME" id="TAKEPOS_RECEIPT_NAME" class="minwidth200" value="'.(!empty($conf->global->TAKEPOS_RECEIPT_NAME) ? $conf->global->TAKEPOS_RECEIPT_NAME : '').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Customer information
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowCustomer');
|
||||
print $langs->trans("AutoPrintTickets");
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_SHOW_CUSTOMER", $conf->global->TAKEPOS_SHOW_CUSTOMER, 1);
|
||||
print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -66,18 +66,13 @@ if (GETPOST('action', 'alpha') == 'set')
|
||||
|
||||
$res = dolibarr_set_const($db, "CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$res = dolibarr_set_const($db, "TAKEPOSCONNECTOR", GETPOST('TAKEPOSCONNECTOR', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_DOLIBARR_PRINTER", GETPOST('TAKEPOS_DOLIBARR_PRINTER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_TICKET_VAT_GROUPPED", GETPOST('TAKEPOS_TICKET_VAT_GROUPPED', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_NOTES", GETPOST('TAKEPOS_ORDER_NOTES', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_PHONE_BASIC_LAYOUT", GETPOST('TAKEPOS_PHONE_BASIC_LAYOUT', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS", GETPOST('TAKEPOS_SUPPLEMENTS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_AUTO_PRINT_TICKETS", GETPOST('TAKEPOS_AUTO_PRINT_TICKETS', 'int'), 'int', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_SORTPRODUCTFIELD", GETPOST('TAKEPOS_SORTPRODUCTFIELD', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_COLOR_THEME", GETPOST('TAKEPOS_COLOR_THEME', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
@ -158,13 +153,6 @@ if (!empty($conf->service->enabled))
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Auto print tickets
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("AutoPrintTickets");
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Root category for products
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
|
||||
@ -173,31 +161,6 @@ print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEP
|
||||
print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->receiptprinter->enabled) {
|
||||
// Use Dolibarr printing
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("DolibarrReceiptPrinterModule");
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_DOLIBARR_PRINTER", $conf->global->TAKEPOS_DOLIBARR_PRINTER, 1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Use Takepos printing
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector" target="_blank">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOSCONNECTOR", $conf->global->TAKEPOSCONNECTOR, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEPOSCONNECTOR) {
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("IPAddress").' (<a href="http://en.takepos.com/connector" target="_blank">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
print '<input type="text" size="20" id="TAKEPOS_PRINT_SERVER" name="TAKEPOS_PRINT_SERVER" value="'.$conf->global->TAKEPOS_PRINT_SERVER.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Bar Restaurant mode
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("EnableBarOrRestaurantFeatures");
|
||||
@ -206,7 +169,7 @@ print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR) {
|
||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") {
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
@ -276,6 +239,7 @@ $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
||||
$htmltext.='</i>';
|
||||
|
||||
// Color theme
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ColorTheme");
|
||||
@ -291,13 +255,6 @@ print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Custom Receipt
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('CustomReceipt');
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_CUSTOM RECEIPT", $conf->global->TAKEPOS_CUSTOM_RECEIPT, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Head Bar
|
||||
/*print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('HeadBar');
|
||||
|
||||
@ -209,7 +209,7 @@ if (!empty($conf->stock->enabled))
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->receiptprinter->enabled) {
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
|
||||
// Select printer to use with terminal
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
$printer = new dolReceiptPrinter($db);
|
||||
|
||||
@ -504,9 +504,9 @@ if ($action == "valid" || $action == "history")
|
||||
else $sectionwithinvoicelink .= $langs->trans('BillShortStatusValidated');
|
||||
}
|
||||
$sectionwithinvoicelink .= '</span>';
|
||||
if ($conf->global->TAKEPOSCONNECTOR) {
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector"){
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
|
||||
} elseif ($conf->global->TAKEPOS_DOLIBARR_PRINTER) {
|
||||
} elseif ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter"){
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="DolibarrTakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
|
||||
} else {
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
|
||||
|
||||
@ -768,13 +768,13 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT)
|
||||
//add temp ticket button
|
||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
|
||||
{
|
||||
if ($conf->global->TAKEPOSCONNECTOR) {
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector"){
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposPrinting(placeid);');
|
||||
} else {
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'Print(placeid);');
|
||||
}
|
||||
}
|
||||
if ($conf->global->TAKEPOSCONNECTOR && $conf->global->TAKEPOS_ORDER_NOTES == 1)
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && $conf->global->TAKEPOS_ORDER_NOTES == 1)
|
||||
{
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("OrderNotes").'</div>', 'action'=>'TakeposOrderNotes();');
|
||||
}
|
||||
@ -784,10 +784,10 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT)
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->global->TAKEPOSCONNECTOR) {
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector"){
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("DOL_OPEN_DRAWER").'</div>', 'action'=>'OpenDrawer();');
|
||||
}
|
||||
if ($conf->global->TAKEPOS_DOLIBARR_PRINTER) {
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
|
||||
$menus[$r++] = array(
|
||||
'title' => '<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("DOL_OPEN_DRAWER").'</div>',
|
||||
'action' => 'DolibarrOpenDrawer();',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user