خطا
@endif
-
@foreach ($errors->all() as $error)
- {{ $error }} @endforeach
| {{ __('home.Invoice_no') }} | {{ __('home.sallerName') }} | {{ __('home.clietName') }} | {{ __('home.quantity_thobe') }} | {{ __('home.date') }} | {{ __('home.branch') }} | {{ __('home.total') }} | مدين (الرصيد الحالي) | {{ __('home.thobe_status') }} | {{ __('home.operations') }} |
|---|---|---|---|---|---|---|---|---|---|
| {{ $product->id }} | {{ $product->user->name ?? 'N/A' }} | {{ $product->customer->name ?? '' }} | {{ $product->sales->sum('quantity') }} | {{ $product->created_at->format('Y-m-d H:i') }} | {{ $product->branch->name ?? '' }} | {{ number_format($totalPrice, 2) }} | @php // جلب رصيد العميل الحالي من الحساب المالي المرتبط به $currentBalance = 0; if($product->customer && $product->customer->financial_account) { $account = $product->customer->financial_account; // حساب الصافي (مدين - دائن) $currentBalance = $account->credit_transactions->where('save', 1)->sum('debtor') - $account->credit_transactions->where('save', 1)->sum('creditor'); } @endphp{{ number_format($currentBalance, 2) }} | {{ $statusText }} |
@if($product->customer && $product->customer->financial_account)
@endif
{{ __('home.show') }}
|
Fatal error: Uncaught Error: Class "App\Models\Avt" not found in /home/ebdea/public_html/khuyut.ebdea.online/resources/views/reports/customerpurchases.blade.php:258 Stack trace: #0 {main} thrown in /home/ebdea/public_html/khuyut.ebdea.online/resources/views/reports/customerpurchases.blade.php on line 258