@extends('layouts.panel') @section('title', 'تامینکننده: ' . $supplier->name) @section('content')
مشاهده جزئیات حسابداری
| ردیف | تاریخ | شرح تراکنش | بدهکاری | بستانکاری | مانده | عملیات |
|---|---|---|---|---|---|---|
| {{ $rowNumber }} | {{ jdate($entry['date'])->format('Y/m/d') }} | {{ $entry['description'] }} | @php $d = (float)($entry['debit'] ?? 0); @endphp {!! $d > 0 ? number_format($d) . ' تومان' : '——' !!} | @php $c = (float)($entry['credit'] ?? 0); @endphp {!! $c > 0 ? number_format($c) . ' تومان' : '——' !!} | {{ $runningBalance >= 0 ? '+' : '' }}{{ number_format($runningBalance) }} تومان |
@if(($entry['type'] ?? '') === 'debt')
@php
$debtModel = \App\Models\Accounting\AccountingDebt::find($entry['debt_id'] ?? null);
$purchaseRequestId = $debtModel?->purchase_request_id;
$purchaseRequestUrl = null;
if ($purchaseRequestId) {
// اگر صفحه در پنل کارشناس خرید باشد
if (request()->is('purchase/*')) {
// روت کارشناس خرید
$purchaseRequestUrl = route('purchase.purchase-requests.show', $purchaseRequestId);
} else {
// پیشفرض: پنل مدیریت
$purchaseRequestUrl = route('admin.purchase-requests.show', $purchaseRequestId);
}
}
@endphp
@if($purchaseRequestUrl)
مشاهده
@else
@endif
@elseif(!empty($entry['transaction_id']))
@endif
|
| تراکنشی یافت نشد. | ||||||
| مانده کل: | {{ $runningBalance >= 0 ? '+' : '' }}{{ number_format($runningBalance) }} تومان | |||||