
<?php $__env->startSection('title', 'Laporan Keuangan'); ?>
<?php $__env->startSection('content'); ?>

<table class="table table-bordered">
    <thead>
        <tr>
            <th>Tanggal Awal</th>
            <th>Tanggal Akhir</th>
            <th>Total Penjualan</th>
            <th>Total Reseller</th>
            <th>Total Barter</th>
            <th>Biaya Bahan</th>
            <th>Biaya Operasional</th>
            <th>Total Biaya</th>
            <th>Laba Bersih</th>
        </tr>
    </thead>
    <tbody>

    <?php $__currentLoopData = $weeks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $week): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
            $totalBiaya = $week['material_cost'] + $week['operational_cost'];
            $laba = ($week['total_sales'] + $week['total_reseller']) 
                    - ($totalBiaya + $week['total_barter']);
        ?>
        <tr>
            <td><?php echo e($week['start']->format('d-m-Y')); ?></td>
            <td><?php echo e($week['end']->format('d-m-Y')); ?></td>
            <td><?php echo e(number_format($week['total_sales'])); ?></td>
            <td><?php echo e(number_format($week['total_reseller'])); ?></td>
            <td>-<?php echo e(number_format($week['total_barter'])); ?></td>
            <td><?php echo e(number_format($week['material_cost'])); ?></td>
            <td><?php echo e(number_format($week['operational_cost'])); ?></td>
            <td><?php echo e(number_format($totalBiaya)); ?></td>
            <td><?php echo e(number_format($laba)); ?></td>
        </tr>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    </tbody>
</table>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\PAW\PiaZhang\resources\views/reports/financial/index.blade.php ENDPATH**/ ?>