Neues Modul 'Steuern Bearbeiten'. Mit diesem Modul ist es moeglich, die Eintraege...
authorUdo Spallek <info@wissensvermittlung.com>
Wed, 11 Jul 2007 11:52:03 +0000 (11:52 +0000)
committerUdo Spallek <info@wissensvermittlung.com>
Wed, 11 Jul 2007 11:52:03 +0000 (11:52 +0000)
SL/AM.pm
bin/mozilla/am.pl
locale/de/all
locale/de/am
locale/de/menu
locale/de/menunew
menu.ini
templates/webpages/am/edit_tax_de.html [new file with mode: 0644]
templates/webpages/am/edit_tax_master.html [new file with mode: 0644]
templates/webpages/am/list_tax_de.html [new file with mode: 0644]
templates/webpages/am/list_tax_master.html [new file with mode: 0644]

index af52ae9..dc6774d 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -2055,4 +2055,181 @@ sub swap_units {
   $main::lxdebug->leave_sub();
 }
 
+sub taxes {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $myconfig, $form) = @_;
+
+  # connect to database
+  my $dbh = $form->dbconnect($myconfig);
+
+  my $query = qq|SELECT 
+                   t.id,
+                   t.taxkey,
+                   t.taxdescription,
+                   round(t.rate, 2) * 100 AS rate,
+                   c.accno AS taxnumber,
+                   c.description AS account_description
+                 FROM tax t
+                 JOIN chart c on (chart_id = c.id)
+                 ORDER BY taxkey|;
+
+  $sth = $dbh->prepare($query);
+  $sth->execute || $form->dberror($query);
+
+  $form->{TAX} = [];
+  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+    push @{ $form->{TAX} }, $ref;
+  }
+
+  $sth->finish;
+  $dbh->disconnect;
+
+  $main::lxdebug->leave_sub();
+}
+
+sub get_tax_accounts {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $myconfig, $form) = @_;
+
+  my $dbh = $form->dbconnect($myconfig);
+
+  # get Accounts from chart
+  my $query = qq{ SELECT 
+                 id,
+                 accno || ' - ' || description AS _taxaccount
+               FROM chart
+               WHERE link LIKE '%_tax%'
+               ORDER BY accno 
+             };
+
+  $sth = $dbh->prepare($query);
+  $sth->execute || $form->dberror($query);
+
+  $form->{ACCOUNTS} = [];
+  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+    push @{ $form->{ACCOUNTS} }, $ref;
+  }
+
+  $sth->finish;
+
+  $dbh->disconnect;
+
+  $main::lxdebug->leave_sub();
+}
+
+sub get_tax {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $myconfig, $form) = @_;
+
+  # connect to database
+  my $dbh = $form->dbconnect($myconfig);
+
+  my $query = qq|SELECT 
+                   taxkey,
+                   taxdescription,
+                   round(rate, 2) * 100 AS rate,
+                   chart_id
+                 FROM tax
+                 WHERE id = ? |;
+                 
+  my $sth = $dbh->prepare($query);
+  $sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
+
+  my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+  map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+  $sth->finish;
+
+  # see if it is used by a taxkey
+  $query = qq|SELECT count(*) FROM taxkeys
+              WHERE tax_id = ?|;
+  
+  ($form->{orphaned}) = selectrow_query($form, $dbh, $query, $form->{id});
+
+  $form->{orphaned} = !$form->{orphaned};
+  $sth->finish;
+  
+  if (!$form->{orphaned} ) {
+    $query = qq|SELECT DISTINCT c.id, c.accno
+                FROM taxkeys tk
+                LEFT JOIN   tax t ON (t.id = tk.tax_id)
+                LEFT JOIN chart c ON (c.id = tk.chart_id)
+                WHERE tk.tax_id = ?|;
+  
+    $sth = $dbh->prepare($query);
+    $sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
+
+    $form->{TAXINUSE} = [];
+    while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+      push @{ $form->{TAXINUSE} }, $ref;
+    }
+
+    $sth->finish;
+  }
+  
+  $dbh->disconnect;
+
+  $main::lxdebug->leave_sub();
+}
+
+sub save_tax {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $myconfig, $form) = @_;
+
+  # connect to database
+  my $dbh = $form->dbconnect($myconfig);
+
+  $form->{rate} = $form->{rate} / 100;
+
+  my @values = ($form->{taxkey}, $form->{taxdescription}, $form->{rate}, $form->{chart_id} );
+  if ($form->{id}) {
+    $query = qq|UPDATE _tax SET
+                  taxkey         = ?,
+                  taxdescription = ?,
+                  rate           = ?,
+                  chart_id       = ?
+                WHERE id = ?|;
+    push(@values, $form->{id});
+  } 
+  else {
+    #ok
+    $query = qq|INSERT INTO _tax (
+                  taxkey,
+                  taxdescription,
+                  rate,
+                  chart_id
+                )
+                VALUES (?, ?, ?, ? )|;
+  }
+  do_query($form, $dbh, $query, @values);
+
+  $dbh->disconnect;
+
+  $main::lxdebug->leave_sub();
+}
+
+sub delete_tax {
+  $main::lxdebug->enter_sub();
+
+  my ($self, $myconfig, $form) = @_;
+
+  # connect to database
+  my $dbh = $form->dbconnect($myconfig);
+
+  $query = qq|DELETE FROM _tax
+              WHERE id = ?|;
+  do_query($form, $dbh, $query, $form->{id});
+
+  $dbh->disconnect;
+
+  $main::lxdebug->leave_sub();
+}
+
+
+
 1;
index 02290c7..95bea4d 100644 (file)
@@ -3137,3 +3137,120 @@ sub swap_units {
 
   $lxdebug->leave_sub();
 }
+
+sub add_tax {
+  $lxdebug->enter_sub();
+
+  $form->{title} =  $locale->text('Add');
+
+  $form->{callback} =
+    "$form->{script}?action=add_tax&login=$form->{login}&password=$form->{password}"
+    unless $form->{callback};
+
+  _get_taxaccount_selection();
+
+  $form->header();
+  
+  my $parameters_ref = {
+#    ChartTypeIsAccount         => $ChartTypeIsAccount,
+  };
+  
+  # Ausgabe des Templates
+  print($form->parse_html_template('am/edit_tax', $parameters_ref));
+
+  $lxdebug->leave_sub();
+}
+
+sub edit_tax {
+  $lxdebug->enter_sub();
+
+  $form->{title} =  $locale->text('Edit');
+
+  AM->get_tax(\%myconfig, \%$form);
+  _get_taxaccount_selection();
+
+  $form->header();
+  
+  my $parameters_ref = {
+  };
+  
+  # Ausgabe des Templates
+  print($form->parse_html_template('am/edit_tax', $parameters_ref));
+
+  $lxdebug->leave_sub();
+}
+
+sub list_tax {
+  $lxdebug->enter_sub();
+
+  AM->taxes(\%myconfig, \%$form);
+
+  $form->{callback} =
+    "$form->{script}?action=list_tax&login=$form->{login}&password=$form->{password}";
+
+  $form->{title} = $locale->text('Tax-O-Matic');
+
+  $form->header();
+  
+  # Ausgabe des Templates
+  print($form->parse_html_template('am/list_tax', $parameters_ref));
+
+  $lxdebug->leave_sub();
+}
+
+sub _get_taxaccount_selection{
+    $lxdebug->enter_sub();
+
+  AM->get_tax_accounts(\%myconfig, \%$form);
+
+  my $i = 0;
+  foreach my $taxaccount (@{ $form->{ACCOUNTS} } ) {
+
+    # Fill in the Taxaxxounts as select options
+      if ($form->{chart_id} == $taxaccount->{id}) {
+        $form->{ACCOUNTS}[$i]{select_taxaccount} .=
+          qq|<option value="$taxaccount->{id}" selected="selected">
+            $form->{ACCOUNTS}[$i]{_taxaccount}\n|;
+      }
+      else {
+        $form->{ACCOUNTS}[$i]{select_taxaccount} .=
+          qq|<option value="$taxaccount->{id}">
+            $form->{ACCOUNTS}[$i]{_taxaccount}<!-- hallo-->\n|;
+      }
+    $i++;
+  }
+  return;
+
+  $lxdebug->leave_sub();
+}
+
+sub save_tax {
+  $lxdebug->enter_sub();
+
+  $form->isblank("chart_id", $locale->text('Tax-O-Matic account missing!'));
+  $form->isblank("rate", $locale->text('Taxrate missing!'));
+  $form->isblank("taxdescription", $locale->text('Taxdescription  missing!'));
+  $form->isblank("taxkey", $locale->text('Taxkey  missing!'));
+  
+  if ( $form->{rate} <= 0 || $form->{rate} >= 100 ) {
+    $form->error($locale->text('Tax Percent is a number between 0 and 100'));
+  }
+
+  if ( $form->{rate} <= 0.99 && $form->{rate} >= 0 ) {
+    $form->error($locale->text('Tax Percent is a number between 0 and 100'));
+  }  
+
+  AM->save_tax(\%myconfig, \%$form);
+  $form->redirect($locale->text('Tax saved!'));
+
+  $lxdebug->leave_sub();
+}
+
+sub delete_tax {
+  $lxdebug->enter_sub();
+
+  AM->delete_tax(\%myconfig, \%$form);
+  $form->redirect($locale->text('Tax deleted!'));
+
+  $lxdebug->leave_sub();
+}
index f5b79dd..db9c268 100644 (file)
@@ -249,6 +249,7 @@ aktualisieren wollen?',
   'Chart Type'                  => 'Kontentyp',
   'Chart of Accounts'           => 'Kontenübersicht',
   'Chart of accounts'           => 'Kontenrahmen',
+  'Chartaccounts connected to this Tax:' => 'Konten, die mit dieser Steuer verknüpft sind:',
   'Check'                       => 'Scheck',
   'Check Details'               => 'Bitte Angaben überprüfen',
   'Checks'                      => 'Schecks',
@@ -667,6 +668,7 @@ aktualisieren wollen?',
   'List Price'                  => 'Listenpreis',
   'List Pricegroups'            => 'Preisgruppen anzeigen',
   'List Printer'                => 'Drucker anzeigen',
+  'List Tax'                    => 'Bearbeiten',
   'List Transactions'           => 'Buchungsliste',
   'Load draft'                  => 'Entwurf laden',
   'Local Tax Office Preferences' => 'Angaben zum Finanzamt',
@@ -1072,18 +1074,28 @@ aktualisieren wollen?',
   'Tax Number / SSN'            => 'Steuernummer',
   'Tax Office'                  => 'Finanzamt',
   'Tax Office Preferences'      => 'Finanzamt - Einstellungen',
+  'Tax Percent is a number between 0 and 100' => 'Prozentsatz muss zwischen
+  1% und 100% liegen',
   'Tax Period'                  => 'Voranmeldungszeitraum',
   'Tax collected'               => 'vereinnahmte Steuer',
+  'Tax deleted!'                => 'Steuer gelöscht!',
   'Tax number'                  => 'Steuernummer',
   'Tax paid'                    => 'Vorsteuer',
+  'Tax saved!'                  => 'Steuer gespeichert!',
+  'Tax-O-Matic'                 => 'Steuer',
+  'Tax-O-Matic account missing!' => 'Automatikkonto fehlt!',
   'Tax-o-matic Account'         => 'Automatikbuchung auf Konto',
   'Taxaccount_coa'              => 'Automatikkonto',
   'Taxation'                    => 'Versteuerungs Verfahren',
+  'Taxdescription  missing!'    => 'Steuername fehlt!',
   'Taxdescription_coa'          => 'Steuer',
+  'Taxes'                       => 'Steuern',
   'Taxkey'                      => 'Steuerschlüssel',
+  'Taxkey  missing!'            => 'Steuerschlüssel fehlt!',
   'Taxkey_coa'                  => 'Steuerschlüssel',
   'Taxkeys and Taxreport Preferences' => 'Steuerautomatik und UStVA',
   'Taxlink_coa'                 => 'Steuerautomatik',
+  'Taxrate missing!'            => 'Prozentsatz fehlt!',
   'Tel'                         => 'Tel',
   'Tel.'                        => 'Telefon',
   'Telephone'                   => 'Telefon',
@@ -1357,6 +1369,10 @@ aktualisieren wollen?',
   'singular first char'         => 'S',
   'soldtotal'                   => 'Verkaufte Anzahl',
   'submit'                      => 'abschicken',
+  'tax_chartaccno'              => 'Automatikkonto',
+  'tax_percent'                 => 'Prozentsatz',
+  'tax_taxdescription'          => 'Steuername',
+  'tax_taxkey'                  => 'Steuerschlüssel',
   'to (date)'                   => 'bis',
   'to (time)'                   => 'bis',
   'up'                          => 'hoch',
index 84b1902..18a0a90 100644 (file)
@@ -106,6 +106,7 @@ $self->{texts} = {
   'Dropdown Limit'              => 'Auswahllistenbegrenzung',
   'E-mail'                      => 'eMail',
   'ELSE'                        => 'Zusatz',
+  'Edit'                        => 'Bearbeiten',
   'Edit Account'                => 'Kontodaten bearbeiten',
   'Edit Accounting Group'       => 'Buchungsgruppe bearbeiten',
   'Edit Buchungsgruppe'         => 'Buchungsgruppe bearbeiten',
@@ -244,7 +245,16 @@ $self->{texts} = {
   'Stylesheet'                  => 'Stilvorlage',
   'Subject'                     => 'Betreff',
   'Tax Accounts'                => 'Steuerkonto',
+  'Tax Percent is a number between 0 and 100' => 'Prozentsatz muss zwischen
+  1% und 100% liegen',
+  'Tax deleted!'                => 'Steuer gelöscht!',
+  'Tax saved!'                  => 'Steuer gespeichert!',
+  'Tax-O-Matic'                 => 'Steuer',
+  'Tax-O-Matic account missing!' => 'Automatikkonto fehlt!',
   'Tax-o-matic Account'         => 'Automatikbuchung auf Konto',
+  'Taxdescription  missing!'    => 'Steuername fehlt!',
+  'Taxkey  missing!'            => 'Steuerschlüssel fehlt!',
+  'Taxrate missing!'            => 'Prozentsatz fehlt!',
   'Template Code'               => 'Vorlagenkürzel',
   'Template Code missing!'      => 'Vorlagenkürzel fehlt!',
   'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.',
@@ -304,6 +314,9 @@ $self->{subs} = {
   'H'                           => 'H',
   'NTI'                         => 'NTI',
   'Q'                           => 'Q',
+  '_get_taxaccount_selection{
+' => '_get_taxaccount_selection{
+',
   'account_header'              => 'account_header',
   'add'                         => 'add',
   'add_account'                 => 'add_account',
@@ -314,6 +327,7 @@ $self->{subs} = {
   'add_lead'                    => 'add_lead',
   'add_payment'                 => 'add_payment',
   'add_printer'                 => 'add_printer',
+  'add_tax'                     => 'add_tax',
   'add_unit'                    => 'add_unit',
   'audit_control'               => 'audit_control',
   'buchungsgruppe_header'       => 'buchungsgruppe_header',
@@ -332,6 +346,7 @@ $self->{subs} = {
   'delete_lead'                 => 'delete_lead',
   'delete_payment'              => 'delete_payment',
   'delete_printer'              => 'delete_printer',
+  'delete_tax'                  => 'delete_tax',
   'delivery_customer_selection' => 'delivery_customer_selection',
   'department_header'           => 'department_header',
   'doclose'                     => 'doclose',
@@ -344,6 +359,7 @@ $self->{subs} = {
   'edit_lead'                   => 'edit_lead',
   'edit_payment'                => 'edit_payment',
   'edit_printer'                => 'edit_printer',
+  'edit_tax'                    => 'edit_tax',
   'edit_units'                  => 'edit_units',
   'employee_selection_internal' => 'employee_selection_internal',
   'form_footer'                 => 'form_footer',
@@ -360,6 +376,7 @@ $self->{subs} = {
   'list_lead'                   => 'list_lead',
   'list_payment'                => 'list_payment',
   'list_printer'                => 'list_printer',
+  'list_tax'                    => 'list_tax',
   'mark_as_paid_common'         => 'mark_as_paid_common',
   'part_selection_internal'     => 'part_selection_internal',
   'payment_header'              => 'payment_header',
@@ -376,6 +393,7 @@ $self->{subs} = {
   'save_payment'                => 'save_payment',
   'save_preferences'            => 'save_preferences',
   'save_printer'                => 'save_printer',
+  'save_tax'                    => 'save_tax',
   'save_unit'                   => 'save_unit',
   'select_employee'             => 'select_employee',
   'select_employee_internal'    => 'select_employee_internal',
index 143a9b9..0955727 100644 (file)
@@ -71,6 +71,7 @@ $self->{texts} = {
   'List Payment Terms'          => 'Zahlungskonditionen anzeigen',
   'List Pricegroups'            => 'Preisgruppen anzeigen',
   'List Printer'                => 'Drucker anzeigen',
+  'List Tax'                    => 'Bearbeiten',
   'Logout'                      => 'Abmeldung',
   'Master Data'                 => 'Stammdaten',
   'Packing Lists'               => 'Lieferschein',
@@ -98,6 +99,7 @@ $self->{texts} = {
   'Shipto'                      => 'Lieferanschriften',
   'Stylesheet'                  => 'Stilvorlage',
   'System'                      => 'System',
+  'Taxes'                       => 'Steuern',
   'Templates'                   => 'Vorlagen',
   'Trial Balance'               => 'Saldenbilanz',
   'Type of Business'            => 'Kunden-/Lieferantentyp',
index 68b83e6..d24bb62 100644 (file)
@@ -70,6 +70,7 @@ $self->{texts} = {
   'List Payment Terms'          => 'Zahlungskonditionen anzeigen',
   'List Pricegroups'            => 'Preisgruppen anzeigen',
   'List Printer'                => 'Drucker anzeigen',
+  'List Tax'                    => 'Bearbeiten',
   'Logout'                      => 'Abmeldung',
   'Master Data'                 => 'Stammdaten',
   'Packing Lists'               => 'Lieferschein',
@@ -97,6 +98,7 @@ $self->{texts} = {
   'Shipto'                      => 'Lieferanschriften',
   'Stylesheet'                  => 'Stilvorlage',
   'System'                      => 'System',
+  'Taxes'                       => 'Steuern',
   'Templates'                   => 'Vorlagen',
   'Trial Balance'               => 'Saldenbilanz',
   'Type of Business'            => 'Kunden-/Lieferantentyp',
index 6b84e9f..adb22e9 100644 (file)
--- a/menu.ini
+++ b/menu.ini
@@ -394,6 +394,16 @@ action=add_buchungsgruppe
 module=am.pl
 action=list_buchungsgruppe
 
+[System--Taxes]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Taxes--List Tax]
+module=am.pl
+action=list_tax
+
 [System--Groups]
 module=menu.pl
 action=acc_menu
diff --git a/templates/webpages/am/edit_tax_de.html b/templates/webpages/am/edit_tax_de.html
new file mode 100644 (file)
index 0000000..2925617
--- /dev/null
@@ -0,0 +1,67 @@
+<body>
+<form method="post" action="<TMPL_VAR script>">
+  <input type="hidden" name="id" value="<TMPL_VAR id>">
+  <input type="hidden" name="type" value="tax">
+
+<table width="100%">
+  <tr>
+    <th class="listtop" colspan="2"><TMPL_VAR title> Steuer</th>
+  </tr>
+</table>
+<table width="100%">
+  <tr>
+    <td>Steuerschlüssel</td>
+    <td><input name="taxkey" size="2" value="<TMPL_VAR taxkey>"></td>
+  </tr>
+
+  <tr>
+    <td>Steuername</td>
+    <td><input name="taxdescription" size="60" value="<TMPL_VAR taxdescription>"></td>
+  </tr>
+
+  <tr>
+    <td>Prozentsatz</td>
+    <td><input name="rate" size="10" value="<TMPL_VAR rate>"> %</td>
+  </tr>
+
+  <tr>
+    <td>Automatikkonto</td>
+    <td><select name="chart_id">
+    <TMPL_LOOP ACCOUNTS>
+      <TMPL_VAR select_taxaccount>
+    </TMPL_LOOP>
+    </select>
+    
+    </td>
+  </tr>
+
+
+</table>
+
+<TMPL_UNLESS orphaned>
+  <br />
+  Konten, die mit dieser Steuer verknüpft sind:
+  <TMPL_LOOP TAXINUSE>
+    <a href="am.pl?action=edit_account&id=<TMPL_VAR id>&login=<TMPL_VAR 
+      login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>"><TMPL_VAR accno></a>&nbsp;
+  </TMPL_LOOP>
+  <br />
+</TMPL_UNLESS>
+
+<input name="callback" type="hidden" value="<TMPL_VAR callback ESCAPE=HTML>">
+<input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
+<input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
+
+<br />
+
+<input type="submit" class="submit" name="action" value="Speichern">
+
+<TMPL_IF orphaned>  
+      <input type="submit" class="submit" name="action"
+      value="Löschen">
+</TMPL_IF>      
+
+</form>
+</body>
+</html>
+
diff --git a/templates/webpages/am/edit_tax_master.html b/templates/webpages/am/edit_tax_master.html
new file mode 100644 (file)
index 0000000..1b5934c
--- /dev/null
@@ -0,0 +1,67 @@
+<body>
+<form method="post" action="<TMPL_VAR script>">
+  <input type="hidden" name="id" value="<TMPL_VAR id>">
+  <input type="hidden" name="type" value="tax">
+
+<table width="100%">
+  <tr>
+    <th class="listtop" colspan="2"><TMPL_VAR title> <translate>Tax-O-Matic</translate></th>
+  </tr>
+</table>
+<table width="100%">
+  <tr>
+    <td><translate>tax_taxkey</translate></td>
+    <td><input name="taxkey" size="2" value="<TMPL_VAR taxkey>"></td>
+  </tr>
+
+  <tr>
+    <td><translate>tax_taxdescription</translate></td>
+    <td><input name="taxdescription" size="60" value="<TMPL_VAR taxdescription>"></td>
+  </tr>
+
+  <tr>
+    <td><translate>tax_percent</translate></td>
+    <td><input name="rate" size="10" value="<TMPL_VAR rate>"> %</td>
+  </tr>
+
+  <tr>
+    <td><translate>tax_chartaccno</translate></td>
+    <td><select name="chart_id">
+    <TMPL_LOOP ACCOUNTS>
+      <TMPL_VAR select_taxaccount>
+    </TMPL_LOOP>
+    </select>
+    
+    </td>
+  </tr>
+
+
+</table>
+
+<TMPL_UNLESS orphaned>
+  <br />
+  <translate>Chartaccounts connected to this Tax:</translate>
+  <TMPL_LOOP TAXINUSE>
+    <a href="am.pl?action=edit_account&id=<TMPL_VAR id>&login=<TMPL_VAR 
+      login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>"><TMPL_VAR accno></a>&nbsp;
+  </TMPL_LOOP>
+  <br />
+</TMPL_UNLESS>
+
+<input name="callback" type="hidden" value="<TMPL_VAR callback ESCAPE=HTML>">
+<input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
+<input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
+
+<br />
+
+<input type="submit" class="submit" name="action" value="<translate>Save</translate>">
+
+<TMPL_IF orphaned>  
+      <input type="submit" class="submit" name="action"
+      value="<translate>Delete</translate>">
+</TMPL_IF>      
+
+</form>
+</body>
+</html>
+
diff --git a/templates/webpages/am/list_tax_de.html b/templates/webpages/am/list_tax_de.html
new file mode 100644 (file)
index 0000000..d6bba94
--- /dev/null
@@ -0,0 +1,54 @@
+<body>
+
+<table width="100%">
+  <tr>
+    <th class="listtop"><TMPL_VAR title ESCAPE=HTML></th>
+  </tr>
+</table>
+<table>
+   <tr>
+     <th class="listheading"><tanslate>tax_taxkey</translate></th>
+     <th class="listheading"><tanslate>tax_taxdescription</translate></th>
+     <th class="listheading"><tanslate>tax_rate</translate></th>
+     <th class="listheading"><tanslate>taxnumber</translate></th>
+     <th class="listheading"><tanslate>account_description</translate></th>
+   </tr>
+
+<TMPL_LOOP TAX>
+
+
+
+<TMPL_IF __odd__>
+   <tr class="listrow1" 
+<TMPL_ELSE> 
+   <tr class="listrow0" 
+</TMPL_IF>
+  onMouseOver="this.style.cursor='pointer';"
+     onclick="window.location.href='am.pl?action=edit_tax&id=<TMPL_VAR id
+       ESCAPE=URL>&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password
+       ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>';">
+
+     <td align="right"><TMPL_VAR taxkey ESCAPE=HTML></td>
+     <td><TMPL_VAR taxdescription ESCAPE=HTML></td>
+     <td align="right"><TMPL_VAR rate ESCAPE=HTML> %</td>
+     <td align="right"><TMPL_VAR taxnumber ESCAPE=HTML></td>
+     <td><TMPL_VAR account_description ESCAPE=HTML></td>
+   </tr>
+
+</TMPL_LOOP>
+</table>
+<br />
+<br />
+<form method="post" action="<TMPL_VAR script>">
+
+  <input name="callback" type="hidden" value="<TMPL_VAR callback>">
+  <input type="hidden" name="type" value="tax">
+  <input type="hidden" name="login" value="<TMPL_VAR login>">
+  <input type="hidden" name="password" value="<TMPL_VAR password>">
+  <input class="submit" type="submit" name="action"
+    value="Erfassen">
+</form>
+
+</body>
+</html>
+
diff --git a/templates/webpages/am/list_tax_master.html b/templates/webpages/am/list_tax_master.html
new file mode 100644 (file)
index 0000000..d35d6a2
--- /dev/null
@@ -0,0 +1,54 @@
+<body>
+
+<table width="100%">
+  <tr>
+    <th class="listtop"><TMPL_VAR title ESCAPE=HTML></th>
+  </tr>
+</table>
+<table>
+   <tr>
+     <th class="listheading"><tanslate>tax_taxkey</translate></th>
+     <th class="listheading"><tanslate>tax_taxdescription</translate></th>
+     <th class="listheading"><tanslate>tax_rate</translate></th>
+     <th class="listheading"><tanslate>taxnumber</translate></th>
+     <th class="listheading"><tanslate>account_description</translate></th>
+   </tr>
+
+<TMPL_LOOP TAX>
+
+
+
+<TMPL_IF __odd__>
+   <tr class="listrow1" 
+<TMPL_ELSE> 
+   <tr class="listrow0" 
+</TMPL_IF>
+  onMouseOver="this.style.cursor='pointer';"
+     onclick="window.location.href='am.pl?action=edit_tax&id=<TMPL_VAR id
+       ESCAPE=URL>&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password
+       ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>';">
+
+     <td align="right"><TMPL_VAR taxkey ESCAPE=HTML></td>
+     <td><TMPL_VAR taxdescription ESCAPE=HTML></td>
+     <td align="right"><TMPL_VAR rate ESCAPE=HTML> %</td>
+     <td align="right"><TMPL_VAR taxnumber ESCAPE=HTML></td>
+     <td><TMPL_VAR account_description ESCAPE=HTML></td>
+   </tr>
+
+</TMPL_LOOP>
+</table>
+<br />
+<br />
+<form method="post" action="<TMPL_VAR script>">
+
+  <input name="callback" type="hidden" value="<TMPL_VAR callback>">
+  <input type="hidden" name="type" value="tax">
+  <input type="hidden" name="login" value="<TMPL_VAR login>">
+  <input type="hidden" name="password" value="<TMPL_VAR password>">
+  <input class="submit" type="submit" name="action"
+    value="<translate>Add</translate>">
+</form>
+
+</body>
+</html>
+