Fix not working feature

This commit is contained in:
Laurent Destailleur 2019-11-07 15:25:57 +01:00
parent cd5a0b56f7
commit 8793fdfe63
3 changed files with 16 additions and 11 deletions

View File

@ -6,6 +6,10 @@ html,body {
width:100%;
}
.center {
text-align: center;
}
button.calcbutton {
display: inline-block;
position: relative;

View File

@ -451,7 +451,10 @@ if ($action=="valid" || $action=="history")
} else {
$sectionwithinvoicelink.=' <button id="buttonprint" type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
}
$sectionwithinvoicelink.=' <button id="buttonprintsend" type="button" onclick="PrintSend('.$placeid.');">'.$langs->trans('PrintSendTicket').'</button>';
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
$sectionwithinvoicelink.=' <button id="buttonsend" type="button" onclick="SendTicket('.$placeid.');">'.$langs->trans('SendTicket').'</button>';
}
if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink.='<script language="javascript">$("#buttonprint").click();</script>';
}
@ -537,11 +540,11 @@ if ($action == "search") {
?>
});
function PrintSend(id)
function SendTicket(id)
{
console.log("Open box to select the Print/Send form");
$.colorbox({href:"printsend.php?facid="+id, width:"90%", height:"50%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("PrintSend");?>"});
$.colorbox({href:"send.php?facid="+id, width:"90%", height:"50%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("SendTicket");?>"});
}
function Print(id){

View File

@ -70,7 +70,7 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
?>
<link rel="stylesheet" href="css/pos.css">
</head>
<body>
<body class="center">
<script>
<?php
@ -129,7 +129,7 @@ else print "var received=0;";
}
}
}
function Print(id){
$.colorbox.close();
$.colorbox({href:"receipt.php?facid="+id, width:"40%", height:"90%", transition:"none", iframe:"true", title:"<?php
@ -138,17 +138,15 @@ function Print(id){
</script>
<div style="position:absolute; top:2%; left:5%; height:30%; width:91%;">
<div class="center">
<center>
<center><input type="email" id="email" name="email" style="width:60%;font-size: 200%;" value="<?php echo $invoice->thirdparty->email;?>"></center>
</center>
</div>
<br>
<div class="center">
<div style="position:absolute; top:33%; left:5%; height:60%; width:91%;">
<button type="button" class="calcbutton" onclick="Print('.<?php echo $placeid; ?>.');"><?php print $langs->trans("PrintTicket"); ?></button>
<button type="button" class="calcbutton" onclick="addreceived();"><?php print $langs->trans("SendInvoice"); ?></button>
<button type="button" class="calcbutton" onclick="addreceived();"><?php print $langs->trans("SaveSendInvoice"); ?></button>
</div>