#include <infocon.style>
#include "account.inc"

<future>
<page func=InfoCon title="Kontoführung">
<calendar_init -5>

<account_heading>

<style type="text/css">
label {
  display: block;
  font-weight: bold;
  font-size: 12px;
  width: 95px;
  text-align: left;
  padding-left: 5px;
  padding-top: 0px;
  padding-bottom: 0px;
  background-color: #1aa2fe;
  color: white;
}
input {
  width: 300px;
  margin-bottom: 10px;
  border: solid #1aa2fe;
  border-width: 1px;
}
div.input {
  display: block;
  width: 300px;
  margin-bottom: 10px;
  border: solid #1aa2fe;
  border-width: 1px;
  background-color: #ffffff;
}
select {
  display: block;
  width: 300px;
  margin-bottom: 10px;
  border: solid #1aa2fe;
  border-width: 1px;
}
input.checkbox {
  display: inline;
  width: auto;
  vertical-align: middle;
}
</style>

<blockquote>
<form action=list.php method=POST>
<input type=hidden class=none name=blzkto value="<? echo $_GET['blzkto']; ?>">
<?
  $table = "account";
  $add = '';
  if (strlen ($_GET['cur']) > 0) {
    printf ("<input type=\"hidden\" class=\"none\" name=\"currency\" value=\"%s\">", $_GET['cur']);
    if ($_GET['cur'] == "dm") {
      $table = "account_dm";
      $add = '&cur=dm';
    }
  }
?>

<label for=year>Jahr</label>
<select id=year name=year>
<option>
<?
  if ($table == 'account')
    $accounting = new Accounting(false);
  else
    $accounting = new AccountingDM(false);

  foreach ($accounting->distinctYears($_GET['blzkto']) as $row)
    printf ("<option value=\"%s\">%s", $row->year, $row->year);
?></select>

<br class="none">
<label for=deadline>Stichtag</label>
<input id=deadline name=deadline size=25 maxlength=10>
<calendar "deadline">

<? if (!isset($_GET["cur"]) || $_GET["cur"] != "dm") { ?>

<br class="none">
<label for=statement>Auszug</label>
<select id=statement name=statement>
<option>
<?
  foreach ($accounting->distinctStatements($_GET['blzkto']) as $row)
    printf ("<option value=\"%s\">%s", $row->statement, $row->statement);
?></select>
<? } ?>

<br class="none">
<label for=category>Kategorie</label>
<select id=category name=category>
<option>
<?
  foreach ($accounting->distinctCategories($_GET['blzkto']) as $row) {
    printf ("<option value=\"%s\">%s", $row->category, $row->category);
  }
?></select>

<br class="none">
<label for=from_to>Abs./Empf.</label>
<select id=from_to name=from_to>
<option>
<?
  foreach ($accounting->distinctFromTo($_GET['blzkto']) as $row) {
    printf ("<option value=\"%s\">%s", $row->from_to, $row->from_to);
  }
?></select>

<br class="none">
<label for=keyword>Suchwort</label>
<input id=keyword name=keyword size=25 maxlength=40>

<br class="none">
<label for=checkbox>Zahlung</label>
<div class=input>
<input class=checkbox type=checkbox name=input value=1 checked> Einnahmen
<input class=checkbox type=checkbox name=output value=1 checked> Ausgaben
</div>

<p><center><input class=button type=submit value="Query">
&nbsp;&nbsp;&nbsp;&nbsp;
<input class=button type=reset value="Reset"></center><p>
</form>
</blockquote>

</page>

# Local variables:
# mode: text
# mode: auto-fill
# end:
