Partial-receipt flows call confirmReceipt multiple times. The nested `create` on the Receipt relation threw a unique-constraint error on the second call when both confirmations supplied notes, preventing any delivery from completing and blocking attachment uploads. Changed to `upsert` so subsequent confirmations update the existing Receipt row's notes instead of failing. Adds integration tests covering full receipt, partial receipt, the upsert scenario (two confirmations each with notes), and permission guards. Fixes #9 |
||
|---|---|---|
| .. | ||
| edit | ||
| receipt | ||
| actions.ts | ||
| page.tsx | ||
| vendor-id-form.tsx | ||