@extends('layouts.app') @section('title', 'Transaksi Penjualan Baru') @section('content') @php $penjualan = new \App\Models\Penjualan(['metode' => 'cash']); @endphp
@csrf
1. Unit & Pembeli
@php $unitTerpilih = old('unit_rumah_id', $selectedUnit); $perumahanTerpilih = old('perumahan_id', $units->firstWhere('id', $unitTerpilih)?->perumahan_id); $daftarPerumahan = $units->groupBy('perumahan_id')->map(fn ($list) => $list->first()->perumahan)->sortBy('nama'); $dataUnit = $units->map(fn ($u) => [ 'id' => $u->id, 'perumahan_id' => $u->perumahan_id, 'label' => $u->label, 'tipe' => $u->tipe, 'lt' => $u->luas_tanah, 'lb' => $u->luas_bangunan, 'kt' => $u->kamar_tidur, 'km' => $u->kamar_mandi, 'harga' => (int) $u->harga, 'ket' => $u->keterangan, ])->values(); @endphp
@if($units->isEmpty())Tidak ada unit yang tersedia.@endif
Baru
2. Harga & Skema Pembayaran
@include('penjualan._fields')
3. Booking Fee (opsional)
Akan tercatat otomatis sebagai pembayaran pertama.
Batal
@endsection @push('styles') @endpush @push('scripts') @endpush @push('scripts') @endpush