Skip to content

Fix krediter(): insert replacement serial row with batch_kob_id 0 ins… - #467

Open
sawaneh1 wants to merge 2 commits into
DANOSOFT:masterfrom
sawaneh1:Sawaneh/krediter-serienr-fresh-row
Open

Fix krediter(): insert replacement serial row with batch_kob_id 0 ins…#467
sawaneh1 wants to merge 2 commits into
DANOSOFT:masterfrom
sawaneh1:Sawaneh/krediter-serienr-fresh-row

Conversation

@sawaneh1

@sawaneh1 sawaneh1 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

…tead of interpolating the $batch_kob_id array as literal "Array", which broke the SQL and blocked kreditnota booking

What are the changes about?

Provide a brief explanation of the changes you have made

Have you checked the following?

Summary by CodeRabbit

  • Bug Fixes
    • Fixed credit processing so replacement serial-number entries are created with the correct batch reference.
    • Prevented invalid array values from being stored when processing credited purchases.
    • Ensured credited items consistently follow the intended batch handling behavior.

…tead of interpolating the $batch_kob_id array as literal "Array", which broke the SQL and blocked kreditnota booking
@sawaneh1
sawaneh1 requested a review from a team August 14, 2026 06:21
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 42 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f66dbe82-1529-400c-bd87-b1221574495a

📥 Commits

Reviewing files that changed from the base of the PR and between ec093b2 and 0fc3bcf.

📒 Files selected for processing (1)
  • includes/ordrefunc.php

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8241ee4e-9fd0-47db-bfb3-ffd68479f56d

📥 Commits

Reviewing files that changed from the base of the PR and between e0cccfa and ec093b2.

📒 Files selected for processing (1)
  • includes/ordrefunc.php

📝 Walkthrough

Walkthrough

The krediter function now initializes $batch_kob_id as an array and inserts replacement serial-number rows with batch_kob_id set to 0. The change is documented in the changelog.

Changes

krediter serial-row correction

Layer / File(s) Summary
Correct replacement serial-row insertion
includes/ordrefunc.php
krediter initializes $batch_kob_id as an array and uses 0 for batch_kob_id when inserting replacement serial-number rows. The changelog records the correction.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to ec093

This is a localized correction to serial-row insertion behavior, and no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: sirrolin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the krediter() fix and the batch_kob_id value used for the replacement serial row.
Description check ✅ Passed The description explains the defect and confirms all checklist items, although the explanation remains above the template heading.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 14, 2026
@ZaynSaul

Copy link
Copy Markdown
Collaborator

Escalating without review: this touches includes/ordrefunc.php, which is literally on the named escalation list (bogfor/kassekladde/ordrefunc/restapi/migrations). Routing to Lui/Nicolai regardless of diff size.

(Description is also still the unfilled template, for whoever picks this up.)

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