@extends('backend.layout.main') @push('css') @endpush @section('content') @if (session('message'))
{{ session('message') }}
@endif
{{-- Hidden template for a payment block (cloned by JS) --}}
{{-- Page Header --}}
  {{ __('db.parts_billing') }} {{ $job->reference_no }}
{{ __('db.customer') }}: {{ optional($job->customer)->name }}  ·  {{ __('db.Warehouse') }}: {{ optional($job->warehouse)->name }}  ·  {!! $job->status_badge !!} {!! $job->priority_badge !!}
{{ __('db.view_job') }} {{ __('db.all_jobs') }}
{{-- PARTS --}}
{{ __('db.parts_items_used') }}
{{ __('db.duplicates_merge') }}
{{ __('db.product_already_added') }}
@forelse($job->items as $idx => $item) @empty @endforelse
# {{ __('db.product') }} {{ __('db.Quantity') }} {{ __('db.Unit Price') }} {{ __('db.Total') }}
{{ $idx + 1 }}
{{ optional($item->product)->name }}
{{ optional($item->product)->code }}
{{ number_format($item->total, config('decimal')) }}
{{ __('db.search_product_to_add') }}
{{ __('db.parts_total') }} {{ number_format($job->items->sum('total'), config('decimal')) }}
{{-- SERVICE CHARGES --}}
{{ __('db.service_charges') }}
{{ __('db.totals_update_after_saving') }}
{{-- PAYMENTS --}}
{{ __('db.payments_received') }}
{{-- Payment Blocks --}}
{{-- First block injected by JS on ready --}}
@forelse($job->payments as $idx => $p) @empty @endforelse
# {{ __('db.date') }} {{ __('db.Amount') }} {{ __('db.Method') }} {{ __('db.Account') }} {{ __('db.reference') }} {{ __('db.Note') }}
{{ $idx + 1 }} {{ $p->payment_at ? $p->payment_at->format(config('date_format')) : '—' }} {{ number_format($p->amount, config('decimal')) }} {{ $p->paying_method }} @if($p->account_id) {{ optional($p->account)->name ?? '—' }} @else @endif {{ $p->payment_reference ?? '—' }} {{ $p->payment_note ?? '—' }}
{{ __('db.no_payments_yet') }}
{{ __('db.Paid Amount') }} {{ number_format($job->payments->sum('amount'), config('decimal')) }}
{{-- col-md-8 --}}
{{-- Billing Summary --}}
{{ __('db.billing_summary') }}
{{ __('db.parts_total') }} {{ number_format($job->items->sum('total'), config('decimal')) }}
{{ __('db.service_charge') }} {{ number_format($job->service_charge, config('decimal')) }}
{{ __('db.Discount') }} − {{ number_format($job->discount, config('decimal')) }}
{{ __('db.Tax') }} {{ number_format($job->tax, config('decimal')) }}
{{ __('db.grand total') }} {{ number_format($job->total_amount, config('decimal')) }}
{{ __('db.Due') }} {{ number_format($job->due_amount, config('decimal')) }}
@if($job->due_amount <= 0) {{ __('db.fully_paid') }} @else {{ __('db.amount_due') }} @endif
{{-- Job Info --}}
{{ __('db.job_info') }}
@if($job->expected_delivery_date) @endif
{{ __('db.reference') }}{{ $job->reference_no }}
{{ __('db.Type') }}{{ ucfirst($job->service_type) }}
{{ __('db.title') }}{{ $job->title }}
{{ __('db.customer') }}{{ optional($job->customer)->name }}
{{ __('db.Warehouse') }}{{ optional($job->warehouse)->name }}
{{ __('db.status') }}{!! $job->status_badge !!}
{{ __('db.expected_delivery') }}{{ $job->expected_delivery_date->format(config('date_format')) }}
{{-- Print Modal --}} @endsection @push('scripts') @endpush