Als Konsequenz aus dem vorherigen Commit, sollte der Benutzer
erstmal nicht fröhlich Freitext-Werte in das Feld füllen.
'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,
);
}
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|<tr valign=top>
$accno
<td id="chart_balance_$i" align="right">${balance}</td>
<hr size="3" noshade>
<input name=callback type=hidden value="[% callback %]">
<input name=bt_id type=hidden value="[% bt_id %]">
+<input name=bt_chart_id type=hidden value="[% bt_chart_id %]">
[%- IF id && follow_ups.size %]
<p>[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size , follow_ups_due) %]</p>