@extends('layouts.app') @section('title', 'فاتورة ' . $sale->reference) @section('page_title', 'فاتورة ' . $sale->reference) @section('breadcrumb') @endsection @section('content')
بنود الفاتورة
@foreach ($sale->lines as $l) @endforeach
الصنفالوحدةالتشغيلةالكميةالسعرالخصمالضريبةالإجمالى
{{ $l->item->name }} {{ $l->item->code }} {{ $l->unit->name }} {{ $l->batch?->batch_number ?? '—' }} @if($l->batch?->expiry_date){{ $l->batch->expiry_date->format('Y-m-d') }}@endif {{ $l->quantity_in_unit }} {{ number_format($l->unit_price, 2) }} {{ number_format($l->discount_amount, 2) }} {{ number_format($l->tax_amount, 2) }} {{ number_format($l->total, 2) }}
@if ($sale->payments->count())
المدفوعات
@foreach ($sale->payments as $p) @endforeach
التاريخالطريقةالمرجعالمبلغ
{{ $p->payment_date->format('Y-m-d H:i') }} {{ $p->method }} {{ $p->reference ?? '—' }} {{ number_format($p->amount, 2) }}
@endif @can('sales.pay') @if (in_array($sale->status, ['confirmed', 'partial_paid']) && $sale->balance_due > 0)
إضافة دفعة
@csrf
@endif @endcan
الملخّص

الصيدلية: {{ $sale->pharmacy->name }}

العميل: {{ $sale->customer?->name ?? 'عابر' }}

الكاشير: {{ $sale->user?->name ?? '—' }}

التاريخ: {{ $sale->sale_date?->format('Y-m-d H:i') }}

الحالة: {{ $sale->status }}

ETA: {{ $sale->eta_status }} @if($sale->eta_uuid)
{{ $sale->eta_uuid }}@endif


الإجمالى الفرعى{{ number_format($sale->subtotal, 2) }}
الخصم{{ number_format($sale->total_discount, 2) }}
الضريبة{{ number_format($sale->tax_amount, 2) }}
الإجمالى{{ number_format($sale->total, 2) }}
المدفوع{{ number_format($sale->paid_amount, 2) }}
المتبقى{{ number_format($sale->balance_due, 2) }}
@endsection