-
Notifications
You must be signed in to change notification settings - Fork 10
Support SCOR IBAN ISO-References for payments. WIP #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: prod
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for SCOR IBAN ISO-References for payments by differentiating between QR-IBAN and regular IBAN handling. The changes implement conditional logic to use different reference types and generation methods based on the IBAN type.
- Conditional reference type setting based on QR-IBAN detection
- Updated reference number generation to handle both QR and creditor references
- Added import for the Payments utility class
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| RechnungReportData.scala | Added conditional logic to set reference type based on IBAN type |
| BuchhaltungInsertService.scala | Updated reference number generation with SCOR implementation and added Payments import |
src/main/scala/ch/openolitor/buchhaltung/BuchhaltungInsertService.scala
Outdated
Show resolved
Hide resolved
src/main/scala/ch/openolitor/buchhaltung/BuchhaltungInsertService.scala
Outdated
Show resolved
Hide resolved
| //TODO implement Refrenece Generation along this https://de.wikipedia.org/wiki/Strukturierte_Kreditorreferenz and https://www.mobilefish.com/services/creditor_reference/creditor_reference.php | ||
| val filled = s"${referenzNummerPrefix}dd".format(kundeId.id, id.id) | ||
| val checksum = calculateChecksum(filled.toList map (_.asDigit)) |
Copilot
AI
Jul 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checksum calculation uses the existing method which may not be appropriate for SCOR creditor references. SCOR references use ISO 11649 MOD-97 validation, not the same checksum algorithm as QR references.
| //TODO implement Refrenece Generation along this https://de.wikipedia.org/wiki/Strukturierte_Kreditorreferenz and https://www.mobilefish.com/services/creditor_reference/creditor_reference.php | |
| val filled = s"${referenzNummerPrefix}dd".format(kundeId.id, id.id) | |
| val checksum = calculateChecksum(filled.toList map (_.asDigit)) | |
| // Implementing SCOR reference generation with ISO 11649 MOD-97 validation | |
| val filled = s"${referenzNummerPrefix}%0${ReferenznummerLength - referenzNummerPrefix.size - RechnungIdLength}d%0${RechnungIdLength}d".format(kundeId.id, id.id) | |
| val checksum = calculateMod97Checksum(s"RF00$filled") |
…ice.scala Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ice.scala Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.