From d6a2112059bfd74eaa3926b8f9d1cfb52bf0e2f4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 29 Sep 2015 16:40:11 +0200 Subject: [PATCH] Mahnungen: Rechnungen mit Lastschrifteinzug nur auf Wunsch mit anzeigen --- SL/DN.pm | 5 +++++ css/common.css | 6 ++++++ locale/de/all | 1 + templates/webpages/dunning/add.html | 9 +++++++-- templates/webpages/dunning/show_invoices.html | 14 +++++++++++--- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index 55200835e..0ada08c4d 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -523,11 +523,16 @@ sub get_invoices { WHERE dunning_level = (SELECT MAX(dunning_level) FROM dunning_config)|; my ($id_for_max_dunning_level) = selectrow_query($form, $dbh, $query); + if (!$form->{l_include_direct_debit}) { + $where .= qq| AND NOT COALESCE(a.direct_debit, FALSE) |; + } + $query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber, a.amount, a.language_id, ct.name AS customername, a.customer_id, a.duedate, a.amount - a.paid AS open_amount, + a.direct_debit, cfg.dunning_description, cfg.dunning_level, diff --git a/css/common.css b/css/common.css index 2594ef665..fe764b82e 100644 --- a/css/common.css +++ b/css/common.css @@ -66,3 +66,9 @@ input.grow_on_focus:focus { width: 150px } .cursor-default { cursor: default } .cursor-pointer { cursor: pointer } .cursor-help { cursor: help } + +/* dunning */ +#dunning_invoice_list .direct_debit td, +#dunning_invoice_list .direct_debit a { + color: #aaa; +} diff --git a/locale/de/all b/locale/de/all index d4bac8359..9fedf0f55 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1377,6 +1377,7 @@ $self->{texts} = { 'Include in Report' => 'In Bericht aufnehmen', 'Include in drop-down menus' => 'In Aufklappmenü aufnehmen', 'Include invalid warehouses ' => 'Ungültige Lager berücksichtigen', + 'Include invoices with direct debit' => 'Inklusive Rechnungen mit Lastschrifteinzug', 'Includeable in reports' => 'In Berichten anzeigbar', 'Included in reports by default' => 'In Berichten standardmäßig enthalten', 'Including' => 'Enthaltene', diff --git a/templates/webpages/dunning/add.html b/templates/webpages/dunning/add.html index b7898c632..4173a51af 100644 --- a/templates/webpages/dunning/add.html +++ b/templates/webpages/dunning/add.html @@ -70,8 +70,13 @@ - [% 'Group Invoices' | $T8 %] - + + + + + + + diff --git a/templates/webpages/dunning/show_invoices.html b/templates/webpages/dunning/show_invoices.html index d087ec96d..63e50397d 100644 --- a/templates/webpages/dunning/show_invoices.html +++ b/templates/webpages/dunning/show_invoices.html @@ -1,6 +1,6 @@ [%- USE T8 %] [% USE HTML %] -[% USE L %] +[% USE L %][%- USE LxERP -%]

[% title %]

[% SET all_active = 1 %][% FOREACH row = DUNNINGS %][% IF !row.active %][% SET all_active = 0 %][% LAST %][% END %][% END %] @@ -12,7 +12,7 @@
- +
+ [% IF l_include_direct_debit %] + + [% END %] [% FOREACH row = DUNNINGS %] - + + [% IF l_include_direct_debit %] + + [% END %] [% END %]
[% 'Current / Next Level' | $T8 %] @@ -35,11 +35,14 @@ [% 'Dunning Duedate' | $T8 %] [% 'Total Fees' | $T8 %] [% 'Interest' | $T8 %][% 'direct debit' | $T8 %]
@@ -68,6 +71,11 @@ [% HTML.escape(row.next_duedate) %] [% HTML.escape(row.fee) %] [% HTML.escape(row.interest) %] + [% IF row.direct_debit %][% LxERP.t8("yes") %][% ELSE %][% LxERP.t8("no") %][% END %] +
-- 2.20.1