From 2c33e93fb5caf10f96cfa462781830f28efa285c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 12 Jul 2018 18:16:17 +0200 Subject: [PATCH] =?utf8?q?Dialogbuchen,=20Betrag=20aus=20Kontoauszug=20ver?= =?utf8?q?buchen=20schreibsch=C3=BCtzen=20(Maske)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Als Konsequenz aus dem vorherigen Commit, sollte der Benutzer erstmal nicht fröhlich Freitext-Werte in das Feld füllen. --- SL/Controller/BankTransaction.pm | 1 + bin/mozilla/gl.pl | 6 ++++++ templates/webpages/gl/form_footer.html | 1 + 3 files changed, 8 insertions(+) diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 0420b8b36..7d7616787 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -890,6 +890,7 @@ sub load_gl_record_template_url { 'form_defaults.transdate' => $self->transaction->transdate_as_date, 'form_defaults.callback' => $self->callback, 'form_defaults.bt_id' => $self->transaction->id, + 'form_defaults.bt_chart_id' => $self->transaction->local_bank_account->chart->id, ); } diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index f351a9dfc..f816dcd56 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -917,6 +917,12 @@ sub display_rows { my $copy2credit = $i == 1 ? 'onkeyup="copy_debit_to_credit()"' : ''; my $balance = $form->format_amount(\%::myconfig, $balances{$accno_id} // 0, 2, 'DRCR'); + # if we have a bt_chart_id we disallow changing the amount of the bank account + if ($form->{bt_chart_id}) { + $debitreadonly = $creditreadonly = "readonly" if ($form->{"accno_id_$i"} eq $form->{bt_chart_id}); + $copy2credit = '' if $i == 1; # and disallow copy2credit + } + print qq| $accno ${balance} diff --git a/templates/webpages/gl/form_footer.html b/templates/webpages/gl/form_footer.html index 8e7d74dc5..b5769bd44 100644 --- a/templates/webpages/gl/form_footer.html +++ b/templates/webpages/gl/form_footer.html @@ -21,6 +21,7 @@
+ [%- IF id && follow_ups.size %]

[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size , follow_ups_due) %]

-- 2.20.1