Skip to content

Conversation

@AlwinEgger
Copy link
Member

No description provided.

@AlwinEgger AlwinEgger requested a review from Copilot July 24, 2025 14:26
@AlwinEgger AlwinEgger marked this pull request as draft July 24, 2025 14:26
Copy link

Copilot AI left a 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

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))
Copy link

Copilot AI Jul 24, 2025

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.

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")

Copilot uses AI. Check for mistakes.
AlwinEgger and others added 2 commits July 24, 2025 16:29
…ice.scala

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ice.scala

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants