fix(reconcile): prevent split/tag double-counting on reconciled transactions
Move splits, tags and overrides from manual to statement side on reconcile (delete from manual after copying) instead of just copying. Add read-time filter to exclude reconciled manual transactions from balance and shared transaction queries. Also adds participant filter to shared expenses page.
This commit is contained in:
@@ -10,6 +10,8 @@ export async function GET(req: NextRequest) {
|
||||
const rawIds = tagParam ? tagParam.split(",").filter(Boolean) : [];
|
||||
const noTags = rawIds.includes("untagged");
|
||||
const tagIds = rawIds.filter((id) => id !== "untagged").map(Number).filter((n) => !isNaN(n));
|
||||
const transactions = await getSharedTransactions(user.id, tagIds.length ? tagIds : undefined, noTags);
|
||||
const participantParam = req.nextUrl.searchParams.get("participant_id");
|
||||
const participantId = participantParam ? Number(participantParam) : undefined;
|
||||
const transactions = await getSharedTransactions(user.id, tagIds.length ? tagIds : undefined, noTags, participantId);
|
||||
return NextResponse.json(transactions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user