Commit a987de7d by jhon

Fix Product

parent af4ce88a
......@@ -3,33 +3,25 @@
namespace App\Http\Controllers;
use App\User;
use App\Barang;
use App\Pembelian;
use App\RequestBarang;
use App\DataRequest;
use App\Http\Requests;
use DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use App\User;
class CustomerController extends Controller
{
public function BeliBarang()
public function BeliBarang()
{
$barangs = Barang::all();
$barangs = Barang::all();
return view('adminlte::customer.BeliBarang.index', compact('barangs'));
}
<<<<<<< HEAD
public function createPembelian($id)
=======
public function createPembelian($id)
{
......@@ -54,6 +46,7 @@ class CustomerController extends Controller
{
$pembelians = new Pembelian();
$pembelians->user_id = $request->user_id;
$pembelians->barang_id = $request->barang_id;
$pembelians->username = $request->username;
$pembelians->nama_barang = $request->nama_barang;
$pembelians->kategori = $request->kategori;
......@@ -64,72 +57,79 @@ class CustomerController extends Controller
$total_harga = $harga * $jumlah;
$pembelians->total_harga = $total_harga;
$pembelians->status_pengantaran = $request->status_pengantaran;
$user = User::find($request->user_id);
if($user->saldo >= $total_harga ){
$user->saldo=$user->saldo-$total_harga;
}else{
$user->saldo=$user->saldo;
return redirect('BeliBarang')->with('message','Saldo Anda Tidak Mencukupi');
}
$barang= Barang::find($request->barang_id);
if($barang->stock >= $jumlah){
$barang->stock= $barang->stock-$pembelians->jumlah;
}else{
$barang->stock= $barang->stock;
return redirect('BeliBarang')->with('message','Stock Barang Tidak Mencukupi');
}
$user->update();
$barang->update();
$pembelians->save();
return redirect('BeliBarang');
return redirect('BeliBarang')->with('message','Pembelian Berhasil Dilakukan');
}
public function create()
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
{
$barangs = Barang::where('id', $id)->first();
return view('adminlte::customer.BeliBarang.createPembelian')->with('barangs', $barangs);
return view('adminlte::inventori.BeliBarang.create');
}
public function savePembelian(Request $request)
public function store(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();
$this->validate($request, [
'nama' => 'required',
'jumlah' => 'required',
'harga' => 'required',
'deskripsi' => 'required',
'kategori' => 'required',
'gambar' => 'required',
]);
$barangs = new Barang();
$barangs->nama = $request['nama'];
$barangs->jumlah = $request['jumlah'];
$barangs->harga = $request['harga'];
$barangs->deskripsi = $request['deskripsi'];
$barangs->kategori = $request['kategori'];
$barangs->gambar = $request['gambar'];
$barangs->save();
return redirect('BeliBarang');
}
<<<<<<< HEAD
public function cariBarang(){
$key = Input::get('search');
if(isset($key)){
$this->data['barangs'] = Barang::where('nama_barang','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['barangs'] = Barang::orderBy('id','desc')->paginate(10);
}
return view('adminlte::customer.BeliBarang.index',$this->data);
}
//----------------------------Data Request----------------------//
=======
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
public function RequestBarang()
public function RequestBarang()
{
$data_requests = DataRequest::all();
return view('adminlte::customer.RequestBarang.index', compact('data_requests'));
}
public function createRequest($id)
{
$data_requests = DataRequest::where('id', $id)->first();
// dd($data_requests);
return view('adminlte::customer.RequestBarang.createRequest')->with('data_requests', $data_requests);
}
public function saveRequest(Request $request)
{
$request_barangs = new RequestBarang();
$request_barangs->user_id = $request->user_id;
$request_barangs->id_data_request = $request->id_data_request;
$request_barangs->username = $request->username;
$request_barangs->nama_barang = $request->nama_barang;
$request_barangs->kategori = $request->kategori;
......@@ -147,41 +147,34 @@ class CustomerController extends Controller
public function CheckSaldo()
{
$users = User::all();
return view('adminlte::customer.CheckSaldo.index');
}
<<<<<<< HEAD
//----------------------------Histori Transaksi----------------------//
public function HistoryRequest()
{
$username = Auth::user()->username;
$user = DB::table('users')->where('username' , $username)->first();
$id = $user->id;
$this->data['request_barang'] = DB::table('request_barangs')->where('user_id','=',$id)->get();
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()
{
<<<<<<< HEAD
$username = Auth::user()->username;
$user = DB::table('users')->where('username' , $username)->first();
$id = $user->id;
$this->data['pembelian'] = DB::table('pembelians')->where('user_id','=',$id)->get();
// dd($this->data);
return view('adminlte::customer.HistoryPembelian.index', $this->data);
=======
$pembelians = Pembelian::all();
return view('adminlte::customer.HistoryPembelian.index', compact('pembelians'));
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
}
public function cariBarang(){
// $barangs = Barang::all();
// $barang = DB::table('barangs');
$key = Input::get('search');
if(isset($key)){
$this->data['barangs'] = Barang::where('nama_barang','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['barangs'] = Barang::orderBy('id','desc')->paginate(10);
}
return view('adminlte::customer.BeliBarang.index',$this->data);
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Barang;
<<<<<<< HEAD
=======
use App\RequestBarang;
use App\DataRequest;
<<<<<<< HEAD
=======
use App\Pembelian;
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
use App\Barang;
use App\RequestBarang;
use App\DataRequest;
use App\Pembelian;
use App\User;
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
class InventoriController extends Controller
{
public function ListBarang()
public function ListBarang()
{
$barangs = Barang::all();
return view('adminlte::inventori.ListBarang.index', compact('barangs'));
$barangs = Barang::all();
return view('adminlte::inventori.ListBarang.index', compact('barangs'));
}
public function create()
{
return view('adminlte::inventori.ListBarang.create');
......@@ -54,7 +40,7 @@ class InventoriController extends Controller
$barangs->kategori = $request['kategori'];
$barangs->gambar = $request['gambar'];
$barangs->save();
return redirect('ListBarang');
return redirect('ListBarang')->with('message','Data Barang Berhasil Di Tambah');
}
......@@ -82,7 +68,7 @@ class InventoriController extends Controller
$barangs->kategori = $request->kategori;
$barangs->gambar = $request->gambar;
$barangs->save();
return redirect('ListBarang');
return redirect('ListBarang')->with('message','Data Barang Berhasil Di Ubah');
}
......@@ -91,12 +77,37 @@ class InventoriController extends Controller
{
$barangs = Barang::find($id);
$barangs->delete();
return redirect('ListBarang');
return redirect('ListBarang')->with('message','Data Barang Berhasil Di Hapus');
}
//----------------------------List Request----------------------//
public function ListRequest()
//----------------------------Cetak PDF----------------------------//
public function pdfpembelian($id)
{
$this->data['title'] = 'Pembelian';
$this->data['pembelians'] = Pembelian::find($id);
return view('adminlte::inventori.ListPembelian.pdfpembelian',$this->data);
}
//----------------------------Cetak PDF----------------------------//
public function pdfrequest($id)
{
$this->data['title'] = 'Cetak Request';
$this->data['request_barangs'] = RequestBarang::find($id);
return view('adminlte::inventori.ListRequest.pdfrequest',$this->data);
}
public function ListRequest()
{
$request_barangs = RequestBarang::all();
return view('adminlte::inventori.ListRequest.index', compact('request_barangs'));
......@@ -142,11 +153,9 @@ class InventoriController extends Controller
$data_requests->kategori = $request['kategori'];
$data_requests->harga = $request['harga'];
$data_requests->save();
return redirect('DataRequest');
return redirect('DataRequest')->with('message','Data Request Berhasil Di Tambah');
}
<<<<<<< HEAD
=======
public function editDataRequest($id)
{
......@@ -168,7 +177,7 @@ class InventoriController extends Controller
$data_requests->kategori = $request->kategori;
$data_requests->harga = $request->harga;
$data_requests->save();
return redirect('DataRequest');
return redirect('DataRequest')->with('message','Data Request Berhasil Di Ubah');
}
......@@ -177,13 +186,9 @@ class InventoriController extends Controller
{
$data_requests = DataRequest::find($id);
$data_requests->delete();
return redirect('DataRequest');
return redirect('DataRequest')->with('message','Data Barang Berhasil Di Hapus');
}
<<<<<<< HEAD
=======
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
public function konfirmasiBarang($id)
{
......@@ -193,7 +198,7 @@ class InventoriController extends Controller
$datauP->update();
return redirect('ListRequest');
return redirect('ListRequest')->with('message','Data Barang Berhasil Di Konfirmasi');
}
......@@ -202,11 +207,15 @@ class InventoriController extends Controller
$datauP = RequestBarang::find ($id);
$datauP->status_request = 'Rejected';
// $user = User::find($request_barangs->user_id);
// $user->saldo=$user->saldo+$total_harga;
$datauP->update();
return redirect('ListRequest');
return redirect('ListRequest')->with('message','Data Barang Berhasil Di Tolak');
}
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
}
\ No newline at end of file
......@@ -6,11 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class Pembelian extends Model
{
<<<<<<< HEAD
protected $table = 'pembelians';
=======
protected $table = 'pembelians';
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
protected $fillable = [
'username','nama_barang', 'kategori','jumlah','total_harga','user_id','status_pengantaran',
];
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Transaksi extends Model
{
protected $fillable = [
'username', 'nama_barang', 'kategori','jumlah','total_harga','status_pengantaran',
];
}
......@@ -49,13 +49,11 @@
<span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="hidden" class="form-control" placeholder="0" ame="saldo"readonly/>
<input type="hidden" class="form-control" placeholder="0" name="saldo"readonly/>
<span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<select name="status" class="form-control">
<option value="customer">Customer</option>
</select>
<div class="form-group has-feedback">
<input type="text" class="form-control" name="status" value="customer" readonly/>
</div>
<div class="row">
<div class="col-xs-1">
......
......@@ -17,16 +17,14 @@
<div class="col-md-9 personal-info">
<div class="form-group">
<label class="col-md-4 control-label">User ID</label>
<div class="col-lg-6">
<input name="user_id" class="form-control" type="integer" value="{{$user->id}}" readonly>
<input name="user_id" class="form-control" type="hidden" value="{{$user->id}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Username</label>
<div class="col-lg-6">
<input name="username" class="form-control" type="text" value="{{$user->username}}" readonly>
<input name="username" class="form-control" type="hidden" value="{{$user->username}}" readonly>
</div>
</div>
......@@ -75,11 +73,7 @@
<label for="title" class="col-md-4 control-label">Status Pengantaran</label>
<div class="col-md-6">
<select name="status_pengantaran" class="form-control">
<<<<<<< HEAD
<option value="Belum">Belum</option>
=======
<option value="Request">Request</option>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</select>
@if ($errors->has('status_pengantaran'))
......@@ -90,6 +84,13 @@
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"></label>
<div class="col-lg-6">
<input name="barang_id" class="form-control" type="hidden" value="{{$barangs->id}}" readonly>
</div>
</div>
</div>
<div class="col-md-9">
......
......@@ -5,42 +5,26 @@
@endsection
@section('contentheader_title')
<form action="{{url('/cariBarang')}}">
<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>
</form>
<form action="{{url('/cariBarang')}}">
<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>
</form>
<!-- <form action="{{url('/customer/menu')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Nama Menu</label>
<input type="text" name="search" placeholder="Nama Menu" 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> -->
<center>Beli Barang</center>
@endsection
@section('main-content')
<<<<<<< HEAD
<table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
=======
<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">
<thead>
<tr>
<th>Nama Barang</th>
......@@ -62,7 +46,6 @@
<td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 50px; width: 50px; "></td>
<td>
<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> -->
</tr>
@endforeach
</tbody>
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
<<<<<<< HEAD
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Histori Transaksi</center>
=======
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Histori Pembelian</center>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
@endsection
@section('main-content')
<table class="table table-striped">
<thead>
<<<<<<< HEAD
<tr>
<th>Username</th>
=======
<tr>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<th>Nama Barang</th>
<th>Kategori</th>
<th>Harga</th>
<th>Jumlah</th>
<th>Total Harga</th>
<<<<<<< HEAD
<th>Pengantaran</th>
=======
<th>Status Pengantaran</th>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</tr>
</thead>
<tbody>
<<<<<<< HEAD
@foreach($pembelian as $pembelians)
<tr>
<td>{{$pembelians->username}}</td>
<td>{{$pembelians->nama_barang}}</td>
<td>{{$pembelians->kategori}}</td>
<td>{{$pembelians->harga}}</td>
<td>{{$pembelians->jumlah}}</td>
<td>{{$pembelians->total_harga}}</td>
<td>{{$pembelians->status_pengantaran}}</td>
=======
@foreach($pembelians as $pembelian)
<tr>
<td>{{$pembelian->nama_barang}}</td>
......@@ -58,7 +30,6 @@
<td>{{$pembelian->jumlah}}</td>
<td>{{$pembelian->total_harga}}</td>
<td>{{$pembelian->status_pengantaran}}</td>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</tr>
@endforeach
</tbody>
......
......@@ -22,7 +22,7 @@
</thead>
<tbody>
@foreach($request_barang as $requestBarang)
@foreach($request_barangs as $requestBarang)
<tr>
<td>{{$requestBarang->nama_barang}}</td>
<td>{{$requestBarang->harga}}</td>
......
......@@ -15,6 +15,13 @@
<form class="form-horizontal" role="form" method="POST" action="{{url('/saveRequest')}}" >
{!! csrf_field() !!}
<div class="col-md-9 personal-info">
<div class="form-group">
<div class="col-lg-6">
<input name="id_data_request" class="form-control" type="hidden" value="{{$data_requests->id}}" readonly>
</div>
</div>
<div class="form-group">
<div class="col-lg-8">
......@@ -23,9 +30,8 @@
</div>
<div class="form-group">
<label class="col-md-4 control-label">Username</label>
<div class="col-lg-8">
<input name="username" class="form-control" type="text" value="{{$user->username}}" readonly>
<input name="username" class="form-control" type="hidden" value="{{$user->username}}" readonly>
</div>
</div>
......
......@@ -10,8 +10,16 @@
@section('main-content')
<table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead>
<tr>
<tr>
<th>Nama Barang</th>
<th>Kategori</th>
<th>Harga</th>
......
......@@ -5,7 +5,7 @@
@endsection
@section('contentheader_title')
Dashboard User SI UD-Anthoni
Dashboard Customer SI UD-Anthoni
@endsection
@section('main-content')
......@@ -16,7 +16,7 @@
<div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf
<br>
</div>
......
......@@ -10,6 +10,13 @@
@section('main-content')
<table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead>
<tr>
<th>Nama Barang</th>
......
......@@ -14,13 +14,8 @@
<div class="panel-body">
<form class="form-horizontal" action="{{ url('store') }}" method="POST">
{!! csrf_field() !!}
<<<<<<< HEAD
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<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">
<input type="text" class="form-control" name="nama_barang" value="{{ old('nama_barang') }}" >
@if ($errors->has('nama_barang'))
......@@ -34,11 +29,7 @@
<div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Stock</label>
<div class="col-md-6">
<<<<<<< HEAD
<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'))
<span class="help-block">
<strong>{{ $errors->first('stock') }}</strong>
......@@ -67,7 +58,8 @@
<option value="makanan">Makanan</option>
<option value="minuman">Minuman</option>
<option value="alat tulis">Alat Tulis</option>
<option value="alat mandi">Alat Mandi</option>
<option value="peralatan mandi">Peralatan Mandi</option>
<option value="peralatan mencuci">Peralatan Mencuci</option>
</select>
@if ($errors->has('kategori'))
......@@ -78,13 +70,13 @@
</div>
</div>
<div class="form-group{{ $errors->has('images') ? ' has-error' : '' }}">
<div class="form-group{{ $errors->has('gambar') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Gambar</label>
<div class="col-md-6">
<input type="file" class="inputimages" name="gambar" value="{{ old('gambar') }}" >
@if ($errors->has('image'))
@if ($errors->has('gambar'))
<span class="help-block">
<strong>{{ $errors->first('image') }}</strong>
<strong>{{ $errors->first('gambar') }}</strong>
</span>
@endif
</div>
......
......@@ -15,11 +15,7 @@
<form class="form-horizontal" action="{{ url('update', $barangs->id) }}" method="POST">
{!! csrf_field() !!}
<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 Barang </label>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $barangs->nama_barang}}" >
@if ($errors->has('nama_barang'))
......@@ -31,11 +27,7 @@
</div>
<<<<<<< HEAD
<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>
<div class="col-md-6">
<input type="text" class="form-control" name="stock" value="{{ $barangs->stock}}" >
......@@ -61,7 +53,7 @@
<div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label" value="{{ $barangs->gambar }}">Kategori</label>
<label for="title" class="col-md-4 control-label" value="{{ $barangs->kategori }}">Kategori</label>
<div class="col-md-6">
<select name="kategori" class="form-control">
<option value="makanan">Makanan</option>
......@@ -78,7 +70,7 @@
</div>
</div>
<div class="form-group{{ $errors->has('gambar') ? ' has-error' : '' }}">
<div class="form-group{{ $errors->has('image') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Gambar</label>
<div class="col-md-6">
<input type="file" class="inputimages" name="gambar" value="{{ $barangs->gambar }}" >
......
......@@ -10,6 +10,14 @@
@section('main-content')
<table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead>
<tr>
<th>Nama Barang</th>
......@@ -28,11 +36,10 @@
<td>{{$barang->stock}}</td>
<td>{{$barang->harga}}</td>
<td>{{$barang->kategori}}</td>
<td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 150px; width: 200px; "> </td>
<td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 55px; width: 50px; "> </td>
<td>
<a href="{{ url('/edit', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Edit</a>
<a href="{{ url('/delete', $barang->id) }}" 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> -->
</tr>
@endforeach
</tbody>
......
......@@ -31,6 +31,9 @@
<td>{{$pembelian->harga}}</td>
<td>{{$pembelian->jumlah}}</td>
<td>{{$pembelian->total_harga}}</td>
<td>
<a href="{{url('/pdfpembelian', $pembelian->id)}}" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
</td>
</tr>
@endforeach
</tbody>
......
<!DOCTYPE html>
<html idmmzcc-ext-docid="480679936" style="height: auto;">
<head>
<meta charset="utf-8">
<center><title>UD Antoni</title></center>
</head>
<body onload="window.print();">
<div class="wrapper">
<!-- Main content -->
<section class="invoice">
<!-- title row -->
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<i class="fa fa-globe"></i> Pembelian Barang
<small class="pull-right">Bukti Pembelian</small>
</h2>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info"></div>
<!-- Table row -->
<div class="row">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<form class="form-horizontal" action="{{ url('') }}" method="POST">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('id') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">ID</label>
<div class="col-md-6">
<input type="text" class="form-control" name="id" value="{{ $pembelians->id}}" readonly>
@if ($errors->has('id'))
<span class="help-block">
<strong>{{ $errors->first('id') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">username</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_bus" value="{{ $pembelians->username}}" readonly>
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama Barang</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $pembelians->nama_barang}}" readonly>
@if ($errors->has('nama_barang'))
<span class="help-block">
<strong>{{ $errors->first('nama_barang') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Kategori</label>
<div class="col-md-6">
<input type="text" class="form-control" name="kategori" value="{{ $pembelians->kategori}}" readonly>
@if ($errors->has('kategori'))
<span class="help-block">
<strong>{{ $errors->first('kategori') }}</strong>
</span>
@endif
</div>
</div>
</form>
</table>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- ./wrapper -->
</body>
</html>
\ No newline at end of file
......@@ -52,6 +52,13 @@
</form>
@endif
</td>
<td>
@if($requestBarang->status_request=="Terkonfirmasi")
<a href="{{url('/pdfrequest', $requestBarang->id)}}" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
@endif
</td>
</tr>
@endforeach
</tbody>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body onload="window.print();">
<div class="wrapper">
<!-- Main content -->
<section class="invoice">
<!-- title row -->
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<i class="fa fa-globe"></i> Pembelian Barang
<small class="pull-right">Bukti Pembelian</small>
</h2>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info"></div>
<!-- Table row -->
<div class="row">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<form class="form-horizontal" action="{{ url('') }}" method="POST">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">username</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_bus" value="{{ $request_barangs->username}}" readonly>
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama Barang</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $request_barangs->nama_barang}}" readonly>
@if ($errors->has('nama_barang'))
<span class="help-block">
<strong>{{ $errors->first('nama_barang') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Kategori</label>
<div class="col-md-6">
<input type="text" class="form-control" name="kategori" value="{{ $request_barangs->kategori}}" readonly>
@if ($errors->has('kategori'))
<span class="help-block">
<strong>{{ $errors->first('kategori') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">harga</label>
<div class="col-md-6">
<input type="text" class="form-control" name="harga" value="{{ $request_barangs->harga}}" readonly>
@if ($errors->has('harga'))
<span class="help-block">
<strong>{{ $errors->first('harga') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">jumlah</label>
<div class="col-md-6">
<input type="text" class="form-control" name="jumlah" value="{{ $request_barangs->jumlah}}" readonly>
@if ($errors->has('jumlah'))
<span class="help-block">
<strong>{{ $errors->first('jumlah') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">harga</label>
<div class="col-md-6">
<input type="text" class="form-control" name="harga" value="{{ $request_barangs->harga}}" readonly>
@if ($errors->has('harga'))
<span class="help-block">
<strong>{{ $errors->first('harga') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">jumlah</label>
<div class="col-md-6">
<input type="text" class="form-control" name="jumlah" value="{{ $request_barangs->jumlah}}" readonly>
@if ($errors->has('jumlah'))
<span class="help-block">
<strong>{{ $errors->first('jumlah') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('total_harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">total_harga</label>
<div class="col-md-6">
<input type="text" class="form-control" name="total_harga" value="{{ $request_barangs->total_harga}}" readonly>
@if ($errors->has('total_harga'))
<span class="help-block">
<strong>{{ $errors->first('total_harga') }}</strong>
</span>
@endif
</div>
</div>
</form>
</table>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- ./wrapper -->
</body>
</html>
\ No newline at end of file
......@@ -5,7 +5,7 @@
@endsection
@section('contentheader_title')
Dashboard User SI UD-Anthoni
Dashboard Inventori SI UD-Anthoni
@endsection
......@@ -18,7 +18,7 @@
<div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf
<br>
</div>
......
......@@ -5,17 +5,22 @@
@endsection
@section('contentheader_title')
<form action="{{url('/cariCustomer')}}">
<form action="{{url('/cariCustomer')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Email Username</label>
<input type="text" name="search" placeholder="Email Customer" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div>
</form>
<center>List Customer</center>
<center>List Customer</center>
@endsection
@section('main-content')
<table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead>
<tr>
<th>Nama</th>
......
......@@ -5,7 +5,7 @@
@endsection
@section('contentheader_title')
Dashboard User SI UD-Anthoni
Dashboard Kasir SI UD-Anthoni
@endsection
......@@ -18,7 +18,7 @@
<div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf
<br>
</div>
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
Dashboard User SI UD-Anthoni
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf
</div>
</div>
</div>
</div>
</div>
<center> <img src="/Admin_lte_Repair/public/images/coba.jpg" style="height: 450px; width: 1000px;" /></center>
@endsection
......@@ -4,8 +4,5 @@
@yield('contentheader_title', 'Page Header here')
<small>@yield('contentheader_description')</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> {{ trans('adminlte_lang::message.level') }}</a></li>
<li class="active">{{ trans('adminlte_lang::message.here') }}</li>
</ol>
</section>
\ No newline at end of file
......@@ -4,9 +4,9 @@
<!-- Logo -->
<a href="{{ url('/home') }}" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>A</b>LT</span>
<span class="logo-mini"><b>IS</b>U</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>Admin</b>LTE Laravel </span>
<span class="logo-lg"><b>IS</b>UD Antoni</span>
</a>
<!-- Header Navbar -->
......@@ -24,41 +24,15 @@
<li><a href="{{ url('/login') }}">{{ trans('adminlte_lang::message.login') }}</a></li>
@else
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="{{ Gravatar::get($user->email) }}" class="user-image" alt="User Image"/>
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs">{{ Auth::user()->name }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('/settings') }}" class="btn btn-default btn-flat">{{ trans('adminlte_lang::message.profile') }}</a>
</div>
<div class="pull-right">
<a href="{{ url('/logout') }}" class="btn btn-default btn-flat"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ trans('adminlte_lang::message.signout') }}
</a>
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
<li class="link">
<a href="{{url('/logout')}}"onclick="event.preventDefault();
document.getElementById('logout-form').submit();" style="font-weight: bold; color:white;">Logout</a>
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
<input type="submit" value="logout" style="display: none;">
</form>
</form>
</li>
</div>
</li>
</ul>
</li>
@endif
</ul>
......
......@@ -8,47 +8,31 @@
@if (! Auth::guest())
<div class="user-panel">
<div class="pull-left image">
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
<img src="/p2d4ti08/public/image/avatar5.png" class="img-circle" alt="User Image" />
</div>
<div class="pull-left info">
<p>{{ Auth::user()->name }}</p>
<!-- Status -->
<a href="#"><i class="fa fa-circle text-success"></i> {{ trans('adminlte_lang::message.online') }}</a>
<br>
<p>{{ Auth::user()->username }}</p>
</div>
</div>
@endif
<!-- search form (Optional) -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="{{ trans('adminlte_lang::message.search') }}..."/>
<span class="input-group-btn">
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header">{{ trans('adminlte_lang::message.header') }}</li>
@if(Auth::user()->status=="admin")
<li><a href="{{ url('listPetugas') }}"><i class='fa fa-link'></i> <span>Daftar Pegawai</span></a></li>
<!-- <li><a href="{{ url('laporanTransaksi') }}"><i class='fa fa-link'></i> <span>Laporan Transaksi</span></a></li> -->
@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('/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('/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>
......
......@@ -51,35 +51,24 @@ Route::group(['middleware' => ['web','auth','admin']], function () {
Route::group(['middleware' => ['web','auth','customer']], function () {
Route::get('/BeliBarang', 'CustomerController@BeliBarang');
Route::get('/createPembelian/{id}', 'CustomerController@createPembelian');
Route::post('/storePembelian', 'CustomerController@storePembelian');
Route::post('/savePembelian', 'CustomerController@savePembelian');
Route::get('/cariBarang','CustomerController@cariBarang');
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('/cariBarang','CustomerController@cariBarang');
Route::get('/RequestBarang', 'CustomerController@RequestBarang');
Route::get('/createRequest/{id}', 'CustomerController@createRequest');
Route::post('/storeRequest', 'CustomerController@storeRequest');
Route::post('/saveRequest', 'CustomerController@saveRequest');
<<<<<<< HEAD
Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian');
Route::get('/HistoryRequest', 'CustomerController@HistoryRequest');
});
=======
Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian');
Route::get('/HistoryRequest', 'CustomerController@HistoryRequest');
});
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
......@@ -109,6 +98,9 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::post('/RejectedBarang/{id}', 'InventoriController@RejectedBarang');
Route::put('/RejectedBarang/{id}', 'InventoriController@RejectedBarang');
Route::get('/pdfpembelian/{id}', 'InventoriController@pdfpembelian');
Route::get('/pdfrequest/{id}', 'InventoriController@pdfrequest');
});
......@@ -116,17 +108,13 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::group(['middleware' => ['web','auth','kasir']], function () {
Route::get('/ListCustomer', 'KasirController@ListCustomer');
<<<<<<< HEAD
Route::get('/ListTransaksi', 'KasirController@ListTransaksi');
Route::get('/cariCustomer','KasirController@cariCustomer');
=======
Route::get('/ListPembelians', 'KasirController@ListPembelians');
Route::get('/ListRequests', 'KasirController@ListRequests');
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
Route::get('/addSaldo/{id}','KasirController@addSaldo');
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');
Route::get('/cariCustomer','KasirController@cariCustomer');
});
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