Changing code to load bank data from SQLite DB
Prasun Kumar
prasun.code at gmail.com
Tue Jun 16 17:57:16 BST 2020
Thanks for this.
In the current implementation the method AccountNumberCheck::readFile()
> reads it from the data file
> but the data file doesn't contain any such field afaik.
>
Don't know why I said that. It is literally the second field of the
datafile. I apologise for this.
I really don't know how I missed it.
Thanks for the help.
Prasun
On Sun, 14 Jun 2020 at 14:43, Thomas Baumgart <thb at net-bembel.de> wrote:
> On Sonntag, 14. Juni 2020 10:13:22 CEST Prasun Kumar wrote:
>
> > Thanks for the guidance.
> > Another question, how is AccountNumberCheck::Record::method supposed to
> be
> > used?
> > In the current implementation the method AccountNumberCheck::readFile()
> > reads it from the data file
> > but the data file doesn't contain any such field afaik.
>
> Looking at the code in AccountNumberCheck::readFile(const string
> &filename) and
> the current data file at the same time, I see some problems. Maybe, the
> data
> file format changed in the meantime, I have not checked.
>
> Anyway, the format in the text file (obtained from
>
> https://www.bundesbank.de/resource/blob/602632/31fec41357f012d537ce62045395929a/mL/blz-aktuell-txt-data.txt
> today) I see the following record structure:
>
> Nr Length Description
> 1 8 BLZ (Bankleitzahl)
> 2 1 Specification whether the institution is the bank sort
> code-carrying payment service provider ("1") or not ("2")
> 3 58 Name of institution
> 4 5 Zip Code
> 5 35 Location/City
> 6 27 Shortname of Institution
> 7 5 PAN (I don't know what that is used for)
> 8 11 BIC (SWIFT Bank Identifier Code - I think we should have that in
> the DB somehow)
> 9 2 Check-Method
> 10 6 Record number
> 11 1 Change Operation
> I see 'A', 'D', 'M' and 'U' and can think that they mean
> 'Add', 'Delete', 'Modified', 'Unchanged' but that is my
> interpretation which needs to be verified
> 12 1 BLZ deletion if "1"
> 13 8 Indicator of successor bank sort code (new BLZ)
>
> I simply copied the description of fields 2 and 13 from
>
> https://www.bundesbank.de/en/tasks/payment-systems/services/bank-sort-codes/download-bank-sort-codes-626218
> so that you can read up on it.
>
> The field you are looking for is contained as field #9. To me it looks
> like the parser in
> AccountNumberCheck::readFile(const string &filename) needs to be
> changed/adopted to the
> current format.
>
> > How should I handle
> > this field with the database?
>
> I'd say extract it from field #9. The values map to the functions located
> in src/lib/methods.cc.
>
> > Inserting an empty string works but then should I also make a place for a
> > possible method field in the
> > user-supplied DB?
>
> It may work but can yield false results. I don't know the details, but
> looking at the code
> there is some heuristic going on to find a method if none is supplied.
> Again, I have not
> looked into that in detail and I am not aware of the detailed procedure.
>
> All I can say is that if you stick an account number into the check
> algorithm you must get a positive
> result, otherwise the account number is not valid for the BLZ (method_09
> being the easiest one ;) ).
>
> Hope that helps. If you still have questions feel free to ask.
>
> --
>
> Regards
>
> Thomas Baumgart
>
> https://www.signal.org/ Signal, the better WhatsApp
> -------------------------------------------------------------
> Testing can only prove the presence of bugs, not their absence.
> -- Edsger W. Dijkstra, 1969
> -------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20200616/b87ceb69/attachment.htm>
More information about the Kde-finance-apps
mailing list