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:
@@ -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];
|
||||
}
|
||||
Reference in New Issue
Block a user