<tr> <th class="border"><b>No</b></</th> <th class="border"><b>Jenjang</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_podetail` WHERE `nopo` like '$kode'"); while ($datad = $koneksi_db->sql_fetchrow ($hasild)){ echo ' <tr> <td class="border">'.$no.'</td> <td class="border">'.getjenjangbarang($datad["kodebarang"]).'</td> <td class="border">'.$datad["kodebarang"].'</td> <td class="border">'.getnamabarang($datad["kodebarang"]).'</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>'; /*
$grandjumlah+=$jumlah; $grandsubdiscount+=$subdiscount; $grandtotal+=$subtotal; $grandrugilaba+=$rugilaba; $grandsubtotalbayar+=$subtotalbayar; }else if($jenisproduk=='Semua'){ echo ' <tr class="border"> <td class="text-center">'.$no.'</td> <td>'.$lihatslip.'</td> <td>'.tanggalindo($tgl).'</td> <td>'.getnamacustomer($kodecustomer).'</td> <td>'.$carabayar.'</td> <td>'.getjenisbarang($kodebarang).'</td> <td>'.getjenjangbarang($kodebarang).'</td> <td>'.$kodebarang.'</td> <td>'.getnamabarang($kodebarang).'</td> <td>'.rupiah_format($hargabeli).'</td> <td>'.rupiah_format($harga).'</td> <td>'.$jumlah.'</td> <td>'.cekdiscountpersen($subdiscount).'</td> <td>'.rupiah_format($subtotal).'</td> <td>'.rupiah_format($subtotalbayar).'</td> <td>'.rupiah_format($rugilaba).'</td> <td>'.$user.'</td> </tr>'; $no++; $grandjumlah+=$jumlah; $grandsubdiscount+=$subdiscount; $grandtotal+=$subtotal;
<tr> <th><b>No</b></</th> <th><b>Jenjang</b></</th> <th><b>Kode</b></</th> <th><b>Nama</b></td> <th><b>Jumlah</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_podetail` WHERE `nopo` like '$kodepo'"); while ($datad = $koneksi_db->sql_fetchrow ($hasild)){ $admin .= ' <tr> <td>'.$no.'</td> <td>'.getjenjangbarang($datad["kodebarang"]).'</td> <td>'.$datad["kodebarang"].'</td> <td>'.getnamabarang($datad["kodebarang"]).'</td> <td>'.$datad["jumlah"].'</td> <td>'.rupiah_format($datad["harga"]).'</td> <td>'.cekdiscountpersen($datad["subdiscount"]).'</td> <td>'.rupiah_format($datad["subtotal"]).'</td> </tr>'; $no++; } $admin .= ' <tr> <td colspan="7" align="right"><b>Total</b></td> <td >'.rupiah_format($total).'</td> </tr>'; /*