Add multi-line sale builder with pending-draft safeguard

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Beccue
2026-05-16 12:57:49 +05:00
parent 9d756e2940
commit 00ee9fb1fe
10 changed files with 809 additions and 0 deletions

View File

@ -0,0 +1,10 @@
import { error } from '@sveltejs/kit';
import { getInvoice } from '$lib/server/invoices.js';
export function load({ params }) {
const result = getInvoice(params.id);
if (!result || result.invoice.status !== 'saved') {
throw error(404, 'Invoice not found');
}
return result;
}