175 |
// find the bank account |
// find the bank account |
176 |
$accountSql="select distinct pcm_val::text,pcm_lib from |
$accountSql="select distinct pcm_val::text,pcm_lib from |
177 |
tmp_pcmn |
tmp_pcmn |
178 |
where pcm_val like '550%' or pcm_val='58' |
where pcm_val like '550%' or pcm_val like '58%' or pcm_val like '57%' |
179 |
order by pcm_val::text"; |
order by pcm_val::text"; |
180 |
$ResAccount=ExecSql($cn,$accountSql); |
$ResAccount=ExecSql($cn,$accountSql); |
181 |
echo '<div class="u_redcontent">'; |
echo '<div class="u_redcontent">'; |
182 |
echo "<table>"; |
echo "<table>"; |
183 |
|
// for each account |
184 |
for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) { |
for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) { |
185 |
|
// get the saldo |
186 |
$l=pg_fetch_array($ResAccount,$i); |
$l=pg_fetch_array($ResAccount,$i); |
187 |
echo "<tr>"; |
$m=GetSolde($cn,$l['pcm_val']); |
188 |
echo "<TD>". |
// print the result if the saldo is not equal to 0 |
189 |
$l['pcm_val']. |
if ( $m != 0.0 ) { |
190 |
"</TD>". |
echo "<tr>"; |
191 |
"<TD>". |
echo "<TD>". |
192 |
$l['pcm_lib']. |
$l['pcm_val']. |
193 |
"</TD>"."<TD>". |
"</TD>". |
194 |
GetSolde($cn,$l['pcm_val']). |
"<TD>". |
195 |
"</TD>"."</TR>"; |
$l['pcm_lib']. |
196 |
|
"</TD>"."<TD>". |
197 |
|
$m. |
198 |
|
"</TD>"."</TR>"; |
199 |
|
} |
200 |
}// for |
}// for |
201 |
echo "</table>"; |
echo "</table>"; |
202 |
echo "</div>"; |
echo "</div>"; |