- my @values = ($item_id, $export_id,
- conv_i($transfer->{ap_id}), conv_i($transfer->{chart_id}),
- $transfer->{amount}, conv_date($transfer->{requested_execution_date}),
- $transfer->{reference}, $end_to_end_id,
- map { my $pfx = $_; map { $transfer->{"${pfx}_${_}"} } qw(iban bic) } qw(our vendor));
+ my @values = ($item_id, $export_id,
+ conv_i($transfer->{"${arap}_id"}), conv_i($transfer->{chart_id}),
+ $transfer->{amount}, conv_date($transfer->{requested_execution_date}),
+ $transfer->{reference}, $end_to_end_id,
+ map { my $pfx = $_; map { $transfer->{"${pfx}_${_}"} } qw(iban bic) } qw(our vc));
+ # save value of skonto_amount and payment_type
+ if ( $transfer->{payment_type} eq 'without_skonto' ) {
+ push(@values, 0);
+ } elsif ($transfer->{payment_type} eq 'difference_as_skonto' ) {
+ push(@values, $transfer->{amount});
+ } elsif ($transfer->{payment_type} eq 'with_skonto_pt' ) {
+ push(@values, $transfer->{skonto_amount});
+ } else {
+ die "illegal payment_type: " . $transfer->{payment_type} . "\n";
+ };
+ push(@values, $transfer->{payment_type});
+
+ push @values, $transfer->{vc_mandator_id}, conv_date($transfer->{vc_mandate_date_of_signature}) if $params{vc} eq 'customer';