Phase 2 commits - order of performed checks
Prasun Kumar
prasun.code at gmail.com
Wed Aug 19 14:48:26 BST 2020
>
> The order of this check assumes that a bank not in the database does not
> exist, where it may be possible that it exists, but is not included in
> the database (for example, if it has been opened recently) and has valid
> bank and account id.
Then, when it will return AccountNumberCheck::BANK_NOT_KNOWN?
The docs of this result type say, "No bank with the specified bankid could
be found".
So, it makes sense for this case, no?
I was assuming that the database would be kept updated thus only needed to
check in the
database but you are right, it might be possible for it to be older.
Thanks.
Prasun
On Wed, 19 Aug 2020 at 17:51, Ralf Habacker <ralf.habacker at freenet.de>
wrote:
> Am 08.08.20 um 05:28 schrieb Prasun Kumar:
> > Hi mentors,
> >
> > Commits:
> > https://sourceforge.net/u/prasun/ktoblzcheck-gsoc2020/commit_browser
> >
>
> @@ -389,6 +389,21 @@ AccountNumberCheck::check(const string &bankId,
> const string &accountId,
>
> return OK;
> }
> +
> + if(country == "CH"){
> + try{
> + Record rec = findBank(bankId);
> + } catch (int){
> + return BANK_NOT_KNOWN;
> + }
> +
> + if (accountId.size() > 12 || bankId.size() != 5) {
> + return ERROR;
> + }
>
> The order of this check assumes that a bank not in the database does not
> exist, where it may be possible that it exists, but is not included in
> the database (for example, if it has been opened recently) and has valid
> bank and account id.
>
> Regards
> Ralf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20200819/7db21e78/attachment.htm>
More information about the Kde-finance-apps
mailing list