@extends('layouts.master') @section('title', 'Debtors | Alboosh - Timeless authenticity, born of the desert') @section('title-topbar', __('basic.supplier file')) @section('css') @endsection @section('content')
{{ __('basic.dashboard') }} | {{ __('basic.debtors') }} | {{ __('basic.debtor file') }}
@role('Super-admin|Accountant-manager') {{ __('basic.delete') }} @endrole
{{ __('basic.supplier file') }}

{{ __('basic.id') }} {{ $debtor->new_id }}

{{ $debtor->full_name }}

{{ __('basic.code') }} {{ $debtor->code }}

{{ __('basic.company name') }}

{{ $debtor->company_name }}



@if(count($debtor->menu_cats) > 0) @foreach ($debtor->menu_cats as $item_menu)
{{ $item_menu->name }}
{{ __('basic.new product') }}
@if($item_menu->products) @foreach ($item_menu->products as $item) {{-- products --}}
...

{{ $item->name }}

{{ $item->barcode }}

{{ $item->quantity }}

{{ $item->unit->name }}

{{ $item->sell_price }}

{{ $currency }}

@endforeach
@endif @endforeach @else

{{ __('basic.no product found') }}

@endif
{{-- invoice --}}
@foreach ($invoice as $item) @if ($item->status == 0) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = 'Not Paid'; @endphp @elseif ($item->status == 1) @php $text_color_invoice = 'pend-color-btn'; $msg_invoice = __('basic.pending'); @endphp @elseif ($item->status == 2) @php $text_color_invoice = 'done-color-btn'; $msg_invoice = 'Paid'; @endphp @endif @endforeach
{{ __('basic.name') }} {{ __('basic.branch') }} {{ __('basic.amount') }} {{ __('basic.status') }}
{{ $item->code }} {{ $item->branch->name }} @if (!empty($item->final_price)) {{ $item->final_price }} EGP @endif {{ $msg_invoice }}
{{-- invoice --}}
@foreach ($debtor->wallet_reco as $item) @if ($item->type == 0) @php $text_color = 'main-color-btn'; $msg = __('basic.add'); @endphp @elseif ($item->type == 1) @php $text_color = 'cancel-color-btn'; $msg = __('basic.withdraw'); @endphp @endif @endforeach
{{ __('basic.type') }} {{ __('basic.service') }} {{ __('basic.balance before') }} {{ __('basic.amount') }} {{ __('basic.balance after') }} {{ __('basic.branch') }} {{ __('basic.note') }}
{{ __('basic.total') }} {{ $debtor->wallet_reco->sum('amount') }} EGP
{{ $msg }} @if ($item->wallet_serviceable) @if($item->wallet_serviceable->booking) {{ $item->wallet_serviceable->name }} @else {{ $item->wallet_serviceable->name }} @endif @else {{ __('basic.new balance') }} @endif {{ $item->balance_before_tran }} EGP {{ $item->amount }} EGP {{ $item->balance_before_tran - $item->amount }} EGP {{ $item->branch->name }} {{ $item->note }}
{{-- invoice --}}
@foreach ($debtor->booking as $item) @if ($item->status == 0) @php $text_color = 'not_accepted-color-btn'; $msg = __('patientappo.not accepted'); @endphp @elseif ($item->status == 1) @php $text_color = 'main-color-btn'; $msg = __('patientappo.accepted'); @endphp @elseif ($item->status == 2) @php $text_color = 'active-color-btn'; $msg = __('broker inquire'); @endphp @elseif ($item->status == 3) @php $text_color = 'prog-color-btn'; $msg = __('traveler payment'); @endphp @elseif ($item->status == 4) @php $text_color = 'done-color-btn'; $msg = __('received payment'); @endphp @elseif ($item->status == 5) @php $text_color = 'pend-color-btn'; $msg = __('send a payment to broker'); @endphp @elseif ($item->status == 6) @php $text_color = 'prog-color-btn'; $msg = __('broker confirm'); @endphp @elseif ($item->status == 7) @php $text_color = 'done-color-btn'; $msg = __('patientappo.done'); @endphp @elseif ($item->status == 8) @php $text_color = 'cancel-color-btn'; $msg = __('patientappo.canceled'); @endphp @endif @if ($item->note_doctor) @php $icon_note = 'fa-user-check text-blue-400'; @endphp @else @php $icon_note = 'fa-user-edit text-grey-400'; @endphp @endif @endforeach
{{ __('basic.booking number') }} {{ __('basic.branch') }} {{ __('basic.file id') }} {{ __('basic.client') }} {{ __('basic.worker') }} {{ __('basic.status') }} {{ __('basic.sell to') }} {{ __('basic.buy') }} {{ __('basic.sell') }} {{ __('basic.net income') }} {{ __('basic.created') }} {{ __('basic.last update') }}
{{ $item->code }} @if($item->branch) {{ $item->branch->name }} @else {{ __('basic.not selected') }} @endif {{ $item->file_id }} @if($item->patient) {{ $item->patient->first_name }} @else {{ __('basic.not selected') }} @endif @isset($item->creator->first_name) {{ $item->creator->first_name }} @endisset {{ $msg }} @if($item->sell_debtor) {{ $item->sell_debtor->company_name }} @else {{ __('basic.not selected') }} @endif {{ $item->total_buy_price }} {{ $item->total_sell_price }} {{ $item->total_sell_price - $item->total_buy_price }} {{ date('Y-m-d', strtotime($item->created_at)) }}
{{ date('h:i a', strtotime($item->created_at)) }}
{{ date('Y-m-d', strtotime($item->updated_at)) }}
{{ date('h:i a', strtotime($item->updated_at)) }}
@role('Super-admin|Accountant-manager') @endrole @endsection @section('js') {{-- Add new product --}} @endsection