@extends('layouts.master') @section('title', 'Work order | Alboosh - Timeless authenticity, born of the desert') @section('title-topbar', __('basic.work order')) @section('css') @endsection @section('fixedcontent')
@if (Session::has('success'))

Sent Successfully

{{ Session::get('success') }}

@endif @endsection @section('content')
{{ __('basic.dashboard') }} | {{ __('basic.work orders') }} | {{ __('basic.work order') }}
{{ $work_order->name }}
@if($work_order->invoice_id) {{ __('basic.invoice') }} @endif

{{ $work_order->start_at }}

{{ $work_order->name }}

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

{{ __('basic.worker') }}

{{ $work_order->worker->full_name }}

{{ __('basic.branch') }}

{{ $work_order->branch->name }}

{{ __('basic.end date') }}

{{ $work_order->end_at }}

{{ __('basic.current income') }}

{{ $work_order->current_income }} {{ $work_order->currency->code }}

{{ __('basic.current expenses') }}

{{ $work_order->current_expenses }} {{ $work_order->currency->code }}

{{ __('basic.budget') }}

{{ $work_order->budget }} {{ $work_order->currency->code }}

@php $expenses_percentage = ($work_order->current_expenses / $work_order->budget) * 100; @endphp
{{ $work_order->current_expenses }} {{ $work_order->currency->code }} ({{ $expenses_percentage }}%)
{{ $work_order->budget }} {{ $work_order->currency->code }}

@if($work_order->invoices) @foreach ($work_order->invoices as $item) @endforeach @endif
{{ __('basic.type') }} {{ __('basic.client') }} {{ __('basic.date') }} {{ __('basic.due date') }} {{ __('basic.worker') }} {{ __('basic.status') }} {{ __('basic.paid amount') }} {{ __('basic.total amount') }} {{ __('basic.handle') }}
@if($item->type == 0) @php $invoice_type_icon = "fas fa-plus text-green"; $invoice_type_text = __('basic.income'); @endphp @else @php $invoice_type_icon = "fas fa-minus text-red"; $invoice_type_text = __('basic.expenses'); @endphp @endif
{{ $invoice_type_text }}
@if($item->receivable_type === "App\Models\Patient\Patient") {{ $item->receivable->full_name }} @else {{ $item->receivable->company_name }} @endif {{ $item->inv_date }} @if($item->due_date) {{ $item->due_date }} @else {{ __('basic.no due date') }} @endif {{ $item->creator->full_name }} @if ($item->status == 0) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = __('basic.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 = 'prog-color-btn'; $msg_invoice = __('basic.installment'); @endphp @elseif ($item->status == 3) @php $text_color_invoice = 'done-color-btn'; $msg_invoice = __('basic.paid'); @endphp @elseif ($item->status == 4) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = __('basic.refund'); @endphp @endif {{ $msg_invoice }} {{ $item->total_paid . " " . $item->currency->code }}
{{ $item->final_price . " " . $item->currency->code }}
@if($work_order->payments) @foreach ($work_order->payments as $item) @endforeach @endif
{{ __('basic.name') }} {{ __('basic.date') }} {{ __('basic.treasury') }} {{ __('basic.to') }} {{ __('basic.current balance') }} {{ __('basic.status') }}
@if ($item->type == 0) @php $icon = "fas fa-plus"; $icon_color = "text-green"; @endphp @else @php $icon = "fas fa-minus"; $icon_color = "main-color"; @endphp @endif

{{ $item->code }}
{{ $item->receiver }}
{{ $item->paid_date}} @if($item->type == 0) @else @endif
{{ $item->amount .' ' . $item->currency->code}}
{{ $work_order->description }}
@endsection @section('js') @endsection