Skip to content

[ENG-898] Fix validation error spelling mistake in sync invoice items - #3736

Merged
vigneshhari merged 2 commits into
ohcnetwork:developfrom
rithviknishad:ENG-898-fix-validation-error-spelling-mistake-in-sync-invoice-items
Aug 13, 2026
Merged

[ENG-898] Fix validation error spelling mistake in sync invoice items#3736
vigneshhari merged 2 commits into
ohcnetwork:developfrom
rithviknishad:ENG-898-fix-validation-error-spelling-mistake-in-sync-invoice-items

Conversation

@rithviknishad

@rithviknishad rithviknishad commented Aug 11, 2026

Copy link
Copy Markdown
Member

Proposed Changes

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@ohcnetwork/care-backend-maintainers @ohcnetwork/care-backend-admins

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the validation error message shown when a non-refund invoice has a negative total.
    • Improved validation when attaching an account to an invoice with negative billable charges.

@rithviknishad
rithviknishad requested a review from a team as a code owner August 11, 2026 10:11
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request corrects a spelling error in the validation message for negative non-refund invoice totals. It also adds API coverage for the rejection case.

Changes

Invoice validation

Layer / File(s) Summary
Correct validation message
care/emr/resources/invoice/sync_items.py
The error message changes “Ivoice” to “Invoice”.
Validate non-refund rejection
care/emr/tests/test_invoice_api.py
The test verifies that a negative non-refund invoice total returns HTTP 400 with the expected error.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • ohcnetwork/care#3726: Both changes cover invoice account-attachment validation in care/emr/tests/test_invoice_api.py.

Suggested reviewers: vigneshhari

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 spelling fix in invoice item synchronization.
Description check ✅ Passed The description is mostly complete and includes the change reference and test checklist, but issue and solution details are minimal.
✨ 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.

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.46%. Comparing base (c64a1ef) to head (68614f9).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3736   +/-   ##
========================================
  Coverage    79.45%   79.46%           
========================================
  Files          480      480           
  Lines        23213    23213           
  Branches      2420     2420           
========================================
+ Hits         18445    18447    +2     
+ Misses        4164     4163    -1     
+ Partials       604      603    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vigneshhari
vigneshhari merged commit e926b64 into ohcnetwork:develop Aug 13, 2026
8 checks passed
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