@extends('layouts.app', ['page' => 'Record Payment', 'pageSlug' => 'raw-material-purchases', 'section' => 'raw-material-purchases']) @section('content')

Record Payment for Purchase

@if ($errors->any())

Please fix the following errors:

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
Purchase Details
Purchase Date: {{ $rawMaterialPurchase->purchase_date->format('Y-m-d') }}
Raw Material: {{ $rawMaterialPurchase->rawMaterial->name }}
Supplier: {{ $rawMaterialPurchase->provider->name }}
Total Amount: {{ number_format($rawMaterialPurchase->total_amount, 2) }}
Amount Paid: {{ number_format($rawMaterialPurchase->payments->sum('amount'), 2) }}
Remaining Balance: {{ number_format($rawMaterialPurchase->remaining_balance, 2) }}
@csrf
@error('payment_date') {{ $message }} @enderror
@error('amount') {{ $message }} @enderror
@error('payment_method_id') {{ $message }} @enderror
@error('reference_number') {{ $message }} @enderror
@error('notes') {{ $message }} @enderror
@endsection