validation2.tpl.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
  3. * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. *
  18. */
  19. // Protection to avoid direct call of template
  20. if (empty($langs) || !is_object($langs))
  21. {
  22. print "Error, template page can't be called as URL";
  23. exit;
  24. }
  25. // Load translation files required by the page
  26. $langs->loadLangs(array("main", "bills"));
  27. ?>
  28. <div class="blocksellfinished">
  29. <div class="cadre_facturation">
  30. <h3 class="titre1"><?php echo $langs->trans("SellFinished"); ?></h3><br>
  31. <script type="text/javascript">
  32. function popupTicket(id,name)
  33. {
  34. largeur = 600;
  35. hauteur = 500;
  36. opt = 'width='+largeur+', height='+hauteur+', left='+(screen.width - largeur)/2+', top='+(screen.height-hauteur)/2+'';
  37. window.open('validation_ticket.php?facid='+id,name, opt);
  38. }
  39. popupTicket(<?php echo GETPOST('facid', 'int'); ?>,'<?php echo $langs->trans('PrintTicket') ?>');
  40. </script>
  41. <p><a class="lien1" href="<?php echo DOL_URL_ROOT ?>/compta/facture/card.php?action=builddoc&facid=<?php echo GETPOST('facid', 'int'); ?>" target="_blank"><?php echo $langs->trans("ShowInvoice"); ?></a></p>
  42. <br>
  43. <p><a class="lien1" href="#" onclick="Javascript: popupTicket(<?php echo GETPOST('facid', 'int'); ?>,'<?php echo $langs->trans('PrintTicket') ?>'); return(false);"><?php echo $langs->trans("PrintTicket"); ?></a></p>
  44. </div>
  45. </div>
  46. <br>