UTS PBKK - POS Rakit Gaming
Untuk tugas UTS PBKK ini, saya membuat POS untuk toko virtual bernama Rakit Gaming yang berguna untuk mencatak transaksi yang terjadi pada toko tersebut. Spesifikasi / fitur yang terdapat di POS ini antara lain:
Source Code:
3. Master Data
3.1.1. Master Data Barang
3.1.2. Tambah Data Barang
3.2 Master Data Pelanggan
3.3 Master Data Pelanggan Setelah Ditambah
Source Code:
3.3 Master Data Pegawai
Source Code:
3.4 Master Data Contact
Source Code:
4. Penjualan
6. Cetak Nota
8. Cetak Laporan
1. Akan terdapat 2 User (Admin & Staff)
2. Login
3. Dashboard
4. Penjualan
5. Laporan
6. Cetak Nota
7. Cetak Laporan Penjualan
8. Master data (hanya diakses oleh Admin)
9. Logout
3. Dashboard
4. Penjualan
5. Laporan
6. Cetak Nota
7. Cetak Laporan Penjualan
8. Master data (hanya diakses oleh Admin)
9. Logout
1. Login
Source Code:
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo $title?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Aplikasi inventori sederhana dengan CI & Bootstrap">
<meta name="author" content="">
<!-- CSS -->
<link rel="stylesheet" href="<?php echo base_url('asset/css/bootstrap.css')?>"/>
<link rel="stylesheet" href="<?php echo base_url('asset/css/bootstrap-responsive.css')?>"/>
<link rel="stylesheet" href="<?php echo base_url('asset/css/style.css')?>"/>
<style>
.chzn-container-single .chzn-search input{
width: 100%;
}
body {
padding-top: 70px;
background-color: #3d579d;
color: #fff;
}
a{
color: #002166;
}
a:hover{
text-decoration: none;
color: #fff;
}
.form-signin {
max-width: 300px;
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #3d579d;
border: 2px solid rgba(255,255,255,0.3);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);
color: #ffffff;
}
.form-signin:hover{
border: 2px solid #fff;
}
.form-signin .form-signin-heading,
.form-signin {
margin-bottom: 10px;
}
.form-signin input[type="text"],
.form-signin input[type="password"] {
font-size: 16px;
height: auto;
margin-bottom: 15px;
padding: 7px 9px;
}
.text-center{
text-align: center;
}
</style>
<!-- Fav icon -->
<link rel="shortcut icon" href="<?php echo base_url('asset/img/favicon.ico')?>">
<!-- JS -->
<script type="text/javascript" src="<?php echo base_url('asset/js/jquery.js')?>"></script>
<script type="text/javascript" src="<?php echo base_url('asset/js/bootstrap.js')?>"></script>
</head>
<body>
<div class="container">
<div class="loading navbar-fixed-top" style="display: none">
<div class="progress progress-primary progress-striped active">
<div class="bar" style="width: 100%;"></div>
</div>
</div>
<div class="alert alert-info text-center">
Admin= Username : admin , Password : admin <br/>
User= Username : staff , Password : staff
</div>
<br>
<form class="form-signin" action="<?= site_url('login/cek_login')?>" method="post">
<hr>
<h4 class="form-signin-heading text-center">POS Rakit Gaming</h4>
<!-- NOTIF -->
<?php
$message = $this->session->flashdata('notif');
if($message){
echo '<p class="alert alert-danger text-center">'.$message .'</p>';
}?>
<hr>
<input type="text" class="input-block-level" placeholder="Username" name="username" required="">
<input type="password" class="input-block-level" placeholder="Password" name="password" required="">
<button class="btn btn-large" type="submit">Sign in</button>
</form>
<hr>
<div class="footer">
<p></p>
</div>
</div>
</body>
</html>
2. Dashboard
<!--========================= Content Wrapper ==============================-->
<div class="container">
<h1 class="text-info" style="text-align: center">POS Rakit Gaming</h1>
<br/>
<?php if(isset($dt_contact)){
foreach($dt_contact as $row){
?>
<div class="row well" style="text-align: center">
<h3><?php echo $row->nama?></h3>
<h4><?php echo $row->desc?></h4>
<h5 class="muted"><?php echo $row->alamat?></h5>
<h5 class="muted"><?php echo $row->email?> || <?php echo $row->telp?> || <?php echo $row->website?></h5>
</div>
<?php }
}
?>
</div>
3. Master Data
<!--========================= Content Wrapper ==============================-->
<div class="tabbable tabs-left">
<ul class="nav nav-tabs">
<li class="active"><a href="#tabBarang" data-toggle="tab"><strong>BARANG</strong></a></li>
<li><a href="#tabPelanggan" data-toggle="tab"><strong>PELANGGAN</strong></a></li>
<li><a href="#tabPegawai" data-toggle="tab"><strong>PEGAWAI</strong></a></li>
<li><a href="#tabContact" data-toggle="tab"><strong>CONTACT</strong></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabBarang">
<?php $this->load->view('pages/v_tab_master_barang')?>
</div>
<div class="tab-pane" id="tabPelanggan">
<?php $this->load->view('pages/v_tab_master_pelanggan')?>
</div>
<div class="tab-pane" id="tabPegawai">
<?php $this->load->view('pages/v_tab_master_pegawai')?>
</div>
<div class="tab-pane" id="tabContact">
<?php $this->load->view('pages/v_tab_master_contact')?>
</div>
</div>
</div>
3.1.1. Master Data Barang
3.1.2. Tambah Data Barang
Source Code:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Kode Barang</th>
<th>Nama Barang</th>
<th>Stok</th>
<th>Harga</th>
<th class="span2">
<a href="#modalAddBarang" class="btn btn-mini btn-block btn-inverse" data-toggle="modal">
<i class="icon-plus-sign icon-white"></i> Tambah Data
</a>
</th>
</tr>
</thead>
<tbody>
<?php
$no=1;
if(isset($data_barang)){
foreach($data_barang as $row){
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $row->kd_barang; ?></td>
<td><?php echo $row->nm_barang; ?></td>
<td><?php echo $row->stok; ?></td>
<td><?php echo currency_format($row->harga);?></td>
<td>
<a class="btn btn-mini" href="#modalEditBarang<?php echo $row->kd_barang?>" data-toggle="modal"><i class="icon-pencil"></i> Edit</a>
<a class="btn btn-mini" href="<?php echo site_url('master/hapus_barang/'.$row->kd_barang);?>"
onclick="return confirm('Anda yakin?')"> <i class="icon-remove"></i> Hapus</a>
</td>
</tr>
<?php }
}
?>
</tbody>
</table>
<!-- ============ MODAL ADD BARANG =============== -->
<div id="modalAddBarang" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Tambah Data Barang</h3>
</div>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/tambah_barang')?>">
<div class="modal-body">
<div class="control-group">
<label class="control-label">Kode Barang</label>
<div class="controls">
<input name="kd_barang" type="text" value="<?php echo $kd_barang; ?>" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label" >Nama Barang</label>
<div class="controls">
<input name="nm_barang" type="text" placeholder="Input Nama Barang...">
</div>
</div>
<div class="control-group">
<label class="control-label" >Stok</label>
<div class="controls">
<input name="stok" type="text" placeholder="Input Stok...">
</div>
</div>
<div class="control-group">
<label class="control-label">Harga</label>
<div class="controls">
<input name="harga" type="text" placeholder="Input Harga...">
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button type="submit" class="btn btn-primary">Save</button>
</div>
</form>
</div>
<!-- ============ MODAL EDIT BARANG =============== -->
<?php
if (isset($data_barang)){
foreach($data_barang as $row){
?>
<div id="modalEditBarang<?php echo $row->kd_barang?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Edit Data Barang</h3>
</div>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/edit_barang')?>">
<div class="modal-body">
<div class="control-group">
<label class="control-label">Kode Barang</label>
<div class="controls">
<input name="kd_barang" type="text" value="<?php echo $row->kd_barang;?>" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label" >Nama Barang</label>
<div class="controls">
<input name="nm_barang" type="text" value="<?php echo $row->nm_barang;?>" >
</div>
</div>
<div class="control-group">
<label class="control-label" >Stok</label>
<div class="controls">
<input name="stok" type="text" value="<?php echo $row->stok;?>">
</div>
</div>
<div class="control-group">
<label class="control-label">Harga</label>
<div class="controls">
<input name="harga" type="text" value="<?php echo $row->harga;?>">
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button type="submit" class="btn btn-primary">Update</button>
</div>
</form>
</div>
<?php }
}
?>
3.2 Master Data Pelanggan
3.3 Master Data Pelanggan Setelah Ditambah
Source Code:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Kode Pelanggan</th>
<th>Nama Pelanggan</th>
<th>Alamat</th>
<th>Email</th>
<th class="span2">
<a href="#modalAddPelanggan" class="btn btn-mini btn-block btn-inverse" data-toggle="modal">
<i class="icon-plus-sign icon-white"></i> Tambah Data
</a>
</th>
</tr>
</thead>
<tbody>
<?php
$no=1;
if(isset($data_pelanggan)){
foreach($data_pelanggan as $row){
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $row->kd_pelanggan; ?></td>
<td><?php echo $row->nm_pelanggan; ?></td>
<td><?php echo $row->alamat; ?></td>
<td><?php echo $row->email; ?></td>
<td>
<a class="btn btn-mini" href="#modalEditPelanggan<?php echo $row->kd_pelanggan?>" data-toggle="modal"><i class="icon-pencil"></i> Edit</a>
<a class="btn btn-mini" href="<?php echo site_url('master/hapus_pelanggan/'.$row->kd_pelanggan);?>"
onclick="return confirm('Anda yakin?')"> <i class="icon-remove"></i> Hapus</a>
</td>
</tr>
<?php }
}
?>
</tbody>
</table>
<!-- ============ MODAL ADD PELANGGAN =============== -->
<div id="modalAddPelanggan" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Tambah Data Pelanggan</h3>
</div>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/tambah_pelanggan')?>">
<div class="modal-body">
<div class="control-group">
<label class="control-label">Kode Pelanggan</label>
<div class="controls">
<input name="kd_pelanggan" type="text" value="<?php echo $kd_pelanggan; ?>" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label" >Nama Pelanggan</label>
<div class="controls">
<input name="nm_pelanggan" type="text" placeholder="Input Nama Pelanggan...">
</div>
</div>
<div class="control-group">
<label class="control-label" >Alamat</label>
<div class="controls">
<input name="alamat" type="text" placeholder="Input Alamat...">
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls">
<input name="email" type="email" placeholder="Input Email..." >
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</form>
</div>
<!-- ============ MODAL EDIT PELANGGAN =============== -->
<?php
if(isset($data_pelanggan)){
foreach($data_pelanggan as $row){
?>
<div id="modalEditPelanggan<?php echo $row->kd_pelanggan?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Edit Data Pelanggan</h3>
</div>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/edit_pelanggan')?>">
<div class="modal-body">
<div class="control-group">
<label class="control-label">Kode Pelanggan</label>
<div class="controls">
<input name="kd_pelanggan" type="text" value="<?php echo $row->kd_pelanggan; ?>" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label" >Nama Pelanggan</label>
<div class="controls">
<input name="nm_pelanggan" type="text" value="<?php echo $row->nm_pelanggan; ?>">
</div>
</div>
<div class="control-group">
<label class="control-label" >Alamat</label>
<div class="controls">
<input name="alamat" type="text" value="<?php echo $row->alamat; ?>">
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls">
<input name="email" type="email" value="<?php echo $row->email; ?>">
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button type="submit" class="btn btn-primary">Save changes</button>
</div>
</form>
</div>
<?php }
}
?>
3.3 Master Data Pegawai
Source Code:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Kode Pegawai</th>
<th>User ID</th>
<th>Nama Pegawai</th>
<th>Level</th>
<th class="span2">
<a href="#modalAddPegawai" class="btn btn-mini btn-block btn-inverse" data-toggle="modal">
<i class="icon-plus-sign icon-white"></i> Tambah Data
</a>
<!-- <a href="#" class="btn btn-mini btn-block btn-inverse disabled" data-toggle="modal">-->
<!-- <i class="icon-plus-sign icon-white"></i> Tambah Data-->
<!-- </a>-->
</th>
</tr>
</thead>
<tbody>
<?php
$no=1;
if(isset($data_pegawai)){
foreach($data_pegawai as $row){
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $row->kd_pegawai; ?></td>
<td><?php echo $row->username; ?></td>
<td><?php echo $row->nama; ?></td>
<td><?php echo $row->level; ?></td>
<td>
<a class="btn btn-mini" href="#modalEditPegawai<?php echo $row->kd_pegawai?>" data-toggle="modal"><i class="icon-pencil"></i> Edit</a>
<a class="btn btn-mini" href="<?php echo site_url('master/hapus_pegawai/'.$row->kd_pegawai);?>"
onclick="return confirm('Anda yakin?')"> <i class="icon-remove"></i> Hapus</a>
<!-- <a class="btn btn-mini disabled" href="#" data-toggle="modal"><i class="icon-pencil"></i> Edit</a>-->
<!-- <a class="btn btn-mini disabled" href="#"> <i class="icon-remove"></i> Hapus</a>-->
</td>
</tr>
<?php }
}
?>
</tbody>
</table>
<!-- ============ MODAL ADD PEGAWAI =============== -->
<div id="modalAddPegawai" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Tambah Data Pegawai</h3>
</div>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/tambah_pegawai')?>">
<div class="modal-body">
<div class="control-group">
<label class="control-label">Kode Pegawai</label>
<div class="controls">
<input name="kd_pegawai" type="text" value="<?php echo $kd_pegawai; ?>" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label" >User ID</label>
<div class="controls">
<input name="username" type="text" required>
</div>
</div>
<div class="control-group">
<label class="control-label" >Password</label>
<div class="controls">
<input name="password" type="password" required>
</div>
</div>
<hr/>
<div class="control-group">
<label class="control-label">Nama Pegawai</label>
<div class="controls">
<input name="nama" type="text">
</div>
</div>
<div class="control-group">
<label class="control-label">Level</label>
<div class="controls">
<select name="level" id="level">
<option value=""> = Pilih Level Akses = </option>
<option value="pegawai">Pegawai</option>
<option value="admin">Admin</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save</button>
</div>
</form>
</div>
<!-- ============ MODAL EDIT PEGAWAI =============== -->
<?php
if (isset($data_pegawai)){
foreach($data_pegawai as $row){
?>
<div id="modalEditPegawai<?php echo $row->kd_pegawai?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Edit Data Pegawai</h3>
</div>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/edit_pegawai')?>">
<div class="modal-body">
<div class="control-group">
<label class="control-label">Kode Pegawai</label>
<div class="controls">
<input name="kd_pegawai" type="text" value="<?php echo $row->kd_pegawai; ?>" class="uneditable-input" readonly="true">
</div>
</div>
<div class="control-group">
<label class="control-label" >User ID</label>
<div class="controls">
<input name="username" type="text" value="<?php echo $row->username?>" required>
</div>
</div>
<div class="control-group">
<label class="control-label" >Password</label>
<div class="controls">
<input name="password" type="password" required>
</div>
</div>
<hr/>
<div class="control-group">
<label class="control-label">Nama Pegawai</label>
<div class="controls">
<input name="nama" type="text" value="<?php echo $row->nama?>">
</div>
</div>
<div class="control-group">
<label class="control-label">Level</label>
<div class="controls">
<select name="level" id="level">
<?php if($row->level == 'admin'){?>
<option value="admin" selected="selected">Admin</option>
<?php }else{ ?>
<option value="pegawai">Pegawai</option>
<?php }?>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save</button>
</div>
</form>
</div>
<?php }
}
?>
3.4 Master Data Contact
Source Code:
<?php if(isset($data_contact)){
foreach ($data_contact as $row){
?>
<form class="form-horizontal" method="post" action="<?php echo site_url('master/edit_contact')?>">
<div class="control-group">
<label class="control-label">Nama Perusahaan</label>
<div class="controls">
<input class="input-block-level" name="nama" type="text" value="<?php echo $row->nama?>" required maxlength="30" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label">Deskripsi Perusahaan</label>
<div class="controls">
<input class="input-block-level" name="desc" type="text" value="<?php echo $row->desc?>" required maxlength="100" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label">Pemilik Perusahaan</label>
<div class="controls">
<input class="input-block-level" name="owner" type="text" value="<?php echo $row->owner?>" required maxlength="30" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label">Telp / HP </label>
<div class="controls">
<input class="input-block-level" name="telp" type="number" value="<?php echo $row->telp?>" required maxlength="30">
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls">
<input class="input-block-level" name="email" type="email" value="<?php echo $row->email?>" required maxlength="30" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label">Website</label>
<div class="controls">
<input class="input-block-level" name="website" type="text" value="<?php echo $row->website?>" required maxlength="50" readonly>
</div>
</div>
<div class="control-group">
<label class="control-label">Alamat</label>
<div class="controls">
<textarea class="span6" name="alamat" rows="5" required readonly><?php echo $row->alamat?></textarea>
</div>
</div>
<input name="id" type="hidden" value="1">
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-info"><i class="icon-edit icon-white"></i> Update Contact</button>
</div>
</div>
</form>
<?php }
}
?>
4. Penjualan
5. Lihat Nota
6. Cetak Nota
7.Laporan
8. Cetak Laporan
Untuk Source code lengkap bisa didownload disini
untuk demo klik disini
Komentar
Posting Komentar