Skip to content

ADR β€” PR #1054

2026-05-28 00:00 β€” Address CodeRabbit feedback on billing calculation and null-check logic

Section titled β€œ2026-05-28 00:00 β€” Address CodeRabbit feedback on billing calculation and null-check logic”
  • Comment: https://github.com/ERP-Unlocked/ordermatic/pull/1054
  • Priority: must-fix, nice-to-have
  • Decision: accept
  • Rationale: All actionable CodeRabbit findings have been resolved - billing calculation now correctly uses COALESCE for fallback to default rates, null checks properly handle numeric overrides, and ADR documentation accurately reflects the implementation patterns.

2026-05-28 00:01 β€” Fix usage charges calculation for orgs without overrides

Section titled β€œ2026-05-28 00:01 β€” Fix usage charges calculation for orgs without overrides”
  • Comment: Outside diff range comment in billing-summary.ts lines 136-145
  • Priority: must-fix
  • Decision: accept
  • Rationale: SQL query was using effectiveRates which only existed for orgs with overrides, causing NULL sums for orgs without overrides. Fixed by using COALESCE to fallback to request defaults.

2026-05-28 00:02 β€” Fix rate override display logic to check null values

Section titled β€œ2026-05-28 00:02 β€” Fix rate override display logic to check null values”
  • Comment: Inline comment in BillingSummary.tsx lines 338-340
  • Priority: nice-to-have
  • Decision: accept
  • Rationale: Updated ternary to check for non-null values instead of undefined, ensuring only actual numeric overrides render β€œCustom” and nulls render β€œDefault”.

2026-05-28 00:03 β€” Update ADR documentation to reflect consistent null-check patterns

Section titled β€œ2026-05-28 00:03 β€” Update ADR documentation to reflect consistent null-check patterns”
  • Comment: Outside diff comment in docs/adr/PR-1026.md
  • Priority: nice-to-have
  • Decision: accept
  • Rationale: ADR documentation updated to consistently reflect the implemented null-check patterns and explain the verification limitations.