From 69e4ce03a92228ef20d3f5c358da28e5c2aeecce Mon Sep 17 00:00:00 2001 From: Philip Reetz Date: Mon, 14 Apr 2008 16:21:23 +0000 Subject: [PATCH] Ausgabefunktionen fuer offene Forderungen und Verbindlichekeiten und SuSa ueberarbeitet --- SL/RP.pm | 13 +++++++------ bin/mozilla/rp.pl | 14 ++++++++++---- locale/de/all | 4 ++++ locale/de/ca | 19 ++++++++++++++++--- locale/de/rp | 4 ++++ 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/SL/RP.pm b/SL/RP.pm index 1355cc83e..816c1e119 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -809,7 +809,7 @@ sub trial_balance { FROM acc_trans ac JOIN chart c ON (ac.chart_id = c.id) $dpt_join - WHERE (ac.transdate < (select date_trunc('year', ?::date))) + WHERE ((select date_trunc('year', ac.transdate::date)) = (select date_trunc('year', ?::date))) AND ac.ob_transaction $dpt_where $project GROUP BY c.accno, c.category, c.description |; @@ -865,9 +865,9 @@ sub trial_balance { $tofrom .= " AND (ac.transdate >= $fromdate)"; $subwhere .= " AND (transdate >= $fromdate)"; $sumsubwhere .= " AND (transdate >= (select date_trunc('year', date $fromdate))) "; - $saldosubwhere .= " AND (((c.category='I' OR c.category='E') AND transdate>=(select date_trunc('year', date $fromdate))) OR (c.category NOT IN ('I', 'E'))) "; + $saldosubwhere .= " AND transdate>=(select date_trunc('year', date $fromdate)) "; $invwhere .= " AND (a.transdate >= $fromdate)"; - $glsaldowhere .= " AND (((c.category='I' OR c.category='E') AND ac.transdate>=(select date_trunc('year', date $fromdate))) OR (c.category NOT IN ('I', 'E'))) "; + $glsaldowhere .= " AND ac.transdate>=(select date_trunc('year', date $fromdate)) "; $glwhere = " AND (ac.transdate >= $fromdate)"; $glsumwhere = " AND (ac.transdate >= (select date_trunc('year', date $fromdate))) "; } @@ -965,9 +965,9 @@ qq| AND ((ac.trans_id IN (SELECT id from ar) AND )|; } else { - $where .= $tofrom; - $saldowhere .= $glsaldowhere; - $sumwhere .= $glsumwhere; + $where .= $tofrom . " AND (NOT ac.ob_transaction OR ac.ob_transaction IS NULL) AND (NOT ac.cb_transaction OR ac.cb_transaction IS NULL)"; + $saldowhere .= $glsaldowhere . " AND (NOT ac.cb_transaction OR ac.cb_transaction IS NULL)"; + $sumwhere .= $glsumwhere . " AND (NOT ac.ob_transaction OR ac.ob_transaction IS NULL) AND (NOT ac.cb_transaction OR ac.cb_transaction IS NULL)"; } $query = qq| @@ -1159,6 +1159,7 @@ qq| AND ((ac.trans_id IN (SELECT id from ar) AND $project_drcr = prepare_query($form, $dbh, $q_project_drcr); } + my ($debit, $credit, $saldo, $soll_saldo, $haben_saldo,$soll_kummuliert, $haben_kummuliert, $last_transaction); foreach my $accno (sort keys %trb) { diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 731a060fd..f77aaaa79 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -1447,6 +1447,7 @@ sub generate_trial_balance { $form->{rowcount} = scalar @{ $form->{TB} }; + $form->{title} = sprintf($locale->text('Trial balance between %s and %s'), $form->{fromdate}, $form->{todate}); my @columns = ( "accno", "description", @@ -1459,13 +1460,13 @@ sub generate_trial_balance { my $attachment_basename; - + $attachment_basename = $locale->text('trial_balance'); my $report = SL::ReportGenerator->new(\%myconfig, $form); my @hidden_variables = (); push @hidden_variables, qw(fromdate todate year cash ); - my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); + my $href = build_std_url('action=generate_trial_balance', grep { $form->{$_} } @hidden_variables); my %column_defs = ( 'accno' => { 'text' => $locale->text('Account Number'), }, @@ -1490,7 +1491,7 @@ sub generate_trial_balance { $report->set_columns(%column_defs); $report->set_column_order(@columns); - $report->set_export_options('trial_balance', @hidden_variables); + $report->set_export_options('generate_trial_balance', @hidden_variables); $report->set_sort_indicator($form->{sort}, 1); @@ -1771,7 +1772,7 @@ sub create_aging_subtotal_row { sub aging { $lxdebug->enter_sub(); - + print(STDERR "Bin in Aging\n"); $auth->assert('general_ledger'); my $report = SL::ReportGenerator->new(\%myconfig, $form); @@ -1799,6 +1800,7 @@ sub aging { $report->set_export_options('generate_' . ($form->{arap} eq 'ar' ? 'ar' : 'ap') . '_aging', @hidden_variables); my @options; + my $attachment_basename; if ($form->{department}) { my ($department) = split /--/, $form->{department}; @@ -1808,10 +1810,14 @@ sub aging { if (($form->{arap} eq 'ar') && $form->{customer}) { push @options, $form->{customer}; + $attachment_basename = $locale->text('ar_aging_list'); + $form->{title} = sprintf($locale->text('Ar aging on %s'), $form->{todate}); } if (($form->{arap} eq 'ap') && $form->{vendor}) { push @options, $form->{vendor}; + $attachment_basename = $locale->text('ap_aging_list'); + $form->{title} = sprintf($locale->text('Ap aging on %s'), $form->{todate}); } push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1); diff --git a/locale/de/all b/locale/de/all index 69f6b5b81..0162bce33 100644 --- a/locale/de/all +++ b/locale/de/all @@ -163,11 +163,13 @@ $self->{texts} = { 'Amount Due' => 'Betrag fällig', 'Annotations' => 'Anmerkungen', 'Ansprechpartner' => 'Ansprechpartner', + 'Ap aging on %s' => 'Offene Verbindlichkeiten zum %s', 'Application Error. No Format given' => 'Fehler in der Anwendung. Das Ausgabeformat fehlt.', 'Application Error. Wrong Format' => 'Fehler in der Anwendung. Falsches Format: ', 'Applying [% HTML.escape(file) %]:' => 'Führe [% HTML.escape(file) %] aus:', 'Apr' => 'Apr', 'April' => 'April', + 'Ar aging on %s' => 'Offene Forderungen zum %s', 'Are you sure you want to delete Delivery Order Number #1?' => 'Sind Sie sicher, dass Sie Lieferschein #1 löschen wollen?', 'Are you sure you want to delete Invoice Number' => 'Soll die Rechnung mit folgender Nummer wirklich gelöscht werden:', 'Are you sure you want to delete Order Number' => 'Soll der Auftrag mit folgender Nummer wirklich gelöscht werden:', @@ -1494,6 +1496,7 @@ aktualisieren wollen?', 'Transfer qty' => 'Umlagermenge', 'Translation (%s)' => 'Übersetzung (%s)', 'Trial Balance' => 'Summen- u. Saldenliste', + 'Trial balance between %s and %s' => 'Summen- und Saldenlisten vom %s bis zum %s', 'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', 'Type' => 'Typ', 'Type of Business' => 'Kunden-/Lieferantentyp', @@ -1736,6 +1739,7 @@ aktualisieren wollen?', 'to (date)' => 'bis', 'to (time)' => 'bis', 'transfer' => 'Umlagerung', + 'trial_balance' => 'susa', 'up' => 'hoch', 'use program settings' => 'benutze Programmeinstellungen', 'used' => 'Verbraucht', diff --git a/locale/de/ca b/locale/de/ca index 135b3eec8..a8c0493fc 100644 --- a/locale/de/ca +++ b/locale/de/ca @@ -5,6 +5,7 @@ $self->{texts} = { 'AP' => 'Einkauf', 'AR' => 'Verkauf', 'Account' => 'Konto', + 'Accrual' => 'Bilanzierung', 'Advance turnover tax return' => 'Umsatzsteuervoranmeldung', 'All reports' => 'Alle Berichte (Kontenübersicht, Summen- u. Saldenliste, GuV, BWA, Bilanz, Projektbuchungen)', 'Apr' => 'Apr', @@ -15,6 +16,7 @@ $self->{texts} = { 'Bcc' => 'Bcc', 'Bin List' => 'Lagerliste', 'Binding to the LDAP server as "#1" failed. Please check config/authentication.pl.' => 'Die Anmeldung am LDAP-Server als "#1" schlug fehl. Bitte überprüfen Sie die Angaben in config/authentication.pl.', + 'Bis' => 'bis', 'CANCELED' => 'Storniert', 'CSV export -- options' => 'CSV-Export -- Optionen', 'Cc' => 'Cc', @@ -39,6 +41,7 @@ $self->{texts} = { 'Create and edit vendor invoices' => 'Eingangsrechnungen erfassen und bearbeiten', 'Credit' => 'Haben', 'Credit Note' => 'Gutschrift', + 'Customized Report' => 'Vorgewählte Zeiträume', 'DATEV Export' => 'DATEV-Export', 'DELETED' => 'Gelöscht', 'DUNNING STARTED' => 'Mahnprozess gestartet', @@ -47,19 +50,22 @@ $self->{texts} = { 'Debit' => 'Soll', 'Dec' => 'Dez', 'December' => 'Dezember', + 'Decimalplaces' => 'Dezimalstellen', 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Description' => 'Beschreibung', 'Directory' => 'Verzeichnis', 'ELSE' => 'Zusatz', + 'EUR' => 'E/Ü-Rechnung', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Falsches Datumsformat!' => 'Falsches Datumsformat!', 'Feb' => 'Feb', 'February' => 'Februar', 'File' => 'Datei', + 'Free report period' => 'Freier Zeitraum', 'From' => 'Von', 'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr', - 'Include in Report' => 'In Bericht aufnehmen', 'Invoice' => 'Rechnung', 'Jan' => 'Jan', 'January' => 'Januar', @@ -77,9 +83,11 @@ $self->{texts} = { 'May ' => 'Mai', 'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen', 'Message' => 'Nachricht', + 'Method' => 'Verfahren', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', 'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.', + 'Monthly' => 'monatlich', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', 'No or an unknown authenticantion module specified in "config/authentication.pl".' => 'Es wurde kein oder ein unbekanntes Authentifizierungsmodul in "config/authentication.pl" angegeben.', 'Nov' => 'Nov', @@ -98,6 +106,8 @@ $self->{texts} = { 'Proforma Invoice' => 'Proformarechnung', 'Project Number' => 'Projektnummer', 'Purchase Order' => 'Lieferantenauftrag', + 'Quarter' => 'Quartal', + 'Quarterly' => 'quartalsweise', 'Quotation' => 'Angebot', 'RFQ' => 'Anfrage', 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', @@ -111,7 +121,6 @@ $self->{texts} = { 'Storno Invoice' => 'Stornorechnung', 'Storno Packing List' => 'Stornolieferschein', 'Subject' => 'Betreff', - 'Subtotal' => 'Zwischensumme', 'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.', 'The LDAP server "#1:#2" is unreachable. Please check config/authentication.pl.' => 'Der LDAP-Server "#1:#2" ist nicht erreichbar. Bitte überprüfen Sie die Angaben in config/authentication.pl.', 'The config file "config/authentication.pl" contained invalid Perl code:' => 'Die Konfigurationsdatei "config/authentication.pl" enthielt ungütigen Perl-Code:', @@ -121,15 +130,18 @@ $self->{texts} = { 'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:', 'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:', 'The list has been printed.' => 'Die Liste wurde ausgedruckt.', - 'To' => 'An', 'To (email)' => 'An', 'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen', 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', 'View warehouse content' => 'Lagerbestand ansehen', 'Warehouse management' => 'Lagerverwaltung/Bestandsveränderung', + 'YYYY' => 'JJJJ', + 'Year' => 'Jahr', + 'Yearly' => 'jährlich', 'You do not have the permissions to access this function.' => 'Sie verfügen nicht über die notwendigen Rechte, um auf diese Funktion zuzugreifen.', '[email]' => '[email]', 'bin_list' => 'Lagerliste', + 'button' => '?', 'chart_of_accounts' => 'kontenuebersicht', 'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schlüsselwort "DB_config" fehlt.', 'config/authentication.pl: Key "LDAP_config" is missing.' => 'config/authentication.pl: Der Schlüssel "LDAP_config" fehlt.', @@ -146,6 +158,7 @@ $self->{texts} = { 'request_quotation' => 'Angebotsanforderung', 'sales_order' => 'Kundenauftrag', 'sales_quotation' => 'Verkaufsangebot', + 'wrongformat' => 'Falsches Format', }; $self->{subs} = { diff --git a/locale/de/rp b/locale/de/rp index 1fc8bd1f9..e4a32be39 100644 --- a/locale/de/rp +++ b/locale/de/rp @@ -14,8 +14,10 @@ $self->{texts} = { 'All Accounts' => 'Alle Konten', 'All reports' => 'Alle Berichte (Kontenübersicht, Summen- u. Saldenliste, GuV, BWA, Bilanz, Projektbuchungen)', 'Amount' => 'Betrag', + 'Ap aging on %s' => 'Offene Verbindlichkeiten zum %s', 'Apr' => 'Apr', 'April' => 'April', + 'Ar aging on %s' => 'Offene Forderungen zum %s', 'Attachment' => 'als Anhang', 'Attempt to call an undefined sub named \'%s\'' => 'Es wurde versucht, eine nicht definierte Unterfunktion namens \'%s\' aufzurufen.', 'Aug' => 'Aug', @@ -213,6 +215,7 @@ $self->{texts} = { 'Total' => 'Summe', 'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen', 'Trial Balance' => 'Summen- u. Saldenliste', + 'Trial balance between %s and %s' => 'Summen- und Saldenlisten vom %s bis zum %s', 'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', 'Unit' => 'Einheit', 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', @@ -255,6 +258,7 @@ $self->{texts} = { 'request_quotation' => 'Angebotsanforderung', 'sales_order' => 'Kundenauftrag', 'sales_quotation' => 'Verkaufsangebot', + 'trial_balance' => 'susa', 'vendor' => 'Lieferant', 'wrongformat' => 'Falsches Format', 'yes' => 'ja', -- 2.20.1