projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update Dokumentation
[kivitendo-erp.git]
/
bin
/
mozilla
/
sepa.pl
diff --git
a/bin/mozilla/sepa.pl
b/bin/mozilla/sepa.pl
index
e7ca5ec
..
6fb9907
100755
(executable)
--- a/
bin/mozilla/sepa.pl
+++ b/
bin/mozilla/sepa.pl
@@
-110,11
+110,14
@@
sub bank_transfer_create {
my ($vc_bank_info);
my $error_message;
my ($vc_bank_info);
my $error_message;
+ my @bank_columns = qw(iban bic);
+ push @bank_columns, qw(mandator_id mandate_date_of_signature) if $vc eq 'customer';
+
if ($form->{confirmation}) {
$vc_bank_info = { map { $_->{id} => $_ } @{ $form->{vc_bank_info} || [] } };
foreach my $info (values %{ $vc_bank_info }) {
if ($form->{confirmation}) {
$vc_bank_info = { map { $_->{id} => $_ } @{ $form->{vc_bank_info} || [] } };
foreach my $info (values %{ $vc_bank_info }) {
- if (any { !$info->{$_} }
qw(iban bic)
) {
+ if (any { !$info->{$_} }
@bank_columns
) {
$error_message = $locale->text('The bank information must not be empty.');
last;
}
$error_message = $locale->text('The bank information must not be empty.');
last;
}
@@
-143,7
+146,7
@@
sub bank_transfer_create {
} else {
foreach my $bank_transfer (@bank_transfers) {
} else {
foreach my $bank_transfer (@bank_transfers) {
- foreach (
qw(iban bic)
) {
+ foreach (
@bank_columns
) {
$bank_transfer->{"vc_${_}"} = $vc_bank_info->{ $bank_transfer->{vc_id} }->{$_};
$bank_transfer->{"our_${_}"} = $bank_account->{$_};
}
$bank_transfer->{"vc_${_}"} = $vc_bank_info->{ $bank_transfer->{vc_id} }->{$_};
$bank_transfer->{"our_${_}"} = $bank_account->{$_};
}
@@
-506,6
+509,10
@@
sub bank_transfer_download_sepa_xml {
my ($yy, $mm, $dd) = $locale->parse_date($myconfig, $item->{reference_date});
$item->{reference_date} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
$mandator_id = $item->{mandator_id};
my ($yy, $mm, $dd) = $locale->parse_date($myconfig, $item->{reference_date});
$item->{reference_date} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
$mandator_id = $item->{mandator_id};
+ if ($item->{mandate_date_of_signature}) {
+ ($yy, $mm, $dd) = $locale->parse_date($myconfig, $item->{mandate_date_of_signature});
+ $item->{mandate_date_of_signature} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
+ }
}
$sepa_xml->add_transaction({ 'src_iban' => $item->{our_iban},
}
$sepa_xml->add_transaction({ 'src_iban' => $item->{our_iban},
@@
-519,7
+526,8
@@
sub bank_transfer_download_sepa_xml {
'mandator_id' => $mandator_id,
'reference_date' => $item->{reference_date},
'execution_date' => $requested_execution_date,
'mandator_id' => $mandator_id,
'reference_date' => $item->{reference_date},
'execution_date' => $requested_execution_date,
- 'end_to_end_id' => $item->{end_to_end_id} });
+ 'end_to_end_id' => $item->{end_to_end_id},
+ 'date_of_signature' => $item->{mandate_date_of_signature}, });
}
my $xml = $sepa_xml->to_xml();
}
my $xml = $sepa_xml->to_xml();