Ensures GR/returns no longer fail without a profile; cash/bank selection appears by payment method. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.6 KiB
XML
48 lines
1.6 KiB
XML
"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,
|
||
},
|
||
]}
|
||
/>
|
||
);
|
||
}
|