viafintech / camt_parser Goto Github PK
View Code? Open in Web Editor NEWA basic parser for camt.052, camt.053 and camt.054 files
License: MIT License
A basic parser for camt.052, camt.053 and camt.054 files
License: MIT License
Accessing Reason Codes for failed debits is important and would be great to correctly display failure information for end users.
Read more: https://www.hettwer-beratung.de/sepa-spezialwissen/sepa-reason-codes/
Hi, got this warning message on Ruby 2.6
~/.gem/ruby/2.6.0/gems/camt_parser-2.3.5/lib/camt_parser/misc.rb:9: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
Thanks for your gem!
Hey,
right now there is only one supported version for each camt format e.g. camt.054.001.04.
But I need to parse camt.054.001.02 formats.
How about to structure the Base class like this: CamtParser::Format054::V001::V04::Base
in order to support different versions?
I can provide a Pull request.
We need to be able to handle camt052 files.
Implement them
See
http://www.bundesbank.de/Redaktion/EN/Documentation/4zb/HtmlDoc/v1.2.1/CR/CR-Overview.pdf
https://www.bayernlb.de/internet/media/de/internet_4/de_1/downloads_5/0800_financial_office_it_operations_5/4200_1/formate/camt05X.pdf
https://corporates.swift.com/sites/sdccor/files/implementing_your_project_2011_standards_mx_message_implementation_guide.pdf
for documentation on camt especially camt052
While you are at it, have a look at this diff and see which improvements can be integrated back into this gem
As we are usually not seeing individual transactions for bookings made as batch, backoffice systems quite often identifies and associates them by MsgId and performs status updates accordingly.
It would be nice to have it.
See #34
Good morning,
First of all, a BIG thank you for writing this superb lib (camt_parser) to process these CAMT XML files which are really painful.
Among all the libs I tested, only yours, written in Ruby, worked well but above all can be modified very easily to have the columns you want for extracting the CAMT file !
In order to simplify the life of our financial secretary, who is not a computer scientist, I created a very small WEB service that is very simple to use:
https://github.com/zuzu59/zcamt2csv
This works great, except we need to be able to extract the transaction proxy address columns:
<Dbtr>
<Nm>Toto, Tutu</Nm>
<PstlAdr>
<StrtNm>Avenue de Milan</StrtNm>
<BldgNb>26</BldgNb>
<PstCd>1007</PstCd>
<TwnNm>Lausanne</TwnNm>
<Ctry>CH</Ctry>
</PstlAdr>
</Dbtr>
and
<Cdtr>
<Nm>Association MakeRevolution</Nm>
<PstlAdr>
<AdrLine>Chemin du Closel 2</AdrLine>
<AdrLine>1020 Renens VD</AdrLine>
</PstlAdr>
</Cdtr>
And this is where my limits in Ruby are exceeded !
Would it be possible, please, to add in your camt_parser lib the possibility of extracting address fields ?
THANKS
Sincerely
Ch. Zufferey
Hi!
I was looking at the collection of errors the Errors module.
All of them inherit directly from Ruby's StandardError.
What if they inherited from a class CamtParserError < StandardError
exception class? That way, I'd be able to catch that one, in my application code.
This commit introduced a bug where a <AmtDtls>
with multiple kinds of <*Amt>
leads Transaction#parse_currency
and #parse_amount
to concatenate the values of all <*Amt>
s.
E.g., this XML leads to the currency being EUREUREUR
and the amount 0.03
(== "0.030.040.03".to_f
):
<AmtDtls>
<InstdAmt>
<Amt Ccy="EUR">0.03</Amt>
</InstdAmt>
<TxAmt>
<Amt Ccy="EUR">0.04</Amt>
</TxAmt>
<PrtryAmt>
<Tp>IBS</Tp>
<Amt Ccy="EUR">0.03</Amt>
</PrtryAmt>
</AmtDtls>
Hi,
Somehow a client of us managed to get hold of a CAMT file with transactions without an amount. This yields the error described with the trace below. As this is not easy to catch, I think the gem should check the value before building the BigDecimal. Maybe a validation? I'm using amount_in_cents
now, as this yields zero when no amount is set.
[GEM_ROOT]/gems/camt_parser-2.4.0/lib/camt_parser/misc.rb:9 :in `BigDecimal`
[GEM_ROOT]/gems/camt_parser-2.4.0/lib/camt_parser/misc.rb:9 :in `to_amount`
[GEM_ROOT]/gems/camt_parser-2.4.0/lib/camt_parser/general/transaction.rb:11 :in `amount`
Some banks may trigger transfers/transactions as blocks.
Currently it is not possible to handle these transactions independently even though they may be listed separately in the CAMT052/CAMT053 files.
Add support for it
Heyo!
I was wondering if we could potentially introduce an attribute reader for @xml_data
?
Maybe by directly adding attr_reader :xml_data
to each class or by adding a new superclass CamtParser::XmlData
from which the other classes could inherit?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.