{{-- a manual document for one customer (slice 4ب, flow م۵): the five kinds as links on top, and the form of ONE kind — it renders exactly App\Ledger\ManualDocument::FIELDS[$kind] and nothing else (+PARTIAL-SAVE twin). «ادامه» goes to the preview with the balances after; nothing is written before «ثبت سند» there. a refusal comes back here with its reason under the field, and a duplicate reference links the earlier document (flow م۵ table). --}} @extends('layouts.mz') @section('title', 'سند دستی') @section('credit', '1') @section('nav') @include('panel._nav') @endsection @php $has = fn (string $field) => in_array($field, $fields, true); $adjustment = $kind === \App\Models\LedgerEntry::KIND_ADJUSTMENT; @endphp @section('content')

سند دستی برای {{ $customer->name }}

برگشت به صفحهٔ مشتری
@if ($customer->status !== \App\Models\Customer::STATUS_ACTIVE) {{-- debt 14 (owner plan question 2): a document is still allowed — settling an inactive customer's account is real work --}}

این مشتری غیرفعال است: وارد اپ نمی‌شود و معامله‌ای برایش ثبت نمی‌شود، ولی سند دستی (مثلاً تسویهٔ بدهی) هنوز ثبت می‌شود.

@endif @include('ledger._balances') @if ($errors->any()) @endif
@csrf

{{ $kinds[$kind] }}

@error('kind')

{{ $message }}

@enderror @if ($adjustment)

سند اصلاحی ماندهٔ مشتری را بی معامله جابه‌جا می‌کند؛ برای اصلاح یک سند اشتباه، فقط اختلاف را بنویسید. ماندهٔ اول دوره هم با همین سند و گزینهٔ «ماندهٔ افتتاحیه» وارد می‌شود.

@endif @if ($has('amount'))
@error('amount')

{{ $message }}

@enderror
@endif @if ($has('rial_direction'))
جهت مبلغ @error('rial_direction')

{{ $message }}

@enderror
@endif @if ($has('metal')) {{-- slice 5د۱ (decision 85): the document's metal; its balance unit follows (gold 750, silver 999) --}}
فلز {{-- slice 5ه۱ (owner plan question 11): each coin product, counted (its weight and purity stay empty) --}} @foreach ($coins as $coinOption) @endforeach @error('metal')

{{ $message }}

@enderror
@endif @if ($has('weight'))
@error('weight')

{{ $message }}

@enderror
در هزار. ماندهٔ طلا به گرم ۷۵۰ و ماندهٔ نقره به گرم ۹۹۹ نگه داشته می‌شود و معادلش را سرور حساب می‌کند؛ وزن و عیار واقعی روی سند می‌ماند. برای سکه وزن را خالی بگذارید. @error('purity')

{{ $message }}

@enderror
@endif @if ($has('count') && $coins !== []) {{-- slice 5ه۱: only when the seller has a coin product to choose above --}}
اگر بالا سکه را انتخاب کردید، تعداد را اینجا بنویسید و وزن را خالی بگذارید؛ برای طلا و نقره این خانه خالی بماند. @error('count')

{{ $message }}

@enderror
@endif @if ($has('metal_direction'))
جهت وزن یا تعداد @error('metal_direction')

{{ $message }}

@enderror
@endif
{{ $adjustment ? 'شماره‌ای برای همین سند پیشنهاد شده است؛ اگر سند مرجع دیگری دارد، آن را بنویسید.' : 'مثلاً شمارهٔ پیگیری بانک یا شمارهٔ رسید. هر شماره فقط یک بار پذیرفته می‌شود.' }} @error('reference')

{{ $message }} @if (session('mz.existing')) دیدن همان سند @endif

@enderror
@error('memo')

{{ $message }}

@enderror
انصراف
@endsection