{{--
  • --}} @if(isset($vehicle_sale_info['id'])) {{-- Form::open(['route'=>"backend.$department.vehicle.update_sale_info",'id'=>'vehicle_sale_form','name'=>'vehicle_sale_form','method'=>'PUT','files'=>true]) --}} @else {{-- Form::open(['route'=>"backend.$department.vehicle.create_sale_info",'id'=>'vehicle_sale_form','name'=>'vehicle_sale_form','method'=>'POST','files'=>true]) --}} @endif {{-- @include('backend.share.vehicle.confirm._s_kakunin', ['name'=>'vehicle[sale_info]', 'old_name'=>'vehicle.sale_info.', 'check_object'=>isset($vehicle_sale_info['id']) ? $vehicle_sale_info : null ]) --}} {{--
    管理番号 {{ isset($vehicle['hp_publish']['manage_no']) ? $vehicle['hp_publish']['manage_no'] : '' }}
    --}} @php $question_files = (isset($vehicle_sale_info['question_file']) ? $vehicle_sale_info['question_file'] : null); $row_count = is_array($question_files) ? count($question_files) : 1; @endphp @if(is_array($question_files) && count($question_files) > 1) @foreach($question_files as $key => $question_file) @if($key == 0 || empty($question_file['file_path'])) @continue @endif @endforeach @endif @php $addition_files = (isset($vehicle_sale_info['addition_data']) ? $vehicle_sale_info['addition_data'] : null); $row_count = is_array($addition_files) ? count($addition_files) : 1; @endphp @if(is_array($addition_files) && count($addition_files) > 1) @foreach($addition_files as $key => $question_file) @if($key == 0 || empty($question_file['file_path'])) @continue @endif @endforeach @endif
    販売担当 {{\App\Service\UserService::getUserName(( isset($vehicle_sale_info['sale_charge_user']) ? $vehicle_sale_info['sale_charge_user'] : '' ))}} 販売日

    {{ ( isset($vehicle_sale_info['sale_date']) ? Carbon::parse($vehicle_sale_info['sale_date'])->format('Y-m-d') : '' ) }}

    販売先 {{ App\Models\Partner\Partner::findById(isset($vehicle_sale_info['sale_dest']) ? $vehicle_sale_info['sale_dest'] : '', 'company_name1') }}
    {{ App\Models\Partner\Partner::findById(isset($vehicle_sale_info['sale_dest']) ? $vehicle_sale_info['sale_dest'] : '', 'company_name2') }}
    お客様ご依頼内容アップロード @if(isset($question_files[0]['file_path']) && $question_files[0]['file_path']) @if(Storage::disk('temp')->has($question_files[0]['file_path'])) {{ $question_files[0]['file_name'] }} @elseif(isset($vehicle_sale_info['id']) && Storage::disk('vehicle_question_pdf')->has($vehicle_sale_info['id'].'/'.$question_files[0]['file_path'])) {{ $question_files[0]['file_name'] }} @endif @endif
    @if(isset($question_file['file_path']) && $question_file['file_path']) @if(Storage::disk('temp')->has($question_file['file_path'])) {{ $question_file['file_name'] }} @elseif(isset($vehicle_sale_info['id']) && Storage::disk('vehicle_question_pdf')->has($vehicle_sale_info['id'].'/'.$question_file['file_path'])) {{ $question_file['file_name'] }} @endif @endif
    販売資料 @if(isset($addition_files[0]['file_path']) && $addition_files[0]['file_path']) @if(Storage::disk('temp')->has($addition_files[0]['file_path'])) {{ $addition_files[0]['file_name'] }} @elseif(isset($vehicle_sale_info['id']) && Storage::disk('vehicle_sale_addition_data')->has($vehicle_sale_info['id'].'/'.$addition_files[0]['file_path'])) {{ $addition_files[0]['file_name'] }} @endif @endif
    @if(isset($question_file['file_path']) && $question_file['file_path']) @if(Storage::disk('temp')->has($question_file['file_path'])) {{ $question_file['file_name'] }} @elseif(isset($vehicle_sale_info['id']) && Storage::disk('vehicle_sale_addition_data')->has($vehicle_sale_info['id'].'/'.$question_file['file_path'])) {{ $question_file['file_name'] }} @endif @endif
    @php $other_info = old('vehicle.sale_info.other_info', isset($vehicle_sale_info['other_info']) ? $vehicle_sale_info['other_info'] : null); @endphp @if (!is_null($other_info) && is_array($other_info) && count($other_info) > 1) @foreach ($other_info as $key=>$info) @if ($key == 0) @continue @endif @include('backend.share.vehicle.confirm._s_sale_other_info') @endforeach @endif @php $ob_sale_info = isset($vehicle_sale_info['id']) ? \App\Models\Vehicle\VehicleSaleInfo::find($vehicle_sale_info['id']) : null; @endphp @php $company_response = (isset($vehicle_sale_info['company_response']) ? $vehicle_sale_info['company_response'] : null); $tax_price = isset($vehicle_sale_info['company_response'][0]['price']) ? $vehicle_sale_info['company_response'][0]['price'] : 0; $non_tax_price = isset($vehicle_sale_info['company_response'][0]['non_tax_price']) ? $vehicle_sale_info['company_response'][0]['non_tax_price'] : 0; @endphp @if(!is_null($company_response) && is_array($company_response) && count($company_response) > 1) @foreach($company_response as $key => $response) @if((empty($response['field_name']) && ($response['price'] === null) && ($response['non_tax_price'] === null)) || $key == 0 ) @continue @endif @php $tax_price += $response['price']; $non_tax_price += $response['non_tax_price']; @endphp @endforeach @endif
    課税 非課税
    車両価格(税別) {{ (isset($vehicle_sale_info['vehicle_price']) && is_numeric($vehicle_sale_info['vehicle_price'])) ? number_format($vehicle_sale_info['vehicle_price']).'円' : '' }}

    {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['vehicle_price_charger']) ? $vehicle_sale_info['vehicle_price_charger'] : '')) }}

    リサイクル料金* {{ (isset($vehicle_sale_info['recycle_fee']) && is_numeric($vehicle_sale_info['recycle_fee'])) ? number_format($vehicle_sale_info['recycle_fee']).'円' : '' }} {{ isset($vehicle_sale_info['recycle_fee_charge']) ? \App\Service\UserService::getUserName($vehicle_sale_info['recycle_fee_charge'] ): '' }}
    自動車税* {{ (isset($vehicle_sale_info['vehicle_tax']) && is_numeric($vehicle_sale_info['vehicle_tax'])) ? number_format($vehicle_sale_info['vehicle_tax']).'円' : '' }} {{ isset($vehicle_sale_info['vehicle_tax_from']) ? $vehicle_sale_info['vehicle_tax_from'].'月~' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['vehicle_tax_charger']) ? $vehicle_sale_info['vehicle_tax_charger'] : '')) }}
    環境性能割* {{ (isset($vehicle_sale_info['acquisition_tax']) && is_numeric($vehicle_sale_info['acquisition_tax'])) ? number_format($vehicle_sale_info['acquisition_tax']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['acquisition_tax_charger']) ? $vehicle_sale_info['acquisition_tax_charger'] : '')) }}
    重量税* {{ (isset($vehicle_sale_info['weight_tax']) && is_numeric($vehicle_sale_info['weight_tax'])) ? number_format($vehicle_sale_info['weight_tax']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['weight_tax_charger']) ? $vehicle_sale_info['weight_tax_charger'] : '')) }}
    自賠責* {{ (isset($vehicle_sale_info['liability_fee']) && is_numeric($vehicle_sale_info['liability_fee'])) ? number_format($vehicle_sale_info['liability_fee']).'円' : '' }} {{ isset($vehicle_sale_info['liability_fee_from']) ? $vehicle_sale_info['liability_fee_from'].'月~' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['liability_fee_charger']) ? $vehicle_sale_info['liability_fee_charger'] : '')) }}
    登録諸費用(税別) {{ (isset($vehicle_sale_info['registration_fee']) && is_numeric($vehicle_sale_info['registration_fee'])) ? number_format($vehicle_sale_info['registration_fee']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['registration_fee_charger']) ? $vehicle_sale_info['registration_fee_charger'] : '')) }}
    車検代行手数料(税別) {{ (isset($vehicle_sale_info['inspection_agency_fee']) && is_numeric($vehicle_sale_info['inspection_agency_fee'])) ? number_format($vehicle_sale_info['inspection_agency_fee']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['inspection_agency_fee_charger']) ? $vehicle_sale_info['inspection_agency_fee_charger'] : '')) }}
    架装費用(税別) {{ (isset($vehicle_sale_info['bodywork_fee']) && is_numeric($vehicle_sale_info['bodywork_fee'])) ? number_format($vehicle_sale_info['bodywork_fee']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['bodywork_fee_charger']) ? $vehicle_sale_info['bodywork_fee_charger'] : '')) }}
    出品料・成約料(税別) {{ (isset($vehicle_sale_info['exhibition_contract_fee']) && is_numeric($vehicle_sale_info['exhibition_contract_fee'])) ? number_format($vehicle_sale_info['exhibition_contract_fee']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['exhibition_contract_fee_charger']) ? $vehicle_sale_info['exhibition_contract_fee_charger'] : '')) }}
    陸送費(税別) {{ (isset($vehicle_sale_info['transportation_fee']) && is_numeric($vehicle_sale_info['transportation_fee'])) ? number_format($vehicle_sale_info['transportation_fee']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['transportation_fee_charger']) ? $vehicle_sale_info['transportation_fee_charger'] : '')) }}
    {{ isset($vehicle_sale_info['other_info'][0]['field_name']) ? $vehicle_sale_info['other_info'][0]['field_name'] : '' }} @error('vehicle.sale_info.other_info.0.field_name') {{ $message }} @enderror {{ (isset($vehicle_sale_info['other_info'][0]['value']) && is_numeric($vehicle_sale_info['other_info'][0]['value'])) ? number_format($vehicle_sale_info['other_info'][0]['value']).'円' : '' }} {{ (isset($vehicle_sale_info['other_info'][0]['non_tax_value']) && is_numeric($vehicle_sale_info['other_info'][0]['non_tax_value'])) ? number_format($vehicle_sale_info['other_info'][0]['non_tax_value']).'円' : '' }} {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['other_info'][0]['charger']) ? $vehicle_sale_info['other_info'][0]['charger'] : '')) }}
    小計 @if(isset($detail) && $detail && !isset($is_confirm)) @if(is_object($ob_sale_info)) {{ number_format($ob_sale_info->getTaxPrice()).'円' }} @endif @else {{ (isset($vehicle_sale_info['total_tax_price']) ) ? number_format($vehicle_sale_info['total_tax_price']).'円' : '' }} @endif @if(isset($detail) && $detail && !isset($is_confirm)) @if(is_object($ob_sale_info)) {{ number_format($ob_sale_info->getNonTaxPrice()).'円' }} @endif @else {{ (isset($vehicle_sale_info['total_non_tax_price']) ) ? number_format($vehicle_sale_info['total_non_tax_price']).'円' : '' }} @endif
    消費税 @if(isset($detail) && $detail && !isset($is_confirm)) @if(is_object($ob_sale_info)) {{ number_format(($ob_sale_info->consumption_tax)).'円' }} @endif @else {{ (isset($vehicle_sale_info['consumption_tax']) && is_numeric($vehicle_sale_info['consumption_tax'])) ? number_format($vehicle_sale_info['consumption_tax']).'円' : '' }} @endif
    合計 {{ (isset($vehicle_sale_info['total_sale_price']) && is_numeric($vehicle_sale_info['total_sale_price'])) ? number_format($vehicle_sale_info['total_sale_price']).'円' : '' }}
    その他経費 課税 非課税
    {{ isset($vehicle_sale_info['company_response'][0]['field_name']) ? $vehicle_sale_info['company_response'][0]['field_name'] : '' }} {{ (isset($vehicle_sale_info['company_response'][0]['price']) && ($vehicle_sale_info['company_response'][0]['price'] !== null) && is_numeric($vehicle_sale_info['company_response'][0]['price'])) ? number_format($vehicle_sale_info['company_response'][0]['price']).'円' : '' }} {{ (isset($vehicle_sale_info['company_response'][0]['non_tax_price']) && ($vehicle_sale_info['company_response'][0]['non_tax_price'] !== null) && is_numeric($vehicle_sale_info['company_response'][0]['non_tax_price'])) ? number_format($vehicle_sale_info['company_response'][0]['non_tax_price']).'円' : '' }} {{ \App\Service\UserService::getUserName(isset($vehicle_sale_info['company_response'][0]['charger']) ? $vehicle_sale_info['company_response'][0]['charger'] : '') }}
    {{ $response['field_name'] }} {{ (($response['price'] !== null) && is_numeric($response['price'])) ? number_format($response['price']).'円' : '' }} {{ (($response['non_tax_price'] !== null) && is_numeric($response['non_tax_price'])) ? number_format($response['non_tax_price']).'円' : '' }} {{ \App\Service\UserService::getUserName(isset($response['charger']) ? $response['charger'] : '') }}
    小計(税別原価) {{ number_format($tax_price).'円' }} {{ number_format($non_tax_price).'円' }} {{ number_format($non_tax_price + $tax_price).'円' }}
    消費税 {{ number_format($tax_price / 10).'円' }}
    合計 {{ number_format($tax_price / 10 + $non_tax_price + $tax_price).'円' }}
    粗利

    予想

    {{ (isset($vehicle_sale_info['profit_forecast']) && is_numeric($vehicle_sale_info['profit_forecast'])) ? '概算 : '.number_format($vehicle_sale_info['profit_forecast']).'円' : '' }}

    確定

    {{ (isset($vehicle_sale_info['profit_correct']) && is_numeric($vehicle_sale_info['profit_correct'])) ? '最終 : '.number_format($vehicle_sale_info['profit_correct']).'円' : '' }}
    {{ \App\Service\UserService::getUserName((isset($vehicle_sale_info['profit_charger']) ? $vehicle_sale_info['profit_charger'] : '')) }}
    支払条件 {{ config('const.payment_terms.'.(isset($vehicle_sale_info['payment_terms']) ? $vehicle_sale_info['payment_terms'] : '')) }} 入金予定日

    入金予定日

    {{ isset($vehicle_sale_info['expect_deposit_date']) ? Carbon::parse($vehicle_sale_info['expect_deposit_date'])->format('Y-m-d') : '' }}

    {{ isset($vehicle_sale_info['expect_deposit_date_2']) ? Carbon::parse($vehicle_sale_info['expect_deposit_date_2'])->format('Y-m-d') : '' }}

    {{ isset($vehicle_sale_info['expect_deposit_date_3']) ? Carbon::parse($vehicle_sale_info['expect_deposit_date_3'])->format('Y-m-d') : '' }}


    入金日:{{ (isset($vehicle_sale_info['deposit_finish_date']) ? $vehicle_sale_info['deposit_finish_date'] : '') }}
    引渡予定日
    {{ isset($vehicle_sale_info['expect_delivery_date']) ? Carbon::parse($vehicle_sale_info['expect_delivery_date'])->format('Y-m-d') : '' }}
    {{ (isset($vehicle_sale_info['is_delivered']) ? $vehicle_sale_info['is_delivered'] : '') ? '納車済日 : ' : '' }}
    @if ((isset($vehicle_sale_info['is_delivered']) ? $vehicle_sale_info['is_delivered'] : ''))
    {{ isset($vehicle_sale_info['delivered_at']) ? Carbon::parse($vehicle_sale_info['delivered_at'])->format('Y-m-d') : '' }}
    @endif
    在庫期間 {{ isset($vehicle_sale_info['stock_period']) ? $vehicle_sale_info['stock_period'] : '' }}
    販売期間 {{ isset($vehicle_sale_info['inventory_period']) ? $vehicle_sale_info['inventory_period'] : '' }} 備考 {{ isset($vehicle_sale_info['remark']) ? $vehicle_sale_info['remark'] : '' }}
    注文書発送
    発送日:{{ (isset($vehicle_sale_info['order_doc_sent_date']) ? $vehicle_sale_info['order_doc_sent_date'] : '') }}
        
    {{ (isset($vehicle_sale_info['order_doc_sent_comment']) ? $vehicle_sale_info['order_doc_sent_comment'] : '') }}
    請求書発送
    発送日:{{ (isset($vehicle_sale_info['bill_doc_sent_date']) ? $vehicle_sale_info['bill_doc_sent_date'] : '') }}
        
    {{ (isset($vehicle_sale_info['bill_doc_sent_comment']) ? $vehicle_sale_info['bill_doc_sent_comment'] : '') }}