@extends('layouts.layoutapp') @section('content')
@csrf
New Purchase

Add the materials purchased, then enter what was paid.

Purchase List
@if (session('error'))
{{ session('error') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- HEADER --}}
The number printed on the supplier's own bill. @error('bill_no') {{ $message }} @enderror
{{-- MATERIAL ROWS --}}
# Material Quantity Buying Amount Amount
Total ? 0.00
{{-- PAYMENT --}}
Leave blank or 0 if nothing is paid yet.
Materials 0

Total ? 0.00
Paying Now ? 0.00

Balance ? 0.00
Cancel
@endsection @push('scripts') @php $productOptions = $products->map(function ($p) { $useNative = $p->branch && $p->branch->native_name_flag == 'A' && $p->native_name; return [ 'id' => $p->id, 'label' => $useNative ? $p->native_name : $p->name, 'code' => $p->code, 'rate' => (float) ($p->margin_price ?? 0), ]; })->values()->toJson(); @endphp @endpush