@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => '']) @php $isNonaktif = ( $list->isactive == '0' || $list->isactive === 0 || $list->isactive === false || (isset($list->updated_fields) && is_array($list->updated_fields) && in_array('isactive', $list->updated_fields)) || (isset($list->updated_fields) && is_string($list->updated_fields) && str_contains($list->updated_fields, 'isactive')) ); @endphp
@if ($isNonaktif)
🚫
Vendor Ini Telah Dinonaktifkan
Vendor {{ $list->old_code_vendor ?? $list->sap_code_vendor ?? $list->name ?? '-' }} telah dinonaktifkan di sistem. Pastikan vendor ini juga sudah dinonaktifkan di SAP dengan menge-set semua field isactive menjadi X (centang).
@endif
@csrf @method('PUT') {{-- VENDOR INFORMATION --}}

Vendor Information


{{-- Old Code Vendor (Always visible and readonly) --}}
Kode tidak dapat diubah
{{-- Status --}}
@if($list->status == 'Pending') Pending @elseif($list->status == 'Proposed') Proposed @elseif($list->status == 'Approved') Approved @elseif($list->status == 'Rejected') Rejected @elseif($list->status == 'Finish') Finish @endif
@if($list->status == 'Rejected')
@endif {{-- SAP Code Vendor (Always visible and readonly) --}}
Kode tidak dapat diubah
{{-- Company Scope - Radio Button Style --}}
@foreach($company_scopes as $scope)
company_scope) && $list->company_scope == $scope->value) checked @endif required disabled>
@endforeach
@error('company_scope')

{{ $message }}

@enderror
{{-- Vendor Name --}}
@error('name')

{{ $message }}

@enderror
{{-- Corp with Search Modal --}}
@error('corp')

{{ $message }}

@enderror
{{-- Company Specification with Search Modal --}}
@error('company_spec_id')

{{ $message }}

@enderror
{{-- Office Address 1 --}}
0/60 @error('office_address1')

{{ $message }}

@enderror
{{-- Office Address 2 --}}
0/40 @error('office_address2')

{{ $message }}

@enderror
{{-- Office Address 3 --}}
0/40 @error('office_address3')

{{ $message }}

@enderror
{{-- Post Code --}}
{{ $list->post_code ? strlen($list->post_code) : 0 }}/10 @error('post_code')

{{ $message }}

@enderror
{{-- Factory Address --}}
0/100 @error('factory_address')

{{ $message }}

@enderror
{{-- Warehouse Address --}}
0/100 @error('warehouse_address')

{{ $message }}

@enderror
{{-- Country with Search Modal --}}
@error('country_id')

{{ $message }}

@enderror
{{-- Region with Search Modal --}}
@error('region_id')

{{ $message }}

@enderror
{{-- Office City with Search Modal --}}
@error('office_city_id')

{{ $message }}

@enderror
{{-- Office Telephone --}}
@error('office_telp')

{{ $message }}

@enderror
{{-- Office Mobile --}}
@error('office_mobile')

{{ $message }}

@enderror
{{-- Office Fax --}}
@error('office_fax')

{{ $message }}

@enderror
{{-- Office Email --}}
@error('office_email')

{{ $message }}

@enderror
{{-- Payment Term --}}
@error('payment_term_id')

{{ $message }}

@enderror
{{-- Vendor Group --}}
Auto-filled based on company scope @error('vendor_group')

{{ $message }}

@enderror
{{-- Rec Account --}}
Auto-filled based on company scope @error('rec_account')

{{ $message }}

@enderror
{{-- Plan Group --}}
Auto-filled based on company scope @error('plan_group')

{{ $message }}

@enderror
{{-- Schema Group --}}
Auto-filled based on company scope @error('schema_group')

{{ $message }}

@enderror
{{-- Currency --}}
@error('currency_id')

{{ $message }}

@enderror
{{-- Note --}}
@error('note')

{{ $message }}

@enderror
{{-- Classification --}}
@error('classification')

{{ $message }}

@enderror
{{-- SAP Status --}}
@if($list->sap_status == 'Belum Upload') Belum Upload @elseif($list->sap_status == 'Proses') Proses @elseif($list->sap_status == 'Sudah Upload') Sudah Upload @elseif($list->sap_status == 'Update PPN') Update PPN @elseif($list->sap_status == 'Update') Update @endif
{{-- CONTACT PERSONS --}}
Contact Persons (Optional)
*Pilih pada kolom SAP untuk menentukan contact yang akan diupload ke SAP
{{-- Empty State --}}

No contact persons added yet.

{{-- Table Container --}}
@if(isset($contacts) && $contacts->count() > 0) @foreach($contacts as $contact) {{-- Kolom SAP --}} @endforeach @endif
SAP
Upload
Full Name Position Telephone Mobile Email Action
is_sap ? 'checked' : '' }} onchange="handleSapRadioChange({{ $loop->index }})" title="Pilih contact yang akan diupload ke SAP" disabled> {{ $contact->is_sap ? 'SAP' : '' }}
{{ $contact->fullname ?? '-' }} {{ $contact->position ?? '-' }} {{ $contact->telp ?? '-' }} {{ $contact->mobile ?? '-' }} {{ $contact->email ?? '-' }}
{{-- DIRECTORS --}}
Directors / Commissioners (Optional)
{{-- Empty State --}} @if (isset($directors) && $directors->count() == 0)

No directors added yet.

@endif {{-- Table Container --}}
@if(isset($directors) && count($directors) > 0) @foreach($directors as $director) @endforeach @endif
Full Name NIK Position Telephone Email Action
{{ $director->fullname ?? '-' }} {{ $director->nik ?? '-' }} {{ $director->position ?? '-' }} {{ $director->telp ?? '-' }} {{ $director->email ?? '-' }}
{{-- LEGAL DOCUMENTS --}}

Legal Documents


{{-- SIUP/NIB Section --}}
SIUP / NIB (Nomor Induk Berusaha)
{{ $list->siup_nib_no ? strlen($list->siup_nib_no) : 0 }}/50
{{-- NPWP Section --}}
NPWP (Nomor Pokok Wajib Pajak)
{{ $list->npwp_no ? strlen($list->npwp_no) : 0 }}/50
{{-- PKP Section --}}
PKP (Pengukuhan Pengusaha Kena Pajak)
{{ $list->pkp_no ? strlen($list->pkp_no) : 0 }}/50
{{-- BANK ACCOUNTS --}}
Bank Accounts (Optional)
{{-- Empty State --}}

No bank accounts added yet.

{{-- Table Container --}}
@if(isset($banks) && $banks->count() > 0) @foreach($banks as $bank) @endforeach @endif
Bank Name Address Account Number Account Holder Account Name Action
{{ $bank->name ?? '-' }} {{ $bank->address ?? '-' }} {{ $bank->account_no ?? '-' }} {{ $bank->account_holder ?? '-' }} {{ $bank->account_name ?? '-' }}
{{-- QUALITY ENVIRONMENT --}}
Quality Environment (Optional)

Select applicable quality environments and provide details

{{-- Empty State --}}

No quality environments added yet.

{{-- Checkbox Selection Area (Hidden in show mode initially) --}} {{-- Edit/View Table --}}
@if(isset($qualityEnvs) && $qualityEnvs->count() > 0) @foreach($qualityEnvs as $qe) @php $qeName = DB::table('ms_quality_environment')->where('id', $qe->quality_environment_id)->value('name'); $isStandardLainnya = $qeName === 'Standard Lainnya'; @endphp @endforeach @endif
Quality Environment Version Document
{{ $qeName ?? $qe->other_quality_environment }} @if($isStandardLainnya && $qe->other_quality_environment) ({{ $qe->other_quality_environment }}) @endif {{ $qe->version ?? '-' }} @if($qe->document) View Document @else - @endif
{{-- AGREEMENT DOCUMENT --}}

Agreement Document


@if(!empty($list->agreement_document) && is_array($list->agreement_document)) @foreach($list->agreement_document as $index => $doc)
File {{ $loop->iteration }} {{-- Input ini yang memberi tahu Controller file apa saja yang masih disimpan --}} {{-- Tombol hapus (Muncul saat klik Edit) --}}
@endforeach @else

No document uploaded

@endif
@php $approverName = DB::table('users') ->where('username', $list->approver) ->value('firstname'); @endphp {{ $approverName ?? '-' }}
{{-- Hidden Data for JavaScript --}} {{-- Modal Validasi Nonaktif SAP (hanya untuk msjits & vendor nonaktif) --}} @if ($list->isactive == '0' && auth()->user()->idroles == 'msjits') @endif {{-- SEARCH MODAL (Same as Add View) --}} @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') @include('js.' . $dmenu) @endpush @else @push('addjs') @endpush @endif @endif @endsection @php $contactIndex = isset($contacts) && $contacts->count() > 0 ? $contacts->count() : 0; $directorIndex = isset($directors) && $directors->count() > 0 ? $directors->count() : 0; $bankIndex = isset($banks) && $banks->count() > 0 ? $banks->count() : 0; $qualityEnvironmentIndex = isset($qualityEnvs) ? $qualityEnvs->count() : 0; $currencyData = $currencies->toArray(); $qualityEnvironmentsMap = isset($quality_environments) ? $quality_environments->pluck('name', 'id')->toArray() : []; @endphp @push('js') @endpush