mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-11-27 20:21:56 +01:00
92 lines
2.5 KiB
PHP
92 lines
2.5 KiB
PHP
|
<div class="standard">
|
|||
|
|
|||
|
<b>Hauptbuch</b>
|
|||
|
<br><br>
|
|||
|
|
|||
|
<table border="0" cellspacing="0" cellpadding="0">
|
|||
|
<tr>
|
|||
|
<td><b>ID:</b> </td>
|
|||
|
<td><b>Sollkonto:</b> </td>
|
|||
|
<td><b>Habenkonto:</b> </td>
|
|||
|
<td><b>Betrag:</b> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td colspan="4" background="./bilder/linie_h2.bmp"><img src="./bilder/linie_h2.bmp"/></td>
|
|||
|
</tr>
|
|||
|
|
|||
|
<?php
|
|||
|
|
|||
|
include("encode.inc");
|
|||
|
|
|||
|
$sql = 'select * from Buchungen order by Buchungen_ID';
|
|||
|
$result = mysql_query($sql);
|
|||
|
while($row = mysql_fetch_array($result))
|
|||
|
{
|
|||
|
//$sql2 = 'select Konten_ID, decode(Konten_Bezeichnung, "'.$encode_passwort.'") from Konten where Konten_ID like '.$row[Buchungen_Sollkonto];
|
|||
|
$sql2 = 'select Konten_ID, Konten_Bezeichnung from Konten where Konten_ID like '.$row[Buchungen_Sollkonto];
|
|||
|
$result2 = mysql_query($sql2);
|
|||
|
while($row2 = mysql_fetch_array($result2))
|
|||
|
{
|
|||
|
// Konten mit Verschl<68>sselung
|
|||
|
//$sollkonto = $row2['decode(Konten_Bezeichnung, "'.$encode_passwort.'")'];
|
|||
|
$sollkonto = $row2['Konten_Bezeichnung'];
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
//$sql2 = 'select Konten_ID, decode(Konten_Bezeichnung, "'.$encode_passwort.'") from Konten where Konten_ID like '.$row[Buchungen_Habenkonto];
|
|||
|
$sql2 = 'select Konten_ID, Konten_Bezeichnung from Konten where Konten_ID like '.$row[Buchungen_Habenkonto];
|
|||
|
$result2 = mysql_query($sql2);
|
|||
|
while($row2 = mysql_fetch_array($result2))
|
|||
|
{
|
|||
|
//$habenkonto = $row2['decode(Konten_Bezeichnung, "'.$encode_passwort.'")'];
|
|||
|
$habenkonto = $row2['Konten_Bezeichnung'];
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
echo '<tr>';
|
|||
|
echo '<td>'.fuellen($row[Buchungen_ID], 5).' </td>';
|
|||
|
echo '<td>'.$row[Buchungen_Sollkonto].' - '.$sollkonto.' </td>';
|
|||
|
echo '<td>'.$row[Buchungen_Habenkonto].' - '.$habenkonto.' </td>';
|
|||
|
echo '<td>CHF '.$row[Buchungen_Betrag].' </td>';
|
|||
|
echo '</tr>';
|
|||
|
|
|||
|
echo '<tr>';
|
|||
|
echo '<td colspan="4"> </td>';
|
|||
|
echo '</tr>';
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
function fuellen($zahl, $stellen)
|
|||
|
{
|
|||
|
$wert = "";
|
|||
|
if(strlen($zahl) >= $stellen)
|
|||
|
{
|
|||
|
$wert = $zahl;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$diff = $stellen-strlen($zahl);
|
|||
|
$fuell = "";
|
|||
|
for($i=0; $i<$diff; $i++)
|
|||
|
{
|
|||
|
$fuell .= '0';
|
|||
|
}
|
|||
|
$wert = $fuell.$zahl;
|
|||
|
}
|
|||
|
|
|||
|
return $wert;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
</table>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|