noalyss Version-9
currency_mtable_input.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * PhpCompta 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 *
11 * PhpCompta is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with PhpCompta; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
21
22if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
23
24/**
25 * @file
26 * @brief input for currency_mtable
27 * @see Currency_MTable
28 */
29?>
30<table>
31 <tr>
32 <td>
33 ISO
34 <?php $error=$this->get_error("cr_code_iso");
36 ?>
37 </td>
38 <td>
39 <?php echo $cr_code_iso->input(); ?>
40 </td>
41 </tr>
42 <tr>
43 <td>
44 <?php echo _("Nom");
45 $error=$this->get_error("cr_name");
47 ?>
48 </td>
49 <td>
50 <?php echo $cr_name->input(); ?>
51 </td>
52 </tr>
53</table>
54<?php
55 // Variable
57
58?>
59<table class="result" id="currency_rate_table">
60 <tr>
61 <th>
62 <?php echo _("Date");
63
64 ?>
65 </th>
66 <th>
67 <?php echo _("Valeur");
68
69 ?>
70 </th>
71 <th>
72
73 </th>
74 </tr>
75 <?php
76 $nb_histo=count($a_histo);
77 for ($i=0;$i<$nb_histo;$i++):
78 $class=($i%2==0)?"even":"odd";
79 ?>
80 <tr class="<?=$class?>" id="<?php printf('currency_rate_%d',$a_histo[$i]['id'])?>">
81 <td>
82 <?php echo $a_histo[$i]['str_from']?>
83 </td>
84 <td>
85 <?php echo $a_histo[$i]['ch_value']?>
86 </td>
87 <td>
88 <?php
89 // Delete the histo
90 $js=sprintf("CurrencyRateDelete('%s','%s')",$dossier_id,$a_histo[$i]['id']);
91 echo Icon_Action::trash($a_histo[$i]['id'], $js);
92 ?>
93 </td>
94 </tr>
95 <?php endfor; ?>
96 <tr>
97 <td>
98 <?php echo _("Date");
99 $error=$this->get_error("str_from");
101 ?>
102 </td>
103 <td>
104 <?php echo $new_rate_date->input();?>
105 </td>
106 </tr>
107 <tr>
108 <td>
109 <?php echo _("Valeur");
110 $error=$this->get_error("ch_value");
112 </td>
113 <td>
114 <?php echo $new_rate_value->input();?>
115 </td>
116 </tr>
117</table>
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
$class
static id()
return the 'gDossier' value after a check
static errorbulle($p_comment)
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
$all table