PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/htdocs/cashdesk/tpl/validation1.tpl.php

https://github.com/asterix14/dolibarr
PHP | 116 lines | 88 code | 25 blank | 3 comment | 10 complexity | 194544cf7c4bb1bd3a6701173032d329 MD5 | raw file
Possible License(s): LGPL-2.0
  1. <?php
  2. $langs->load("main");
  3. ?>
  4. <!--Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
  5. Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  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. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Summary"); ?></legend>
  18. <table class="table_resume">
  19. <tr><td class="resume_label"><?php echo $langs->trans("Invoice"); ?></td><td><?php echo $obj_facturation->num_facture(); ?></td></tr>
  20. <tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prix_total_ht(),'MT').' '.$conf->monnaie; ?></td></tr>
  21. <?php
  22. // Affichage de la tva par taux
  23. if ( $obj_facturation->montant_tva() ) {
  24. echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price2num($obj_facturation->montant_tva(),'MT').' '.$conf->monnaie.'</td></tr>');
  25. }
  26. else
  27. {
  28. echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.$langs->trans("NoVAT").'</td></tr>');
  29. }
  30. ?>
  31. <tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prix_total_ttc(),'MT').' '.$conf->monnaie; ?></td></tr>
  32. <tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> </td><td>
  33. <?php
  34. switch ($obj_facturation->mode_reglement())
  35. {
  36. case 'ESP':
  37. echo $langs->trans("Cash");
  38. $filtre='courant=2';
  39. if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH))
  40. $selected = $conf->global->CASHDESK_ID_BANKACCOUNT_CASH;
  41. break;
  42. case 'CB':
  43. echo $langs->trans("CreditCard");
  44. $filtre='courant=1';
  45. if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB))
  46. $selected = $conf->global->CASHDESK_ID_BANKACCOUNT_CB;
  47. break;
  48. case 'CHQ':
  49. echo $langs->trans("Cheque");
  50. $filtre='courant=1';
  51. if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE))
  52. $selected = $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE;
  53. break;
  54. case 'DIF':
  55. echo $langs->trans("Reported");
  56. $filtre='courant=1 OR courant=2';
  57. $selected='';
  58. break;
  59. default:
  60. $filtre='courant=1 OR courant=2';
  61. $selected='';
  62. }
  63. ?>
  64. </td></tr>
  65. <?php
  66. // Affichage des infos en fonction du mode de paiement
  67. if ( $obj_facturation->mode_reglement() == 'DIF' ) {
  68. echo ('<tr><td class="resume_label">'.$langs->trans("DateEcheance").'</td><td>'.$obj_facturation->paiement_le().'</td></tr>');
  69. } else {
  70. echo ('<tr><td class="resume_label">'.$langs->trans("Received").'</td><td>'.price2num($obj_facturation->montant_encaisse(),'MT').' '.$conf->monnaie.'</td></tr>');
  71. }
  72. // Affichage du montant rendu (reglement en especes)
  73. if ( $obj_facturation->montant_rendu() ) {
  74. echo ('<tr><td class="resume_label">'.$langs->trans("Change").'</td><td>'.price2num($obj_facturation->montant_rendu(),'MT').' '.$conf->monnaie.'</td></tr>');
  75. }
  76. ?>
  77. </table>
  78. <form id="frmValidation" class="formulaire2" method="post" action="validation_verif.php?action=valide_facture">
  79. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
  80. <p class="note_label">
  81. <?php
  82. echo $langs->trans("BankToPay"). "<br>";
  83. $form = new Form($db);
  84. $form->select_comptes($selected,'cashdeskbank',0,$filtre);
  85. ?>
  86. </p>
  87. <p class="note_label"><?php echo $langs->trans("Notes"); ?><br><textarea class="textarea_note" name="txtaNotes"></textarea></p>
  88. <span><input class="bouton_validation" type="submit" name="btnValider" value="<?php echo $langs->trans("ValidateInvoice"); ?>" /></span>
  89. <p><a class="lien1" href="affIndex.php?menu=facturation"><?php echo $langs->trans("RestartSelling"); ?></a></p>
  90. </form>
  91. </fieldset>