@extends('root') @section('title', 'Message Report - ' . $client->name) @section('content')
@include('components.breadcrumb', [ 'title' => 'Message Report & Cost - ' . $client->name, 'links' => [ ['url' => route('dashboard'), 'label' => 'Dashboard'], ['url' => route('admin.clients.index'), 'label' => 'WA Clients'], ['url' => route('admin.clients.message-report-cost'), 'label' => 'Message Report & Cost'], ], 'current' => $client->name ])
Ringkasan Client: {{ $client->name }}
Total Messages -
Total Success -
Total Failed -
Provider Cost -
Saldo Terpotong -
Net Profit -
Peringatan:
    Audit Deposit vs Cost
    Total Deposit (Nett) Rp {{ number_format($totalDeposit, 0, ',', '.') }}
    Cost Pesan Rp {{ number_format($messageCost, 0, ',', '.') }}
    Cost Add-on Rp {{ number_format($addonCost, 0, ',', '.') }}
    Total Cost Rp {{ number_format($totalCostAllTime, 0, ',', '.') }}
    Selisih (Deposit - Cost) Rp {{ number_format($selisihDepositCost, 0, ',', '.') }}
    Saldo Sekarang Rp {{ number_format($saldoSekarang, 0, ',', '.') }}
    Adjustment @if(abs($adjustment) < 1) 0 @else Rp {{ number_format($adjustment, 0, ',', '.') }} @endif
    Status @if(abs($adjustment) < 1) Match @else Perlu Adjustment @endif

    Total Deposit (Nett) = Total Deposit Bruto dikurangi 11% biaya layanan. Total Cost = Cost Pesan + Cost Add-on (langganan mobile agent dll). Selisih positif = deposit lebih besar; negatif = cost melebihi deposit (perlu dicek: saldo awal, adjustment, refund).

    Deposit Client
    Total: Rp {{ number_format($totalDeposit, 0, ',', '.') }}
    @forelse($deposits as $i => $d) @empty @endforelse
    No Order ID Tanggal Channel Amount (Bruto) Layanan 11% Amount (Nett)
    {{ $i + 1 }} {{ $d->order_id ?? '-' }} {{ $d->paid_at?->format('d/m/Y H:i') ?? $d->created_at?->format('d/m/Y H:i') ?? '-' }} {{ $d->payment_channel ?? '-' }} Rp {{ number_format($d->amount, 0, ',', '.') }} -Rp {{ number_format($d->amount * 0.11, 0, ',', '.') }} Rp {{ number_format($d->amount * 0.89, 0, ',', '.') }}
    Belum ada deposit
    🟢 Normal 🟡 Provider cost kosong 🔴 Mismatch (selisih negatif)
    Detail Transaksi Pesan
    No Tanggal Message ID Nomor Tujuan Message Type Status Provider Cost Harga Client Saldo Terpotong Net Profit Selisih Keterangan
    @endsection @push('scripts') @endpush