noalyss Version-9
form_ledger_detail.php
Go to the documentation of this file.
1<?php
2//This file is part of NOALYSS and is under GPL
3//see licence.txt
4/**
5 * @file
6 * @brief Display a form to enter an operation Sale or Purchase
7 */
8
11?>
12 <div id="jrn_name_div">
13 <h1 id="jrn_name"> <?php echo $this->get_name()?></h1>
14</div>
15<table>
16 <tr>
17 <td>
18 <?php echo _('Journal')?>
19 </td>
20 <td>
21 <?php echo $f_jrn?>
22 </td>
23 </tr>
24 <tr>
25 <td> <?php echo _('Modèle opération') ?></td>
26 <td>
27 <?php echo $str_op_template;?>
28 </td>
29 </tr>
30 <tr>
31 <td>
32 <?php echo _('Date')?>
33 </td>
34 <td>
35 <?php echo $f_date ?>
36 </td>
37 </tr>
38 <tr>
39 <td>
40 <?php echo _('Echeance')?>
41 </td>
42 <td>
43 <?php echo $f_echeance?>
44 </td>
45 </tr>
46 <tr>
47 <td><?php echo $f_type?></td>
48 <td>
49 <?php echo $f_client_qcode?><?php echo $f_client_bt?><?php echo $str_add_button_tiers;?> <?php echo $f_client?>
50 </td>
51 </tr>
52
53 <tr>
54 <?php echo $f_periode?>
55 </tr>
56 <tr>
57 <td>
58 <?php echo _('Numéro Pièce')?>
59 </td>
60 <td>
61 <?php echo $f_pj?>
62 </td>
63 </tr>
64 <tr>
65 <td>
66 <?php echo _('Libellé')?>
67 <?php echo $label ; ?>
68 </td>
69 <td>
70 <?php echo $f_desc, Icon_Action::longer("e_comm",20)?>
71 </td>
72 </tr>
73 <tr>
74 <td>
75 <?=_("Note")?>
76 <?php echo Icon_Action::show_note('jrn_note_div') ?>
77 </td>
78 <td >
79 <pre id="jrn_note_td"></pre>
80 </td>
81 </tr>
82
83 <tr>
84 <td>
85 <?=_("Devise")?>
86 </td>
87 <td>
88 <?=$currency_select->input()?>
89 <?=$currency_input->change('CurrencyCompute(\'p_currency_rate\',\'p_currency_euro\');')?>
90
91 </td>
92 </tr>
93</table>
94<?php
95// note for operation
96$note=(isset($p_array['jrn_note_input']))?$p_array['jrn_note_input']:'';
98?>
99
100<br>
101<?php
102$hidden=($this->has_quantity()==0)?'d-none':'';
103?>
104<h2><?php echo $f_legend_detail?></h2>
105<table id="sold_item" >
106<tr>
107<th style="width:auto"colspan="2">Code <?php echo Icon_Action::infobulle(0)?></th>
108 <th class="visible_gt800 visible_gt1155"><?php echo _('Dénomination')?></th>
109<?php if ($flag_tva =='Y') : ?>
110 <th class="text-center" ><?php echo _('prix/unité htva')?><?php echo Icon_Action::infobulle(6)?></th>
111 <th class="text-center col_quant <?=$hidden?>"><?php echo _('quantité')?></th>
112 <th class="text-center visible_gt800" ><?php echo _('Total HTVA')?></th>
113 <th><?php echo _('tva')?></th>
114 <th class="text-center visible_gt800"><?php echo _('tot.tva')?></th>
115 <th class="text-center "><?php echo _('tvac')?></th>
116<?php else: ?>
117 <th class="text-center "><?php echo _('prix/unité ')?><?php echo Icon_Action::infobulle(6)?></th>
118 <th class="text-center col_quant <?=$hidden?>"><?php echo _('quantité')?></th>
119 <th class="text-center "><?php echo _('Total ')?></th>
120<?php endif;?>
121
122
123
124</tr>
125<?php foreach ($array as $item) {
126echo '<tr>';
127// echo "<td>";
128echo $item['quick_code'];
129// echo "</td>";
130echo '<td>'.$item['bt'].$item['card_add'].'</td>';
131?>
132<td class="visible_gt800 visible_gt1155"><?php echo $item['denom'] ?></td>
133<?php
134echo td($item['pu'],'class=" text-center"');
135echo td($item['quantity' ],'class="col_quant '. $hidden.' text-center"');
136echo td($item['htva'],' class="visible_gt800 text-center" ');
137if ($flag_tva=='Y') {
138 echo td($item['tva']);
139 echo td($item['amount_tva'].$item['hidden'],' class="visible_gt800 text-center" ');
140
141}
142echo td($item['tvac'],'class="text-center"');
143echo '</tr>';
144}
145
146?>
147<tfoot id="sum">
148 <tr class="highlight">
149 <td> <?php echo _("Total")?>
150 <span id="currency_code"></span>
151 </td>
152 <td> </td>
153 <td class="visible_gt800 visible_gt1155"> </td>
154 <td> </td>
155 <td> </td>
156 <td style="text-align:center" class="visible_gt800"> <span id="htva">0.0</span></td>
157 <?php if ( $flag_tva=='Y' ) : ?>
158 <td> </td>
159 <td style="text-align:center" class="visible_gt800"> <span id="tva">0.0</span> </td>
160 <td style="text-align:center"> <span id="tvac" >0.0</span> </td>
161 <?php endif; ?>
162 </tr>
163
164 <tr id="row_currency" class="highlight" style="display:none">
165 <td> <?php printf( _("Total %s"),$default_currency->get_code() );?>
166
167 </td>
168 <td class="num visible_gt800"></td>
169<?php if ($flag_tva=='Y') {?>
170 <td style="text-align:center" class="visible_gt800 visible_gt1155"></td>
171 <td></td>
172 <td class="visible_gt800"></td>
173<?php } ?>
174 <td></td>
175 <td></td>
176 <td></td>
177 <td style="text-align:center">
178 <span id="p_currency_euro"></span>
179 </td>
180 </tr>
181</tfoot>
182</table>
183
184<?php echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); ?>
185
186
187<script>
188 if ($('p_currency_code').value != 0) {
189 $('row_currency').show();
190 }
191 compute_all_ledger();
192</script>
193
194
195
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
span($p_string, $p_extra='')
Definition: ac_common.php:43
h1($p_string, $p_class="")
Definition: ac_common.php:72
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
$opd_description style
display currency , convert to euro , and save them if used.
static connect()
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
static longer($p_domid, $p_size)
Increase size of input_text (p_domid) with p_domid.
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
static show_note($p_domid)
Increase size of input_text (p_domid) with p_domid.
static echo_file($msg, $print=true)
display the file
Definition: dbg.php:88
$all table
$default_currency