From 56041df395cc2d8971f822c54f4e48743cc4f22b Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Fri, 2 Feb 2007 14:35:01 +0000 Subject: [PATCH] Neue Version System-> Kontenuebersicht-> Konten anzeigen. Bitte testen, steuerliche Zuordnungen noch nicht ganz in Ordnung... --- SL/CA.pm | 60 +++++++- bin/mozilla/am.pl | 130 ++++++++---------- locale/de/all | 39 +++++- locale/de/am | 29 +++- templates/webpages/am/list_accounts_de.html | 110 +++++++++++++++ .../webpages/am/list_accounts_master.html | 110 +++++++++++++++ 6 files changed, 400 insertions(+), 78 deletions(-) create mode 100644 templates/webpages/am/list_accounts_de.html create mode 100644 templates/webpages/am/list_accounts_master.html diff --git a/SL/CA.pm b/SL/CA.pm index 8122b9d4e..162a320f6 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -71,10 +71,62 @@ sub all_accounts { } $sth->finish; - $query = qq|SELECT c.id, c.accno, c.description, c.charttype, c.gifi_accno, - c.category, c.link - FROM chart c - ORDER BY accno|; + $query = qq| + + SELECT c.id, + c.accno, + c.description, + c.charttype, + c.gifi_accno, + c.category, + c.link, + c.pos_ustva, + c.pos_bwa, + c.pos_bilanz, + c.pos_eur, + c.valid_from, + c.datevautomatik, + ( SELECT comma(taxkey_id) + FROM taxkeys tk + WHERE tk.chart_id = c.id + AND c.taxkey_id = tk.taxkey_id + ORDER BY c.id + ) AS taxkey_id, + + ( SELECT comma(taxdescription) + FROM tax tx + WHERE tx.id in ( + SELECT tk.tax_id from taxkeys tk + WHERE tk.chart_id = ( + SELECT id from chart + WHERE chart.accno='0027' -- Beispielkonto aus dem SKR03 + ) + ) + ORDER BY c.accno + ) AS taxdescription, + + ( SELECT comma(tk.pos_ustva) + FROM taxkeys tk + WHERE tk.chart_id = c.id + AND c.taxkey_id = tk.taxkey_id + ORDER BY c.id + ) AS tk_ustva, + + ( SELECT comma(startdate) + FROM taxkeys tk + WHERE tk.chart_id = c.id + AND c.taxkey_id = tk.taxkey_id + ORDER BY c.id + ) AS startdate, + + ( SELECT accno + FROM chart c2 + WHERE c2.id = c.id + ) AS new_account + FROM chart c + ORDER BY accno + |; + $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 1571e24c0..c9b5f549f 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -40,6 +40,8 @@ use Data::Dumper; 1; + + require "$form->{path}/common.pl"; # end of main @@ -528,36 +530,7 @@ sub list_account { $callback = "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}"; - @column_index = qw(accno gifi_accno description debit credit link); - - $column_header{accno} = qq|| . $locale->text('Account') . qq||; - $column_header{gifi_accno} = - qq|| . $locale->text('GIFI') . qq||; - $column_header{description} = - qq|| . $locale->text('Description') . qq||; - $column_header{debit} = qq|| . $locale->text('Debit') . qq||; - $column_header{credit} = qq|| . $locale->text('Credit') . qq||; - $column_header{link} = qq|| . $locale->text('Link') . qq||; - $form->header; - $colspan = $#column_index + 1; - - print qq| - - - - - - - - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; # escape callback $callback = $form->escape($callback); @@ -576,50 +549,67 @@ sub list_account { $form->format_amount(\%myconfig, -$ca->{amount}, 2, " "); } - $ca->{link} =~ s/:/
/og; - - if ($ca->{charttype} eq "H") { - print qq||; - - $column_data{accno} = - qq||; - $column_data{gifi_accno} = - qq||; - $column_data{description} = qq||; - $column_data{debit} = qq||; - $column_data{credit} = qq| |; - $column_data{link} = qq||; - - } else { - $i++; - $i %= 2; - print qq| -|; - $column_data{accno} = - qq||; - $column_data{gifi_accno} = - qq||; - $column_data{description} = qq||; - $column_data{debit} = qq||; - $column_data{credit} = qq||; - $column_data{link} = qq||; - + my @links = split( q{:}, $ca->{link}); + + $ca->{link} = q{}; + + foreach my $link (@links){ + $link = ( $link eq 'AR') ? $locale->text('Account Link AR') + : ( $link eq 'AP') ? $locale->text('Account Link AP') + : ( $link eq 'IC') ? $locale->text('Account Link IC') + : ( $link eq 'AR_amount' ) ? $locale->text('Account Link AR_amount') + : ( $link eq 'AR_paid' ) ? $locale->text('Account Link AR_paid') + : ( $link eq 'AR_tax' ) ? $locale->text('Account Link AR_tax') + : ( $link eq 'AP_amount' ) ? $locale->text('Account Link AP_amount') + : ( $link eq 'AP_paid' ) ? $locale->text('Account Link AP_paid') + : ( $link eq 'AP_tax' ) ? $locale->text('Account Link AP_tax') + : ( $link eq 'IC_sale' ) ? $locale->text('Account Link IC_sale') + : ( $link eq 'IC_cogs' ) ? $locale->text('Account Link IC_cogs') + : ( $link eq 'IC_taxpart' ) ? $locale->text('Account Link IC_taxpart') + : ( $link eq 'IC_income' ) ? $locale->text('Account Link IC_income') + : ( $link eq 'IC_expense' ) ? $locale->text('Account Link IC_expense') + : ( $link eq 'IC_taxservice' ) ? $locale->text('Account Link IC_taxservice') + : ( $link eq 'CT_tax' ) ? $locale->text('Account Link CT_tax') + : $locale->text('Unknown Link') . ': ' . $link; + + $ca->{link} .= qq|[| . $link . qq|] |; } - - map { print "$column_data{$_}\n" } @column_index; - - print "\n"; + + $ca->{startdate} =~ s/,/
/og; + $ca->{tk_ustva} =~ s/,/
/og; + + $ca->{taxkey_id} =~ s/,/
/og; + $ca->{taxdescription} =~ s/,/
/og; + + $ca->{datevautomatik} = ($ca->{datevautomatik}) ? $locale->text('On'):q{}; + + $ca->{category} = ($ca->{category} eq 'A') ? $locale->text('Account Category A') + : ($ca->{category} eq 'E') ? $locale->text('Account Category E') + : ($ca->{category} eq 'L') ? $locale->text('Account Category L') + : ($ca->{category} eq 'I') ? $locale->text('Account Category I') + : ($ca->{category} eq 'Q') ? $locale->text('Account Category Q') + : ($ca->{category} eq 'C') ? $locale->text('Account Category C') + : ($ca->{category} eq 'G') ? $locale->text('Account Category G') + : $locale->text('Unknown Category') . ': ' . $ca->{category}; + + $ca->{link_edit_account} = + qq|$form->{script}?action=edit_account&id=$ca->{id}| + .qq|&path=$form->{path}&login=$form->{login}| + .qq|&password=$form->{password}&callback=$callback>$ca->{accno}|; } + + my $parameters_ref = { + + + # hidden_variables => $_hidden_variables_ref, + }; + + # Ausgabe des Templates + print($form->parse_html_template('am/list_accounts', $parameters_ref)); + + $lxdebug->leave_sub(); + - print qq| - -
$form->{title}
{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno} $ca->{description}    
{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno} $ca->{description} $ca->{debit}$ca->{credit}$ca->{link} 

- - - -|; - - $lxdebug->leave_sub(); } sub delete_account { diff --git a/locale/de/all b/locale/de/all index a368ce845..14a203859 100644 --- a/locale/de/all +++ b/locale/de/all @@ -31,6 +31,29 @@ $self->{texts} = { 'Abteilung' => 'Abteilung', 'Access Control' => 'Zugriffkontrolle', 'Account' => 'Konto', + 'Account Category A' => 'Aktiva/Mittelverwendung', + 'Account Category C' => 'Kosten', + 'Account Category E' => 'Aufwandskonto', + 'Account Category G' => '?Gegenkonto?', + 'Account Category I' => 'Erlöskonto', + 'Account Category L' => 'Passiva/Mittelherkunft', + 'Account Category Q' => 'Passiva', + 'Account Link AP' => 'Einkauf', + 'Account Link AP_amount' => 'Verbindlichkeiten Aufwand/Anlagen', + 'Account Link AP_paid' => 'Verbindlichkeiten Zahlungsausgang', + 'Account Link AP_tax' => 'Verbindlichkeiten Steuer', + 'Account Link AR' => 'Verkauf', + 'Account Link AR_amount' => 'Forderungen Erlöskonto', + 'Account Link AR_paid' => 'Forderungen Zahlungseingang', + 'Account Link AR_tax' => 'Forderungen Steuer', + 'Account Link CT_tax' => 'Kunde/Lieferant Steuer', + 'Account Link IC' => 'Inventar', + 'Account Link IC_cogs' => 'Warenliste Aufwandskonto', + 'Account Link IC_expense' => 'Dienstleistungen Aufwandskonto', + 'Account Link IC_income' => 'Dienstleistungen Erlöskonto', + 'Account Link IC_sale' => 'Warenliste Erlöskonto', + 'Account Link IC_taxpart' => 'Warenliste Steuer', + 'Account Link IC_taxservice' => 'Dienstleistungen Steuer', 'Account Number' => 'Kontonummer', 'Account Number missing!' => 'Kontonummer fehlt!', 'Account Nummer' => 'Kontonummer', @@ -303,6 +326,7 @@ aktualisieren wollen?', 'Date missing!' => 'Datum fehlt!', 'Date received missing!' => 'Empfangsdatum fehlt!', 'Datenträgernummer' => 'Datenträgernummer', + 'Datev' => '', 'Datum von' => 'Datum von', 'Debit' => 'Soll', 'Debit Account' => 'Sollkonto', @@ -450,6 +474,7 @@ gestartet', 'Fee' => 'Gebühr', 'File locked!' => 'Datei gesperrt!', 'Folgekonto' => 'Folgekonto', + 'Following Account' => 'Folgekonto', 'For each unit there\'s either no or exactly one base unit. If you chose a base unit then you also have to chose a factor. That way the new unit will be defined as a multiple of the base unit. The base unit must be the "smaller" one. A factor may not be less than 1. Therefore you may define "kg" with the base unit "g" and a factor of "1", but not the other way round.' => 'Einheiten haben entweder keine oder genau eine Basiseinheit, von der sie ein Vielfaches sind. Wenn Sie eine Basiseinheit auswählen, dann müssen Sie auch einen Faktor eingeben. Sie müssen Einheiten als ein Vielfaches einer kleineren Einheit eingeben. So ist die Definition von "kg" mit der Basiseinheit "g" und dem Faktor 1000 zulässig, die Definition von "g" mit der Basiseinheit "kg" und dem Faktor "0,001" hingegen nicht.', 'Foreign Exchange Gain' => 'Wechselkurserträge', 'Foreign Exchange Loss' => 'Wechselkursaufwendungen', @@ -681,6 +706,7 @@ gestartet', 'Oct' => 'Okt', 'October' => 'Oktober', 'Old (on the side)' => 'Alt (seitlich)', + 'On' => '', 'On Hand' => 'Auf Lager', 'On Order' => 'Ist bestellt', 'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen', @@ -915,6 +941,7 @@ gestartet', 'Spoolfile' => 'Druckdatei', 'Standard Industrial Codes' => 'SIC', 'Start Dunning Process' => 'Mahnprozess starten', + 'Startdate' => 'Gültig ab', 'Statement' => 'Sammelrechnung', 'Statement Balance' => 'Sammelrechnungsbilanz', 'Statement sent to' => 'Sammelrechnung verschickt an', @@ -952,7 +979,8 @@ gestartet', 'Tax paid' => 'Vorsteuer', 'Taxable' => 'Steuerpflichtig', 'Taxation' => 'Versteuerungs Verfahren', - 'Taxkey' => 'Steuerschlüssel', + 'Taxdescription' => 'Beschreibung', + 'Taxkey' => 'Tax Key', 'Tel' => 'Tel', 'Tel.' => 'Telefon', 'Telephone' => 'Telefon', @@ -1077,6 +1105,8 @@ gestartet', 'Unit' => 'Einheit', 'Unit of measure' => 'Maßeinheit', 'Units' => 'Einheiten', + 'Unknown Category' => '', + 'Unknown Link' => '', 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', 'Unlock System' => 'System entsperren', 'Until' => 'Bis', @@ -1148,6 +1178,7 @@ gestartet', 'bis' => 'bis', 'button' => '?', 'cash' => 'E/Ü-Rechnung (Ist-Versteuerung)', + 'category' => 'Kontenart', 'choice' => 'auswählen', 'choice part' => 'Artikel auswählen', 'config' => 'Konfiguration', @@ -1174,6 +1205,10 @@ gestartet', 'none (pricegroup)' => 'keine', 'number' => 'Nummer', 'plural first char' => 'P', + 'pos_bilanz' => 'Bilanz', + 'pos_bwa' => 'BWA', + 'pos_eur' => 'E/ÜR', + 'pos_ustva' => 'UStVA', 'posted!' => 'gebucht', 'prices updated!' => ' Preise aktualisiert!', 'quarter' => 'Vierteljährliche (quartalsweise) Abgabe', @@ -1187,10 +1222,12 @@ gestartet', 'soldtotal' => 'Verkaufte Anzahl', 'successfully created!' => 'wurde erfolgreich erstellt', 'successfully deleted!' => 'wurde erfolgreich gelöscht', + 'tk_ustva' => '', 'to (date)' => 'bis', 'up' => 'runter', 'use program settings' => 'benutze Programmeinstellungen', 'ustva' => 'UStVA', + 'valid_from' => 'Gültig ab', 'website' => 'Webseite', 'winston_export' => 'Winston-Export', }; diff --git a/locale/de/am b/locale/de/am index e39eb6fd5..63cdef2f8 100644 --- a/locale/de/am +++ b/locale/de/am @@ -4,6 +4,29 @@ $self->{texts} = { 'AP' => 'Einkauf', 'AR' => 'Verkauf', 'Account' => 'Konto', + 'Account Category A' => 'Aktiva/Mittelverwendung', + 'Account Category C' => 'Kosten', + 'Account Category E' => 'Aufwandskonto', + 'Account Category G' => '?Gegenkonto?', + 'Account Category I' => 'Erlöskonto', + 'Account Category L' => 'Passiva/Mittelherkunft', + 'Account Category Q' => 'Passiva', + 'Account Link AP' => 'Einkauf', + 'Account Link AP_amount' => 'Verbindlichkeiten Aufwand/Anlagen', + 'Account Link AP_paid' => 'Verbindlichkeiten Zahlungsausgang', + 'Account Link AP_tax' => 'Verbindlichkeiten Steuer', + 'Account Link AR' => 'Verkauf', + 'Account Link AR_amount' => 'Forderungen Erlöskonto', + 'Account Link AR_paid' => 'Forderungen Zahlungseingang', + 'Account Link AR_tax' => 'Forderungen Steuer', + 'Account Link CT_tax' => 'Kunde/Lieferant Steuer', + 'Account Link IC' => 'Inventar', + 'Account Link IC_cogs' => 'Warenliste Aufwandskonto', + 'Account Link IC_expense' => 'Dienstleistungen Aufwandskonto', + 'Account Link IC_income' => 'Dienstleistungen Erlöskonto', + 'Account Link IC_sale' => 'Warenliste Erlöskonto', + 'Account Link IC_taxpart' => 'Warenliste Steuer', + 'Account Link IC_taxservice' => 'Dienstleistungen Steuer', 'Account Number' => 'Kontonummer', 'Account Number missing!' => 'Kontonummer fehlt!', 'Account Type' => 'Kontoart', @@ -60,12 +83,10 @@ $self->{texts} = { 'Copy to COA' => 'In Kontenplan kopieren', 'Cost Center' => 'Kostenstelle', 'Costs' => 'Kosten', - 'Credit' => 'Haben', 'Customer Number' => 'Kundennummer', 'Customernumberinit' => 'Kundennummernkreis', 'Dataset upgrade' => 'Datenbankaktualisierung', 'Date Format' => 'Datumsformat', - 'Debit' => 'Soll', 'Default output medium' => 'Standardausgabekanal', 'Default printer' => 'Standarddrucker', 'Default template format' => 'Standardvorlagenformat', @@ -142,7 +163,6 @@ $self->{texts} = { 'Last Vendor Number' => 'Letzte Lieferantennummer', 'Lead' => 'Kundenquelle', 'Liability' => 'Passiva/Mittelherkunft', - 'Link' => 'Verknüpfungen', 'Long Dates' => 'Lange Monatsnamen', 'Long Description' => 'Langtext', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', @@ -161,6 +181,7 @@ $self->{texts} = { 'Number Format' => 'Zahlenformat', 'Number of copies' => 'Anzahl Kopien', 'Old (on the side)' => 'Alt (seitlich)', + 'On' => 'On', 'OpenDocument/OASIS' => 'OpenDocument/OASIS', 'Output Number Format' => 'Zahlenformat (Ausgabe)', 'PDF' => 'PDF', @@ -279,6 +300,8 @@ $self->{texts} = { 'UStVA-Nr. 98' => 'Kz. 98', 'Umsatzsteuervoranmeldung' => 'Umsatzsteuervoranmeldung', 'Unit' => 'Einheit', + 'Unknown Category' => 'Unknown Category', + 'Unknown Link' => 'Unknown Link', 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', 'Value' => 'Wert', 'Variable' => 'Variable', diff --git a/templates/webpages/am/list_accounts_de.html b/templates/webpages/am/list_accounts_de.html new file mode 100644 index 000000000..7241a8184 --- /dev/null +++ b/templates/webpages/am/list_accounts_de.html @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KontonummerBeschreibungHabenSoll
KontenartVerknüpfungen
Tax KeyBeschreibungGültig abtk_ustvaUStVABWABilanzE/ÜRDatevGültig abFolgekonto
+ > + + + + > + + +
+ +    
  
           

+ + + diff --git a/templates/webpages/am/list_accounts_master.html b/templates/webpages/am/list_accounts_master.html new file mode 100644 index 000000000..ec7a19ba5 --- /dev/null +++ b/templates/webpages/am/list_accounts_master.html @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account NumberDescriptionCreditDebit
categoryLink
TaxkeyTaxdescriptionStartdatetk_ustvapos_ustvapos_bwapos_bilanzpos_eurDatevvalid_fromFollowing Account
+ > + + + + > + + +
+ +    
  
           

+ + + \ No newline at end of file -- 2.20.1