feat(assets): dönemsel rapor, net varlık ve aynî kayıt bağlantısı

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 00:19:05 +03:00
parent 20e5a90df4
commit 9a60085d14
9 changed files with 806 additions and 19 deletions
+6
View File
@@ -101,9 +101,15 @@ export const paymentFormSchema = z
quantity: z.preprocess(emptyToNull, quantity.nullable()),
amount: optionalMoney,
accountId: z.preprocess(emptyToNull, objectId.nullable()),
/** Aynı varlıkla ödemede bağlanacak varlık (Faz 9b): borçta varlıktan düşer, alacakta eklenir. */
assetId: z.preprocess(emptyToNull, objectId.nullable()).default(null),
note: z.string().trim().max(300).default(""),
})
.superRefine((x, ctx) => {
if (x.assetId && x.method !== "asset")
ctx.addIssue({ code: "custom", path: ["assetId"], message: k.assetOnlyWithAsset });
if (x.assetId && x.amount)
ctx.addIssue({ code: "custom", path: ["amount"], message: k.noAmountWithAsset });
if (x.method === "asset" && x.quantity === null)
ctx.addIssue({ code: "custom", path: ["quantity"], message: k.quantity });
if (x.method === "cash") {