From 5fcb96c723a3e5bdf2e93ff3786dfb7ba77b3d24 Mon Sep 17 00:00:00 2001
From: Luca <102960244+Luca-Timo@users.noreply.github.com>
Date: Fri, 12 Jun 2026 16:41:06 +0200
Subject: [PATCH] =?UTF-8?q?fix(accounting):=20PDF=20pager=20always=20shown?=
=?UTF-8?q?,=20click=20categorized=E2=86=92pay,=20drop=20duplicate=20Paid?=
=?UTF-8?q?=20chip?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
#1 DocumentPreview renders the page pager for every PDF (disabled at the ends),
not only multi-page ones — so the control is visible on single-page invoices.
#2 Clicking a categorized (unpaid) invoice opens the Mark-paid dialog; new →
categorize, paid/declined/duplicate → view.
#3 A paid row no longer shows two 'Paid' chips — the front badge is the status,
and the right action becomes a quiet 'Mark unpaid' (revert).
---
frontend/src/i18n/locales/de.json | 1 +
frontend/src/i18n/locales/en.json | 1 +
.../admin/accounting/AccountingInboxPage.tsx | 23 +++++++++++++++----
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json
index 426c3c8a..89256a55 100644
--- a/frontend/src/i18n/locales/de.json
+++ b/frontend/src/i18n/locales/de.json
@@ -3563,6 +3563,7 @@
"payTitle": "Lieferant als bezahlt markieren",
"outstanding": "Offen",
"markPaid": "Als bezahlt markieren",
+ "markUnpaid": "Als unbezahlt markieren",
"confirmPaid": "Als bezahlt markieren",
"paid": "Bezahlt",
"paidToast": "Als bezahlt markiert.",
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index 5045fabc..9d5fcae1 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -3563,6 +3563,7 @@
"payTitle": "Mark supplier paid",
"outstanding": "Outstanding",
"markPaid": "Mark paid",
+ "markUnpaid": "Mark unpaid",
"confirmPaid": "Mark paid",
"paid": "Paid",
"paidToast": "Marked as paid.",
diff --git a/frontend/src/pages/admin/accounting/AccountingInboxPage.tsx b/frontend/src/pages/admin/accounting/AccountingInboxPage.tsx
index 9938e8f2..69b54223 100644
--- a/frontend/src/pages/admin/accounting/AccountingInboxPage.tsx
+++ b/frontend/src/pages/admin/accounting/AccountingInboxPage.tsx
@@ -9,7 +9,7 @@ import React, { useRef, useState, useEffect } from 'react';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'react-i18next';
import { toast } from 'react-toastify';
-import { Camera, Upload, Inbox, X, CheckCircle2, Circle, Eye } from 'lucide-react';
+import { Camera, Upload, Inbox, X, Circle, Eye, RotateCcw } from 'lucide-react';
import { Button, Card, CardContent, Input, LocalizedDateInput, Loading } from '../../../components/common';
import { DecimalInput } from '../../../components/common/DecimalInput';
import { CustomerAccountPicker, type SelectedCustomer } from '../../../components/admin/CustomerAccountPicker';
@@ -68,7 +68,9 @@ const DocumentPreview: React.FC<{ doc: InboundDocument; maxHeight?: string; init
: imgUrl ?
: