@extends('layouts.main') @section('page-title') {{ __('Proposal Detail') }} @endsection @section('page-breadcrumb') {{ __('Proposal') }} @endsection @push('scripts') @endpush @section('page-action')
@if($proposal->is_convert==0) @can('proposal convert invoice')
{!! Form::open(['method' => 'get', 'route' => ['proposal.convert', $proposal->id],'id'=>'proposal-form-'.$proposal->id]) !!} {{Form::close()}}
@endcan @else @can('invoice show')
@endcan @endif @if (module_is_active('Retainer')) @include('retainer::setting.convert_retainer', ['proposal' => $proposal, 'type' => 'view']) @endif
@endsection @section('content') @can('proposal send') @if($proposal->status!=4)
{{__('Create Proposal')}}

{{__('Created on ')}}{{ company_date_formate($proposal->issue_date)}}

@can('proposal edit') {{__('Edit')}} @endcan
{{__('Send Proposal')}}

@if($proposal->status!=0) {{__('Sent on')}} {{ company_date_formate($proposal->send_date)}} @else @can('proposal send') {{__('Status')}} : {{__('Not Sent')}} @endcan @endif

@if($proposal->status==0) @can('proposal send') {{__('Send')}} @endcan @endif
{{__('Proposal Status')}}
@if($proposal->status == 0) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 1) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 2) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 3) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 4) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @endif
@endif @endcan
@if(\Auth::user()->type=='company')
@if($proposal->status!=0) @endif @if($proposal->status == 0)
@else
@endif
@else
@endif

{{__('Proposal')}}

{{ \App\Models\Proposal::proposalNumberFormat($proposal->proposal_id) }}


{{__('Issue Date')}} :
{{ company_date_formate($proposal->issue_date)}}

@if (!empty($customer->billing_name) && !empty($customer->billing_address) && !empty($customer->billing_zip))
{{__('Billed To')}} :
{{ !empty($customer->billing_name) ? $customer->billing_name : '' }}
{{ !empty($customer->billing_address) ? $customer->billing_address : '' }}
{{ !empty($customer->billing_city) ? $customer->billing_city . ' ,' : '' }} {{ !empty($customer->billing_state) ? $customer->billing_state . ' ,' : '' }} {{ !empty($customer->billing_zip) ? $customer->billing_zip : '' }}
{{ !empty($customer->billing_country) ? $customer->billing_country : '' }}
{{ !empty($customer->billing_phone) ? $customer->billing_phone : '' }}
{{__('Tax Number ')}} : {{!empty($customer->tax_number)?$customer->tax_number:''}}
@endif @if(company_setting('proposal_shipping_display')=='on') @if (!empty($customer->shipping_name) && !empty($customer->shipping_address) && !empty($customer->shipping_zip))
{{__('Shipped To')}} :
{{ !empty($customer->shipping_name) ? $customer->shipping_name : '' }}
{{ !empty($customer->shipping_address) ? $customer->shipping_address : '' }}
{{ !empty($customer->shipping_city) ? $customer->shipping_city .' ,': '' }} {{ !empty($customer->shipping_state) ? $customer->shipping_state .' ,': '' }} {{ !empty($customer->shipping_zip) ? $customer->shipping_zip : '' }}
{{ !empty($customer->shipping_country) ? $customer->shipping_country : '' }}
{{ !empty($customer->shipping_phone) ? $customer->shipping_phone : '' }}
{{__('Tax Number ')}} : {{!empty($customer->tax_number)?$customer->tax_number:''}}
@endif @endif
{!! DNS2D::getBarcodeHTML(route('pay.proposalpay',\Illuminate\Support\Facades\Crypt::encrypt($proposal->id)), "QRCODE",2,2) !!}
{{__('Status')}} :
@if($proposal->status == 0) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 1) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 2) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 3) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 4) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @endif
@if(!empty($customFields) && count($proposal->customField)>0) @foreach($customFields as $field)
{{$field->name}} :
@if ($field->type == 'attachment') @else {{ !empty($proposal->customField[$field->id]) ? $proposal->customField[$field->id] : '-' }} @endif

@endforeach @endif
{{__('Item Summary')}}
{{__('All items here cannot be deleted.')}}
@if($proposal->proposal_module == "account") @elseif($proposal->proposal_module == "taskly") @endif @php $totalQuantity=0; $totalRate=0; $totalTaxPrice=0; $totalDiscount=0; $taxesData=[]; $TaxPrice_array = []; @endphp @foreach($iteams as $key =>$iteam) @if(!empty($iteam->tax)) @php $taxes= \App\Models\Proposal::tax($iteam->tax); $totalQuantity+=$iteam->quantity; $totalRate+=$iteam->price; $totalDiscount+=$iteam->discount; foreach($taxes as $taxe){ $taxDataPrice= \App\Models\Proposal::taxRate($taxe->rate,$iteam->price,$iteam->quantity,$iteam->discount); if (array_key_exists($taxe->name,$taxesData)) { $taxesData[$taxe->name] = $taxesData[$taxe->name]+$taxDataPrice; } else { $taxesData[$taxe->name] = $taxDataPrice; } } @endphp @endif @if($proposal->proposal_module == "account") @elseif($proposal->proposal_module == "taskly") @endif @php $tr_tex = (array_key_exists($key,$TaxPrice_array) == true) ? $TaxPrice_array[$key] : 0; @endphp @endforeach @if($proposal->proposal_module == "account") @endif @php $colspan = 6; if($proposal->proposal_module == "account"){ $colspan = 7; } @endphp @if(!empty($taxesData)) @foreach($taxesData as $taxName => $taxPrice) @endforeach @endif
#{{__('Item Type')}} {{__('Item')}}{{__('Project')}}{{__('Quantity')}} {{__('Rate')}} {{__('Discount')}} {{__('Tax')}} {{__('Description')}} {{__('Price')}}
{{__('After discount & tax')}}
{{$key+1}}{{!empty($iteam->product_type) ? Str::ucfirst($iteam->product_type) : '--'}} {{!empty($iteam->product())?$iteam->product()->name:''}}{{!empty($iteam->product())?$iteam->product()->title:''}}{{$iteam->quantity}} {{ currency_format_with_sym($iteam->price)}} {{ currency_format_with_sym($iteam->discount)}} @if(!empty($iteam->tax)) @php $totalTaxRate = 0; $data = 0; @endphp @foreach($taxes as $tax) @php $taxPrice= \App\Models\Proposal::taxRate($tax->rate,$iteam->price,$iteam->quantity,$iteam->discount); $totalTaxPrice+=$taxPrice; $data+=$taxPrice; @endphp @endforeach @php array_push($TaxPrice_array,$data); @endphp
{{$tax->name .' ('.$tax->rate .'%)'}} {{ currency_format_with_sym($taxPrice)}}
@else - @endif
{{!empty($iteam->description)?$iteam->description:'-'}} {{ currency_format_with_sym(($iteam->price*$iteam->quantity) -$iteam->discount + $tr_tex )}}
{{__('Total')}} {{$totalQuantity}} {{ currency_format_with_sym ($totalRate)}} {{ currency_format_with_sym ($totalDiscount)}} {{ currency_format_with_sym ($totalTaxPrice)}}
{{__('Sub Total')}} {{ currency_format_with_sym ($proposal->getSubTotal())}}
{{__('Discount')}} {{ currency_format_with_sym ($proposal->getTotalDiscount())}}
{{$taxName}} {{ currency_format_with_sym ($taxPrice) }}
{{__('Total')}} {{ currency_format_with_sym ($proposal->getTotal())}}
{{ __('Attachments') }}
{{ __('Drop files here to upload') }}
@forelse($proposal_attachment as $key =>$attachment) @empty @include('layouts.nodatafound') @endforelse
{{__('#')}} {{__('File Name')}} {{__('File Size')}} {{__('Date Created')}} {{__('Action')}}
{{ ++$key }} {{ $attachment->file_name }} {{ $attachment->file_size }} {{ company_date_formate($attachment->created_at) }}
{{Form::open(array('route'=>array('proposal.attachment.destroy',$attachment->id),'class' => 'm-0'))}} @method('DELETE') {{Form::close()}}
@endsection