noalyss Version-9
letter_all.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?><?php
5\Noalyss\Dbg::echo_file(__FILE__);
8global $g_failed;
9
10if ( count($this->content) == 0 ) :
11?>
12 <h2 class="error"><?php echo _('Désolé aucun résultat trouvé')?></h2>
13
14<?php exit();
16 <table class="result">
17<tr>
18<th>
19 <?php echo _('Lettrage')?>
20</th>
21<th>
22 <?php echo _('Date')?>
23</th>
24<th>
25 <?php echo _('Ref')?>
26</th>
27<th>
28 <?php echo _('Interne')?>
29</th>
30<th>
31 <?php echo _('Description')?>
32</th>
33<th style="text-align:right">
34 <?php echo _('Débit')?>
35</th>
36<th style="text-align:right">
37 <?php echo _('Crédit')?>
38</th>
39<th style="text-align:center">
40 <?php echo _('Op. concernée')?>
41</th>
42</tr>
43
44<?php
45for ($i=0;$i<count($this->content);$i++):
46 $class="";
47$class= ( ($i % 2) == 0 ) ? "odd":"even";
48?>
49 <tr <?php echo "class=\"$class\""; ?> >
50<td>
51<?php
52$letter=($this->content[$i]['letter']==-1)?_("aucun lettrage"):strtoupper(base_convert($this->content[$i]['letter'],10,36));
53
54$object=sprintf('{ gDossier : %s , j_id : %s , obj_type:\'%s\',search_start:\'%s\',search_end:\'%s\',op:\'dl\'} ',
55 $gDossier,
56 $this->content[$i]['j_id'],
57 $this->object_type,
58 $this->get_parameter('start'),
59 $this->get_parameter('end')
60 );
61
62$js=sprintf("dsp_letter(%s)",$object);
63
64?>
65<A class="detail" style="text-decoration: underline" onclick="<?php echo $js?>"><?php echo $letter?>
66<?php if ( $this->content[$i]['letter_diff'] != 0) echo $g_failed; ?>
67 </A>
68</td>
69<td> <?php echo smaller_date($this->content[$i]['j_date_fmt'])?> </td>
70<td> <?php echo $this->content[$i]['jr_pj_number']?> </td>
71
72<?php
73$r=sprintf('<A class="detail" style="text-decoration:underline" href="javascript:void(0)" onclick="viewOperation(\'%s\',\'%s\')" >%s</A>',
74 $this->content[$i]['jr_id'], $gDossier, $this->content[$i]['jr_internal']);
75?>
76 <td> <?php echo $r?> </td>
77 <td> <?php echo h($this->content[$i]['jr_comment'])?> </td>
78 <?php if ($this->content[$i]['j_debit']=='t') : ?>
79 <td style="text-align:right"> <?php echo nbm($this->content[$i]['j_montant'])?> </td>
80 <td></td>
81 <?php else : ?>
82 <td></td>
83 <td style="text-align:right"> <?php echo nbm($this->content[$i]['j_montant'])?> </td>
84 <?php endif ?>
85<td style="text-align:center">
86<?php
87 // Rapprochement
88 $rec=new Acc_Reconciliation($this->db);
89 $rec->set_jr_id($this->content[$i]['jr_id']);
90 $a=$rec->get();
91 if ( $a != null ) {
92 foreach ($a as $key => $element)
93 {
94 $operation=new Acc_Operation($this->db);
95 $operation->jr_id=$element;
96 $l_amount=$this->db->get_value("select jr_montant from jrn ".
97 " where jr_id=$element");
98 echo "<A class=\"detail\" href=\"javascript:void(0)\" onclick=\"viewOperation('".$element."',".$gDossier.")\" > ".$operation->get_internal()." [ ".nbm($l_amount,2)." &euro; ]</A>";
99 }//for
100 }// if ( $a != null ) {
101// compute amount
102$amount_deb+=($this->content[$i]['j_debit']=='t')?$this->content[$i]['j_montant']:0;
103$amount_cred+=($this->content[$i]['j_debit']=='f')?$this->content[$i]['j_montant']:0;
104
105?>
106</td>
107</tr>
108
109<?php
111?>
112<tr class="highlight">
113 <td></td>
114 <td></td>
115 <td></td>
116 <td></td>
117 <td></td>
118 <td class="num"> <?php echo nbm($amount_deb,2);?> </td>
119 <td class="num"> <?php echo nbm($amount_cred,2);?> </td>
120 <td class="num">
121 <?php
122 bcscale(2);
124 if ( $solde > 0 )
125 printf (_("Solde débiteur : %s"),nbm($solde));
126 elseif ($solde < 0)
127 printf (_("Solde créditeur : %s"),nbm(abs($solde)));
128
129
130 ?>
131
132 </td>
133</table>
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
smaller_date($p_date)
shrink the date, make a date shorter for the printing
Definition: ac_common.php:837
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
nbm($p_number, $p_dec=2)
format the number with a sep.
Definition: ac_common.php:137
if(!headers_sent()) else
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
h( $row[ 'oa_description'])
$opd_description style
$input_from id
Definition: balance.inc.php:63
else $card content[$j]['j_montant']
this file match the tables jrn & jrnx the purpose is to remove or save accountant writing to these ta...
new class for managing the reconciliation it must be used instead of the function InsertRapt,...
$all table
for($e=0; $e< count($afiche); $e++) exit
$SecUser db
global $g_failed
Definition: letter_all.php:8
$gDossier
Definition: letter_all.php:7
$class
Definition: letter_all.php:47
$solde
Definition: letter_all.php:123
$amount_cred
Definition: letter_all.php:6
$object
Definition: letter_all.php:54
$letter
Definition: letter_all.php:52
$js
Definition: letter_all.php:62
$amount_deb
Definition: letter_all.php:6
endif
Definition: letter_all.php:15
$a
Definition: letter_all.php:90
endfor
Definition: letter_all.php:110
if( $delta< 0) elseif( $delta==0)