@extends('layouts.admin')

@section('content')
<div class="content-header">
    <div class="container-fluid">
        <h1 class="m-0"><i class="fas fa-chart-line mr-2"></i>Laporan Perubahan Modal</h1>
    </div>
</div>

<section class="content">
    <div class="container-fluid">
        <div class="card card-primary card-outline">
            <div class="card-header">
                <h3 class="card-title">Perubahan Modal (Ekuitas)</h3>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-striped">
                        <tbody>
                            <tr>
                                <td><strong>Modal Awal</strong></td>
                                <td class="text-right">Rp{{ number_format($data['modal_awal'], 0, ',', '.') }}</td>
                            </tr>
                            <tr>
                                <td>Laba Bersih Harian Berjalan</td>
                                <td class="text-right {{ $data['laba_bersih'] < 0 ? 'text-danger' : 'text-success' }}">{{ $data['laba_bersih'] < 0 ? '-' : '+' }} Rp{{ number_format(abs($data['laba_bersih']), 0, ',', '.') }}</td>
                            </tr>
                            <tr>
                                <td>Prive (Penarikan Modal)</td>
                                <td class="text-right {{ $data['prive'] < 0 ? 'text-success' : 'text-danger' }}">{{ $data['prive'] < 0 ? '+' : '-' }} Rp{{ number_format(abs($data['prive']), 0, ',', '.') }}</td>
                            </tr>
                            <tr class="bg-primary text-white">
                                <td><strong>Modal Akhir</strong></td>
                                <td class="text-right"><strong>Rp{{ number_format($data['modal_akhir'], 0, ',', '.') }}</strong></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
@endsection
