Ejemplo n.º 1
0
        ?>
</td>
			<td class="text-center"><?php 
        echo number_format($uang_pesanan);
        ?>
</td>
			<td class="text-center"><?php 
        echo kontgl(tgltgl(date("d M Y", strtotime($tgl_rencana))));
        ?>
</td>
			<td class="text-center"><?php 
        echo number_format($nilai);
        ?>
</td>
		</tr>
		<?php 
        if ($i % $per_page === 0) {
            echo '<tr><td class="nb"><div class="newpage"></div></td></tr>';
            th_print();
        }
        $i++;
        $obj->movenext();
    }
}
?>
</table>
</body>
</html>
<?php 
close($conn);
exit;
}
.break { word-wrap:break-word; }
.nowrap { white-space:nowrap; }
.va-top { vertical-align:top; }
.va-bottom { vertical-align:bottom; }
.text-left { text-align:left; }
.text-center { text-align:center; }
.text-right { text-align:right; }
</style>
</head>
<body onload="window.print()">

<table class="data">

<?php 
echo th_print();
if ($total_data > 0) {
    $query = "\n\tSELECT *\n\tFROM\n\tSPP a \n\tLEFT JOIN STOK b ON a.KODE_BLOK = b.KODE_BLOK\n\tLEFT JOIN TIPE c ON b.KODE_TIPE = c.KODE_TIPE\n\tLEFT JOIN HARGA_TANAH d ON b.KODE_SK_TANAH = d.KODE_SK\n\tLEFT JOIN HARGA_BANGUNAN e ON b.KODE_SK_BANGUNAN = e.KODE_SK\n\tLEFT JOIN FAKTOR f ON b.KODE_FAKTOR = f.KODE_FAKTOR\n\tLEFT JOIN CS_VIRTUAL_ACCOUNT g ON a.NOMOR_CUSTOMER = g.NOMOR_VA\t\t\n\t\t{$query_search}\n\t";
    $obj = $conn->Execute($query);
    $i = 1;
    $total_rows = $obj->RecordCount();
    while (!$obj->EOF) {
        $id = $obj->fields['KODE_BLOK'];
        $luas_tanah = $obj->fields['LUAS_TANAH'];
        $luas_bangunan = $obj->fields['LUAS_BANGUNAN'];
        $tanah = $luas_tanah * $obj->fields['HARGA_TANAH'];
        $disc_tanah = round($tanah * $obj->fields['DISC_TANAH'] / 100, 0);
        $nilai_tambah = round(($tanah - $disc_tanah) * $obj->fields['NILAI_TAMBAH'] / 100, 0);
        $nilai_kurang = round(($tanah - $disc_tanah) * $obj->fields['NILAI_KURANG'] / 100, 0);
        $faktor = $nilai_tambah - $nilai_kurang;
        $total_tanah = $tanah - $disc_tanah + $faktor;