Rebuild the Classic template on the engine with A4/Letter and a template harness

Classic now renders through buildRenderModel, computeFrame, the template
and renderCore, with S.No and HSN/SAC columns, GST slots only through
checked Slot components, taxable value, reverse-charge line, cancelled tag,
continuation band and Page n of N. Letter absorbs its height deficit in
elastic gaps. A harness runs 15 fixtures on A4 and Letter plus an item
sweep and asserts zero audit errors, repeated headers, no split blocks,
rupee extraction and deterministic output. The legacy InvoiceDocument is
removed.
This commit is contained in:
2026-10-04 05:31:14 +05:30
parent e2032a3f9c
commit fa4d711dc0
40 changed files with 2185 additions and 832 deletions
+13
View File
@@ -0,0 +1,13 @@
import type { TemplateDefinition } from "./contract";
import { classic } from "./classic";
export const TEMPLATES: Record<string, TemplateDefinition> = {
classic,
};
export const DEFAULT_TEMPLATE_ID = "classic";
/** The template for an id; an unknown id (a template removed later, a corrupt pref) falls back to Classic. */
export function getTemplate(id: string | undefined): TemplateDefinition {
return (id !== undefined ? TEMPLATES[id] : undefined) ?? TEMPLATES[DEFAULT_TEMPLATE_ID];
}