Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Commit

Permalink
Fehler in Pruefziffernmethode 51C. Die basiert auf Verfahren 00, bei …
Browse files Browse the repository at this point in the history
…dem die zweistelligen Quersummen addiert werden muessen.
  • Loading branch information
willuhn committed Dec 2, 2014
1 parent 0c3b2ba commit ba4a91c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/kapott/hbci/manager/AccountCRCAlgs.java
Expand Up @@ -467,7 +467,7 @@ public static boolean alg_51(int[] blz, int[] number)

if (!ok) {
// Method C
sum = addProducts(number, 3, 8, new int[] {1, 2, 1, 2, 1, 2 }, false);
sum = addProducts(number, 3, 8, new int[] {1, 2, 1, 2, 1, 2 }, true);
crc = (10 - sum % 10) % 10;
ok = (number[9] == crc);
}
Expand Down
6 changes: 6 additions & 0 deletions test/hbci4java/manager/TestAccountCRCAlgs.java
Expand Up @@ -26,4 +26,10 @@ public void test002() {
}
}

@Test
public void test51_a()
{
Assert.assertTrue(AccountCRCAlgs.alg_51(null,new int[]{0,0,0,2,6,7,1,0,7,1}));
}

}

0 comments on commit ba4a91c

Please sign in to comment.