@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
Sync Status - {{ $title_menu }}

@if(session('message'))
@php $alertClass = session('class', 'info'); $icon = match($alertClass) { 'success' => 'check-circle', 'warning' => 'exclamation-triangle', 'danger' => 'times-circle', default => 'info-circle' }; @endphp
@endif
{{ $report_types[$sync_status->report_type]['label'] ?? $sync_status->report_type }}
Tahun: {{ $sync_status->sync_year }} @if($sync_status->sync_month) | Bulan: {{ $sync_status->sync_month }} @endif
{{ strtoupper($sync_status->status) }}
@if($sync_status->status === 'processing' || $sync_status->status === 'completed' || $sync_status->status === 'pending') @php $progress = $sync_status->total_records > 0 ? round(($sync_status->processed_records / $sync_status->total_records) * 100, 1) : 0; @endphp
Progress {{ $progress }}% ({{ number_format($sync_status->processed_records) }} / {{ number_format($sync_status->total_records) }} records)
{{ $progress }}%
@endif
Total Records

{{ number_format($sync_status->total_records) }}

Dimulai:

{{ $sync_status->started_at ? date('d-m-Y H:i:s', strtotime($sync_status->started_at)) : '-' }}

Selesai:

{{ $sync_status->completed_at ? date('d-m-Y H:i:s', strtotime($sync_status->completed_at)) : '-' }}

Requested By:

{{ $sync_status->requested_by ?? '-' }}

@if($sync_status->error_message)
Error: {{ $sync_status->error_message }}
@endif
@if($sync_status->status === 'completed' && !empty($table_result))
Data Preview ({{ count($table_result) }} records)
@if($sync_status->report_type === 'Z_GET_ONHAND') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoDocument NumberCustomer CodeDelivery DateQuantityFiscal YearFiscal Month
{{ $index + 1 }}{{ $row->DOCUMENTNUMBER }}{{ $row->CUSTOMERCODE }}{{ $row->DELIVERYDATE ? date('d-m-Y', strtotime($row->DELIVERYDATE)) : '-' }}{{ $row->QUANTITY !== null ? number_format($row->QUANTITY, 3) : '-' }}{{ $row->FISCALYEAR }}{{ $row->FISCALMONTH }}
@elseif($sync_status->report_type === 'Z_GET_DOBYSO') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoSales DocumentDeliver DateRequired QtyFiscal YearFiscal Month
{{ $index + 1 }}{{ $row->SALESDOCUMENT }}{{ ($row->DELIVERYDATE && $row->DELIVERYDATE !== '0000-00-00') ? date('d-m-Y', strtotime($row->DELIVERYDATE)) : '-' }}{{ $row->REQUIREDQUANTITY !== null ? number_format($row->REQUIREDQUANTITY, 3) : '-' }}{{ $row->FISCALYEAR }}{{ $row->FISCALMONTH }}
@elseif($sync_status->report_type === 'Z_GET_NEW_CUST') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoCustomer NoNameSold ToCreated On
{{ $index + 1 }}{{ $row->KUNNR }}{{ $row->NAME1 }}{{ $row->KUNNRS }}{{ $row->ERDAT ? date('d-m-Y', strtotime($row->ERDAT)) : '-' }}
@elseif($sync_status->report_type === 'Z_GET_PAYMENT') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoDoc NumberCustomerPost DateAmount
{{ $index + 1 }}{{ $row->DOCNUMBER }}{{ $row->CUST }}{{ $row->POST_DATE ? date('d-m-Y', strtotime($row->POST_DATE)) : '-' }}{{ $row->CCAMNT !== null ? number_format($row->CCAMNT, 2) : '-' }}
@elseif($sync_status->report_type === 'ZFFINANCE_YIELD') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoYearPeriodAccountAmount
{{ $index + 1 }}{{ $row->gjahr }}{{ $row->poper }}{{ $row->racct }}{{ $row->hsl !== null ? number_format($row->hsl, 2) : '-' }}
@elseif($sync_status->report_type === 'Z_GET_TCURR') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoExchange Rate TypeFrom CurrencyTo CurrencyValid FromRate
{{ $index + 1 }}{{ $row->KURST }}{{ $row->FCURR }}{{ $row->TCURR }}{{ $row->gdatu_display ?? '-' }}{{ $row->UKURS !== null ? number_format($row->UKURS, 6) : '-' }}
@elseif($sync_status->report_type === 'Z_GET_SOBYRANGE') @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoSales DocumentSold ToEnd UserCreated ByCreated DateFiscal Year
{{ $index + 1 }}{{ $row->SALESDOCUMENT }}{{ $row->SOLDTO }}{{ !empty($row->ENDUSER) ? $row->ENDUSER : '-' }}{{ $row->CREATEDBY }}{{ ($row->CREATEDDATE && $row->CREATEDDATE !== '0000-00-00') ? date('d-m-Y', strtotime($row->CREATEDDATE)) : '-' }}{{ $row->FISYR }}
@else @foreach (array_slice($table_result, 0, 10) as $index => $row) @endforeach
NoBilling DocItemBilling DateMaterialDescriptionBill QtyNet ValueSold To
{{ $index + 1 }}{{ $row->BILLDOC }}{{ $row->ITMNO }}{{ $row->BILLDATE ? date('d-m-Y', strtotime($row->BILLDATE)) : '-' }}{{ $row->MATNR }}{{ $row->ITEMD }}{{ $row->BILLQTY ? number_format($row->BILLQTY, 4) : '-' }}{{ $row->NETVAL ? number_format($row->NETVAL, 2) : '-' }}{{ $row->SOLDTO }}
@endif
@if(count($table_result) > 10)

Menampilkan 10 dari {{ count($table_result) }} records.

@endif
@endif
@if($sync_status->status === 'pending' || $sync_status->status === 'processing') @push('js') @endpush @endif @push('css') @endpush @endsection