From 9e30e4f6930108207ecaa77a57f0baee243ebaa6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 8 Mar 2019 12:58:13 +0100 Subject: [PATCH] =?utf8?q?Kreditorenbeleg:=20Kontenbeschreibung=20f=C3=BCr?= =?utf8?q?=20Zahlungskonten=20anzeigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Wie bei EK-Rechnung. Zur Sicherheit ein eigenes Form-Feld generiert, anstatt die select box nur zu disablen. --- bin/mozilla/ap.pl | 5 +++++ templates/webpages/ap/form_header.html | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 039f5a963..559154854 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -44,6 +44,7 @@ use SL::IR; use SL::IS; use SL::ReportGenerator; use SL::DB::BankTransactionAccTrans; +use SL::DB::Chart; use SL::DB::Currency; use SL::DB::Default; use SL::DB::PurchaseInvoice; @@ -553,6 +554,10 @@ sub form_header { $form->{'paidaccount_changeable_'. $i} = $changeable; $form->{'labelpaid_project_id_'. $i} = $project_labels{$form->{'paid_project_id_'. $i}}; + # accno and description as info text + $form->{'AP_paid_readonly_desc_' . $i} = $form->{'AP_paid_' . $i} ? + $form->{'AP_paid_' . $i} . " " . SL::DB::Manager::Chart->find_by(accno => $form->{'AP_paid_' . $i})->description + : ''; } $form->{paid_missing} = $form->{invtotal_unformatted} - $form->{totalpaid}; diff --git a/templates/webpages/ap/form_header.html b/templates/webpages/ap/form_header.html index 45dcf332a..fd8c91e54 100644 --- a/templates/webpages/ap/form_header.html +++ b/templates/webpages/ap/form_header.html @@ -331,12 +331,13 @@ [% END %] - [% temp = "AP_paid_"_ i %] + [% temp = "AP_paid_"_ i %] + [% readonly = "AP_paid_readonly_desc_"_ i %] [% IF( changeable ) %] [% L.select_tag(temp, ALL_CHARTS_AP_paid, value_title_sub = \AP_paid_value_title_sub, default = ($temp || accno_arap)) %] [% ELSE %] - [% $temp | html %] + [% $readonly | html %] [% END %] -- 2.20.1