Beispiel #1
0
           <th>H.Beli</th>
           <th>H.Jual</th>
            <th width="30%">Aksi</th>
        </tr>
    </thead>';
	$admin.='<tbody>';
$hasil = $koneksi_db->sql_query( "SELECT * FROM po_produk" );
while ($data = $koneksi_db->sql_fetchrow($hasil)) { 
$kode=$data['kode'];
$nama=$data['nama'];
$jenis=$data['jenis'];
$jumlah=$data['jumlah'];
$hargabeli=$data['hargabeli'];
$hargajual=$data['hargajual'];
$admin.='<tr>
            <td>'.getjenis($jenis).'</td>
            <td>'.$kode.'</td>
            <td>'.$nama.'</td>
            <td>'.$jumlah.'</td>
            <td>'.$hargabeli.'</td>
            <td>'.$hargajual.'</td>
            <td><a href="?pilih=produk&amp;mod=yes&amp;aksi=del&amp;id='.$data['id'].'" onclick="return confirm(\'Apakah Anda Yakin Ingin Menghapus Data Ini ?\')"><span class="btn btn-danger">Hapus</span></a> <a href="?pilih=produk&amp;mod=yes&amp;aksi=edit&amp;id='.$data['id'].'"><span class="btn btn-warning">Edit</span></a></td>
        </tr>';
}   
$admin.='</tbody>
</table>';
}

if($_GET['aksi']== 'deljenis'){    
	global $koneksi_db;    
	$id     = int_filter($_GET['id']);    
Beispiel #2
0
include 'includes/mysql.php';
include 'includes/configsitus.php';
global $koneksi_db,$url_situs;
$tglmulai 		= $_GET['tglmulai'];
$tglakhir 		= $_GET['tglakhir'];
$carabayar 		= $_GET['carabayar'];
$detail 		= $_GET['detail'];
$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 kodebarang='$kodebarang'";
$namakodebarang=getnamabarang($kodebarang);
		 $namajenisproduk ="Semua";
}
if($kodecustomer=='Semua'){
         $wherecustomer="";
}else{
         $wherecustomer="and kodecustomer='$kodecustomer'";
}
switch ($carabayar) {
Beispiel #3
0
<?php

include 'includes/config.php';
include 'includes/mysql.php';
include 'includes/configsitus.php';
global $koneksi_db,$url_situs;
$kodejenis 		= $_GET['kodejenis'];
$namakodejenis 		= getjenis($_GET['kodejenis']);
if($namakodejenis==''){
$namakodejenis ='Semua';
}
echo "<html><head><title>Laporan Stok Awal </title>";
echo '<style type="text/css">
   table { page-break-inside:auto; 
    font-size: 0.8em; /* 14px/16=0.875em */
font-family: "Times New Roman", Times, serif;
   }
   tr    { page-break-inside:avoid; page-break-after:auto }
	table {
    border-collapse: collapse;}
	th,td {
    padding: 5px;
}
.border{
	border: 1px solid black;
}
.border td{
	border: 1px solid black;
}
body {
	margin		: 0;
$jenis = $datas2['jenis'];
$jumlah = $datas2['jumlah'];
$harga = $datas2['harga'];
$subdiscount = $datas2['subdiscount'];
$subtotal = $datas2['subtotal'];
$subhargabeli = ($hargabeli*$jumlah);
$rugilaba = $subtotal-$subhargabeli;
$jenisbiayaid = getjenisbiayaid($kodebiaya);
if($jenisbiayaid==$jenisproduk){
echo '
<tr class="border">
<td class="text-center">'.$no.'</td>
<td>'.$lihatslip.'</td>
<td>'.tanggalindo($tgl).'</td>
<td>'.$carabayar.'</td>
<td>'.getjenis($jenis).'/'.$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;
}
else
if($jenisproduk=='Semua'){
echo '
$admin .= '	
	<tr>
			<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>
<tr>
<th class="border"><b>No</b></</th>
<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_penjualanjasadetail` 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["kodejasa"].'</td>
<td class="border">'.getnamajasa($datad["kodejasa"]).'</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>';
	/*