fix(patient): consistent debt/paid status, invoice totals, global service search

- patient_debt_rials now = session remaining (final - discount - paid), so the
  card status and invoice status stay consistent with is_paid even after a
  session is edited post-invoicing (no more '0 remaining but تکمیل پرداخت').
- InvoiceSummaryModal: remaining subtracts discount; the فاکتور status reflects
  actual settlement (تسویه شده / بدهکار), and the payments table shows a
  «مجموع پرداختی‌ها» total row.
- Add GET /api/v1/service-items (all owner services) and make the service
  picker searchable across all services without first choosing a section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-17 15:53:28 +03:30
co-authored by Claude Fable 5
parent e9108e7590
commit 385b81fae0
6 changed files with 56 additions and 19 deletions
+4
View File
@@ -76,6 +76,10 @@
---
## GET /api/v1/service-items
همه‌ی سرویس‌های owner در همه‌ی بخش‌ها (برای انتخاب/جستجوی سراسری در فرم ثبت/ویرایش مراجعه). پاسخ مثل لیست هر بخش (آرایه‌ی `ServiceItem::toArray`)، مرتب بر نام.
## GET /api/v1/service-items/{sectionUuid}
لیست سرویس‌های یک بخش.