<div class="row layout-top-spacing">
    <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
        <div class="card component-card_7" style="width: auto;">
            <div class="card-body">
                <h4 class="card-text">Pinjaman Pokok</h4>
                <h2 class="card-text">
                    <?= number_format($rincian_kontrak['pokok_pinjaman'], 0, ',', '.') ?>,-
                </h2>
            </div>
        </div>
    </div>
    <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
        <div class="card component-card_7" style="width: auto;">
            <div class="card-body">
                <h4 class="card-text">Besar Tanggungan</h4>
                <h2 class="card-text">
                    <?php if ($rincian_kontrak['aturan_id'] == '4') : ?>
                        <?= number_format(($rincian_kontrak['bsr_angsuran']), 0, ',', '.') ?>,-
                    <?php else: ?>
                        <?= number_format(($rincian_kontrak['bsr_angsuran'] * $rincian_kontrak['tempo_pinjaman']), 0, ',', '.') ?>,-
                    <?php endif; ?>
                </h2>
            </div>
        </div>
    </div>
    <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
        <div class="card component-card_7" style="width: auto;">
            <div class="card-body">
                <h4 class="card-text">Sudah Bayar</h4>
                <h2 class="card-text">
                    <?= number_format($sudah_bayar['sudah_bayar'], 0, ',', '.') ?>,-
                </h2>
            </div>
        </div>
    </div>
    <div class="col-xl-3 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
        <div class="card component-card_7" style="width: auto;">
            <div class="card-body">
                <h4 class="card-text">Sisa Pinjaman</h4>
                <h2 class="card-text">
                    <?php if ($rincian_kontrak['aturan_id'] == '4') : ?>
                        <?= number_format(($rincian_kontrak['bsr_angsuran']) - $sudah_bayar['sudah_bayar'], 0, ',', '.') ?>,-
                    <?php else: ?>
                        <?= number_format(($rincian_kontrak['bsr_angsuran'] * $rincian_kontrak['tempo_pinjaman']) - $sudah_bayar['sudah_bayar'], 0, ',', '.') ?>,-
                    <?php endif; ?>

                </h2>
            </div>
        </div>
    </div>
</div>