| Server IP : 172.67.168.138 / Your IP : 216.73.216.227 [ Web Server : Apache System : Linux frog 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web13 ( 5017) PHP Version : 8.3.31 Disable Function : NONE Domains : 41 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/clients/client12/web13/web/ahelos/resources/views/layouts/backend/orders/ |
Upload File : |
@extends('layouts.backend.index', ['module_title' => 'Информация за поръчка'])
@section('content')
@if (session('success'))
<div class="alert alert-success form-group">
{{ session('success') }}
</div>
@endif
<div id="order-detail">
<div id="order-information" class="card card-primary">
<div class="card-header">
<h5 class="header-title mb-0">Основна информация</h5>
</div>
<div class="card-body text-sm">
<div class="row">
<div class="col-sm-4">
<span class="title">Информация за поръчка</span>
<ul>
<li>
<strong>Номер на поръчка:</strong>
<span>#{{ $order->id }}</span>
</li>
<li>
<strong>Тип на поръчката:</strong>
@if ($order->type == 1)
<span class="badge bg-purple align-self-center">Обикновенна</span>
@elseif($order->type == 2)
<span class="badge bg-primary align-self-center">Бърза</span>
@endif
</li>
<li>
<strong>Дата на създаване:</strong>
<span>{{ $order->created_at }}</span>
</li>
<li>
<strong>Статус:</strong>
<span class="badge {{ $order->statusBgClass() }} align-self-center">{{ $order->status() }}</span>
</li>
</ul>
<form id="status-from" action="{{ route('change_order_status', $order->id) }}" method="post">
@csrf
<div class="row">
<div class="col-md-2point5 pr-0">
<label for="status" style="padding-top:6px">Нов статус</label>
</div>
<div class="form-group col-md-5point5">
<select class="form-control" name="status">
<option value="">- Избери -</option>
<option value="1">Нова</option>
<option value="2">Изпратена</option>
<option value="3">Обработва се</option>
<option value="4">Доставена</option>
<option value="5">Изчакваща</option>
<option value="6">Отказана</option>
<option value="7">Върната</option>
</select>
</div>
<div class="form-group col-md-4 text-right">
<button type="submit" class="btn btn-primary">Смени статус</button>
</div>
</form>
</div>
</div>
<div class="col-sm-4">
<form class="order-client-information" action="{{ route('update_order_info', $order->id) }}" method="post" autocomplete="off">
@csrf
<span class="title">
Информация за клиент
<button type="button" class="btn btn-default btn-xs edit-client-info" name="button">
<i class="fa fa-edit"></i>
</button>
<a class="btn btn-default btn-xs float-right mt-1" href="{{ route('users.show', $order->user_id) }}" target="_blank">Профил</a>
</span>
<ul>
<li>
<strong>Имена:</strong>
<span class="label">{{ $order->fname }} {{ $order->lname }}</span>
<input type="text" class="input form-control w-25 ml-auto mr-2 @error('fname') is-invalid @enderror" name="fname" value="{{ $order->fname }}" placeholder="Име" style="display:none">
<input type="text" class="input form-control w-25 @error('lname') is-invalid @enderror" name="lname" value="{{ $order->lname }}" placeholder="Фамилия" style="display:none">
</li>
<li>
<strong>Email:</strong>
<span class="label">{{ $order->email }}</span>
<input type="email" class="input form-control w-50 @error('email') is-invalid @enderror" name="email" value="{{ $order->email }}" placeholder="Email" style="display:none">
</li>
<li>
<strong>Телефон:</strong>
<span class="label">{{ $order->phone }}</span>
<input type="text" class="input form-control w-50 @error('phone') is-invalid @enderror" name="phone" value="{{ $order->phone }}" placeholder="Телефон" style="display:none">
</li>
<li>
<strong>Куриер:</strong>
<span class="label">{{ ($order->address->courier == 1) ? 'Speedy' : 'Econt' }}</span>
<select class="input form-control w-50 " name="courier" style="display:none">
<option value="">- Избери -</option>
<option value="1">Speedy</option>
<option value="2">Econt</option>
</select>
</li>
<li>
<strong>Град:</strong>
<span class="label">{{ $order->address->city }} {{ $order->address->zip }}</span>
<input type="text" class="input form-control ml-auto mr-2 @error('city') is-invalid @enderror" name="city" value="{{ $order->address->city }}" placeholder="Град" style="display:none; width:30%">
<input type="text" class="input form-control @error('zip') is-invalid @enderror" name="zip" value="{{ $order->address->zip }}" placeholder="ПК" style="display:none; width:20%">
</li>
<li class="input" style="display:none">
<strong>Доставка до:</strong>
<select class="form-control w-50 order_shipping_to @error('shipping_to') is-invalid @enderror" name="shipping_to">
<option value="">- Избери -</option>
<option value="1">Адрес</option>
<option value="2">Офис</option>
</select>
</li>
<li class="shipping_to_address" style="display:none">
<strong>Адрес:</strong>
<input type="text" class="form-control w-50" name="address" value="{{ $order->address->address }}">
</li>
<li class="shipping_to_address" style="display:none">
<div>
<strong>No:</strong>
<input type="text" class="form-control w-75" name="no" value="{{ $order->address->no }}">
</div>
<div>
<strong>Блок:</strong>
<input type="text" class="form-control w-75" name="block" value="{{ $order->address->block }}">
</div>
<div>
<strong>Вход:</strong>
<input type="text" class="form-control w-75" name="entrance" value="{{ $order->address->entrance }}">
</div>
<div>
<strong>Етаж:</strong>
<input type="text" class="form-control w-75" name="floor" value="{{ $order->address->floor }}">
</div>
<div>
<strong>Ап №:</strong>
<input type="text" class="form-control w-75" name="apartment_no" value="{{ $order->address->apartment_no }}">
</div>
</li>
<li class="shipping_to_office" style="display:none">
<strong>Офис:</strong>
<input type="text" class="form-control w-50" name="office" value="{{ $order->address->office }}">
</li>
<li>
<strong>{{ ($order->address->shipping_to == 1) ? 'Адрес' : 'Офис' }}:</strong>
@if ($order->address->shipping_to == 1)
<span>
{{ $order->address->address }}
@if (!is_null($order->address->no))
No: {{ $order->address?->no }},
@endif
@if (!is_null($order->address->block))
Блок: {{ $order->address?->block }} ,
@endif
@if (!is_null($order->address->entrance))
Вход: {{ $order->address?->entrance }}
@endif
@if (!is_null($order->address->floor))
Етаж: {{ $order->address?->floor }},
@endif
@if (!is_null($order->address->apartment_no))
Ап №: {{ $order->address?->apartment_no }}
@endif
</span>
@endif
@if ($order->address->shipping_to == 2)
<span>{{ $order->address->office }}</span>
@endif
</li>
@if ($order->note != '')
<li>
<strong>Забележка от клиент:</strong>
<span>{{ $order->note }}</span>
</li>
@endif
</ul>
@if($order->invoice)
<span class="title">Информация за фактура</span>
<ul>
<li>
<strong>Име на фирмата: </strong>
<span>{{ $order->invoice->company_name }}</span>
</li>
<li>
<strong>МОЛ: </strong>
<span>{{ $order->invoice->company_owner }}</span>
</li>
<li>
<strong>Град: </strong>
<span>{{ $order->invoice->company_city }}</span>
</li>
<li>
<strong>Адрес: </strong>
<span>{{ $order->invoice->company_address }}</span>
</li>
<li>
<strong>Булстат: </strong>
<span>{{ $order->invoice->company_number }}</span>
</li>
@if($order->invoice->company_vat)
<li>
<strong>ДДС номер: </strong>
<span>{{ $order->invoice->company_vat }}</span>
</li>
@endif
</ul>
@endif
<div class="form-group input text-right" style="display:none">
<button type="sumbit" class="btn btn-primary">Обнови</button>
</div>
</form>
</div>
<div class="col-sm-4 notes-box">
<span class="title">Бележка</span>
@foreach($order->notes as $key => $note)
<div class="message">
<span class="number">{{ $key+1 }}</span>
<strong class="admin">{{ $note->admin->name }}</strong>
<span class="date">{{ $note->created_at->format('d.m.Y H:i') }}</span>
<p>{{ $note->note }}</p>
</div>
@endforeach
<form class="" action="{{ route('add_order_note', $order->id) }}" method="post">
@csrf
<div class="form-group">
<textarea name="note" class="form-control" ></textarea>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Добави</button>
</div>
</form>
</div>
</div>
</div>
</div>
@if($order->card?->id > 0)
@if($order->card->is_paid == 1)
@php
$paid_sum = $order->card->paid_sum;
$order_sum = $order->total_sum;
@endphp
<div id="card_payment" style="background: #6f6f6f; color: #fff; padding: 20px; text-align: center;">
<h3> ВНИМАНИЕ!!! Поръчката е платена с карта.</h3>
<strong>Номер на транзкация: {{ $order->card->txnid }}</strong><br>
<strong>Референтен номер: {{ $order->card->ref_num }}</strong><br>
<strong>Сума на поръчката: {{ $order_sum }} лв.</strong><br>
<strong>Платена сума: {{ $paid_sum }} лв.</strong>
</div>
@endif
@if($order->card->is_paid == 0)
<div id="card_payment" style="background: #a30000; color: #fff; padding: 20px; text-align: center;">
<h3>Внимание!!! Поръчката е незавършена. Моля проверете дали сумата е внесена в банката и се свържете за доуточнение с клиента.</h3>
Номер на транзакция: <?php echo $order->card->txnid ?>
</div>
@endif
@endif
{{-- <div class="row">
<div class="col-md-8">
<div class="card card-primary">
<div class="card-header">
<h5 class="card-title">Информация за товарителница</h5>
</div>
<div class="card-body">
<form id="shipping-form" action="{{ route('update_shipping_info', $order->id) }}" method="post" autocomplete="off">
@csrf
<span class="form-title w100">Адрес за доставка</span>
<div class="row">
<div class="col-md-2 text-right">
<label for="">Град <strong class="text-danger">*</strong></label>
</div>
<div class="col-md-4">
<input id="city" type="text" class="form-control form-control-sm" name="city" value="">
</div>
<div class="col-md-1 text-right">
<label for="">ПК <strong class="text-danger">*</strong></label>
</div>
<div class="col-md-2">
<input id="zip" type="text" class="form-control form-control-sm" name="zip" value="">
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Улица/кварал</label>
</div>
<div class="col-md-4">
<input id="address" type="text" class="form-control form-control-sm" name="address" value="">
</div>
<div class="col-md-1 text-right">
<label for="">No</label>
</div>
<div class="col-md-2">
<input type="text" class="form-control form-control-sm" name="no" value="">
</div>
<div class="w-100 form-group"></div>
<div class="col-md-1 text-right">
<label for="">Блок</label>
</div>
<div class="col-md-1">
<input type="text" class="form-control form-control-sm" name="block" value="">
</div>
<div class="col-md-1 text-right">
<label for="">Вход</label>
</div>
<div class="col-md-1">
<input type="text" class="form-control form-control-sm" name="entrance" value="">
</div>
<div class="col-md-1 text-right">
<label for="">Етаж</label>
</div>
<div class="col-md-1">
<input type="text" class="form-control form-control-sm" name="floor" value="">
</div>
<div class="col-md-1 text-right">
<label for="">ап.No</label>
</div>
<div class="col-md-1">
<input type="text" class="form-control form-control-sm" name="apartment_no" value="">
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Уточнение</label>
</div>
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" name="description" value="">
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Доставка до Офис</label>
</div>
<div class="col-md-4">
<select id="office_select" class="form-control form-control-sm" name="office_id">
<option value="">- Избери -</option>
</select>
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Преглед</label>
</div>
<div class="col-md-4">
<select class="form-control form-control-sm" name="test_option">
<option value="OPEN">Преглед</option>
<option value="TEST">Преглед и тест</option>
</select>
</div>
<div class="w-100 form-group"></div>
<span class="form-title w-100">Допълнителни данни за товарителницата </span>
<div class="col-md-2 text-right">
<label for="">Чупливо</label>
</div>
<div class="col-md-4">
<select class="form-control form-control-sm" name="fragile">
<option value="0">Не</option>
<option value="1">Да</option>
</select>
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Съботен разнос</label>
</div>
<div class="col-md-4">
<select class="form-control form-control-sm" name="saturday_delivery">
<option value="0">Не</option>
<option value="1">Да</option>
</select>
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Съдържание <strong class="text-danger">*</strong></label>
</div>
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" name="contents" value="">
</div>
<div class="col-md-2 text-right">
<label for="">Пакети <strong class="text-danger">*</strong></label>
</div>
<div class="col-md-2">
<input type="text" class="form-control form-control-sm" name="packages" value="">
</div>
<div class="w-100 form-group"></div>
<div class="col-md-2 text-right">
<label for="">Сума на товарителница <strong class="text-danger">*</strong></label>
</div>
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" name="amount" value="">
</div>
</div>
<div class="mt-3">
<button type="submit" class="btn btn-primary" name="save_shipping_information">Запази тези данни за товарителницата</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card card-primary">
<div class="card-header">
<h5 class="card-title">Товарителница</h5>
</div>
<div class="card-body">
@if (!is_null($order->shipping))
<div class="alert alert-warning">
<i class="fas fa-exclamation-triangle"></i> Няма генерирана товарителница!
</div>
@endif
</div>
</div>
</div>
</div> --}}
<div class="row">
<div class="col-md-8">
<div id="order-products" class="card card-primary">
<div class="card-header">
<h5 class="card-title">Поръчани продукти </h5>
</div>
<div class="card-body">
@if (session('order_product'))
<div class="alert alert-success form-group">
{{ session('order_product') }}
</div>
@endif
<table class="table table-sm text-sm">
<thead>
<tr>
<th colspan="2" width="50%">Продукт</th>
<th class="text-center">Брой</th>
{{-- <th class="text-center">Категория</th> --}}
<th class="text-center" width="15%">Ед. цена</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach ($order->products as $product)
<tr>
<td>
<img class="img-fluid" src="{{ asset('storage/products/resized/'.$product->info->photo) }}" alt="" width="100">
</td>
<td>
<a class="product-name" href="#" target="_black">{{ $product->info->translation->title }}</a>
<div class="order-list-options">
<ul class="product-info-options">
<li class="item-option">
<strong class="item-name">Артикул No:</strong>
<span class="item-value">{{ $product->product_id }}</span>
</li>
<li class="item-option">
<strong class="item-name">Марка:</strong>
<span class="item-value">{{ $product->info->brand->title }}</span>
</li>
</ul>
</div>
</td>
<td class="text-center">{{ $product->qty }} бр.</td>
{{-- <td class="text-center">
{{ $product->info->category->translation->title }}
<small class="d-block">{{ $product->info->subcategory->translation->title }}</small>
</td> --}}
<td class="text-center">
@money($product->price, 'EUR', true)
</td>
<td class="text-right">
<form class="d-inline-block" action="{{ route('product_remove_order', [$order->id, $product->id]) }}#order-products" method="post">
@csrf
<button type="submit" name="delete"
class="btn btn-danger btn-sm"
data-toggle="confirmation"
data-placement="left"
data-title="Изтриване?"
data-btn-ok-label="Да"
data-btn-ok-class="btn btn-sm btn-success"
data-btn-cancel-label="Не"
data-btn-cancel-class="btn btn-sm btn-danger">
<i class="fas fa-trash-alt" aria-hidden></i>
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<th class="text-right">Сума продукти:</th>
<td colspan="2" width="38%">@money($order->products->sum('price'), 'EUR', true)</td>
</tr>
<tr>
<td colspan="3"></td>
<th class="text-right">Доставка:</th>
<td colspan="2" width="38%">
@money($order->shipping, 'EUR', true)
<span class="btn btn-warning btn-xs edit-shipping">
<i class="fa fa-edit"></i>
</span>
<form id="edit-shipping-form" class="d-none" action="{{ route('update_shipping_price', $order->id) }}#order-products" method="post" autocomplete="off">
@csrf
<input type="text" class="form-control shipping-input w-25 d-inline-block" name="shipping" value="{{ $order->shipping }}">
<button type="submit" class="btn btn-success btn-sm">Обнови</button>
</form>
</td>
</tr>
<tr>
<td colspan="3"></td>
<th class="text-right">Обща сума:</th>
<td colspan="2" width="38%">@money($order->products->sum('price') + $order->shipping, 'EUR', true)</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card card-primary">
<div class="card-header">
<h5 class="card-title">Добавяне на продукт към поръчка</h5>
</div>
<div class="card-body">
<form id="order-search-product" action="{{ route('order_search_product', $order->id) }}" method="post" autocomplete="off">
@csrf
<div class="row">
<div class="col-md-8">
<label for="">ID или продуктов код </label>
<input type="text" class="form-control product-keyword" name="keyword" value="" required>
</div>
<div class="col-md-4 align-self-end">
<button type="submit" class="btn btn-primary">Намери продукт</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection