@extends('print.template.checklist') @section('title', 'お見積書') @section('header')
お見積書
見積番号
{{$estimate->number}}
見積日
{{toCarbon($estimate->estimate_date)->format('Y年m月d日')}}
見積有効期限
{{ (!empty($estimate->expired_date))?toCarbon($estimate->expired_date)->format('Y年m月d日'):''}}
@endsection @section('table-header') @php $partner = $estimate->buyer?->partner; $manager = $estimate->manager; $client = $estimate->client; @endphp
{{$partner?->code}}
@if(!empty($estimate->buyer_id))
{{$partner?->name_main}} {{$partner?->name_store}} 様
@else
{{$estimate->buyer_name ?? $partner?->name}} 様
@endif
TEL: {{$partner?->tel}}
FAX: {{$partner?->fax}}
〒 {{$partner?->postal_code}}
{{$partner?->address1}}
{{$partner?->address2}}
{{$client->name}}
{{$client?->order_form_address1}}
{{$client?->order_form_address2}}
TEL: {{$client->tel}}
FAX: {{$client->fax}}
担当営業 : {{$manager?->name}}
下記の見積り価格は外税/中身価格です
品番 JANコード 規格 単価(税抜)
上:ケース/下:バラ
明細備考
商品名 税率
@endsection @section('table-details')
@foreach($estimate->estimate_items as $index => $estimate_item) @php $item = $estimate_item->item; $item_price = $item->current_price; //JANコードの入ったコレクションを数区分がバラで絞り込み、優先度で並び替える $item_search_information=$item->item_search_information->sortBy('priority'); $item_search_information=$item_search_information->firstWhere('quantity_type',$quantity_type); $tax_exempt_case_price = '0.00'; $tax_exempt_unit_price = '0.00'; if ($estimate->container_trade_type !== \App\Enums\Partners\EContainerTradeType::CONTENTS_ONLY->value) { $tax_exempt_case_price = $estimate_item->item->current_price?->tax_exempt_case_price ?? '0.00'; $tax_exempt_unit_price = $estimate_item->item->current_price?->tax_exempt_unit_price ?? '0.00'; } $case_price_excluding_tax = number_format($estimate_item->case_price - $tax_exempt_case_price, 2); $unit_price_excluding_tax = number_format($estimate_item->unit_price - $tax_exempt_unit_price, 2); $show_tax_exempt_price = true; if ($tax_exempt_case_price == '0.00' && $tax_exempt_unit_price == '0.00') { $show_tax_exempt_price = false; } $show_tax_exempt_case_price = true; if ($estimate_item->item->capacity_case == 1) { $show_tax_exempt_case_price = false; } @endphp
{{$index + 1}} {{$item->code}} {{$item_search_information->search_string ?? null}} {{$item->packaging}} {{$case_price_excluding_tax}}
{{$unit_price_excluding_tax}}
@if(!empty($estimate_item->note))
{{$estimate_item->note}}
@endif @if($show_tax_exempt_price) @if($show_tax_exempt_case_price)
非課税ケース保証金 {{$tax_exempt_case_price}}円
@endif
非課税バラ保証金 {{$tax_exempt_unit_price}}円
@endif
{{$item->name_main}} {{\App\Enums\EItemTaxType::tryFrom($item_price?->type)?->asPercent() ?? ''}}
@endforeach
備考
 {{$estimate->annotation}}
 {{$estimate->note}}
@endsection