Fix some TakePOS small bugs from last third-party commits
This commit is contained in:
parent
c50646be1c
commit
a53688151d
@ -95,55 +95,55 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set">';
|
print '<input type="hidden" name="action" value="set">';
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
if (! empty($conf->service->enabled))
|
if (! empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("CashdeskShowServices");
|
print $langs->trans("CashdeskShowServices");
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Use Takepos printing
|
|
||||||
print '<tr class="oddeven"><td>';
|
|
||||||
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector">'.$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">'.$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 'Bar Restaurant';
|
|
||||||
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 and $conf->global->TAKEPOSCONNECTOR){
|
|
||||||
print '<tr class="oddeven value"><td>';
|
|
||||||
print $langs->trans("OrderPrinters").' (<a href="orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
|
||||||
print '<td colspan="2">';
|
|
||||||
print $form->selectyesno("TAKEPOS_ORDER_PRINTERS",$conf->global->TAKEPOS_ORDER_PRINTERS,1);
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use Takepos printing
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector">'.$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">'.$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 'Bar Restaurant';
|
||||||
|
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 and $conf->global->TAKEPOSCONNECTOR){
|
||||||
|
print '<tr class="oddeven value"><td>';
|
||||||
|
print $langs->trans("OrderPrinters").' (<a href="orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $form->selectyesno("TAKEPOS_ORDER_PRINTERS",$conf->global->TAKEPOS_ORDER_PRINTERS,1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -402,42 +402,24 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT) print " ".$langs->trans('Place')." ".$
|
|||||||
|
|
||||||
print ': '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).' </b></p>';
|
print ': '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).' </b></p>';
|
||||||
|
|
||||||
//if ($invoice->socid != $conf->global->CASHDESK_ID_THIRDPARTY){
|
if ($invoice->socid != $conf->global->CASHDESK_ID_THIRDPARTY)
|
||||||
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
if ($invoice->socid > 0) $soc->fetch($invoice->socid);
|
if ($invoice->socid > 0) $soc->fetch($invoice->socid);
|
||||||
else $soc->fetch($conf->global->CASHDESK_ID_THIRDPARTY);
|
else $soc->fetch($conf->global->CASHDESK_ID_THIRDPARTY);
|
||||||
print '<p style="font-size:120%;" align="right">';
|
print '<p style="font-size:120%;" align="right">';
|
||||||
print $langs->trans("Customer").': '.$soc->name;
|
print $langs->trans("Customer").': '.$soc->name;
|
||||||
print '</p>';
|
print '</p>';
|
||||||
//}
|
}
|
||||||
if ($action=="valid"){
|
if ($action=="valid")
|
||||||
|
{
|
||||||
print '<p style="font-size:120%;" align="center"><b>'.$invoice->ref." ".$langs->trans('BillShortStatusValidated').'</b></p>';
|
print '<p style="font-size:120%;" align="center"><b>'.$invoice->ref." ".$langs->trans('BillShortStatusValidated').'</b></p>';
|
||||||
if ($conf->global->TAKEPOSCONNECTOR) print '<center><button type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
if ($conf->global->TAKEPOSCONNECTOR) print '<center><button type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
||||||
else print '<center><button type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
else print '<center><button type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
||||||
}
|
}
|
||||||
print ': ' . price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency) . ' </b></p>';
|
|
||||||
|
|
||||||
// if ($invoice->socid != $conf->global->CASHDESK_ID_THIRDPARTY){
|
if ($action == "search")
|
||||||
|
{
|
||||||
$soc = new Societe($db);
|
|
||||||
|
|
||||||
if ($invoice->socid > 0) { $soc->fetch($invoice->socid);
|
|
||||||
} else { $soc->fetch($conf->global->CASHDESK_ID_THIRDPARTY);
|
|
||||||
}
|
|
||||||
print '<p style="font-size:120%;" align="right">';
|
|
||||||
print $langs->trans("Customer") . ': ' . $soc->name;
|
|
||||||
print '</p>';
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
if ($action == "valid") {
|
|
||||||
print '<p style="font-size:120%;" align="center"><b>' . $invoice->facnumber . " " . $langs->trans('BillShortStatusValidated') . '</b></p>';
|
|
||||||
if ($conf->global->TAKEPOSCONNECTOR) { print '<center><button type="button" onclick="TakeposPrinting(' . $placeid . ');">' . $langs->trans('PrintTicket') . '</button><center>';
|
|
||||||
} else { print '<center><button type="button" onclick="Print(' . $placeid . ');">' . $langs->trans('PrintTicket') . '</button><center>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == "search") {
|
|
||||||
print '<center>
|
print '<center>
|
||||||
<input type="text" id="search" name="search" onkeyup="Search2();" name="search" style="width:80%;font-size: 150%;" placeholder=' . $langs->trans('Search') . '
|
<input type="text" id="search" name="search" onkeyup="Search2();" name="search" style="width:80%;font-size: 150%;" placeholder=' . $langs->trans('Search') . '
|
||||||
</center>';
|
</center>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user