From 8c204ce48aa9ecc1e3eb6a99ff9e444716633a90 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 29 Sep 2015 15:27:20 +0200 Subject: [PATCH] Debitoren-/Kreditorenbuchungen: Zahlungsdatum mit aktuellem Datum vorbelegen --- bin/mozilla/ap.pl | 4 +++- bin/mozilla/ar.pl | 1 + templates/webpages/ap/form_header.html | 2 +- templates/webpages/ar/form_header.html | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 7e7fbdebc..b2e5819e8 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -410,7 +410,9 @@ sub form_header { $form->{paid_missing} = $form->{invtotal_unformatted} - $form->{totalpaid}; - print $form->parse_html_template('ap/form_header'); + print $form->parse_html_template('ap/form_header', { + today => DateTime->today, + }); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index e43361f47..38a667e95 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -442,6 +442,7 @@ sub form_header { ARselected => $ARselected, title_str => $title, follow_up_trans_info => $follow_up_trans_info, + today => DateTime->today, }); $main::lxdebug->leave_sub(); diff --git a/templates/webpages/ap/form_header.html b/templates/webpages/ap/form_header.html index 59457ee4c..4d81f9d94 100644 --- a/templates/webpages/ap/form_header.html +++ b/templates/webpages/ap/form_header.html @@ -283,7 +283,7 @@ [% temp = "datepaid_"_ i %] [% IF( changeable ) %] - [% L.date_tag(temp, $temp) %] + [% L.date_tag(temp, $temp ? $temp : today) %] [% ELSE %] [% $temp | html %] diff --git a/templates/webpages/ar/form_header.html b/templates/webpages/ar/form_header.html index 6bce66a4f..0f588671d 100644 --- a/templates/webpages/ar/form_header.html +++ b/templates/webpages/ar/form_header.html @@ -213,7 +213,7 @@ [%- IF row.changeable %] - [% L.date_tag('datepaid_' _ loop.count, row.datepaid) %] + [% L.date_tag('datepaid_' _ loop.count, row.datepaid ? row.datepaid : today) %] [%- ELSE %] [% row.datepaid | html %][% L.hidden_tag('datepaid_' _ loop.count, row.datepaid) %] [%- END %] -- 2.20.1