map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate);
if (!$form->{"forex_$i"}) { #read exchangerate from input field (not hidden)
$form->{exchangerate} = $form->{"exchangerate_$i"};
map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate);
if (!$form->{"forex_$i"}) { #read exchangerate from input field (not hidden)
$form->{exchangerate} = $form->{"exchangerate_$i"};