@extends('layouts.admin') @section('title', 'Debit Note '.$debitNote->debit_note_number) @section('page-title', 'Debit Note '.$debitNote->debit_note_number) @section('breadcrumbs') Debit Notes chevron_right {{ $debitNote->debit_note_number }} @endsection @section('content')

{{ $debitNote->debit_note_number }}

{{ $debitNote->debit_note_date?->format('M d, Y') ?? '—' }} · {{ $debitNote->status }}

Purchase
@if($debitNote->purchase) {{ $debitNote->purchase->purchase_number }} @else — @endif
Order date
{{ $debitNote->order_date?->format('M d, Y') ?? '—' }}
Payment
{{ str_replace('_', ' ', $debitNote->payment_method ?? 'cash') }}
Bill from
{{ $debitNote->company?->name ?? '—' }}
Supplier
{{ $debitNote->supplier?->name ?? '—' }}
Created by
{{ $debitNote->creator?->name ?? '—' }}

Company

{{ $debitNote->company?->name }}

@if($debitNote->company)
@if($debitNote->company->email)

{{ $debitNote->company->email }}

@endif @if($debitNote->company->phone)

{{ $debitNote->company->phone }}

@endif
@endif

Supplier

{{ $debitNote->supplier?->name }}

@if($debitNote->supplier)
@if($debitNote->supplier->email)

{{ $debitNote->supplier->email }}

@endif @if($debitNote->supplier->phone)

{{ $debitNote->supplier->phone }}

@endif
@endif
@if($debitNote->items->isNotEmpty())

Line items

@foreach($debitNote->items as $line) @endforeach
Description Unit Qty Rate Discount Tax % Amount
{{ $line->description }} {{ $line->unit ?? '—' }} {{ $line->quantity }} {{ \App\Models\Currency::formatAmount((float) $line->rate) }} {{ \App\Models\Currency::formatAmount((float) $line->discount) }} {{ $line->tax_rate }} {{ \App\Models\Currency::formatAmount((float) $line->amount) }}
@endif
Subtotal

{{ \App\Models\Currency::formatAmount((float) $debitNote->amount) }}

Tax

{{ \App\Models\Currency::formatAmount((float) $debitNote->tax_amount) }}

Discount

{{ \App\Models\Currency::formatAmount((float) $debitNote->discount_amount) }}

Total

{{ \App\Models\Currency::formatAmount((float) $debitNote->total) }}

@if($debitNote->notes || $debitNote->terms)
@if($debitNote->notes)

Notes

{{ $debitNote->notes }}

@endif @if($debitNote->terms)

Terms

{{ $debitNote->terms }}

@endif
@endif @if($debitNote->signature)

Signature

{{ $debitNote->signature->name }}

@endif
@push('scripts') @endpush @endsection