TorbatYar/frontend/app/accounting/purchase/prepayments/page.tsx
Mortezakoohjani 9e1fcd9176 Auto-create default purchase posting profile and complete prepayment treasury fields.
Ensures GR/returns no longer fail without a profile; cash/bank selection appears by payment method.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 20:03:39 +03:30

48 lines
1.6 KiB
XML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client";
import { SpecializedOpsPage } from "@/components/accounting/SpecializedOpsPage";
export default function Page() {
return (
<SpecializedOpsPage
title="پیش‌پرداخت‌ها"
description="پیش‌پرداخت به تأمین‌کننده — روش پرداخت و صندوق/حساب بانکی را مشخص کنید."
module="purchase"
docType="prepayment"
createLabel="پیش‌پرداخت جدید"
fields={[
{ key: "party", label: "تأمینکننده", kind: "party", module: "purchase" },
{ key: "amount", label: "مبلغ", kind: "money" },
{ key: "due_date", label: "سررسید", kind: "date" },
{
key: "method",
label: "روش پرداخت",
kind: "select",
options: [
{ value: "cash", label: "نقد / صندوق" },
{ value: "bank", label: "حواله بانکی" },
{ value: "cheque", label: "چک" },
],
},
{
key: "cash_box_id",
label: "صندوق",
kind: "cash_box",
showWhen: { key: "method", value: "cash" },
},
{
key: "bank_account_id",
label: "حساب بانکی",
kind: "bank_account",
showWhen: { key: "method", value: "bank" },
},
{
key: "cheque_number",
label: "شماره چک",
kind: "text",
showWhen: { key: "method", value: "cheque" },
required: false,
},
]}
/>
);
}