22 lines
546 B
TypeScript
22 lines
546 B
TypeScript
import type { Op } from "@/domain/types";
|
|
|
|
let seq = 0;
|
|
|
|
/** Opération de test : ACTUAL, 50/50 entre H et C, sans affectation, sauf surcharge. */
|
|
export function op(partial: Partial<Op> & Pick<Op, "kind" | "amount" | "accountUserId">): Op {
|
|
seq += 1;
|
|
return {
|
|
id: `op${seq}`,
|
|
date: "2026-10-15",
|
|
label: "test",
|
|
categoryId: "cat",
|
|
status: "ACTUAL",
|
|
split: { H: 5000, C: 5000 },
|
|
recurringId: null,
|
|
allocatedToRecurringId: null,
|
|
allocatedToOperationId: null,
|
|
allocationMode: null,
|
|
...partial,
|
|
};
|
|
}
|