<?php include_once '../models/transaksi.php'; include_once '../models/masterdata.php'; include_once '../inc/functions.php'; $apt = apotek_atribute(); $attr = penjualan_load_data_barang($_GET['id']); $array = penjualan_load_data_barang_nota($_GET['id']); foreach ($attr as $rows) { } ?> <title>Nota</title> <link rel="stylesheet" href="../themes/theme_default/theme-print.css" /> <script type="text/javascript"> //window.onunload = refreshParent; //function refreshParent() { // window.opener.location.reload(); //} function cetak() { window.print(); setTimeout(function(){ window.close();},300); } </script> <body onload="cetak();"> <div class="layout-print-struk"> <table style="border-bottom: 1px solid #000;" width="100%"> <tr><td align="center" style="text-transform: uppercase; font-size: 12px;"><?php echo $apt->nama; ?> </td> </tr> <tr><td align="center" style="font-size: 12px;"><?php
<?php include_once '../models/transaksi.php'; include_once '../inc/functions.php'; $detail = "<table width=300px class=list-data>"; $array = penjualan_load_data_barang($_GET['id']); $total = 0; foreach ($array as $i => $rows) { $detail .= "<tr><td>" . $rows->nama . " " . $rows->kekuatan . " " . $rows->satuan . "</td><td>" . $rows->qty . "</td><td align=right>" . rupiah($rows->harga_jual) . "</td><td align=right>" . rupiah($rows->subtotal) . "</td></tr>"; $total = $total + $rows->subtotal; } $detail .= "<tr><td colspan=3>Total</td><td align=right>" . rupiah($total) . "</td></tr>"; $detail .= "</table>"; echo $detail; die;