Merge lp:~hbrunn/banking-addons/lp-1106831-handle-P into lp:banking-addons/6.1

Proposed by Holger Brunn (Therp)
Status: Merged
Merged at revision: 159
Proposed branch: lp:~hbrunn/banking-addons/lp-1106831-handle-P
Merge into: lp:banking-addons/6.1
Diff against target: 14 lines (+2/-2)
1 file modified
account_banking_nl_clieop/wizard/clieop.py (+2/-2)
To merge this branch: bzr merge lp:~hbrunn/banking-addons/lp-1106831-handle-P
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Review via email: mp+145129@code.launchpad.net

This proposal supersedes a proposal from 2013-01-27.

Description of the change

Now replacing Ps by zeroes as proposed

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote : Posted in a previous version of this proposal

Good catch, but did you check whether this makes for a valid Clieop file? The most recent Clieop specifications don't mention it, but the specifications from March 2006 rule it out explicitely in page 15 of

    http://www-old.adslweb.net/tools/clieop2psv/ClieOp_03_EN.pdf

It may be bank specific as well. Rabobank rules it out in page 12 of

    https://www.rabobank.com/en/images/Format_description__RCM6.pdf

So does ING in page 10 of

    http://www.ing.nl/Images/ClieOp_03_tcm7-69019.pdf

All of this seems to indicate that a better approach would be to replace the P by a zero. What do you think?

review: Needs Information
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote : Posted in a previous version of this proposal

I think you are right. But to me the specification seems to tell to remove the P, not to replace it by a zero.
Unfortunately, I don't have access to any bank account to test that currently.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote : Posted in a previous version of this proposal

Numeric fields in the Clieop format, such as the account number are right justified and padded with leading zeroes[1]. The clieop export filter takes care of this, so whether you can remove the 'P' depends on whether it already has done that at that point. Replacing is probably your safest option.

[1] Page 15 of http://www.equens.com/Images/CLIEOP%20EN.pdf

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks!

review: Approve
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

i lack expertise in the field but the code looks ok to me.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking_nl_clieop/wizard/clieop.py'
2--- account_banking_nl_clieop/wizard/clieop.py 2013-01-14 15:21:11 +0000
3+++ account_banking_nl_clieop/wizard/clieop.py 2013-01-28 09:07:36 +0000
4@@ -276,8 +276,8 @@
5 self.paymentreference = Optional(PaymentReferenceRecord)
6 self.description = Optional(DescriptionRecord, 4)
7 self.transaction.transactiontype = type_
8- self.transaction.accountno_beneficiary = accountno_beneficiary
9- self.transaction.accountno_payer = accountno_payer
10+ self.transaction.accountno_beneficiary = accountno_beneficiary.replace('P', '0')
11+ self.transaction.accountno_payer = accountno_payer.replace('P', '0')
12 self.transaction.amount = int(round(amount * 100))
13 if reference:
14 self.paymentreference.paymentreference = reference

Subscribers

People subscribed via source and target branches