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%; width:100%;
} }
.center {
text-align: center;
}
button.calcbutton { button.calcbutton {
display: inline-block; display: inline-block;
position: relative; position: relative;

View File

@ -451,7 +451,10 @@ if ($action=="valid" || $action=="history")
} else { } else {
$sectionwithinvoicelink.=' <button id="buttonprint" type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button>'; $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>'; if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink.='<script language="javascript">$("#buttonprint").click();</script>';
} }
@ -538,10 +541,10 @@ if ($action == "search") {
}); });
function PrintSend(id) function SendTicket(id)
{ {
console.log("Open box to select the Print/Send form"); 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){ function Print(id){

View File

@ -70,7 +70,7 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
?> ?>
<link rel="stylesheet" href="css/pos.css"> <link rel="stylesheet" href="css/pos.css">
</head> </head>
<body> <body class="center">
<script> <script>
<?php <?php
@ -138,17 +138,15 @@ function Print(id){
</script> </script>
<div style="position:absolute; top:2%; left:5%; height:30%; width:91%;"> <div class="center">
<center> <center>
<center><input type="email" id="email" name="email" style="width:60%;font-size: 200%;" value="<?php echo $invoice->thirdparty->email;?>"></center> <center><input type="email" id="email" name="email" style="width:60%;font-size: 200%;" value="<?php echo $invoice->thirdparty->email;?>"></center>
</center> </center>
</div> </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("SendInvoice"); ?></button>
<button type="button" class="calcbutton" onclick="addreceived();"><?php print $langs->trans("SaveSendInvoice"); ?></button>
</div> </div>