Jump to content

marcosevaristo

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by marcosevaristo

  1. this is the code that prints, i fixed it is *botaoprint* what should i do to fix this bug please help me!! <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#botaoPrint').click(function(){ $('#divImprimir').printThis({ doctypeString: '<meta charset="utf-8">', importStyle: true, base: false, }); }); }); </script>
  2. Yes my friend!! but i don't know what i should do to replace the id so the button can open for all receipts!! Please help me!
  3. the problem is that only the first button works, the other buttons don't open the print function
  4. Hello I have a problem in my Script and I'm not able to solve it, it's the following: I want to create a button that prints several different receipts, several lunch orders on one page and I want them all to have a print button for printing the receipt below: #This is the Button# <button id="botaoPrint" class="btn_1">Imprimir Pedido <i class="icon-print-2" aria-hidden="true"></i></button></a> #The receipt# </center> <div> <div class="container"> <div style="margin: 0 auto;align-items: center;display: flex;flex-direction: row;flex-wrap: wrap;justify-content: center;" class="row justify-content-center "> <article class="col-md-4"> <div id="divImprimir" style="background-color: #fdfbe3;" class="boxed-md boxed-padded"> <?php $dataex = explode(' ', $data); $dataex[0] = explode('-', $dataex[0]); $dataex[0] = array_reverse($dataex[0]); $dataex[0] = implode('/', $dataex[0]); $dataformatada = $dataex[0].' - '.$dataex[1]; $nome = str_replace('%20', ' ', $nome); $nomeCliente = $nome; $telefoneformatado = formatPhone($telefone); $taxaPedido = Check::Real($valor_taxa); $valorTroco = Check::Real($valor_troco); $totalPedido = Check::Real($total); $resumoPedidosFormatado = str_replace('*', '', $resumo_pedidos); $resumoPedidosFormatado = str_replace('<b>', '', $resumoPedidosFormatado); $resumoPedidosFormatado = str_replace('</b>', '', $resumoPedidosFormatado); $telefoneEmpresaFormatado = formatPhone($telefone_empresa); echo "<b>".$nome_empresa."</b>"; echo ".\n <br />"; echo (!empty($end_rua_n_empresa) && !empty($end_bairro_empresa) && !empty($cidade_empresa) && !empty($end_uf_empresa) ? $end_rua_n_empresa.' <br /> '.$end_bairro_empresa : 'Defina_um_endereço').' - '.$cidade_empresa.' - '.$end_uf_empresa; echo "\n <br />"; echo "Telefone: {$telefoneEmpresaFormatado}"; echo "\n <br />"; echo "\n <br />"; echo "<b>PEDIDO: #{$codigo_pedido}</b>\n <br />"; echo "{$dataformatada} <br />"; echo "\n <br />"; echo "-----------------------------"."\n <br />"; if($opcao_delivery != 'true'): echo "{$msg_delivery_false}\n <br />"; echo "Observações: {$name_observacao_mesa}\n <br />"; else: echo "Rua: {$rua}, Nº {$unidade}\n <br />"; echo "Bairro: {$bairro}\n <br />"; echo "Cidade: {$cidade} - {$uf}\n <br />"; echo "Complemento: {$complemento}\n <br />"; echo "Observação: {$observacao}\n <br />"; endif; echo "-----------------------------"."\n <br />"; echo "\n <br />"; echo "DADOS DO CLIENTE: <br />"; echo "NOME: {$nomeCliente}\n <br />"; echo "TEL: {$telefoneformatado}\n <br />"; echo "-----------------------------"."\n <br />"; echo "\n <br />"; echo "RESUMO DO PEDIDO: <br />"; echo "{$resumoPedidosFormatado}"; echo "-----------------------------"."\n <br />"; echo "PAGAMENTO: {$forma_pagamento}\n <br />"; echo (!empty($sub_total) || $sub_total != '0.00' ? "SUBTOTAL: R$ ".Check::Real($sub_total)." \n <br />" : "" ); if(!empty($desconto) && $desconto != 0): echo "DESCONTO: {$desconto}% \n <br />"; endif; if($valor_taxa != '0.00'): echo "DELIVERY: R$ {$taxaPedido}\n <br />"; endif; echo "TOTAL: R$ {$totalPedido} \n <br />"; if(!empty($valor_troco) && $valor_troco != '0.00'): echo "TROCO PARA: R$ {$valorTroco}\n <br />"; endif; echo "-----------------------------"." \n <br />"; echo "\n <br />"; echo "***OBRIGADO E BOM APETITE*** \n <br />"; ?> </div> </article> </div> </div> </div> <center> ----------------------------------------------------------------- *COMMAND TO PRINT* <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#botaoPrint2').click(function(){ $('#divImprimir').printThis({ doctypeString: '<meta charset="utf-8">', importStyle: true, base: false, }); }); }); </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.