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

<?php $__env->startSection('content'); ?>

<div class="row mb-3">
    <div class="col-md-12">
        <form method="GET" action="<?php echo e(route('reports.monthly')); ?>" class="row g-3 align-items-end">
            <div class="col-md-6">
                <label class="form-label">Tahun</label>
                <input type="number" name="year" class="form-control" value="<?php echo e($year); ?>">
            </div>

            <div class="col-md-6">
                <?php if (isset($component)) { $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.button','data' => ['type' => 'submit']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'submit']); ?>Filter <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $attributes = $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $component = $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
            </div>
        </form>
    </div>
</div>

<?php
$headers = [
    'Bulan',
    'Total Penjualan',
    'Total Reseller',
    'Total Barter',
    'Biaya Bahan',
    'Biaya Operasional',
    'Total Biaya',
    'Laba Bersih'
];
?>

<div class="table-responsive">
<table class="table table-bordered table-striped">
    <thead>
        <tr>
            <?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <th><?php echo e($header); ?></th>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tr>
    </thead>

    <tbody>
        <?php $__empty_1 = true; $__currentLoopData = $months; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $m): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr>
            <td><?php echo e($m['bulan']); ?></td>
            <td>Rp <?php echo e(number_format($m['total_penjualan'],0,',','.')); ?></td>
            <td>Rp <?php echo e(number_format($m['total_reseller'],0,',','.')); ?></td>
            <td>Rp <?php echo e(number_format($m['total_barter'],0,',','.')); ?></td>
            <td>Rp <?php echo e(number_format($m['biaya_bahan'],0,',','.')); ?></td>
            <td>Rp <?php echo e(number_format($m['biaya_operasional'],0,',','.')); ?></td>
            <td>Rp <?php echo e(number_format($m['total_biaya'],0,',','.')); ?></td>
            <td>Rp <?php echo e(number_format($m['laba_bersih'],0,',','.')); ?></td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr>
            <td colspan="8" class="text-center text-muted py-3">
                No data available.
            </td>
        </tr>
        <?php endif; ?>
    </tbody>
</table>
</div>

<?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/monthly.blade.php ENDPATH**/ ?>