From 618f7061cc6a057ec172ae3f2a8e2006742238e0 Mon Sep 17 00:00:00 2001 From: Werner Hahn Date: Tue, 11 Sep 2018 13:57:37 +0200 Subject: [PATCH] Kundenstatistik: Fehler beim Link zu Rechnungen behoben --- locale/de/all | 2 +- .../_list_open_items.html | 54 ++++++++++++++----- .../invoices_statistic.html | 38 ++++++++++--- 3 files changed, 71 insertions(+), 23 deletions(-) diff --git a/locale/de/all b/locale/de/all index 794c82a98..4ea1a6a06 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1094,7 +1094,7 @@ $self->{texts} = { 'Dunning overview' => 'Mahnungsübersicht', 'Dunning status' => 'Mahnstatus', 'Dunnings' => 'Mahnungen', - 'Dunnings (Id -- Dunning Date --Dunning Level -- Dunning Fee)' => 'Mahnungen -- Mahndatum -- Mahnstufe -- Mahngebühr/Zinsen', + 'Dunnings (Id -- Dunning Date --Dunning Level -- Dunning Fee)' => 'Mahnungen (Nummer -- Mahndatum -- Mahnstufe -- Mahngebühr/Zinsen)', 'Dunningstatistic' => 'Mahnstatistik', 'Duplicate in CSV file' => 'Duplikat in CSV-Datei', 'Duplicate in database' => 'Duplikat in Datenbank', diff --git a/templates/webpages/customer_vendor_turnover/_list_open_items.html b/templates/webpages/customer_vendor_turnover/_list_open_items.html index 4ea914803..55dc7dfd4 100644 --- a/templates/webpages/customer_vendor_turnover/_list_open_items.html +++ b/templates/webpages/customer_vendor_turnover/_list_open_items.html @@ -8,31 +8,57 @@ [%- HTML.escape(title) %] + [% 'Type' | $T8 %] [% 'Invoice Number' | $T8 %] [% 'Invoice Date' | $T8 %] [% 'Amount' | $T8 %] [% 'Inv. Duedate' | $T8 %] [% 'Paid' | $T8 %] [% 'Open Amount' | $T8 %] - [% 'Dunnings (Id -- Dunning Date --Dunning Level -- Dunning Fee)' | $T8 %] + [% IF FORM.db == 'customer' %] + [% 'Dunnings (Id -- Dunning Date --Dunning Level -- Dunning Fee)' | $T8 %] + [% END %] [%- FOREACH row = OPEN_ITEMS %] - - [% row.invnumber | html %] - [% row.transdate.to_kivitendo | html %] - [%- LxERP.format_amount(row.amount, 2) %] - [% row.duedate.to_kivitendo | html %] - [%- LxERP.format_amount(row.paid, 2) %] - [%- LxERP.format_amount(row.amount - row.paid,2) %] - - [%- IF row.dunning_config_id != '' %] - [%- FOREACH dun = row.dunnings %] - [% dun.dunning_id | html %] -- [% dun.transdate.to_kivitendo | html %] -- [% dun.dunning_level | html %] -- [%- LxERP.format_amount(dun.fee, 2) %]
+ [% IF FORM.db == 'customer' %] + [% IF row.type == 'invoice' %] + [% SET type = 'Invoice (one letter abbreviation)' %] + [% SET link = 'is.pl' %] + [% ELSIF row.type == 'credit_note' %] + [% SET type = 'Credit note (one letter abbreviation)' %] + [% SET link = 'is.pl' %] + [% ELSE %] + [% SET type = 'AR Transaction (abbreviation)' %] + [% SET link = 'ar.pl' %] + [% END %] + [% ELSE %] + [% IF row.invoice %] + [% SET type = 'Invoice (one letter abbreviation)' %] + [% SET link = 'ir.pl' %] + [% ELSE %] + [% SET type = 'AP Transaction (abbreviation)' %] + [% SET link = 'ap.pl' %] [% END %] [% END %] - - + + [% type | $T8 %] + [% row.invnumber | html %] + [% row.transdate.to_kivitendo | html %] + [%- LxERP.format_amount(row.amount, 2) %] + [% row.duedate.to_kivitendo | html %] + [%- LxERP.format_amount(row.paid, 2) %] + [%- LxERP.format_amount(row.amount - row.paid,2) %] + [% IF FORM.db == 'customer' %] + + [%- IF row.dunning_config_id != '' %] + [%- FOREACH dun = row.dunnings %] + [% dun.dunning_id | html %] -- [% dun.transdate.to_kivitendo | html %] -- [% dun.dunning_level | html %] -- [%- LxERP.format_amount(dun.fee, 2) %]
+ [% END %] + [% END %] + + [% END %] + [% END %] diff --git a/templates/webpages/customer_vendor_turnover/invoices_statistic.html b/templates/webpages/customer_vendor_turnover/invoices_statistic.html index 16a157461..c6dc91a97 100644 --- a/templates/webpages/customer_vendor_turnover/invoices_statistic.html +++ b/templates/webpages/customer_vendor_turnover/invoices_statistic.html @@ -6,6 +6,7 @@ + @@ -15,14 +16,35 @@ [%- FOREACH row = invoices %] - - - - - - - + [% IF FORM.db == 'customer' %] + [% IF row.type == 'invoice' %] + [% SET type = 'Invoice (one letter abbreviation)' %] + [% SET link = 'is.pl' %] + [% ELSIF row.type == 'credit_note' %] + [% SET type = 'Credit note (one letter abbreviation)' %] + [% SET link = 'is.pl' %] + [% ELSE %] + [% SET type = 'AR Transaction (abbreviation)' %] + [% SET link = 'ar.pl' %] + [% END %] + [% ELSE %] + [% IF row.invoice %] + [% SET type = 'Invoice (one letter abbreviation)' %] + [% SET link = 'ir.pl' %] + [% ELSE %] + [% SET type = 'AP Transaction (abbreviation)' %] + [% SET link = 'ap.pl' %] + [% END %] + [% END %] + + + + + + + + [% END %]
[% 'Type' | $T8 %] [% 'Invoice Number' | $T8 %] [% 'Invoice Date' | $T8 %] [% 'Amount' | $T8 %]
[% row.invnumber | html %][% row.transdate.to_kivitendo | html %][%- LxERP.format_amount(row.amount, 2) %][% row.duedate.to_kivitendo | html %][%- LxERP.format_amount(row.paid, 2) %][%- LxERP.format_amount(row.amount - row.paid, 2) %] -
[% type | $T8 %][% row.invnumber | html %][% row.transdate.to_kivitendo | html %][%- LxERP.format_amount(row.amount, 2) %][% row.duedate.to_kivitendo | html %][%- LxERP.format_amount(row.paid, 2) %][%- LxERP.format_amount(row.amount - row.paid, 2) %] +
-- 2.20.1