Merge pull request #680 from Luca-Timo/fix/invoice-pdf-multipage

Fix/invoice pdf multipage
This commit is contained in:
Paul Nothaft
2026-06-28 22:17:07 +02:00
committed by GitHub
12 changed files with 337 additions and 41 deletions
@@ -675,7 +675,8 @@ export const BillEditorPage: React.FC = () => {
<Card>
<h3 className="font-semibold mb-2">{t('bills.section.lineItems', 'Line items')}</h3>
<LineItemsTable items={lineItems} currency={currency} showDiscount={false}
vatRate={vatRate / 100} shippingAmount={shipping} onChange={setLineItems} />
vatRate={vatRate / 100} shippingAmount={shipping}
roundTotal={appSettings?.crm_invoice_round_total === true} onChange={setLineItems} />
<div className="grid grid-cols-1 md:grid-cols-3 gap-3 mt-4">
<VatRateSelect
label={t('bills.field.vatRate', 'VAT rate %') as string}
@@ -621,6 +621,7 @@ export const QuoteEditorPage: React.FC = () => {
showDiscount={true}
vatRate={form.vatRate / 100}
shippingAmount={form.shippingAmount}
roundTotal={appSettings?.crm_invoice_round_total === true}
presets={liPresets?.presets || []}
onChange={(items) => setForm((f) => ({ ...f, lineItems: items }))}
/>
@@ -28,6 +28,7 @@ const SETTING_KEYS = [
'crm_quotes_tos_text',
'crm_quotes_tos_url',
'crm_invoices_qr_enabled',
'crm_invoice_round_total',
'crm_invoices_reminders_enabled',
'crm_invoices_reminder_first_days',
'crm_invoices_reminder_second_days',
@@ -249,6 +250,7 @@ export const CrmSettingsPage: React.FC = () => {
<Card>
<h3 className="font-semibold mb-3">{t('crmSettings.section.invoices', 'Invoices')}</h3>
{checkbox('crm_invoices_qr_enabled', 'Render payment QR on invoice PDFs')}
{checkbox('crm_invoice_round_total', 'Reconcile sub-cent rounding to a clean total (adds a "Rundung" row when per-line rounding drifts from qty × rate)')}
{/* Reminder TIMING: owned by the Invoice dunning workflow when the
engine is live (callout); otherwise the legacy schedule controls. The