Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ctk =array();
- $laporan = tampilkan_laporan_packing_tanggal();
- while($pilih = mysqli_fetch_array($laporan)){
- $ctk[$pilih['tanggal']][$pilih['no_karton']][]=array('no_po'=>$pilih['no_po'],
- 'kode_barcode'=>$pilih['kode_barcode'],
- 'style'=>$pilih['style'],
- 'warna'=>$pilih['warna'],
- 'size'=>$pilih['size'],
- 'jumlah_size'=>$pilih['jumlah_size']
- );
- }
- foreach($ctk as $tgl=>$no_kartons){
- foreach($no_kartons as $no_karton as $data)
- {
- $txt="<table>
- <tr><td>Tanggal Scan</td><td>$tgl</td></tr>
- <tr><td>No Karton</td><td>$no_karton</td></tr>
- </table>";
- $txt.="<table border='1' class='table table-hover' width=100% cellpadding=6 >
- <thead>
- <tr>
- <th style='background-color:#f4f4f4; '><center>NO PO</center></th>
- <th style='background-color:#f4f4f4; '><center>Kode Barcode</center></th>
- <th style='background-color:#f4f4f4; '><center>STYLE</center></th>
- <th style='background-color:#f4f4f4; '><center>QTY</center></th>
- </tr>
- </thead>
- <tbody>";
- foreach($data as $pilih)
- {
- $txt .= "<tr>
- <td align='center'>$pilih[no_po]</td>
- <td align='center'>$pilih[kode_barcode]</td>
- <td align='center'>$pilih[style] ($pilih[warna]) - $pilih[size]</td>
- <td align='center'>$pilih[jumlah_size]</td>
- </tr>"
- }
- $txt.="</tbody></table>";
- echo $txt.'<br><br>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement