Fix issues on TakePOS
This commit is contained in:
parent
1009588592
commit
8f1a00bbf1
@ -55,7 +55,7 @@ if (GETPOST('action','alpha') == 'set')
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",(GETPOST('CASHDESK_ID_WAREHOUSE','alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",GETPOST('CASHDESK_NO_DECREASE_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEBOX", GETPOST('TAKEBOX','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEPOSCONNECTOR", GETPOST('TAKEPOSCONNECTOR','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_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);
|
||||
@ -172,10 +172,10 @@ if (! empty($conf->service->enabled))
|
||||
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("TAKEBOX",$conf->global->TAKEBOX,1);
|
||||
print $form->selectyesno("TAKEPOSCONNECTOR",$conf->global->TAKEPOSCONNECTOR,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEBOX){
|
||||
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">';
|
||||
@ -190,7 +190,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 and $conf->global->TAKEBOX){
|
||||
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">';
|
||||
|
||||
@ -29,6 +29,8 @@ $_GET['theme']="md"; // Force theme. MD theme provides better look and feel to T
|
||||
|
||||
require '../main.inc.php'; // Load $user and permissions
|
||||
|
||||
$langs->loadLangs(array("bills","orders","commercial","cashdesk"));
|
||||
|
||||
$floor=GETPOST('floor','alpha');
|
||||
if ($floor=="") $floor=1;
|
||||
$id = GETPOST('id','int');
|
||||
|
||||
@ -151,7 +151,7 @@ if ($action=="updatereduction"){
|
||||
$invoice->fetch($placeid);
|
||||
}
|
||||
|
||||
if ($action=="order"){
|
||||
if ($action=="order" and $placeid!=0){
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$headerorder='<html><br><b>'.$langs->trans('Place').' '.$place.'<br><table width="65%"><thead><tr><th align="left">'.$langs->trans("Label").'</th><th align="right">'.$langs->trans("Qty").'</th></tr></thead><tbody>';
|
||||
$footerorder='</tbody></table>'.dol_print_date(dol_now(), 'dayhour').'<br></html>';
|
||||
@ -281,7 +281,7 @@ print ': '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'&nbs
|
||||
//}
|
||||
if ($action=="valid"){
|
||||
print '<p style="font-size:120%;" align="center"><b>'.$invoice->facnumber." ".$langs->trans('BillShortStatusValidated').'</b></p>';
|
||||
if ($conf->global->TAKEBOX) 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>';
|
||||
}
|
||||
if ($action=="search"){
|
||||
|
||||
@ -101,11 +101,11 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
|
||||
<button type="button" class="calcbutton" onclick="addreceived(10);">10</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(20);">20</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(50);">50</button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(1);">1</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(2);">2</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(5);">5</button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.10);">0.10</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.20);">0.20</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.50);">0.50</button>
|
||||
@ -114,7 +114,7 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.02);">0.02</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.05);">0.05</button>
|
||||
<button type="button" class="calcbutton3" onclick="reset();"><span style='font-size: 150%;'>C</span></button>
|
||||
<button type="button" class="calcbutton3" onclick="printclick();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||
<button type="button" class="calcbutton3" onclick="parent.$.colorbox.close();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@ -355,7 +355,7 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){
|
||||
'action'=>'TakeposPrintingOrder();');
|
||||
}
|
||||
}
|
||||
if ($conf->global->TAKEBOX){
|
||||
if ($conf->global->TAKEPOSCONNECTOR){
|
||||
$menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
||||
'action'=>'OpenDrawer();');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user