feat(transactions): pick several ROT/RUT begäran by hand for one Skatteverket transfer (#2431)

The manual invoice picker's ROT/RUT section handed over exactly one
begäran, while the route, the settle service and the confirm dialog take
a bundle since #2360. When the automatic set matcher refuses a transfer
(two open begäran with the same amount, or more than four), the user had
no way to build the bundle and was told to split the bank row.

Each begäran row now carries a checkbox; ticking one or more shows the
running sum against the bank row and a "Matcha valda" button that hands
the set (largest first, the matcher's order) to the existing confirm
dialog, which still refuses a sum that is off the row. A plain row click
keeps the one-begäran path.

Part of #2425 (the suggestion itself shipped in #2271 and #2360).


Claude-Session: https://claude.ai/code/session_0179bdetHyofL6ATfQxB5wP5

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-09-08 21:05:52 +02:00
committed by GitHub
co-authored by Jakob Wennberg Claude Fable 5.1
parent d5373cd66c
commit 5e2498bc2f
5 changed files with 109 additions and 33 deletions
+7 -6
View File
@@ -2713,15 +2713,16 @@ export default function TransactionsPage() {
setMatchDialogOpen(true)
}
function handleSelectRotRutPayoutFromPicker(request: PotentialRotRutPayoutRequest) {
if (!invoicePickerTransaction) return
// Same handoff as the invoice pick: close the picker, hang the request on
// the row and open the ROT/RUT confirm dialog so the user sees the
// 19xx / 1513 entry before it is booked.
function handleSelectRotRutPayoutFromPicker(requests: PotentialRotRutPayoutRequest[]) {
if (!invoicePickerTransaction || requests.length === 0) return
// Same handoff as the invoice pick: close the picker, hang the begäran
// (one, or the bundle the user ticked) on the row and open the ROT/RUT
// confirm dialog so the user sees the 19xx / 1513 entry before it is
// booked. The dialog refuses a bundle whose sum is off the row.
const tx = invoicePickerTransaction
setInvoicePickerOpen(false)
setInvoicePickerTransaction(null)
setSelectedTransaction({ ...tx, potential_rot_rut_payout: { requests: [request] } })
setSelectedTransaction({ ...tx, potential_rot_rut_payout: { requests } })
setRotRutMatchDialogOpen(true)
}