{client !== undefined ? (
{client.code} · {client.name}
) : (
setQ(e.target.value)} />
{hits.length > 0 && (
{hits.slice(0, 8).map((c) => (
))}
)}
)}
{(['QUOTATION', 'PROFORMA', 'INVOICE'] as const).map((t) => (
))}
{docType === 'INVOICE' && (
{ setDueDate(e.target.value); commit() }}
/>
)}
Lines
{lines.map((l, i) => {
const mod = modules.data?.find((m) => m.id === l.moduleId)
const prices = pricesByModule[l.moduleId] ?? []
const editions = editionsOf(prices)
const priceGap = warnings.some((w) => mod !== undefined && w.includes(mod.code))
return (
{editions.length > 1 && (
)}
setLine(i, { qty: e.target.value })} onBlur={commit} />
setLine(i, { unitRs: e.target.value })} onBlur={commit} />
setLine(i, { description: e.target.value })} onBlur={commit} />
{lines.length > 1 && (
)}
)
})}
{modules.error !== undefined &&
{modules.error}}
{error !== undefined &&
{error}}
)
if (narrow) {
return (
<>
{form}
{/* pinned bar never disappears — always shows Payable + GST + Preview */}