}else{ $hasil = mysql_query( "INSERT INTO `pos_produkjasa` VALUES ('','$jenis','$jenjang','$kode','$nama','$hargajual')" ); if($hasil){ $admin .= '<div class="sukses"><b>Berhasil di Buat.</b></div>'; }else{ $admin .= '<div class="error"><b> Gagal di Buat.</b></div>'; } unset($jenjang); unset($kode); unset($nama); unset($jenis); unset($hargajual); } } $generatekode=generatekode('KPR','kode','pos_produk'); $jenjang = !isset($jenjang) ? '' : $jenjang; $kode = !isset($kode) ? $generatekode : $kode; $nama = !isset($nama) ? '' : $nama; $jenis = !isset($jenis) ? '' : $jenis; $hargajual = !isset($hargajual) ? '0' : $hargajual; $admin .= '<div class="panel panel-info"> <div class="panel-heading"><h3 class="panel-title">Tambah Jasa</h3></div>'; $admin .= ' <form method="post" action=""> <table border="0" cellspacing="0" cellpadding="0"class="table table-condensed"> <tr> <td>Jenis</td> <td>:</td>
}else{ $hasil = mysql_query( "INSERT INTO `pos_produkjasa` VALUES ('','$jenis','$jenjang','$kode','$nama','$hargajual')" ); if($hasil){ $admin .= '<div class="sukses"><b>Berhasil di Buat.</b></div>'; }else{ $admin .= '<div class="error"><b> Gagal di Buat.</b></div>'; } unset($jenjang); unset($kode); unset($nama); unset($jenis); unset($hargajual); } } $generatekode=generatekode('KPJ','kode','pos_produkjasa'); $jenjang = !isset($jenjang) ? '' : $jenjang; $kode = !isset($kode) ? $generatekode : $kode; $nama = !isset($nama) ? '' : $nama; $jenis = !isset($jenis) ? '' : $jenis; $hargajual = !isset($hargajual) ? '0' : $hargajual; $admin .= '<div class="panel panel-info"> <div class="panel-heading"><h3 class="panel-title">Tambah Jasa</h3></div>'; $admin .= ' <form method="post" action=""> <table border="0" cellspacing="0" cellpadding="0"class="table table-condensed"> <tr> <td>Jenis</td> <td>:</td>
$hasil = mysql_query( "INSERT INTO `pos_supplier` VALUES ('','$kode','$nama','$alamat','$telepon','$carabayar','$termin')" ); if($hasil){ $admin .= '<div class="sukses"><b>Berhasil di Buat.</b></div>'; }else{ $admin .= '<div class="error"><b> Gagal di Buat.</b></div>'; } unset($nama); unset($kode); unset($alamat); unset($telepon); unset($carabayar); unset($termin); } } $generatekode=generatekode('SUP','kode','pos_supplier'); $kode = !isset($kode) ? $generatekode : $kode; $nama = !isset($nama) ? '' : $nama; $alamat = !isset($alamat) ? '' : $alamat; $telepon = !isset($telepon) ? '' : $telepon; $carabayar = !isset($carabayar) ? '' : $carabayar; $termin = !isset($termin) ? '0' : $termin; $sel2 = '<select name="carabayar" class="form-control">'; $arr2 = array ('Tunai','Debet Card','Hutang'); foreach ($arr2 as $kk=>$vv){ if ($carabayar == $vv){ $sel2 .= '<option value="'.$vv.'" selected="selected">'.$vv.'</option>'; }else { $sel2 .= '<option value="'.$vv.'">'.$vv.'</option>'; } }
}else{ $hasil = mysql_query( "INSERT INTO `pos_produkbiaya` VALUES ('','$jenis','$jenjang','$kode','$nama','$hargajual')" ); if($hasil){ $admin .= '<div class="sukses"><b>Berhasil di Buat.</b></div>'; }else{ $admin .= '<div class="error"><b> Gagal di Buat.</b></div>'; } unset($jenjang); unset($kode); unset($nama); unset($jenis); unset($hargajual); } } $generatekode=generatekode('KBB','kode','pos_produkbiaya'); $jenjang = !isset($jenjang) ? '' : $jenjang; $kode = !isset($kode) ? $generatekode : $kode; $nama = !isset($nama) ? '' : $nama; $jenis = !isset($jenis) ? '' : $jenis; $hargajual = !isset($hargajual) ? '0' : $hargajual; $admin .= '<div class="panel panel-info"> <div class="panel-heading"><h3 class="panel-title">Tambah Biaya</h3></div>'; $admin .= ' <form method="post" action=""> <table border="0" cellspacing="0" cellpadding="0"class="table table-condensed"> <tr> <td>Jenis</td> <td>:</td>