<page backtop="0mm" backbottom="0mm" backleft="0mm" backright="0mm">
    <div style="font-size: 12px;">
        <div style="line-height: 15px;">
            <div style="text-align:center">
                <h4>Laporan Biaya Operasional <br><br>PT. HRM Mining</h4>
                periode <?php echo tgl_indo($tanggal_report_awal) ?> - <?php echo tgl_indo($tanggal_report_akhir) ?><br /><br />
            </div>
            <table style="width:100%; border-collapse: collapse;">
                <tr>
                    <th style="border:black solid 1px; padding:5px; text-align:center; width:10%;">NO</th>
                    <th style="border:black solid 1px; padding:5px; text-align:center; width:70%;">DESCRIPTION</th>
                    <th style="border:black solid 1px; padding:5px; text-align:center; width:20%;">TOTAL</th>
                </tr>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"><b>1</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;"><b>Pendapatan Operasional :</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                </tr>
                <?php
                $total_pendapatan = 0;
                $no = 1;
                foreach ($pendapatan as $pendapatan) {
                ?>
                    <tr>
                        <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                        <td style="border:black solid 1px; padding:5px; text-align:left;"><?php echo $no ?>. Pendapatan Batubara Keluar</td>
                        <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format(($pendapatan->pendapatan) / 1000) ?></td>
                    </tr>
                <?php
                    $total_pendapatan = $total_pendapatan + $pendapatan->pendapatan;
                    $no++;
                }
                ?>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"><b>Total Pendapatan</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><b><?php echo number_format(($total_pendapatan) / 1000) ?></b></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"><b>2</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;"><b>Beban Operasional :</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">1. Biaya Rental [ Alat Berat / Unit DT ]</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($biaya_sewa_alat_berat) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">2. Biaya Pemakaian Solar Operasional Karyawan</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"> <?php echo number_format($resume_pemakaian_solar) ?></td>
                </tr>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">3. Biaya Pemakaian Solar Driver DT</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($resume_pemakaian_solar_driver) ?></td>
                </tr>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">4. Biaya Pemakaian Solar Operator</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($resume_pemakaian_solar_operator) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">5. Biaya Gaji Karyawan</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($resume_gaji_karyawan) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">6. Biaya Ritase Driver</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($resume_ritase_driver) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">7. Biaya HM Operator</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($resume_hm_operator) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">8. Biaya Blok Fee</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($resume_blok_fee) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">9. Biaya Pembelian Sparepart</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($biaya_sparepart) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">10. Beban Amortisasi</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($amortisasi) ?></td>
                </tr>

                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:left;">11. Biaya Lain-lain</td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><?php echo number_format($biaya_lain) ?></td>
                </tr>



                <!-- Ori File <?php
                                $total_beban = $biaya_sewa_crusher + $biaya_sewa_alat_berat + $biaya_konsumsi + $biaya_lain + $biaya_sparepart + $amortisasi;
                                ?> End of Ori File-->

                <?php
                $total_beban = $biaya_sewa_alat_berat + $biaya_lain + $biaya_sparepart + $amortisasi + $resume_ritase_driver + $resume_hm_operator + $resume_gaji_karyawan + $resume_blok_fee;
                ?>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:center;"></td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><b>Total</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><b><?php echo number_format($total_beban) ?></b></td>
                </tr>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:right;" colspan="2"><b>Total Beban</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><b><?php echo number_format($total_beban) ?></b></td>
                </tr>
                <tr>
                    <td style="border:black solid 1px; padding:5px; text-align:right;" colspan="2"><b>Pendapatan Bersih</b></td>
                    <td style="border:black solid 1px; padding:5px; text-align:right;"><b><?php echo number_format(($total_pendapatan - $total_beban) / 1000) ?></b></td>
                </tr>
            </table>

        </div>
    </div>
</page>