@use('App\Services\Date') @php use Carbon\Carbon; @endphp @extends('sales::layouts.exporting.print.master-local-style') @section('title', __('sales::estimates.show_estimate')) @section('koolreport') @foreach($estimates as $estimate) @php $color = $estimate['formDesign']->color ?? getenv('DEFAULT_ESTIMATION_COLOR'); $subdomain = request()->route()->parameter('subdomain'); $is_student = app(\Hyn\Tenancy\Repositories\HostnameRepository::class)->findByHostname($subdomain)->website->company->is_student; @endphp
getLocale() == 'en') style="position: relative; direction:ltr;" @else style="position: relative; direction:rtl;" @endif> @if($is_student) @include('draft') @endif
{{__('sales::estimates.reference_id')}}:
{{isset($estimate['estimate'])? $estimate['estimate']->code : $estimate['formDesign']->reference}}
{{__('sales::estimates.description')}} :
{{isset($estimate['estimate'])? $estimate['estimate']->description : ".................."}}
{{__('sales::estimates.customer')}} :
{{isset($estimate['estimate'])? $estimate['estimate']->customer->name : ".................."}}
{{ __('sales::estimates.phone')}} :
@if(isset($estimate['estimate'])) @php $mobile = $estimate['estimate']->customer->mobile ? str_replace("+", "00", App\Enums\PhoneCode::get($estimate['estimate']->customer->country_code)) . '-' . $estimate['estimate']->customer->mobile : '' @endphp @else
..................
@endif
@if($estimate['formDesign']->customer_email)
{{ __('sales::estimates.email')}}:
@if(isset($estimate['estimate'])) {{$estimate['estimate']->customer->email}} @else .................. @endif
@endif @if($estimate['formDesign']->customer_tax_number)
{{__('sales::customers.Tax Number')}}:
{{isset($estimate['estimate'])? $estimate['estimate']->customer->tax_number : ".................."}}
@endif
{{__('sales::estimates.issue_date')}} :
{{isset($estimate['estimate'])? Date::format($estimate['estimate']->issue_date) : ".................."}}
{{__('sales::estimates.due_date')}}:
{{isset($estimate['estimate'])? Date::format($estimate['estimate']->due_date) : ".................."}}
@php $counterOfColumn=9; if(!$estimate['formDesign']->product_description) { $counterOfColumn--; } if(!$estimate['formDesign']->discount) { $counterOfColumn--; } if(!$estimate['formDesign']->unit) { $counterOfColumn--; } if(!$estimate['formDesign']->tax_amount) { $counterOfColumn--; } if(!$estimate['formDesign']->product_image) { $counterOfColumn--; } @endphp @if($estimate['formDesign']->product_image) @if($description && !isset($estimate['estimate'])) @elseif($description && isset($estimate['checkDesc']) && count($estimate['checkDesc']) > 0) @endif @if($estimate['formDesign']->unit) @endif @if($estimate['formDesign']->discount) @endif @if($estimate['formDesign']->tax_amount) @endif @if(isset($estimate['estimate'])) @foreach($estimate['estimate']->products as $record) @if($estimate['formDesign']->product_image) @endif @if($description && count($estimate['checkDesc']) > 0) @endif @if($estimate['formDesign']->unit) @endif @if($estimate['formDesign']->discount)
{{ __('products::product.Image')}} @endif 0) style="width: 20%" @else style="width: 40%" @endif>{{$productTypeTitle}}{{ __('sales::estimates.description')}}{{ __('sales::estimates.description')}}{{ __('sales::estimates.qty')}} {{ __('sales::estimates.unit_price')}}@lang('settings::forms_design.unit') {{ __('sales::estimates.discount')}}{{__('sales::estimates.vat')}} {{__('sales::estimates.vat_value')}}{{__('sales::estimates.amount')}}
{{ $record->product->name }}{{ $record->description }}{{ number_format($record->quantity,2,".",",") }} {{ number_format($record->unit_price,2,".",",") }}{{$record->product->unit->name}}