noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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
9$default_currency=new Acc_Currency(Dossier::connect(),0);
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 style="width:100%" colspan="2">
75
76 <?php echo Icon_Action::show_note('jrn_note_div') ?>
77 <div id="jrn_note_td"><?php
78 if (!empty($p_array)&& isset ($p_array['jrn_note_input']))
79 { echo $p_array['jrn_note_input'];}
80
81 ?></div>
82 </td>
83 </tr>
84
85 <tr>
86 <td>
87 <?=_("Devise")?>
88 </td>
89 <td>
90 <?=$currency_select->input()?>
91 <?=$currency_input->change('CurrencyCompute(\'p_currency_rate\',\'p_currency_euro\');')?>
92
93 </td>
94 </tr>
95</table>
96<?php
97// note for operation
98$note=(isset($p_array['jrn_note_input']))?$p_array['jrn_note_input']:'';
100?>
101
102<br>
103<?php
104$hidden=($this->has_quantity()==0)?'d-none':'';
105?>
106<h2 class="h-section"><?php echo $f_legend_detail?></h2>
107<table id="sold_item" >
108<tr>
109<th style="width:auto"colspan="1">Code <?php echo Icon_Action::infobulle(0)?></th>
110 <th class="visible_gt800 visible_gt1155"><?php echo _('Dénomination')?></th>
111<?php if ($flag_tva =='Y') : ?>
112 <th class="text-center" ><?php echo _('prix/unité htva')?><?php echo Icon_Action::infobulle(6)?></th>
113 <th class="text-center col_quant <?=$hidden?>"><?php echo _('quantité')?></th>
114 <th class="text-center visible_gt800" ><?php echo _('Total HTVA')?></th>
115 <th><?php echo _('tva')?></th>
116 <th class="text-center visible_gt800"><?php echo _('tot.tva')?></th>
117 <th class="text-center "><?php echo _('tvac')?></th>
118<?php else: ?>
119 <th class="text-center "><?php echo _('prix/unité ')?><?php echo Icon_Action::infobulle(6)?></th>
120 <th class="text-center col_quant <?=$hidden?>"><?php echo _('quantité')?></th>
121 <th class="text-center "><?php echo _('Total ')?></th>
122<?php endif;?>
123
124
125
126</tr>
127<?php foreach ($array as $item) {
128echo '<tr>';
129 echo "<td>";
130echo $item['quick_code'];
131// echo "</td>";
132echo $item['bt'].$item['card_add'].'</td>';
133?>
134<td class="visible_gt800 visible_gt1155"><?php echo $item['denom'] ?></td>
135<?php
136echo td($item['pu'],'class=" text-center"');
137echo td($item['quantity' ],'class="col_quant '. $hidden.' text-center"');
138echo td($item['htva'],' class="visible_gt800 text-center" ');
139if ($flag_tva=='Y') {
140 echo td($item['tva']);
141 echo td($item['amount_tva'].$item['hidden'],' class="visible_gt800 text-center" ');
142
143}
144echo td($item['tvac'],'class="text-center"');
145echo '</tr>';
146}
147
148?>
149<tfoot id="sum">
150 <tr class="highlight">
151 <td> <?php echo _("Total")?>
152 <span id="currency_code"></span>
153 </td>
154 <td> </td>
155 <td class="visible_gt800 visible_gt1155"> </td>
156 <td class="col_quant <?=$hidden?> text-center"'> </td>
157 <td style="text-align:center" class="visible_gt800"> <span id="htva">0.0</span></td>
158 <?php if ( $flag_tva=='Y' ) : ?>
159 <td> </td>
160 <td style="text-align:center" class="visible_gt800"> <span id="tva">0.0</span> </td>
161 <td style="text-align:center"> <span id="tvac" >0.0</span> </td>
162 <?php endif; ?>
163 </tr>
164
165 <tr id="row_currency" class="highlight" style="display:none">
166 <td> <?php printf( _("Total %s"),$default_currency->get_code() );?>
167
168 </td>
169 <td class="num visible_gt800"></td>
170 <td class="col_quant <?=$hidden?> text-center"'> </td>
171<?php if ($flag_tva=='Y') {?>
172 <td style="text-align:center" class="visible_gt800 visible_gt1155"></td>
173 <td></td>
174 <td class="visible_gt800"></td>
175<?php } ?>
176
177 <td></td>
178 <td style="text-align:center">
179 <span id="p_currency_euro"></span>
180 </td>
181 </tr>
182</tfoot>
183</table>
184
185<?php echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); ?>
186
187
188<script>
189 if ($('p_currency_code').value != 0) {
190 $('row_currency').show();
191 }
192 compute_all_ledger();
193</script>
194
195
196
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
$note
display input textarea for operation note
$opd_description style
_("actif, passif,charge,...")
display currency , convert to euro , and save them if used.
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