UNPKG

@eristack/qups

Version:

Quantity / unit price / subtotal (QUPS) with 2-of-3 sources of truth, plus modifiers and tax — business line pricing on @eristack/money

13 lines • 705 B
import type { CalculateLineInput, CalculatedLine } from "./calculate.js"; export type QupsCellField = "quantity" | "unitPrice" | "subtotal" | "truth" | "taxRatePercent" | "taxMode" | "currency"; export type ApplyCellPatchOptions = { round?: boolean; /** When patching `subtotal`, keep this SoT partner. */ prefer?: "quantity" | "unitPrice"; }; /** * Spreadsheet cell commit → `patchLine` with QUPS truth roles. * Maps grid field keys to `PatchLineInput` — no DOM, no React. */ export declare function applyCellPatch(line: CalculatedLine | CalculateLineInput, field: QupsCellField, value: string, options?: ApplyCellPatchOptions): CalculatedLine; //# sourceMappingURL=cell-patch.d.ts.map