promptdojo_

The hours-saved receipt — hours and dollars a CFO can read this week — step 7 of 8

Write write_receipt(row) — the line a staff meeting can read. Return a string.

Build reasons in this rule order:

  1. no owner (missing or falsy) → append "no owner"
  2. no shipped (missing or empty) → append "nothing shipped"
  3. accepted is missing or falsy → append "not accepted"
  4. before_hours or after_hours is missing (None) → append "hours not counted"
  5. no loaded_rate (missing or falsy, including 0) → append "no loaded rate"

If reasons is empty, return "READY — {hours}h, ${dollars}" where hours is before minus after, and dollars is hours times the loaded rate. Otherwise return "BLOCKED — " plus the reasons joined by "; ".

Four rows run. Expected output:

R-41: READY — 3h, $255
R-42: BLOCKED — no owner
R-43: BLOCKED — not accepted
R-44: BLOCKED — no owner; not accepted

full-screen editor opens — close anytime to keep reading.