Net payable after withholdings
ClosingBridges a Spanish or Italian invoice total to what the customer actually transfers, each row labelled with its legal basis. IRPF (15%, or 7% for a new professional) comes off the base imponible and the ritenuta d'acconto (20%) off the fee plus rivalsa INPS, never off IVA. A cassa contribution carries IVA but stays out of the ritenuta base. Consumers are never withheld from. In Italy only a sostituto d'imposta withholds, and never from a forfettario supplier. The recargo de equivalencia follows the IVA rate. Split payment shows the IVA and then takes it off the net payable, and is refused alongside a ritenuta. The 2.00 € imposta di bollo applies over 77.47 € carrying no IVA and is added only when re-charged. Every amount is rounded to the cent in integer cents, in legal order, so the rows add up. Unclear data fails the document instead of guessing.
npx dxcl add net-payable-withholdings Данные предпросмотра
JSON, на котором построен этот предпросмотр{
"invoice": {
"country": "IT",
"base": "48650.00",
"vatPercent": "22",
"exemptAmount": "1285.40",
"stampRecharged": true
},
"supplier": {
"professional": true,
"cassaPercent": "4",
"cassaName": "Cassa Nazionale di Previdenza e Assistenza Forense"
},
"customer": {
"type": "business",
"withholdingAgent": true
}
} Отрисованный предпросмотр
каждая компоновка, отрисованная сама по себеarrangement="table" по умолчанию arrangement="stacked" Разрешённые узлы
что получает рендерер — узлов: 1net-payable section Файлы
что записывает установка; выбранный файл и есть компонентnodes/net-payable-withholdings.node.tsx import { arrange, Paragraph, Section, type Section as SectionComponent, useDeriver, useState } from "docxcelerate/template";
import type { NetPayableWithholdingsLines } from "../arrangements/net-payable-withholdings/lines.ts";
import { stacked } from "../arrangements/net-payable-withholdings/stacked.arrangement.tsx";
import { table } from "../arrangements/net-payable-withholdings/table.arrangement.tsx";
import netPayableWithholdings from "../derivers/net-payable-withholdings.deriver.ts";
/**
* How a Spanish or Italian invoice total becomes the amount the customer
* actually transfers: each step its own row, labelled with its legal basis,
* and the rows always add up. The decisions are already made here.
*
* Withholding comes off the base, never the VAT-inclusive total. IRPF is taken
* from the base imponible; the ritenuta d'acconto from the fee plus the 4%
* INPS rivalsa. A cassa contribution counts toward IVA but is not in the
* ritenuta base.
*
* A consumer is never withheld from. In Spain every business, professional or
* public-administration customer withholds; in Italy only a sostituto
* d'imposta does, and never from a forfettario supplier.
*
* Split payment still shows the IVA, as a charged row, and then takes it off
* the net payable. It is never shown as 0% IVA, and it cannot be combined with
* a ritenuta.
*
* The 2.00 EUR bollo is due when the amount carrying no IVA is over 77.47 EUR.
* It is added to the total only when re-charged; otherwise it is a note.
*
* Every amount is rounded to the cent on its own, half up, in integer cents,
* in legal order, each step on the rows above it, so the total and the net are
* figures a reader can check by adding the rows. Unclear or contradictory data
* fails the document: a guessed withholding gives a wrong payable either way.
*
* The labels are in the country's language whatever the document locale,
* because the mention requires the legal wording. All of it is one deriver,
* since every figure is arithmetic on request data and publishing refuses
* arithmetic. Rows are fixed slots, each printed by rule rather than by amount.
*
* Arrangement: where the rows sit is a separate choice, made with the
* `arrangement` prop. This file decides every row and note; each arrangement
* only places them.
*
* Installed by `dxcl add net-payable-withholdings`, which also installs its deriver.
*/
/** What this component reads. Add these fields to your document data type. */
export interface NetPayableWithholdingsData {
invoice: {
/** Whose rules apply: `ES` Spain, `IT` Italy. Required: anything else throws. */
country: "ES" | "IT";
/**
* The price or fee before any contribution, VAT, recargo or withholding,
* in euros: `"1000.00"`. Spain: the base imponible. Italy: the compenso or
* corrispettivo, before rivalsa INPS and cassa. Required: throws when
* missing, negative, or with more than two decimals. `"0"` is allowed.
*/
base: string | number;
/**
* The VAT rate as a percentage. ES: `"21"`, `"10"`, `"4"` or `"0"`. IT:
* `"22"`, `"10"`, `"5"`, `"4"` or `"0"`. `"0"` means no VAT is charged;
* the mention saying why belongs to `tax-treatment-notice`. Required,
* except for an Italian forfettario supplier, where it must be missing or
* `"0"`. Any other value throws.
*/
vatPercent?: string | number;
/**
* Expenses paid in the customer's name and re-charged at cost, outside VAT
* and withholding: suplidos in Spain, anticipazioni in Italy. Added to the
* total on its own row. Counts toward the Italian bollo trigger. Missing
* or `"0"` means none.
*/
exemptAmount?: string | number;
/**
* Italy only: the customer pays the IVA to the Treasury (art. 17-ter DPR
* 633/1972). IVA is shown, then deducted from the net payable. Throws when
* true and: the country is ES, the customer is a consumer, no IVA is
* charged, or a ritenuta applies.
*/
splitPayment?: boolean;
/**
* Italy only: the 2.00 EUR bollo is charged on and added to the total.
* Otherwise, when due, it is printed as a note. Throws when true in ES.
*/
stampRecharged?: boolean;
};
supplier: {
/**
* An individual doing professional work whose fees carry withholding.
* Missing means false, and nothing is withheld.
*/
professional?: boolean;
/**
* Spain only: withheld at 7% instead of 15%. The caller decides this.
* Throws when true without `professional`, or in Italy.
*/
newProfessional?: boolean;
/** Italy only: regime forfettario. No IVA, never a ritenuta. Throws in Spain when true. */
forfettario?: boolean;
/**
* Italy only: the supplier charges the 4% rivalsa INPS. Carries IVA and is
* in the ritenuta base. Throws with `cassaPercent`, and in Spain.
*/
rivalsaInps?: boolean;
/**
* Italy only: the cassa's contributo integrativo as a percentage, such as
* `"4"`. Carries IVA, not in the ritenuta base. Throws unless above 0 and
* at most 10 with up to two places, and in Spain.
*/
cassaPercent?: string | number;
/** The cassa's name as printed in its row. Ignored without `cassaPercent`. */
cassaName?: string;
};
customer: {
/** Who is paying. A `consumer` is never withheld from. Required. */
type: "business" | "consumer" | "public-administration";
/** Spain only: a retailer in the recargo de equivalencia buying goods. Throws in Italy when true. */
reRegime?: boolean;
/**
* Italy only: the customer is a sostituto d'imposta. Must be a boolean
* whenever a ritenuta could apply; missing then throws. Throws when true
* for a consumer. Ignored in Spain.
*/
withholdingAgent?: boolean;
};
}
/**
* Where the rows sit.
*
* - `table`: labels in a column with the figures right-aligned beside them.
* The default.
* - `stacked`: one `Label: figure` paragraph per row, for a narrow column.
*/
export type NetPayableWithholdingsArrangement = "table" | "stacked";
/** Props for {@linkcode NetPayableWithholdings}. */
export interface NetPayableWithholdingsProps {
/** Where the rows sit. Defaults to `"table"`. */
arrangement?: NetPayableWithholdingsArrangement;
}
export const NetPayableWithholdings: SectionComponent<NetPayableWithholdingsProps> = async ({ arrangement }) => {
const [invoice] = useState((data: NetPayableWithholdingsData) => data.invoice);
const [supplier] = useState((data: NetPayableWithholdingsData) => data.supplier);
const [customer] = useState((data: NetPayableWithholdingsData) => data.customer);
const p = await useDeriver(netPayableWithholdings, [invoice, supplier, customer]);
// Field by field: a spread of a derived stand-in is refused at publish.
const lines: NetPayableWithholdingsLines = {
baseLabel: p.baseLabel,
base: p.base,
rivalsaLabel: p.rivalsaLabel,
rivalsa: p.rivalsa,
cassaLabel: p.cassaLabel,
cassa: p.cassa,
vatLabel: p.vatLabel,
vat: p.vat,
reLabel: p.reLabel,
re: p.re,
exemptLabel: p.exemptLabel,
exempt: p.exempt,
stampLabel: p.stampLabel,
stamp: p.stamp,
totalLabel: p.totalLabel,
total: p.total,
withholdingLabel: p.withholdingLabel,
withholding: p.withholding,
splitPaymentLabel: p.splitPaymentLabel,
splitPayment: p.splitPayment,
netLabel: p.netLabel,
net: p.net,
};
return (
<Section id="net-payable" title={p.title}>
{arrange(arrangement, {
table: () => table(lines),
stacked: () => stacked(lines),
})}
{p.withholdingNote && <Paragraph id="net-payable-withholding-note">{p.withholdingNote}</Paragraph>}
{p.stampNote && <Paragraph id="net-payable-stamp-note">{p.stampNote}</Paragraph>}
</Section>
);
}; derivers/net-payable-withholdings.deriver.ts import { deriver } from "docxcelerate/template";
/**
* Settles an invoice total into what the customer transfers. Installed by
* `dxcl add net-payable-withholdings`.
*
* It is self-contained on purpose: it travels to the engine as source text, so
* a module-level helper or constant would be a ReferenceError there. Every
* parser, rate and label lives inside `run`.
*/
export default deriver({
name: "netPayableWithholdings",
run: (invoice: unknown, supplier: unknown, customer: unknown) => {
// deno-lint-ignore no-explicit-any
const inv = (invoice ?? {}) as any;
// deno-lint-ignore no-explicit-any
const sup = (supplier ?? {}) as any;
// deno-lint-ignore no-explicit-any
const cus = (customer ?? {}) as any;
const fail = (field: string, rule: string, got: unknown): never => {
throw new Error(
"netPayableWithholdings: " + field + " " + rule + "; got " + (got === undefined ? "undefined" : JSON.stringify(got)) + ".",
);
};
// A decimal with at most two places, to exact integer hundredths (cents, or
// basis points for a percentage), from the string and never by a float multiply.
const hundredths = (field: string, value: unknown): number => {
const s = typeof value === "number" ? String(value) : value;
if (typeof s !== "string" || !/^\d+(\.\d{1,2})?$/.test(s)) {
return fail(field, "must be a non-negative decimal with at most two places", value);
}
const [whole, frac = ""] = s.split(".");
return Number(whole) * 100 + Number((frac + "00").slice(0, 2));
};
// Half up and exact: every operand is a non-negative integer.
const pct = (cents: number, bp: number) => Math.floor((cents * bp + 5000) / 10000);
const given = (v: unknown) => v !== undefined && v !== null && v !== "";
// Validation, before any figure is computed.
const country: string = inv.country;
if (country !== "ES" && country !== "IT") fail("invoice.country", "must be ES or IT", inv.country);
const types = ["business", "consumer", "public-administration"];
if (!types.includes(cus.type)) fail("customer.type", "must be one of " + types.join(", "), cus.type);
const isES = country === "ES";
const consumer = cus.type === "consumer";
const B = hundredths("invoice.base", inv.base);
const E = given(inv.exemptAmount) ? hundredths("invoice.exemptAmount", inv.exemptAmount) : 0;
const other = (field: string, value: unknown, theirs: "ES" | "IT") => {
if (country === theirs && (value === true || (typeof value !== "boolean" && given(value)))) {
fail(field, "applies to " + (theirs === "ES" ? "IT" : "ES") + " only", value);
}
};
other("customer.reRegime", cus.reRegime, "IT");
other("supplier.newProfessional", sup.newProfessional, "IT");
other("supplier.forfettario", sup.forfettario, "ES");
other("supplier.rivalsaInps", sup.rivalsaInps, "ES");
other("supplier.cassaPercent", sup.cassaPercent, "ES");
other("invoice.splitPayment", inv.splitPayment, "ES");
other("invoice.stampRecharged", inv.stampRecharged, "ES");
const forfettario = sup.forfettario === true;
const professional = sup.professional === true;
const vatSet = isES ? ["21", "10", "4", "0"] : ["22", "10", "5", "4", "0"];
let vat = 0;
if (inv.vatPercent === undefined || inv.vatPercent === null) {
if (!forfettario) fail("invoice.vatPercent", "is required", inv.vatPercent);
} else {
if (!vatSet.includes(String(inv.vatPercent))) {
fail("invoice.vatPercent", "must be one of " + vatSet.join(", "), inv.vatPercent);
}
vat = Number(inv.vatPercent) * 100;
if (forfettario && vat !== 0) fail("invoice.vatPercent", "must be missing or 0 for a forfettario supplier", inv.vatPercent);
}
if (sup.newProfessional === true && !professional) {
fail("supplier.newProfessional", "requires supplier.professional", sup.newProfessional);
}
if (sup.rivalsaInps === true && given(sup.cassaPercent)) {
fail("supplier.rivalsaInps", "cannot be combined with supplier.cassaPercent", sup.rivalsaInps);
}
let cassaBp = 0;
if (given(sup.cassaPercent)) {
cassaBp = hundredths("supplier.cassaPercent", sup.cassaPercent);
if (cassaBp <= 0 || cassaBp > 1000) fail("supplier.cassaPercent", "must be above 0 and at most 10", sup.cassaPercent);
}
let agent = false;
if (!isES) {
const ritenutaPossible = professional && !forfettario && !consumer;
if (ritenutaPossible && typeof cus.withholdingAgent !== "boolean") {
fail("customer.withholdingAgent", "must be true or false when a ritenuta could apply", cus.withholdingAgent);
}
if (consumer && cus.withholdingAgent === true) {
fail("customer.withholdingAgent", "cannot be true for a consumer", cus.withholdingAgent);
}
agent = ritenutaPossible && cus.withholdingAgent === true;
}
const withheld = isES ? professional && !consumer : agent;
const split = inv.splitPayment === true;
if (split) {
if (consumer) fail("invoice.splitPayment", "is not available to a consumer", inv.splitPayment);
if (forfettario || vat === 0) fail("invoice.splitPayment", "needs IVA to be charged", inv.splitPayment);
if (withheld) fail("invoice.splitPayment", "cannot be combined with a ritenuta (art. 12 DL 87/2018)", inv.splitPayment);
}
// Figures, in legal order, each on the rows already rounded above it.
let rivalsa = 0, cassa = 0, T = B, V: number, re = 0, stamp = 0, stampDue = false;
if (isES) {
V = pct(B, vat);
if (cus.reRegime === true && vat > 0) {
re = pct(B, vat === 2100 ? 520 : vat === 1000 ? 140 : 50);
}
} else {
if (sup.rivalsaInps === true) rivalsa = pct(B, 400);
if (cassaBp > 0) cassa = pct(B, cassaBp);
T = B + rivalsa + cassa;
V = forfettario ? 0 : pct(T, vat);
// Strictly over 77.47 EUR carrying no IVA.
stampDue = E + (V === 0 ? T : 0) > 7747;
if (stampDue && inv.stampRecharged === true) stamp = 200;
}
const total = (isES ? B : T) + V + re + E + stamp;
let withholding = 0;
if (withheld) {
withholding = isES ? pct(B, sup.newProfessional === true ? 700 : 1500) : pct(B + rivalsa, 2000);
}
const splitPayment = split ? V : 0;
const net = total - withholding - splitPayment;
const nf = new Intl.NumberFormat(isES ? "es-ES" : "it-IT", { style: "currency", currency: "EUR" });
const fmt = (cents: number) => nf.format(cents / 100);
const rate = (bp: number) => String(bp / 100).replace(".", ",");
// These are the strings an owner edits: the legal wording, in the country's
// language whatever the document locale.
const text = isES
? {
title: "Total a pagar",
base: "Base imponible",
vat: "IVA " + rate(vat) + "% (" + (vat === 2100 ? "art. 90" : vat === 1000 ? "art. 91.Uno" : "art. 91.Dos") + " Ley 37/1992)",
exempt: "Suplidos (art. 78.Tres.3 Ley 37/1992)",
total: "Total factura",
withholding: "Retención IRPF " + (sup.newProfessional === true ? "7" : "15") + "% sobre " + fmt(B) + " (art. 101.5 Ley 35/2006)",
net: "Total a pagar",
}
: {
title: "Netto a pagare",
base: professional ? "Compenso" : "Corrispettivo",
vat: "IVA " + rate(vat) + "% su " + fmt(T) + " (art. 16 DPR 633/1972)",
exempt: "Spese anticipate in nome e per conto del cliente (art. 15 DPR 633/1972)",
total: "Totale documento",
withholding: "Ritenuta d'acconto 20% su " + fmt(B + rivalsa) + " (art. 25 DPR 600/1973)",
net: "Netto a pagare",
};
const rows = (on: boolean, label: string, cents: number) => ({
label: on ? label : null,
value: on ? fmt(cents) : null,
});
const vatRow = rows(vat > 0 && !forfettario, text.vat, V);
const reRow = rows(
isES && cus.reRegime === true && vat > 0,
"Recargo de equivalencia " + rate(vat === 2100 ? 520 : vat === 1000 ? 140 : 50) + "% (art. 161 Ley 37/1992)",
re,
);
const rivalsaRow = rows(sup.rivalsaInps === true, "Rivalsa INPS 4% (art. 1, c. 212, L. 662/1996)", rivalsa);
const cassaRow = rows(
cassaBp > 0,
"Contributo integrativo " + (given(sup.cassaName) ? sup.cassaName + " " : "") + rate(cassaBp) + "%",
cassa,
);
const exemptRow = rows(E > 0, text.exempt, E);
const stampRow = rows(stamp > 0, "Imposta di bollo (DPR 642/1972)", stamp);
const withholdingRow = rows(withheld, text.withholding, 0 - withholding);
const splitRow = rows(
split,
"IVA versata dal committente, scissione dei pagamenti (art. 17-ter DPR 633/1972)",
0 - splitPayment,
);
return {
title: text.title,
baseLabel: text.base,
base: fmt(B),
rivalsaLabel: rivalsaRow.label,
rivalsa: rivalsaRow.value,
cassaLabel: cassaRow.label,
cassa: cassaRow.value,
vatLabel: vatRow.label,
vat: vatRow.value,
reLabel: reRow.label,
re: reRow.value,
exemptLabel: exemptRow.label,
exempt: exemptRow.value,
stampLabel: stampRow.label,
stamp: stampRow.value,
totalLabel: text.total,
total: fmt(total),
withholdingLabel: withholdingRow.label,
withholding: withholdingRow.value,
splitPaymentLabel: splitRow.label,
splitPayment: splitRow.value,
netLabel: text.net,
net: fmt(net),
withholdingNote: !isES && forfettario && professional && !consumer
? "Compenso non soggetto a ritenuta d'acconto (art. 1, c. 67, L. 190/2014)."
: null,
stampNote: stampDue && stamp === 0
? "Imposta di bollo di " + fmt(200) + " assolta dall'emittente (DPR 642/1972)."
: null,
cents: {
base: B,
rivalsa,
cassa,
vat: V,
re,
exempt: E,
stamp,
total,
withholding,
splitPayment,
net,
},
};
},
}); arrangements/net-payable-withholdings/lines.ts /**
* What the net payable section hands each of its arrangements: every row it
* may print, already decided. An arrangement places these and decides
* nothing, so both print the same rows under the same conditions.
*
* A `null` label is a row this invoice does not carry. Test it in the JSX,
* `{lines.vatLabel && …}`, so the test is compiled into a condition the engine
* settles per document.
*
* Installed by `dxcl add net-payable-withholdings`, with the arrangements.
*/
export interface NetPayableWithholdingsLines {
/** The base row's label and figure: always present. */
baseLabel: string;
/** The base amount, formatted. */
base: string;
/** The rivalsa INPS row's label, or null when the supplier charges none. */
rivalsaLabel: string | null;
/** The rivalsa INPS amount, or null when there is no row. */
rivalsa: string | null;
/** The cassa previdenza row's label, or null when none applies. */
cassaLabel: string | null;
/** The cassa previdenza amount, or null when there is no row. */
cassa: string | null;
/** The VAT row's label, or null when no VAT is charged. */
vatLabel: string | null;
/** The VAT amount, or null when there is no row. */
vat: string | null;
/** The recargo di equivalencia row's label, or null when none applies. */
reLabel: string | null;
/** The recargo di equivalencia amount, or null when there is no row. */
re: string | null;
/** The VAT-exempt row's label, or null when nothing is exempt. */
exemptLabel: string | null;
/** The VAT-exempt amount, or null when there is no row. */
exempt: string | null;
/** The imposta di bollo row's label, or null when no stamp is charged. */
stampLabel: string | null;
/** The imposta di bollo amount, or null when there is no row. */
stamp: string | null;
/** The document total: always present. */
totalLabel: string;
/** The document total, formatted. */
total: string;
/** A deduction prints with a leading minus. */
withholdingLabel: string | null;
/** The withholding amount, or null when nothing is withheld. */
withholding: string | null;
/** The split-payment row's label, or null when it does not apply. */
splitPaymentLabel: string | null;
/** The IVA the customer pays directly, or null when it does not apply. */
splitPayment: string | null;
/** What the customer transfers: always present. */
netLabel: string;
/** The net payable, formatted. */
net: string;
} arrangements/net-payable-withholdings/table.arrangement.tsx import { Cell, Row, Table, Text, type Yield } from "docxcelerate/template";
import type { NetPayableWithholdingsLines } from "./lines.ts";
/**
* Labels in an auto-width column with the figures right-aligned in a 40 mm
* column, so the bridge adds up down the page. The default.
*/
export const table = (lines: NetPayableWithholdingsLines): Yield => (
<Table id="net-payable-lines" columns={[{ width: "auto" }, { width: 40, align: "right" }]}>
<Row id="net-payable-base">
<Cell>{lines.baseLabel}</Cell>
<Cell>{lines.base}</Cell>
</Row>
{lines.rivalsaLabel && (
<Row id="net-payable-rivalsa">
<Cell>{lines.rivalsaLabel}</Cell>
<Cell>{lines.rivalsa}</Cell>
</Row>
)}
{lines.cassaLabel && (
<Row id="net-payable-cassa">
<Cell>{lines.cassaLabel}</Cell>
<Cell>{lines.cassa}</Cell>
</Row>
)}
{lines.vatLabel && (
<Row id="net-payable-vat">
<Cell>{lines.vatLabel}</Cell>
<Cell>{lines.vat}</Cell>
</Row>
)}
{lines.reLabel && (
<Row id="net-payable-re">
<Cell>{lines.reLabel}</Cell>
<Cell>{lines.re}</Cell>
</Row>
)}
{lines.exemptLabel && (
<Row id="net-payable-exempt">
<Cell>{lines.exemptLabel}</Cell>
<Cell>{lines.exempt}</Cell>
</Row>
)}
{lines.stampLabel && (
<Row id="net-payable-stamp">
<Cell>{lines.stampLabel}</Cell>
<Cell>{lines.stamp}</Cell>
</Row>
)}
<Row id="net-payable-total">
<Cell>{lines.totalLabel}</Cell>
<Cell>{lines.total}</Cell>
</Row>
{lines.withholdingLabel && (
<Row id="net-payable-withholding">
<Cell>{lines.withholdingLabel}</Cell>
<Cell>{lines.withholding}</Cell>
</Row>
)}
{lines.splitPaymentLabel && (
<Row id="net-payable-split-payment">
<Cell>{lines.splitPaymentLabel}</Cell>
<Cell>{lines.splitPayment}</Cell>
</Row>
)}
<Row id="net-payable-net">
<Cell>{lines.netLabel}</Cell>
<Cell><Text bold>{lines.net}</Text></Cell>
</Row>
</Table>
); arrangements/net-payable-withholdings/stacked.arrangement.tsx import { Paragraph, Text, type Yield } from "docxcelerate/template";
import type { NetPayableWithholdingsLines } from "./lines.ts";
/** One `Label: figure` paragraph per row, for a narrow column. */
export const stacked = (lines: NetPayableWithholdingsLines): Yield => (
<>
<Paragraph id="net-payable-base">{lines.baseLabel}: {lines.base}</Paragraph>
{lines.rivalsaLabel && (
<Paragraph id="net-payable-rivalsa">{lines.rivalsaLabel}: {lines.rivalsa}</Paragraph>
)}
{lines.cassaLabel && (
<Paragraph id="net-payable-cassa">{lines.cassaLabel}: {lines.cassa}</Paragraph>
)}
{lines.vatLabel && (
<Paragraph id="net-payable-vat">{lines.vatLabel}: {lines.vat}</Paragraph>
)}
{lines.reLabel && (
<Paragraph id="net-payable-re">{lines.reLabel}: {lines.re}</Paragraph>
)}
{lines.exemptLabel && (
<Paragraph id="net-payable-exempt">{lines.exemptLabel}: {lines.exempt}</Paragraph>
)}
{lines.stampLabel && (
<Paragraph id="net-payable-stamp">{lines.stampLabel}: {lines.stamp}</Paragraph>
)}
<Paragraph id="net-payable-total">{lines.totalLabel}: {lines.total}</Paragraph>
{lines.withholdingLabel && (
<Paragraph id="net-payable-withholding">{lines.withholdingLabel}: {lines.withholding}</Paragraph>
)}
{lines.splitPaymentLabel && (
<Paragraph id="net-payable-split-payment">{lines.splitPaymentLabel}: {lines.splitPayment}</Paragraph>
)}
<Paragraph id="net-payable-net">{lines.netLabel}: <Text bold>{lines.net}</Text></Paragraph>
</>
);