@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
@csrf @method('PUT') {{-- VENDOR INFORMATION --}}

Vendor Information


{{-- Vendor Code (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 {{-- 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
{{-- SAP Code Vendor (visible if Update PPN) --}} @if($list->sap_status == 'Update PPN')
@endif {{-- 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 --}}
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 --}}
@php $contactsData = old('contacts') ? collect(old('contacts'))->map(fn($c) => (object)$c) : (isset($contacts) ? $contacts : collect()); $sapSelectorFromOld = old('sap_contact_selector'); @endphp @foreach($contactsData as $ci => $contact) @endforeach
SAP
Upload
Full Name Position Telephone Mobile Email Action
is_sap ?? 0) ? 'checked' : '' }} onchange="handleSapRadioChange({{ $ci }})" title="Pilih contact yang akan diupload ke SAP" disabled> {{ ($contact->is_sap ?? 0) ? '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 --}}
@php $directorsData = old('directors') ? collect(old('directors'))->map(fn($d) => (object)$d) : (isset($directors) ? $directors : collect()); @endphp @foreach($directorsData as $di => $director) @endforeach
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 --}}
@php $banksData = old('banks') ? collect(old('banks'))->map(fn($b) => (object)$b) : (isset($banks) ? $banks : collect()); @endphp @foreach($banksData as $bi => $bank) @endforeach
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

@php $hasOldQE = old('quality_environments') !== null; $oldQEData = old('quality_environments') ?? []; // Bangun checked IDs: dari old() jika ada error, dari DB jika tidak $checkedQEIds = $hasOldQE ? collect($oldQEData)->pluck('quality_environment_id')->map(fn($id) => (int)$id)->toArray() : (isset($qualityEnvs) ? $qualityEnvs->pluck('quality_environment_id')->toArray() : []); @endphp {{-- Empty State --}}

No quality environments added yet.

{{-- Checkbox Selection Area --}} {{-- Table --}}
@if($hasOldQE) {{-- Render dari old() saat ada validation error --}} @foreach($oldQEData as $qi => $qeOld) @php $qeName = \DB::table('ms_quality_environment') ->where('id', $qeOld['quality_environment_id']) ->value('name'); $isStandardLainnya = $qeName === 'Standard Lainnya'; @endphp @endforeach @else {{-- Render dari DB (normal load) --}} @if(isset($qualityEnvs) && $qualityEnvs->count() > 0) @foreach($qualityEnvs as $qi => $qe) @php $qeName = \DB::table('ms_quality_environment')->where('id', $qe->quality_environment_id)->value('name'); $isStandardLainnya = $qeName === 'Standard Lainnya'; @endphp @endforeach @endif @endif
Quality Environment Version Document
{{ $qeName }} @if($isStandardLainnya) {{ $qeOld['other_quality_environment'] ?? '' }} @endif {{ $qeOld['version'] ?? '-' }} Re-upload file jika ingin mengubah
{{ $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 --}} {{-- 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