@php
$editing = isset($customer);
$selectedTransporterIds = collect(old(
'transporter_ids',
$editing ? $customer->transporters->pluck('id')->all() : []
))->map(fn ($id) => (string) $id)->all();
@endphp
{{-- NEW: MSME Input --}}
Manage
Choose all transporters preferred by this customer. Leave empty to allow every transporter on invoices.
@error('transporter_ids')
{{ $message }}
@enderror
@error('transporter_ids.*')
{{ $message }}
@enderror
@php
$partyTypes = [
'sales' => 'Sales',
'purchase' => 'Purchase',
'both' => 'Both (Sales & Purchase)',
];
@endphp
@php
$paymentTypes = [
'cash' => '100% Advance',
'credit' => '15 Days Credit',
];
@endphp
@php
$showBillingCustomerMap = ($companyMode ?? null) === 'cash'
|| old('mode_type', $customer->mode_type ?? null) === 'cash';
@endphp
@if($showBillingCustomerMap)
@endif
@php
$existing = $customer->shippingAddresses ?? collect();
$oldRows = old('shipping_addresses', []);
@endphp
@foreach ($existing as $i => $addr)
@php $old = $oldRows[$i] ?? [] @endphp
@endforeach
{{-- Opening Balance (only on create) --}}
@if(!$editing)
Opening Balance (per Company)
Enter opening balance for each company. Leave amount empty or 0 to skip. Fiscal year is auto-calculated from date (April-March).
@endif
@push('scripts')
@endpush