TorbatYar/frontend/app/accounting/sales/pre-receipts/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 ambiguous Unicode characters

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="sales"
docType="pre_receipt"
createLabel="پیش‌دریافت جدید"
fields={[
{ key: "party", label: "مشتری", kind: "party", module: "sales" },
{ 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,
},
]}
/>
);
}