<th><b>No</b></</th> <th><b>Jenis</b></</th> <th><b>Kode</b></</th> <th><b>Nama</b></td> <th><b>Harga</b></</th> <th><b>Discount</b></</th> <th><b>Subtotal</b></</th> </tr>'; $hasild = $koneksi_db->sql_query("SELECT * FROM `pos_penjualanbiayadetail` WHERE `nofaktur` like '$kodefaktur'"); while ($datad = $koneksi_db->sql_fetchrow ($hasild)){ $admin .= ' <tr> <td>'.$no.'</td> <td>'.getjenis($datad["jenis"]).'</td> <td>'.$datad["kodebiaya"].'</td> <td>'.getnamabiaya($datad["kodebiaya"]).'</td> <td>'.rupiah_format($datad["harga"]).'</td> <td>'.cekdiscountpersen($datad["subdiscount"]).'</td> <td>'.rupiah_format($datad["subtotal"]).'</td> </tr>'; $no++; } $admin .= ' <tr> <td colspan="6" align="right"><b>Total</b></td> <td >'.rupiah_format($total).'</td> </tr>'; $admin .= ' <tr> <td colspan="6" align="right"><b>Bayar</b></td> <td >'.rupiah_format($bayar).'</td> </tr>
$no++; $grandjumlah+=$jumlah; $grandsubdiscount+=$subdiscount; $grandtotal+=$subtotal; } else if($jenisproduk=='Semua'){ echo ' <tr class="border"> <td class="text-center">'.$no.'</td> <td>'.$lihatslip.'</td> <td>'.tanggalindo($tgl).'</td> <td>'.$carabayar.'</td> <td>'.getjenisdaribiaya($kodebiaya).'/'.getjenjangbiaya($kodebiaya).'</td> <td>'.$kodebiaya.'</td> <td>'.getnamabiaya($kodebiaya).'</td> <td>'.rupiah_format($harga).'</td> <td>'.$jumlah.'</td> <td>'.cekdiscountpersen($subdiscount).'</td> <td>'.rupiah_format($subtotal).'</td> <td>'.$user.'</td> </tr>'; $no++; $grandjumlah+=$jumlah; $grandsubdiscount+=$subdiscount; $grandtotal+=$subtotal; } } } echo ' <tr class="border" align="right">
<th class="border"><b>Jenis</b></</th> <th class="border"><b>Kode</b></</th> <th class="border"><b>Nama</b></td> <th class="border"><b>Jumlah</b></</td> <th class="border"><b>Harga</b></</th> <th class="border"><b>Discount</b></</th> <th class="border"><b>Subtotal</b></</th> </tr>'; $hasild = $koneksi_db->sql_query("SELECT * FROM `pos_penjualanbiayadetail` WHERE `nofaktur` like '$kode'"); while ($datad = $koneksi_db->sql_fetchrow ($hasild)){ echo ' <tr> <td class="border">'.$no.'</td> <td class="border">'.getjenis($datad["jenis"]).'</td> <td class="border">'.$datad["kodebiaya"].'</td> <td class="border">'.getnamabiaya($datad["kodebiaya"]).'</td> <td class="border">'.$datad["jumlah"].'</td> <td class="border">'.rupiah_format($datad["harga"]).'</td> <td class="border">'.cekdiscountpersen($datad["subdiscount"]).'</td> <td class="border">'.rupiah_format($datad["subtotal"]).'</td> </tr>'; $no++; } echo ' <tr class="border"> <td colspan="7" align="right"><b>Total</b></td> <td >'.rupiah_format($total).'</td> </tr>'; echo ' <tr class="border"> <td colspan="7" align="right"><b>Bayar</b></td> <td >'.rupiah_format($bayar).'</td>