本文整理汇总了PHP中getnamabarang函数的典型用法代码示例。如果您正苦于以下问题:PHP getnamabarang函数的具体用法?PHP getnamabarang怎么用?PHP getnamabarang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getnamabarang函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<tr>
<th class="border"><b>No</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 `po_podetail` WHERE `nopo` like '$kode'");
while ($datad = $koneksi_db->sql_fetchrow ($hasild)){
echo '
<tr>
<td class="border">'.$no.'</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="6" align="right"><b>Total</b></td>
<td >'.rupiah_format($total).'</td>
</tr>';
echo '
<tr class="border">
<td colspan="6" align="right"><b>Discount</b></td>
示例2: mysql_query
<td>Kode Barang</td>
<td>Nama Barang</td>
<td>Stok Awal</td>
<td>Stok Akhir</td>
</tr>';
$no =1;
/****************************/
$st2 = mysql_query ("SELECT * FROM pos_alur_stok where transaksi like'Stok Awal'");
while($datast2 = mysql_fetch_array($st2)){
$idsa = $datast2['id'];
$tglsa = $datast2['tgl'];
$transaksi = $datast2['transaksi'];
$kodebarangsa = $datast2['kodebarang'];
$jumlahsa = $datast2['jumlah'];
$getnamabarangsa = getnamabarang($kodebarangsa);
$getjenisbarang = getjenisbarang($kodebarangsa);
$getidjenisbarang=getidjenisbarang($kodebarangsa);
$getstokbarang=getstokbarang($kodebarangsa);
if($kodejenis!=''){
if($getidjenisbarang==$kodejenis){
echo '
<tr class="border">
<td class="text-center">'.$no.'</td>
<td>'.tanggalindo($datast2['tgl']).'</td>
<td>'.$datast2['transaksi'].'</td>
<td>'.$datast2['kode'].'</td>
<td>'.$kodebarangsa.'</td>
<td>'.$getnamabarangsa.'</td>
<td>'.$datast2['jumlah'].'</td>
<td>'.$getstokbarang.'</td>
示例3:
$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;
$grandrugilaba+=$rugilaba;
$grandsubtotalbayar+=$subtotalbayar;
示例4: getnamacustomer
$jenisproduk = $_GET['jenisproduk'];
$kodebarang = $_GET['kodebarang'];
$jenisproduk = $_GET['jenisproduk'];
$kodecustomer = $_GET['kodecustomer'];
$namacustomer = getnamacustomer($kodecustomer);
if($jenisproduk!='Semua'){
$wherekodebarang="";
$detail ='ok';
$namajenisproduk = getjenis($jenisproduk);
$namakodebarang="Semua";
}
if($kodebarang!='Semua'){
$jenisproduk="Semua";
$detail ='ok';
$wherekodebarang="and kodejasa='$kodebarang'";
$namakodebarang=getnamabarang($kodebarang);
$namajenisproduk ="Semua";
}
if($kodecustomer=='Semua'){
$wherecustomer="";
}else{
$wherecustomer="and kodecustomer='$kodecustomer'";
}
switch ($carabayar) {
case 'Tunai':
$wherestatus="and carabayar='Tunai'";
break;
}
echo "<html><head><title>Laporan Penjualan Jasa</title>";
echo '<style type="text/css">
table { page-break-inside:auto;
示例5: while
<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>';
/*
$admin .= '
<tr>
示例6: mysql_query
<td>'.$kodebarang.'</td>
<td>'.$getnamabarang.'</td>
<td>'.$tjumlah.'</td>
</tr>';
$no++;
}
/************* STOK BETWEEN ************/
$st = mysql_query ("SELECT * FROM pos_alur_stok where tgl >='$tglmulai' and tgl <='$tglakhir' $wherekodebarang order by tgl asc");
while($datast = mysql_fetch_array($st)){
$id = $datast['id'];
$tgl = $datast['tgl'];
$transaksi = $datast['transaksi'];
$kode = $datast['kode'];
$kodebaranga = $datast['kodebarang'];
$jumlah = $datast['jumlah'];
$getnamabarang = getnamabarang($kodebaranga);
if($transaksi=='Penjualan' or $transaksi=='Retur Pembelian'or $transaksi=='Mutasi Keluar'){
$jumlah =$jumlah*(-1);
}
if($transaksi=='Pembelian'){
$lihatslip = '<a href="cetak_notainvoice.php?kode='.$datast['kode'].'&lihat=ok"target="new">'.$kode.'</a>';
}elseif($transaksi=='Retur Pembelian'){
$lihatslip = '<a href="cetak_notareturbeli.php?kode='.$datast['kode'].'&lihat=ok"target="new">'.$kode.'</a>';
}elseif($transaksi=='Penjualan'){
$lihatslip = '<a href="cetak_notafaktur.php?kode='.$datast['kode'].'&lihat=ok"target="new" >'.$kode.'</a>';
}elseif($transaksi=='Retur Penjualan'){
$lihatslip = '<a href="cetak_notareturjual.php?kode='.$datast['kode'].'&lihat=ok"target="new">'.$kode.'</a>';
}
echo '
<tr class="border">
<td class="text-center">'.$no.'</td>
示例7: mysql_query
<tr bgcolor="#E3FDE6">
<td colspan="3"><b>Detail</b></td>
</tr>
<tr>
<td>Nama Barang</td>
<td width="200px">Jumlah</td>
<td width="200px">Harga</td>
</tr>';
$s = mysql_query("SELECT * FROM `transdetail` where idtrans='{$idtrans}'");
while ($data = mysql_fetch_array($s)) {
$kdbarang = $data['kdbarang'];
$jumlah = $data['jumlah'];
$harga = $data['harga'];
$admin .= '
<tr>
<td>' . getnamabarang($kdbarang) . '</td>
<td>' . $jumlah . '</td>
<td>' . rupiah_format($harga) . '</td>
</tr>';
}
$admin .= '
</table>
<table class="table table-hover">
<form action="" method="post" enctype ="multipart/form-data" >
<tr bgcolor="#E3FDE6">
<td colspan="3"><b>Tambahan</b></td>
</tr>
<tr>
<td>Harga + Ongkos Kirim</td>
<td>:</td>
<td><input type="text" name="tharga2" value="' . $tharga2 . '" size="30" class="form-control"required></td>
示例8: foreach
<th><b>Jumlah</b></</td>
<th><b>Harga</b></</th>
<th><b>Discount</b></</th>
<th><b>SubDiscount</b></</th>
<th><b>Subtotal</b></</th>
<th><b>Aksi</b></</th>
</tr>';
foreach ($_SESSION["product_id"] as $cart_itm) {
$array = $no - 1;
$nilaidiscount = cekdiscount($cart_itm["subdiscount"], $cart_itm["harga"]);
$admin .= '
<tr>
<td>' . $no . '</td>
<td>' . getjenjang($cart_itm["jenjang"]) . '</td>
<td>' . $cart_itm["kode"] . '</td>
<td>' . getnamabarang($cart_itm["kode"]) . '</td>
<td><input align="right" type="text" name="jumlahbeli[' . $array . ']" value="' . $cart_itm["jumlah"] . '"class="form-control"></td>
<td>' . $cart_itm["harga"] . '</td>
<td>' . $cart_itm["subdiscount"] . '</td>
<td>' . $nilaidiscount . '</td>
<td>' . $cart_itm["subtotal"] . '</td>
<td>
<input align="right" type="hidden" name="harga[' . $array . ']" value="' . $cart_itm["harga"] . '"class="form-control">
<input align="right" type="hidden" name="subdiscount[' . $array . ']" value="' . $cart_itm["jumlah"] . '"class="form-control">
<input align="right" type="hidden" name="jumlahbeliasli[' . $array . ']" value="' . $cart_itm["jumlahbeliasli"] . '"class="form-control">
<input type="hidden" name="kode" value="' . $cart_itm["kode"] . '">
</td>
</tr>';
$total += $cart_itm["subtotal"];
$no++;
}