Support SCOR IBAN ISO-References for payments. WIP#899
Draft
AlwinEgger wants to merge 3 commits intoprodfrom
Draft
Support SCOR IBAN ISO-References for payments. WIP#899AlwinEgger wants to merge 3 commits intoprodfrom
AlwinEgger wants to merge 3 commits intoprodfrom
Conversation
There was a problem hiding this comment.
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
Comment on lines
140
to
142
| //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)) |
There was a problem hiding this comment.
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.
Suggested change
| //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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.