X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/66e2fdcc4f89a4f13c77f6e44f2969fd46aa7aba..57f150274e0dc0f89968bc59a8a7a997ae7c4a08:/SL/SEPA/XML.pm diff --git a/SL/SEPA/XML.pm b/SL/SEPA/XML.pm index f939453fe..e4bf360d6 100644 --- a/SL/SEPA/XML.pm +++ b/SL/SEPA/XML.pm @@ -67,10 +67,15 @@ sub _replace_special_chars { 'Ü' => 'Ue', 'ß' => 'ss', '&' => '+', + '`' => '\'', ); map { $text =~ s/$_/$special_chars{$_}/g; } keys %special_chars; + # for all other non ascii chars 'OLÉ S.L.' and 'Årdberg AB'! + use Text::Unidecode qw(unidecode); + $text = unidecode($text); + return $text; } @@ -224,7 +229,7 @@ sub to_xml { $xml->startTag('MndtRltdInf'); $xml->dataElement('MndtId', $self->_restricted_identification_sepa2($transaction->get('mandator_id'))); - $xml->dataElement('DtOfSgntr', $transaction->get('reference_date', 2010-12-02)); + $xml->dataElement('DtOfSgntr', $self->_restricted_identification_sepa2($transaction->get('date_of_signature'))); $xml->endTag('MndtRltdInf'); $xml->startTag('CdtrSchmeId');