X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/83b3264ad318cd10b8247f4f553694be075b60d3..b3501bdfd1971fd17d06e47cdf994c7545c3c13c:/bin/mozilla/io.pl diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 478932b69..cdc030297 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -33,6 +33,8 @@ # ####################################################################### +use SL::IC; + # any custom scripts for this one if (-f "$form->{path}/custom_io.pl") { eval { require "$form->{path}/custom_io.pl"; }; @@ -843,6 +845,9 @@ sub new_item { sub display_form { $lxdebug->enter_sub(); + + relink_accounts(); + $form->language_payment(\%myconfig); # if we have a display_form @@ -2119,3 +2124,21 @@ sub new_license { $lxdebug->leave_sub(); } +sub relink_accounts { + $lxdebug->enter_sub(); + + $form->{"taxaccounts"} =~ s/\s*$//; + $form->{"taxaccounts"} =~ s/^\s*//; + foreach my $accno (split(/\s*/, $form->{"taxaccounts"})) { + map({ delete($form->{"${accno}_${_}"}); } qw(rate description taxnumber)); + } + $form->{"taxaccounts"} = ""; + + for ($i = 1; $i <= $form->{"rowcount"}; $i++) { + if ($form->{"id_$i"}) { + IC->retrieve_taxaccounts(\%myconfig, $form, $form->{"id_$i"}, $i, 1); + } + } + + $lxdebug->leave_sub(); +}