Commit af4ce88a by jhon

Merge branch 'master' of https://gitlab.del.ac.id/charles/pa21617d4ti08

# Conflicts: # app/Http/Controllers/CustomerController.php # app/Http/Controllers/InventoriController.php # app/Http/Controllers/KasirController.php # app/Pembelian.php # resources/views/vendor/adminlte/customer/BeliBarang/createPembelian.blade.php # resources/views/vendor/adminlte/customer/BeliBarang/index.blade.php # resources/views/vendor/adminlte/customer/HistoryPembelian/index.blade.php # resources/views/vendor/adminlte/inventori/ListBarang/create.blade.php # resources/views/vendor/adminlte/inventori/ListBarang/edit.blade.php # resources/views/vendor/adminlte/layouts/partials/sidebar.blade.php # routes/web.php
parents edd3b7c7 a17ddf8b
...@@ -21,16 +21,56 @@ use App\User; ...@@ -21,16 +21,56 @@ use App\User;
class CustomerController extends Controller class CustomerController extends Controller
{ {
//----------------------------Pembelian Barang----------------------//
public function BeliBarang() public function BeliBarang()
{ {
$barangs = Barang::all(); $barangs = Barang::all();
return view('adminlte::customer.BeliBarang.index', compact('barangs')); return view('adminlte::customer.BeliBarang.index', compact('barangs'));
} }
<<<<<<< HEAD
public function createPembelian($id) public function createPembelian($id)
=======
public function createPembelian($id)
{
$barangs = Barang::where('id', $id)->first();
return view('adminlte::customer.BeliBarang.createPembelian')->with('barangs', $barangs);
}
public function list(){
// $barangs = Barang::all();
$key = Input::get('search');
if(isset($key)){
$this->data['barang'] = Barang::where('nama_barang','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['barang'] = Barang::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('barangs')->get();
return view('adminlte::customer.BeliBarang.index',$this->data);
}
public function savePembelian(Request $request)
{
$pembelians = new Pembelian();
$pembelians->user_id = $request->user_id;
$pembelians->username = $request->username;
$pembelians->nama_barang = $request->nama_barang;
$pembelians->kategori = $request->kategori;
$pembelians->harga =$request->harga;
$pembelians->jumlah = $request->jumlah;
$harga = $request->harga;
$jumlah = $request->jumlah;
$total_harga = $harga * $jumlah;
$pembelians->total_harga = $total_harga;
$pembelians->status_pengantaran = $request->status_pengantaran;
$pembelians->save();
return redirect('BeliBarang');
}
public function create()
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
{ {
$barangs = Barang::where('id', $id)->first(); $barangs = Barang::where('id', $id)->first();
return view('adminlte::customer.BeliBarang.createPembelian')->with('barangs', $barangs); return view('adminlte::customer.BeliBarang.createPembelian')->with('barangs', $barangs);
...@@ -54,6 +94,7 @@ class CustomerController extends Controller ...@@ -54,6 +94,7 @@ class CustomerController extends Controller
return redirect('BeliBarang'); return redirect('BeliBarang');
} }
<<<<<<< HEAD
public function cariBarang(){ public function cariBarang(){
...@@ -70,6 +111,8 @@ class CustomerController extends Controller ...@@ -70,6 +111,8 @@ class CustomerController extends Controller
//----------------------------Data Request----------------------// //----------------------------Data Request----------------------//
=======
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
public function RequestBarang() public function RequestBarang()
{ {
$data_requests = DataRequest::all(); $data_requests = DataRequest::all();
...@@ -102,12 +145,11 @@ class CustomerController extends Controller ...@@ -102,12 +145,11 @@ class CustomerController extends Controller
return redirect('RequestBarang'); return redirect('RequestBarang');
} }
//----------------------------Check Saldo----------------------------//
public function CheckSaldo() public function CheckSaldo()
{ {
return view('adminlte::customer.CheckSaldo.index'); return view('adminlte::customer.CheckSaldo.index');
} }
<<<<<<< HEAD
//----------------------------Histori Transaksi----------------------// //----------------------------Histori Transaksi----------------------//
...@@ -118,16 +160,28 @@ class CustomerController extends Controller ...@@ -118,16 +160,28 @@ class CustomerController extends Controller
$id = $user->id; $id = $user->id;
$this->data['request_barang'] = DB::table('request_barangs')->where('user_id','=',$id)->get(); $this->data['request_barang'] = DB::table('request_barangs')->where('user_id','=',$id)->get();
return view('adminlte::customer.HistoryRequest.index', $this->data); return view('adminlte::customer.HistoryRequest.index', $this->data);
=======
public function HistoryRequest()
{
$request_barangs = RequestBarang::all();
return view('adminlte::customer.HistoryRequest.index', compact('request_barangs'));
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
} }
public function HistoryPembelian() public function HistoryPembelian()
{ {
<<<<<<< HEAD
$username = Auth::user()->username; $username = Auth::user()->username;
$user = DB::table('users')->where('username' , $username)->first(); $user = DB::table('users')->where('username' , $username)->first();
$id = $user->id; $id = $user->id;
$this->data['pembelian'] = DB::table('pembelians')->where('user_id','=',$id)->get(); $this->data['pembelian'] = DB::table('pembelians')->where('user_id','=',$id)->get();
// dd($this->data); // dd($this->data);
return view('adminlte::customer.HistoryPembelian.index', $this->data); return view('adminlte::customer.HistoryPembelian.index', $this->data);
=======
$pembelians = Pembelian::all();
return view('adminlte::customer.HistoryPembelian.index', compact('pembelians'));
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
} }
} }
\ No newline at end of file
...@@ -5,9 +5,25 @@ namespace App\Http\Controllers; ...@@ -5,9 +5,25 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Requests; use App\Http\Requests;
use App\Barang; use App\Barang;
<<<<<<< HEAD
=======
use App\RequestBarang; use App\RequestBarang;
use App\DataRequest;
<<<<<<< HEAD
=======
use App\Pembelian;
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
use App\RequestBarang;
use App\DataRequest; use App\DataRequest;
use App\Pembelian;
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
class InventoriController extends Controller class InventoriController extends Controller
{ {
public function ListBarang() public function ListBarang()
...@@ -94,8 +110,13 @@ class InventoriController extends Controller ...@@ -94,8 +110,13 @@ class InventoriController extends Controller
} }
public function ListPembelian()
{
$pembelians = Pembelian::all();
return view('adminlte::inventori.ListPembelian.index', compact('pembelians'));
}
//----------------------------Data Request----------------------//
public function DataRequest() public function DataRequest()
{ {
...@@ -124,6 +145,8 @@ class InventoriController extends Controller ...@@ -124,6 +145,8 @@ class InventoriController extends Controller
return redirect('DataRequest'); return redirect('DataRequest');
} }
<<<<<<< HEAD
=======
public function editDataRequest($id) public function editDataRequest($id)
{ {
...@@ -156,5 +179,34 @@ class InventoriController extends Controller ...@@ -156,5 +179,34 @@ class InventoriController extends Controller
$data_requests->delete(); $data_requests->delete();
return redirect('DataRequest'); return redirect('DataRequest');
} }
<<<<<<< HEAD
=======
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
public function konfirmasiBarang($id)
{
$datauP = RequestBarang::find ($id);
$datauP->status_request = 'Terkonfirmasi';
$datauP->update();
return redirect('ListRequest');
}
public function RejectedBarang($id)
{
$datauP = RequestBarang::find ($id);
$datauP->status_request = 'Rejected';
$datauP->update();
return redirect('ListRequest');
}
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
} }
\ No newline at end of file
...@@ -7,6 +7,8 @@ use Illuminate\Support\Facades\Input; ...@@ -7,6 +7,8 @@ use Illuminate\Support\Facades\Input;
use App\User; use App\User;
use App\Transaksi; use App\Transaksi;
use App\RequestBarang;
use App\pembelian;
class KasirController extends Controller class KasirController extends Controller
{ {
...@@ -16,10 +18,16 @@ class KasirController extends Controller ...@@ -16,10 +18,16 @@ class KasirController extends Controller
return view('adminlte::kasir.ListCustomer.index', compact('users')); return view('adminlte::kasir.ListCustomer.index', compact('users'));
} }
public function ListTransaksi() public function ListPembelians()
{ {
$transaksis = Transaksi::all(); $pembelians = Pembelian::all();
return view('adminlte::kasir.ListTransaksi.index', compact('transaksis')); return view('adminlte::kasir.ListPembelian.index', compact('pembelians'));
}
public function ListRequests()
{
$request_barangs = RequestBarang::where('status_request', 'like', 'Terkonfirmasi')->get();
return view('adminlte::kasir.ListRequest.index', compact('request_barangs'));
} }
...@@ -35,6 +43,7 @@ class KasirController extends Controller ...@@ -35,6 +43,7 @@ class KasirController extends Controller
$data->update(); $data->update();
return redirect('ListCustomer'); return redirect('ListCustomer');
<<<<<<< HEAD
} }
public function cariCustomer(){ public function cariCustomer(){
...@@ -47,10 +56,34 @@ class KasirController extends Controller ...@@ -47,10 +56,34 @@ class KasirController extends Controller
return view('adminlte::kasir.ListCustomer.index',$this->data); return view('adminlte::kasir.ListCustomer.index',$this->data);
} }
=======
}
public function konfPengantaran($id)
{
$datauP = Pembelian::find ($id);
$datauP->status_pengantaran = 'Terkirim';
$datauP->update();
return redirect('ListPembelians');
}
public function konfAntar($id)
{
$datauP = RequestBarang::find ($id);
$datauP->status_pengantaran = 'Terkirim';
$datauP->update();
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
return redirect('ListRequests');
public function KonfirmasiBarang($id){
DB::table('request_barangs')->where('id', $id)->update(['status_request'=> 1]);
return redirect()->back();
} }
......
...@@ -6,7 +6,11 @@ use Illuminate\Database\Eloquent\Model; ...@@ -6,7 +6,11 @@ use Illuminate\Database\Eloquent\Model;
class Pembelian extends Model class Pembelian extends Model
{ {
<<<<<<< HEAD
protected $table = 'pembelians'; protected $table = 'pembelians';
=======
protected $table = 'pembelians';
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
protected $fillable = [ protected $fillable = [
'username','nama_barang', 'kategori','jumlah','total_harga','user_id','status_pengantaran', 'username','nama_barang', 'kategori','jumlah','total_harga','user_id','status_pengantaran',
]; ];
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<select name="status" class="form-control"> <select name="status" class="form-control">
<option value="user">User</option> <option value="customer">Customer</option>
</select> </select>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -75,7 +75,11 @@ ...@@ -75,7 +75,11 @@
<label for="title" class="col-md-4 control-label">Status Pengantaran</label> <label for="title" class="col-md-4 control-label">Status Pengantaran</label>
<div class="col-md-6"> <div class="col-md-6">
<select name="status_pengantaran" class="form-control"> <select name="status_pengantaran" class="form-control">
<<<<<<< HEAD
<option value="Belum">Belum</option> <option value="Belum">Belum</option>
=======
<option value="Request">Request</option>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</select> </select>
@if ($errors->has('status_pengantaran')) @if ($errors->has('status_pengantaran'))
......
...@@ -26,8 +26,20 @@ ...@@ -26,8 +26,20 @@
@endsection @endsection
@section('main-content') @section('main-content')
<<<<<<< HEAD
=======
<form action="{{url('/list')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Username</label>
<input type="text" name="search" placeholder="Nama Barang" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div>
<button type="submit" id="button-filter" class="btn btn-danger pull-right" style="margin-right: 20px">
<i class="fa fa-search"></i> Search
</button>
</form>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
...@@ -47,7 +59,7 @@ ...@@ -47,7 +59,7 @@
<td>{{$barang->stock}}</td> <td>{{$barang->stock}}</td>
<td>{{$barang->harga}}</td> <td>{{$barang->harga}}</td>
<td>{{$barang->kategori}}</td> <td>{{$barang->kategori}}</td>
<td>{{$barang->gambar}}</td> <td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 50px; width: 50px; "></td>
<td> <td>
<a href="{{ url('/createPembelian', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Beli</a> <a href="{{ url('/createPembelian', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Beli</a>
<!-- <a href="{{ url('/delete', $barang->id) }}" <onclick="return confirm('Yakin mau hapus data ini sob?')" class="btn btn-warning">Delete</a> --> <!-- <a href="{{ url('/delete', $barang->id) }}" <onclick="return confirm('Yakin mau hapus data ini sob?')" class="btn btn-warning">Delete</a> -->
...@@ -55,5 +67,4 @@ ...@@ -55,5 +67,4 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
<a href="{{ url('/create') }}" button type="button" class="btn btn-info">Create</a></button>
@endsection @endsection
...@@ -5,14 +5,16 @@ ...@@ -5,14 +5,16 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>Check Saldo</center> <center>My Saldo</center>
@endsection @endsection
@section('main-content') @section('main-content')
<div class="container-fluid spark-screen"> <div class="container-fluid spark-screen">
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-8 col-md-offset-2">
<p style="font-size: 15px">Saldo= Rp. {{$user->saldo}}</p> <div class="panel-body">
<label style="font-weight:bolder;color:black;font-size: 17px"></center><b>Saldo : Rp.{{$user->saldo}}</b></label>
</div>
</div> </div>
</div> </div>
</div> </div>
......
@extends('adminlte::layouts.app') @extends('adminlte::layouts.app')
@section('htmlheader_title') @section('htmlheader_title')
<<<<<<< HEAD
{{ trans('adminlte_lang::message.home') }} {{ trans('adminlte_lang::message.home') }}
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>Histori Transaksi</center> <center>Histori Transaksi</center>
=======
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Histori Pembelian</center>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
@endsection @endsection
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<<<<<<< HEAD
<tr> <tr>
<th>Username</th> <th>Username</th>
=======
<tr>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<th>Nama Barang</th> <th>Nama Barang</th>
<th>Kategori</th> <th>Kategori</th>
<th>Harga</th> <th>Harga</th>
<th>Jumlah</th> <th>Jumlah</th>
<th>Total Harga</th> <th>Total Harga</th>
<<<<<<< HEAD
<th>Pengantaran</th> <th>Pengantaran</th>
=======
<th>Status Pengantaran</th>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<<<<<<< HEAD
@foreach($pembelian as $pembelians) @foreach($pembelian as $pembelians)
<tr> <tr>
<td>{{$pembelians->username}}</td> <td>{{$pembelians->username}}</td>
...@@ -32,6 +49,16 @@ ...@@ -32,6 +49,16 @@
<td>{{$pembelians->jumlah}}</td> <td>{{$pembelians->jumlah}}</td>
<td>{{$pembelians->total_harga}}</td> <td>{{$pembelians->total_harga}}</td>
<td>{{$pembelians->status_pengantaran}}</td> <td>{{$pembelians->status_pengantaran}}</td>
=======
@foreach($pembelians as $pembelian)
<tr>
<td>{{$pembelian->nama_barang}}</td>
<td>{{$pembelian->kategori}}</td>
<td>{{$pembelian->harga}}</td>
<td>{{$pembelian->jumlah}}</td>
<td>{{$pembelian->total_harga}}</td>
<td>{{$pembelian->status_pengantaran}}</td>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
...@@ -5,14 +5,13 @@ ...@@ -5,14 +5,13 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>Histori Transaksi</center> <center>Histori Request</center>
@endsection @endsection
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Username</th>
<th>Nama Barang</th> <th>Nama Barang</th>
<th>Harga</th> <th>Harga</th>
<th>Jumlah</th> <th>Jumlah</th>
...@@ -25,7 +24,6 @@ ...@@ -25,7 +24,6 @@
<tbody> <tbody>
@foreach($request_barang as $requestBarang) @foreach($request_barang as $requestBarang)
<tr> <tr>
<td>{{$requestBarang->username}}</td>
<td>{{$requestBarang->nama_barang}}</td> <td>{{$requestBarang->nama_barang}}</td>
<td>{{$requestBarang->harga}}</td> <td>{{$requestBarang->harga}}</td>
<td>{{$requestBarang->jumlah}}</td> <td>{{$requestBarang->jumlah}}</td>
......
...@@ -14,8 +14,13 @@ ...@@ -14,8 +14,13 @@
<div class="panel-body"> <div class="panel-body">
<form class="form-horizontal" action="{{ url('store') }}" method="POST"> <form class="form-horizontal" action="{{ url('store') }}" method="POST">
{!! csrf_field() !!} {!! csrf_field() !!}
<<<<<<< HEAD
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama Barang</label> <label for="title" class="col-md-4 control-label">Nama Barang</label>
=======
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama</label>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ old('nama_barang') }}" > <input type="text" class="form-control" name="nama_barang" value="{{ old('nama_barang') }}" >
@if ($errors->has('nama_barang')) @if ($errors->has('nama_barang'))
...@@ -29,7 +34,11 @@ ...@@ -29,7 +34,11 @@
<div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Stock</label> <label for="title" class="col-md-4 control-label">Stock</label>
<div class="col-md-6"> <div class="col-md-6">
<<<<<<< HEAD
<input type="text" class="form-control" name="stock" value="{{ old('stock') }}" > <input type="text" class="form-control" name="stock" value="{{ old('stock') }}" >
=======
<input type="integer" class="form-control" name="stock" value="{{ old('stock') }}" >
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
@if ($errors->has('stock')) @if ($errors->has('stock'))
<span class="help-block"> <span class="help-block">
<strong>{{ $errors->first('stock') }}</strong> <strong>{{ $errors->first('stock') }}</strong>
...@@ -38,6 +47,7 @@ ...@@ -38,6 +47,7 @@
</div> </div>
</div> </div>
<div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Harga</label> <label for="title" class="col-md-4 control-label">Harga</label>
<div class="col-md-6"> <div class="col-md-6">
......
...@@ -15,7 +15,11 @@ ...@@ -15,7 +15,11 @@
<form class="form-horizontal" action="{{ url('update', $barangs->id) }}" method="POST"> <form class="form-horizontal" action="{{ url('update', $barangs->id) }}" method="POST">
{!! csrf_field() !!} {!! csrf_field() !!}
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<<<<<<< HEAD
<label for="title" class="col-md-4 control-label">Nama</label> <label for="title" class="col-md-4 control-label">Nama</label>
=======
<label for="title" class="col-md-4 control-label">Nama Barang </label>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $barangs->nama_barang}}" > <input type="text" class="form-control" name="nama_barang" value="{{ $barangs->nama_barang}}" >
@if ($errors->has('nama_barang')) @if ($errors->has('nama_barang'))
...@@ -27,7 +31,11 @@ ...@@ -27,7 +31,11 @@
</div> </div>
<<<<<<< HEAD
<div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
=======
<div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}">
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<label for="title" class="col-md-4 control-label">Stock</label> <label for="title" class="col-md-4 control-label">Stock</label>
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" name="stock" value="{{ $barangs->stock}}" > <input type="text" class="form-control" name="stock" value="{{ $barangs->stock}}" >
......
...@@ -5,37 +5,35 @@ ...@@ -5,37 +5,35 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>List Customer</center> <center>List Pembelian</center>
@endsection @endsection
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Username</th> <th>Username</th>
<th>Nama Barang</th> <th>Nama Barang</th>
<th>Kategori</th> <th>Kategori</th>
<th>Harga</th>
<th>Jumlah</th> <th>Jumlah</th>
<th>Total Harga</th> <th>Total Harga</th>
<!-- <th>Status Pengantaran</th> -->
<th>Action</th> <th>Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($transaksis as $transaksi) @foreach($pembelians as $pembelian)
<tr> <tr>
<td>{{$transaksi->username}}</td> <td>{{$pembelian->username}}</td>
<td>{{$transaksi->nama_barang}}</td> <td>{{$pembelian->nama_barang}}</td>
<td>{{$transaksi->kategori}}</td> <td>{{$pembelian->kategori}}</td>
<td>{{$transaksi->jumlah}}</td> <td>{{$pembelian->harga}}</td>
<td>{{$transaksi->total_harga}}</td> <td>{{$pembelian->jumlah}}</td>
<!-- <td>{{$transaksi->status_pengantaran}}</td> --> <td>{{$pembelian->total_harga}}</td>
<td>
<a href="{{ url('/konfirmasiAntar', $transaksi->id) }}" type="submit" button type="button" class="btn btn-warning">Konfirmasi</a>
<td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
@endsection @endsection
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>Request Barang</center> <center>List Request</center>
@endsection @endsection
@section('main-content') @section('main-content')
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<th>Harga</th> <th>Harga</th>
<th>Jumlah</th> <th>Jumlah</th>
<th>Total Harga</th> <th>Total Harga</th>
<th>Status Request</th>
<th>Action</th> <th>Action</th>
</tr> </tr>
</thead> </thead>
...@@ -32,9 +31,26 @@ ...@@ -32,9 +31,26 @@
<td>{{$requestBarang->harga}}</td> <td>{{$requestBarang->harga}}</td>
<td>{{$requestBarang->jumlah}}</td> <td>{{$requestBarang->jumlah}}</td>
<td>{{$requestBarang->total_harga}}</td> <td>{{$requestBarang->total_harga}}</td>
<td>{{$requestBarang->status_request}}</td>
<td> <td>
<a href="{{ url('/KonfirmasiBarang', $requestBarang->id) }}" type="submit" button type="button" class="btn btn-warning">Konfirmasi</a> @if($requestBarang->status_request=="Terkonfirmasi")
<p>Accept</p>
@elseif($requestBarang->status_request=="Rejected")
<p>Reject</p>
@elseif($requestBarang->status_request=="Request")
<form action="{{url('konfirmasiBarang/'.$requestBarang->id)}}" method="post">
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<button type="submit" class="btn btn-info"><i class="glyphicon glyphicon-apple"> Accept</i></button>
</form>
<form action="{{url('RejectedBarang/'.$requestBarang->id)}}" method="post">
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"> Eject</i></button>
</form>
@endif
</td> </td>
</tr> </tr>
@endforeach @endforeach
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>List Customer</center>
@endsection
@section('main-content')
<table class="table table-striped">
<thead>
<tr>
<th>Username</th>
<th>Nama Barang</th>
<th>Kategori</th>
<th>Harga</th>
<th>Jumlah</th>
<th>Total Harga</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($pembelians as $rb)
<tr>
<td>{{$rb->username}}</td>
<td>{{$rb->nama_barang}}</td>
<td>{{$rb->kategori}}</td>
<td>{{$rb->harga}}</td>
<td>{{$rb->jumlah}}</td>
<td>{{$rb->total_harga}}</td>
<td>
@if($rb->status_pengantaran=="Terkirim")
<p>Delivered</p>
@else($rb->status_pengantaran=="Request")
<form action="{{url('konfPengantaran/'.$rb->id)}}" method="post">
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<button type="submit" class="btn btn-info"><i class="glyphicon glyphicon-apple"> Delivered</i></button>
</form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>List Customer</center>
@endsection
@section('main-content')
<table class="table table-striped">
<thead>
<tr>
<th>Username</th>
<th>Nama Barang</th>
<th>Kategori</th>
<th>Harga</th>
<th>Jumlah</th>
<th>Total Harga</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($request_barangs as $rb)
<tr>
<td>{{$rb->username}}</td>
<td>{{$rb->nama_barang}}</td>
<td>{{$rb->kategori}}</td>
<td>{{$rb->harga}}</td>
<td>{{$rb->jumlah}}</td>
<td>{{$rb->total_harga}}</td>
<td>
@if($rb->status_pengantaran=="Terkirim")
<p>Delivered</p>
@else($rb->status_pengantaran=="Request")
<form action="{{url('konfAntar/'.$rb->id)}}" method="post">
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<button type="submit" class="btn btn-info"><i class="glyphicon glyphicon-apple"> Delivered</i></button>
</form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection
...@@ -38,20 +38,30 @@ ...@@ -38,20 +38,30 @@
@elseif(Auth::user()->status=="customer") @elseif(Auth::user()->status=="customer")
<li><a href="{{ url('/BeliBarang') }}"><i class='fa fa-link'></i> <span>Beli Barang</span></a></li> <li><a href="{{ url('/BeliBarang') }}"><i class='fa fa-link'></i> <span>Beli Barang</span></a></li>
<li><a href="{{ url('/RequestBarang') }}"><i class='fa fa-link'></i> <span>Request Barang</span></a></li> <li><a href="{{ url('/RequestBarang') }}"><i class='fa fa-link'></i> <span>Request Barang</span></a></li>
<<<<<<< HEAD
<li><a href="{{ url('/CheckSaldo') }}"><i class='fa fa-link'></i> <span>Check Saldo</span></a></li> <li><a href="{{ url('/CheckSaldo') }}"><i class='fa fa-link'></i> <span>Check Saldo</span></a></li>
<li><a href="{{ url('/HistoryPembelian') }}"><i class='fa fa-link'></i> <span>History Pembelian</span></a></li> <li><a href="{{ url('/HistoryPembelian') }}"><i class='fa fa-link'></i> <span>History Pembelian</span></a></li>
=======
<li><a href="{{ url('/CheckSaldo') }}"><i class='fa fa-link'></i> <span>Check Saldo</span></a></li>
<li><a href="{{ url('/HistoryPembelian') }}"><i class='fa fa-link'></i> <span>History Pembelian</span></a></li>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<li><a href="{{ url('/HistoryRequest') }}"><i class='fa fa-link'></i> <span>History Request</span></a></li> <li><a href="{{ url('/HistoryRequest') }}"><i class='fa fa-link'></i> <span>History Request</span></a></li>
@elseif(Auth::user()->status=="inventori") @elseif(Auth::user()->status=="inventori")
<li><a href="{{ url('/ListBarang') }}"><i class='fa fa-link'></i> <span>List Barang</span></a></li> <li><a href="{{ url('/ListBarang') }}"><i class='fa fa-link'></i> <span>List Barang</span></a></li>
<li><a href="{{ url('/ListRequest') }}"><i class='fa fa-link'></i> <span>List Transaksi Request</span></a></li>
<li><a href="{{ url('/DataRequest') }}"><i class='fa fa-link'></i> <span>Data Request</span></a></li> <li><a href="{{ url('/DataRequest') }}"><i class='fa fa-link'></i> <span>Data Request</span></a></li>
<li><a href="{{ url('/ListPembelian') }}"><i class='fa fa-link'></i> <span>List Pembelian</span></a></li>
<li><a href="{{ url('/ListRequest') }}"><i class='fa fa-link'></i> <span>List Request</span></a></li>
@elseif(Auth::user()->status=="kasir") @elseif(Auth::user()->status=="kasir")
<li><a href="{{ url('/ListCustomer') }}"><i class='fa fa-link'></i> <span>List Customer</span></a></li> <li><a href="{{ url('/ListCustomer') }}"><i class='fa fa-link'></i> <span>List Customer</span></a></li>
<li><a href="{{ url('/ListTransaksi') }}"><i class='fa fa-link'></i> <span>List Transaksi</span></a></li> <li><a href="{{ url('/ListPembelians') }}"><i class='fa fa-link'></i> <span>List Pembelian</span></a></li>
<li><a href="{{ url('/ListRequests') }}"><i class='fa fa-link'></i> <span>List Request</span></a></li>
@endif @endif
......
...@@ -58,16 +58,28 @@ Route::group(['middleware' => ['web','auth','customer']], function () { ...@@ -58,16 +58,28 @@ Route::group(['middleware' => ['web','auth','customer']], function () {
Route::get('/CheckSaldo', 'CustomerController@CheckSaldo'); Route::get('/CheckSaldo', 'CustomerController@CheckSaldo');
Route::get('/createPembelian/{id}', 'CustomerController@createPembelian');
Route::post('/storePembelian', 'CustomerController@storePembelian');
Route::post('/savePembelian', 'CustomerController@savePembelian');
Route::get('/list','CustomerController@list');
Route::get('/RequestBarang', 'CustomerController@RequestBarang'); Route::get('/RequestBarang', 'CustomerController@RequestBarang');
Route::get('/createRequest/{id}', 'CustomerController@createRequest'); Route::get('/createRequest/{id}', 'CustomerController@createRequest');
Route::post('/storeRequest', 'CustomerController@storeRequest'); Route::post('/storeRequest', 'CustomerController@storeRequest');
Route::post('/saveRequest', 'CustomerController@saveRequest'); Route::post('/saveRequest', 'CustomerController@saveRequest');
<<<<<<< HEAD
Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian'); Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian');
Route::get('/HistoryRequest', 'CustomerController@HistoryRequest'); Route::get('/HistoryRequest', 'CustomerController@HistoryRequest');
}); });
=======
Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian');
Route::get('/HistoryRequest', 'CustomerController@HistoryRequest');
});
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
...@@ -79,8 +91,7 @@ Route::group(['middleware' => ['web','auth','inventori']], function () { ...@@ -79,8 +91,7 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::get('/edit/{id}', 'InventoriController@edit'); Route::get('/edit/{id}', 'InventoriController@edit');
Route::post('/update/{id}', 'InventoriController@update'); Route::post('/update/{id}', 'InventoriController@update');
Route::get('/delete/{id}', 'InventoriController@destroy'); Route::get('/delete/{id}', 'InventoriController@destroy');
Route::get('/ListPembelian', 'InventoriController@ListPembelian');
Route::get('/ListRequest', 'InventoriController@ListRequest'); Route::get('/ListRequest', 'InventoriController@ListRequest');
Route::get('/editRequest/{id}', 'InventoriController@editRequest'); Route::get('/editRequest/{id}', 'InventoriController@editRequest');
Route::post('/update/{id}', 'InventoriController@update'); Route::post('/update/{id}', 'InventoriController@update');
...@@ -93,6 +104,10 @@ Route::group(['middleware' => ['web','auth','inventori']], function () { ...@@ -93,6 +104,10 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::get('/editDataRequest/{id}', 'InventoriController@editDataRequest'); Route::get('/editDataRequest/{id}', 'InventoriController@editDataRequest');
Route::post('/updateDataRequest/{id}', 'InventoriController@updateDataRequest'); Route::post('/updateDataRequest/{id}', 'InventoriController@updateDataRequest');
Route::get('/deleteDataRequest/{id}', 'InventoriController@destroyDataRequest'); Route::get('/deleteDataRequest/{id}', 'InventoriController@destroyDataRequest');
Route::post('/konfirmasiBarang/{id}', 'InventoriController@KonfirmasiBarang');
Route::put('/konfirmasiBarang/{id}', 'InventoriController@KonfirmasiBarang');
Route::post('/RejectedBarang/{id}', 'InventoriController@RejectedBarang');
Route::put('/RejectedBarang/{id}', 'InventoriController@RejectedBarang');
}); });
...@@ -101,8 +116,17 @@ Route::group(['middleware' => ['web','auth','inventori']], function () { ...@@ -101,8 +116,17 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::group(['middleware' => ['web','auth','kasir']], function () { Route::group(['middleware' => ['web','auth','kasir']], function () {
Route::get('/ListCustomer', 'KasirController@ListCustomer'); Route::get('/ListCustomer', 'KasirController@ListCustomer');
<<<<<<< HEAD
Route::get('/ListTransaksi', 'KasirController@ListTransaksi'); Route::get('/ListTransaksi', 'KasirController@ListTransaksi');
Route::get('/cariCustomer','KasirController@cariCustomer'); Route::get('/cariCustomer','KasirController@cariCustomer');
=======
Route::get('/ListPembelians', 'KasirController@ListPembelians');
Route::get('/ListRequests', 'KasirController@ListRequests');
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
Route::get('/addSaldo/{id}','KasirController@addSaldo'); Route::get('/addSaldo/{id}','KasirController@addSaldo');
Route::put('/saldo/{id}','KasirController@saldo'); Route::put('/saldo/{id}','KasirController@saldo');
Route::post('/konfPengantaran/{id}', 'KasirController@konfPengantaran');
Route::put('/konfPengantaran/{id}', 'KasirController@konfPengantaran');
Route::post('/konfAntar/{id}', 'KasirController@konfAntar');
Route::put('/konfAntar/{id}', 'KasirController@konfAntar');
}); });
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2017 at 10:06 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `ud_antoni`
--
-- --------------------------------------------------------
--
-- Table structure for table `barangs`
--
CREATE TABLE `barangs` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'ID',
`nama_barang` varchar(100) COLLATE latin1_general_ci NOT NULL COMMENT 'Nama',
`stock` int(10) DEFAULT NULL COMMENT 'Jumlah',
`harga` decimal(10,0) NOT NULL COMMENT 'harga',
`kategori` varchar(50) COLLATE latin1_general_ci NOT NULL,
`gambar` varchar(100) COLLATE latin1_general_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Dumping data for table `barangs`
--
INSERT INTO `barangs` (`id`, `nama_barang`, `stock`, `harga`, `kategori`, `gambar`, `created_at`, `updated_at`) VALUES
(18, 'Beng-beng', 100, '1500', 'makanan', 'beng@.jpg', '2017-05-19 08:02:34', '2017-05-19 08:02:34'),
(19, 'Coca-cola', 100, '4500', 'minuman', 'cocacola.jpg', '2017-05-19 08:07:04', '2017-05-19 08:07:04'),
(20, 'Pepsodent', 50, '9000', 'alat mandi', 'pepsoden.jpg', '2017-05-19 08:08:14', '2017-05-19 08:08:14'),
(21, 'Kalkulator', 50, '45000', 'alat tulis', 'kalkulator.jpg', '2017-05-19 08:09:25', '2017-05-19 08:09:25');
-- --------------------------------------------------------
--
-- Table structure for table `data_requests`
--
CREATE TABLE `data_requests` (
`id` int(10) UNSIGNED NOT NULL,
`nama_barang` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`kategori` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`harga` int(10) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `data_requests`
--
INSERT INTO `data_requests` (`id`, `nama_barang`, `kategori`, `harga`, `created_at`, `updated_at`) VALUES
(19, 'Kue Bolu ', 'makanan', 40000, '2017-05-19 08:11:34', '2017-05-19 08:12:10'),
(20, 'Kue Tart', 'makanan', 80000, '2017-05-19 08:11:50', '2017-05-19 08:11:50'),
(21, 'Piscok', 'makanan', 1000, '2017-05-19 08:12:02', '2017-05-19 08:12:02');
-- --------------------------------------------------------
--
-- Table structure for table `pembelians`
--
CREATE TABLE `pembelians` (
`id` int(10) UNSIGNED NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`nama_barang` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`kategori` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`harga` int(10) NOT NULL,
`jumlah` int(10) NOT NULL,
`total_harga` int(10) NOT NULL,
`status_pengantaran` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `pembelians`
--
INSERT INTO `pembelians` (`id`, `username`, `nama_barang`, `kategori`, `harga`, `jumlah`, `total_harga`, `status_pengantaran`, `user_id`, `created_at`, `updated_at`) VALUES
(18, 'customer123', 'Beng-beng', 'makanan', 1500, 3, 4500, 'Terkirim', 22, '2017-05-19 08:31:51', '2017-05-19 09:01:31');
-- --------------------------------------------------------
--
-- Table structure for table `request_barangs`
--
CREATE TABLE `request_barangs` (
`id` int(10) UNSIGNED NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`nama_barang` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`kategori` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`harga` int(10) DEFAULT NULL,
`jumlah` int(10) NOT NULL,
`total_harga` int(10) DEFAULT NULL,
`status_request` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`status_pengantaran` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `request_barangs`
--
INSERT INTO `request_barangs` (`id`, `username`, `nama_barang`, `kategori`, `harga`, `jumlah`, `total_harga`, `status_request`, `status_pengantaran`, `user_id`, `created_at`, `updated_at`) VALUES
(38, 'customer123', 'Piscok', 'makanan', 1000, 5, 5000, 'Request', 'Request', 22, '2017-05-19 09:36:21', '2017-05-19 09:36:21'),
(39, 'customer123', 'Kue Tart', 'makanan', 80000, 2, 160000, 'Request', 'Request', 22, '2017-05-19 09:36:31', '2017-05-19 09:36:31');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`status` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`saldo` int(20) NOT NULL DEFAULT '0',
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `username`, `password`, `status`, `saldo`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'admin@yahoo.com', 'admin', '$2y$10$HpjF1.bHvOGu7dsxljvrG.Gn.cO7fBxtsZt7vApf5VuSzfk4NhpWC', 'admin', 0, 'BFv7MkWmkdc41QkpoEwvcBVdrFIjwnBj6DvAx07wJutJTkpPiQsKx9lh6E5C', '2017-01-05 10:14:15', '2017-05-19 06:42:56'),
(22, 'customer', 'customer@yahoo.com', 'customer123', '$2y$10$EoyGEfjo/bUMEM7C7yYyN.JeWQ1TsbdQzYbWIgWYfR4Y1vQ/FfulW', 'customer', 200000, 'e0qqKYhu6HDvYkHCc0F9jnyqI2IwcFEmlXwjE3bOmwhvX4NGUYKMc2dcX0ZI', '2017-05-19 06:39:36', '2017-05-19 14:05:59'),
(23, 'inventori', 'inventori@yahoo.com', 'inventori', '$2y$10$Zm024gkgCi5sMdMSJWwJh.G.Y04dUDzgkdMY3YRlbrn7WxOycXDMO', 'inventori', 0, 'N4V0fUGNs6yCLTGg53zWn7qJ6BQljnMhC8Iq7oOkBEgdXojyf1Pw5D6LeTOo', '2017-05-19 06:41:46', '2017-05-19 09:43:54'),
(24, 'kasir', 'kasir@yahoo.com', 'kasir', '$2y$10$nHqhy6fu91vLtyxuAHdanO0M62Y0y9H8qOPxq519rwSL8JhdCT5ee', 'kasir', 0, '0qC64zLJk7n1GIhAPRlCcLw1DBsaEfiujnFx8WA28ZttBmSeTWMDk4Y20Lxi', '2017-05-19 06:42:18', '2017-05-19 09:15:54');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `barangs`
--
ALTER TABLE `barangs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `data_requests`
--
ALTER TABLE `data_requests`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `pembelians`
--
ALTER TABLE `pembelians`
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`);
--
-- Indexes for table `request_barangs`
--
ALTER TABLE `request_barangs`
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`),
ADD KEY `user_id_2` (`user_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `barangs`
--
ALTER TABLE `barangs`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `data_requests`
--
ALTER TABLE `data_requests`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `pembelians`
--
ALTER TABLE `pembelians`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `request_barangs`
--
ALTER TABLE `request_barangs`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `pembelians`
--
ALTER TABLE `pembelians`
ADD CONSTRAINT `pembelians_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
--
-- Constraints for table `request_barangs`
--
ALTER TABLE `request_barangs`
ADD CONSTRAINT `request_barangs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment