Decide: should manual pricing apply to every period, or only back-dated ones? #6

Open
opened 2026-08-31 21:22:27 +00:00 by padreug · 0 comments
Owner

A behaviour question left open by 1584eb3, worth a deliberate answer rather than inheriting the one that fell out of a bug fix.

What changed and why

resolve_price used to test payday >= today before the mode, so manual was silently ignored for any period not already back-dated — "pay at the rate we agreed" quietly didn't, which was the bug. A stated rate now wins unconditionally.

The consequence

manual is no longer just a back-dating correction: a contract set to manual with a rate converts every period at it, ignoring the market entirely. That is a fixed-rate contract, and it is a genuinely useful thing — a salary pegged to a rate both parties agreed — but it is a bigger feature than "let me correct one entry", and nothing in the UI presents it as such.

Options

  1. Keep it. Document fixed-rate contracts as a supported mode and say so in the dialog, e.g. "every payout converts at this rate".
  2. Contract-level manual only applies to back-dated periods; per-payout override still applies always. Preserves the bug fix (an explicit override wins) without making a standing contract ignore the market.
  3. Drop contract-level manual entirely — make it a pay-now / add-past-payout override only, and let contracts choose between payday and current.

Option 1 is the current behaviour and the least code. Option 2 is the subtlest to explain. Worth deciding alongside #3, since a first-class "add a past payout" would take over most of what per-payout manual is for.

Also unanswered: the memo now names the rate on every payout, including same-day ones where it is just "now". Valuable for a back-dated payout, arguably clutter otherwise — the clause is trivial to restrict to back-dated periods if it reads as noise in the payments list.

🤖 Generated with Claude Code

https://claude.ai/code/session_018jy52j9GRZ6XKa1Zt21LLj

A behaviour question left open by 1584eb3, worth a deliberate answer rather than inheriting the one that fell out of a bug fix. ## What changed and why `resolve_price` used to test `payday >= today` *before* the mode, so `manual` was silently ignored for any period not already back-dated — "pay at the rate we agreed" quietly didn't, which was the bug. A stated rate now wins unconditionally. ## The consequence `manual` is no longer just a back-dating correction: a contract set to `manual` with a rate converts **every** period at it, ignoring the market entirely. That is a fixed-rate contract, and it is a genuinely useful thing — a salary pegged to a rate both parties agreed — but it is a bigger feature than "let me correct one entry", and nothing in the UI presents it as such. ## Options 1. **Keep it.** Document fixed-rate contracts as a supported mode and say so in the dialog, e.g. "every payout converts at this rate". 2. **Contract-level `manual` only applies to back-dated periods**; per-payout override still applies always. Preserves the bug fix (an explicit override wins) without making a standing contract ignore the market. 3. **Drop contract-level `manual`** entirely — make it a pay-now / add-past-payout override only, and let contracts choose between `payday` and `current`. Option 1 is the current behaviour and the least code. Option 2 is the subtlest to explain. Worth deciding alongside #3, since a first-class "add a past payout" would take over most of what per-payout `manual` is for. ## Related Also unanswered: the memo now names the rate on **every** payout, including same-day ones where it is just "now". Valuable for a back-dated payout, arguably clutter otherwise — the clause is trivial to restrict to back-dated periods if it reads as noise in the payments list. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018jy52j9GRZ6XKa1Zt21LLj
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/payroll#6
No description provided.