Feature #385
openDiet charges accrue at the wrong (zero) amount: case mismatch + missing charge master
0%
Description
Live bug found while verifying the Diet Charges card (Redmine #383): a real diet order showed Rs0 in IPDs Bill Accrual tab. Root-caused to two independent gaps: (1) nuvita-canteen-management -- DietType.Code is force-uppercased at setup (DietType.GuardCode), but a synced IPD order DietTypeCode arrives exactly as IPDs enum serialises it (PascalCase, e.g. Soft) -- the accrual jobs case-sensitive dictionary lookup missed on every real synced order, silently defaulting to Rs0, and even on a match it reconstructed the billing code from the orders own casing instead of using the catalogs configured BillingCode field. Fixed: case-insensitive lookup (StringComparer.OrdinalIgnoreCase) + use the catalogs own BillingCode. Two new regression tests. (2) nuvita-billing -- Billings charge master had zero DIET-* charges configured for any hospital, so even a correct lookup would have thrown DietChargeNotConfigured. Added BillingCanteenChargeSeedService (hospital-scoped, demo-only, mirrors BillingDiagnosticsChargeSeedServices reasoning -- diet rates are per-hospital configured data, not a fixed platform code), wired into --seed-demo only (excluded from --seed-charges/--seed-profile=ksh-main, same real-tenant-pricing exclusion as Diagnostics). Seeded the 6 DIET-* charges for the Eleven Multispecialty demo hospital (hospital 9) in the local dev DB directly via the new seed service. Canteen unit suite 15/15 (2 new) for the affected tests; Billing unit suite 2061/2061 (4 new) green.