Template
first commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h1 class="text-center font-weight-light my-4"><b>Add New Customer</b></h1></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url('/insert-customer') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Name</label>
|
||||
<input class="form-control py-4" name="name" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Email</label>
|
||||
<input class="form-control py-4" name="email" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Company</label>
|
||||
<input class="form-control py-4" name="company" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Address</label>
|
||||
<input class="form-control py-4" name="address" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Phone</label>
|
||||
<input class="form-control py-4" name="phone" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,102 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4"><b>Create New Invoice</b></h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{url('/insert-invoice') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Name</label>
|
||||
<input class="form-control py-4" name="customer" type="text" value="{{ $customer->name }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Email</label>
|
||||
<input class="form-control py-4" name="email" type="text" value="{{ $customer->email }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Company</label>
|
||||
<input class="form-control py-4" name="company" type="text" value="{{ $customer->company }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Address</label>
|
||||
<input class="form-control py-4" name="address" type="text" value="{{ $customer->address }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Phone No.</label>
|
||||
<input class="form-control py-4" name="phone" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Product Category</label>
|
||||
<input class="form-control py-4" name="item" type="text" value="{{ $product->category }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Product Name</label>
|
||||
<input class="form-control py-4" name="name" type="text" value="{{ $product->name }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Price (perUnit)</label>
|
||||
<input class="form-control py-4" name="unit_price" type="text" value="{{ $product->unit_price }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Quantity</label>
|
||||
<input class="form-control py-4" name="quantity" type="text" value="{{ $order->quantity }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Total Price</label>
|
||||
<input class="form-control py-4" name="total" type="text" value="{{ $product->unit_price * $order->quantity }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Payment</label>
|
||||
<input class="form-control py-4" name="payment" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Gallery</label>
|
||||
<input name="photo" type="file" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Add New Order</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{url('/insert-order') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Product Code</label>
|
||||
<input class="form-control py-4" name="code" type="text" value="{{ $product->product_code }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Product Name</label>
|
||||
<input class="form-control py-4" name="name" type="text" value="{{ $product->name }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Customer Email</label>
|
||||
<input class="form-control py-4" name="email" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Stock</label>
|
||||
<input class="form-control py-4" name="stock" type="text" value="{{ $product->stock }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Quantity</label>
|
||||
<input class="form-control py-4" name="quantity" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Gallery</label>
|
||||
<input name="photo" type="file" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,71 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Add New Product</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url('/insert-product') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Product Code</label>
|
||||
<input class="form-control py-4" name="code" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Product Name</label>
|
||||
<input class="form-control py-4" name="name" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Category</label>
|
||||
<input class="form-control py-4" name="category" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Stock</label>
|
||||
<input class="form-control py-4" name="stock" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Buy Price (perUnit)</label>
|
||||
<input class="form-control py-4" name="unit_price" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Sale Price(perUnit)</label>
|
||||
<input class="form-control py-4" name="sale_price" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Gallery</label>
|
||||
<input name="photo" type="file" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,94 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Customers List
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Company</th>
|
||||
<th>Address</th>
|
||||
<th>Phone</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($customers as $row)
|
||||
<tr>
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>{{ $row->email }}</td>
|
||||
<td>{{ $row->company }}</td>
|
||||
<td>{{ $row->address }}</td>
|
||||
<td>{{ $row->phone }}</td>
|
||||
<td>
|
||||
<a href="{{URL::to('edit_customer')}}" class="btn btn-sm btn-info">Edit</a>
|
||||
<!-- <a href="{{ 'add-order/'.$row->id }}" class="btn btn-sm btn-info">Order</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$('#dataTable').DataTable({
|
||||
columnDefs: [
|
||||
{bSortable: false, targets: [5]}
|
||||
],
|
||||
dom: 'lBfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, 1, 2, 5 ]
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
|
||||
],
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,94 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Invoices List
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Invoice No.</th>
|
||||
<th>Customer Name</th>
|
||||
<th>Customer Email</th>
|
||||
<th>Company</th>
|
||||
<th>Address</th>
|
||||
<!-- <th>Total_Price</th> -->
|
||||
<th>Product Name</th>
|
||||
<!-- <th>Sales Stock Price</th> -->
|
||||
<th>Quantity</th>
|
||||
<th>Total Cost</th>
|
||||
<th>Due</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $row)
|
||||
<tr>
|
||||
<td>{{ $row->id }}</td>
|
||||
<td>{{ $row->customer_name }}</td>
|
||||
<td>{{ $row->customer_mail }}</td>
|
||||
<td>{{ $row->company }}</td>
|
||||
<td>{{ $row->address }}</td>
|
||||
<td>{{ $row->product_name }}</td>
|
||||
<td>{{ $row->quantity }}</td>
|
||||
<td>{{ $row->total }}</td>
|
||||
<td>{{ $row->due }}</td>
|
||||
<td>{{ $row->created_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$('#dataTable').DataTable({
|
||||
columnDefs: [
|
||||
{bSortable: false, targets: [6]}
|
||||
],
|
||||
dom: 'lBfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, 1, 2, 5 ]
|
||||
}
|
||||
},
|
||||
'colvis'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,101 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Orders List
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order Id</th>
|
||||
<th>Product Code</th>
|
||||
<th>Product Name</th>
|
||||
<th>Customer Email</th>
|
||||
<th>Quantity</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($orders as $row)
|
||||
<tr>
|
||||
<td>{{ $row->id }}</td>
|
||||
<td>{{ $row->product_code }}</td>
|
||||
<td>{{ $row->product_name }}</td>
|
||||
<td>{{ $row->email }}</td>
|
||||
<td>{{ $row->quantity }}</td>
|
||||
<td>
|
||||
@if($row->order_status=='0')
|
||||
<a href="#" class="btn btn-sm btn-info">Pending</a>
|
||||
@else
|
||||
<a href="#" class="btn btn-sm btn-info">Delivered</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($row->order_status=='0')
|
||||
<a href="{{ 'add-invoice/'.$row->id }}" class="btn btn-sm btn-info">createInvoice</a>
|
||||
@else
|
||||
<a href="#" class="btn btn-sm btn-info">Invoiced</a>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$('#dataTable').DataTable({
|
||||
columnDefs: [
|
||||
{bSortable: false, targets: [6]}
|
||||
],
|
||||
dom: 'lBfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, 1, 2, 5 ]
|
||||
}
|
||||
},
|
||||
'colvis'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,96 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Products in Stock
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Category</th>
|
||||
<th>Stock</th>
|
||||
<th>Unit Price</th>
|
||||
<th>Sale Price</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($products as $row)
|
||||
<tr>
|
||||
<td>{{ $row->product_code }}</td>
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>{{ $row->category }}</td>
|
||||
|
||||
@if($row->stock > '0')
|
||||
<td>{{ $row->stock }}</td>
|
||||
@else
|
||||
<td>stockout</td>
|
||||
@endif
|
||||
|
||||
<td>{{ $row->unit_price }}</td>
|
||||
<td>{{ $row->sales_unit_price }}</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-sm btn-info">Edit</a>
|
||||
<a href="#" class="btn btn-sm btn-danger">Delete</a>
|
||||
<a href="{{ 'purchase-products/'.$row->id }}" class="btn btn-sm btn-info">Purchase</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$('#dataTable').DataTable({
|
||||
columnDefs: [
|
||||
{bSortable: false, targets: [6]}
|
||||
],
|
||||
dom: 'lBfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, 1, 2, 5 ]
|
||||
}
|
||||
},
|
||||
'colvis'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,49 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Available Products
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Category</th>
|
||||
<th>Stock</th>
|
||||
<th>Unit Price</th>
|
||||
<th>Sales Unit Price</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($products as $row)
|
||||
<tr>
|
||||
<td>{{ $row->product_code }}</td>
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>{{ $row->category }}</td>
|
||||
|
||||
@if($row->stock > '0')
|
||||
<td>{{ $row->stock }}</td>
|
||||
@else
|
||||
<td>Not Available</td>
|
||||
@endif
|
||||
|
||||
<td>{{ $row->unit_price }}</td>
|
||||
<td>{{ $row->sales_unit_price }}</td>
|
||||
<td>
|
||||
<a href="{{ 'add-order/'.$row->id }}" class="btn btn-sm btn-info">Order</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,49 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Delivered Products
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order Id</th>
|
||||
<th>Product Code</th>
|
||||
<th>Product Name</th>
|
||||
<th>Customer Email</th>
|
||||
<th>Quantity</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($orders as $row)
|
||||
<tr>
|
||||
<td>{{ $row->id }}</td>
|
||||
<td>{{ $row->product_code }}</td>
|
||||
<td>{{ $row->product_name }}</td>
|
||||
<td>{{ $row->email }}</td>
|
||||
<td>{{ $row->quantity }}</td>
|
||||
<td>
|
||||
@if($row->order_status=='0')
|
||||
<a href="#" class="btn btn-sm btn-info">Pending</a>
|
||||
@else
|
||||
<a href="#" class="btn btn-sm btn-info">Delivered</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,58 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">New Customer</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{URL::to('update-customer/'.$customers->id)}}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Name</label>
|
||||
<input class="form-control py-4" name="name" value="{{ $customers->name }}" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Email</label>
|
||||
<input class="form-control py-4" name="email" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Company</label>
|
||||
<input class="form-control py-4" name="company" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Address</label>
|
||||
<input class="form-control py-4" name="address" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Phone</label>
|
||||
<input class="form-control py-4" name="phone" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,206 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>A simple, clean, and responsive HTML invoice template</title>
|
||||
|
||||
<style>
|
||||
.invoice-box {
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
border: 1px solid #eee;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.invoice-box table {
|
||||
width: 100%;
|
||||
line-height: inherit;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.invoice-box table td {
|
||||
padding: 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.invoice-box table tr td:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.invoice-box table tr.top table td {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.invoice-box table tr.top table td.title {
|
||||
font-size: 45px;
|
||||
line-height: 45px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.invoice-box table tr.information table td {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.invoice-box table tr.heading td {
|
||||
background: #eee;
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.invoice-box table tr.details td {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.invoice-box table tr.item td {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.invoice-box table tr.item.last td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.invoice-box table tr.total td:nth-child(2) {
|
||||
border-top: 2px solid #eee;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.invoice-box table tr.top table td {
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.invoice-box table tr.information table td {
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/** RTL **/
|
||||
.rtl {
|
||||
direction: rtl;
|
||||
font-family: Tahoma, 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.rtl table {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.rtl table tr td:nth-child(2) {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="invoice-box">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr class="top">
|
||||
<td colspan="2">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="title">
|
||||
<h2>SEP Company Ltd.</h2>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
Invoice #: {{$data->id }}<br />
|
||||
Created: {{$data->created_at }}<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="information">
|
||||
<td colspan="2">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
SEP Company Ltd.<br />
|
||||
GEC<br />
|
||||
Chittagong, Bangladesh
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $data->company }}<br />
|
||||
{{ $data->customer_name }}<br />
|
||||
{{ $data->customer_mail }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="heading">
|
||||
<td>Details</td>
|
||||
|
||||
<td>#</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item">
|
||||
<td>Product Name</td>
|
||||
<td>{{ $data->product_name }}</td>
|
||||
</tr>
|
||||
<tr class="item">
|
||||
<td>Product Quantity</td>
|
||||
<td>{{ $data->quantity }}</td>
|
||||
</tr>
|
||||
<tr class="item">
|
||||
<td>Unit price</td>
|
||||
<td>{{ $data->price }}</td>
|
||||
</tr>
|
||||
<tr class="item">
|
||||
<td>Total price</td>
|
||||
<td>{{ $data->total }}</td>
|
||||
</tr>
|
||||
<tr class="item">
|
||||
<td>Payment</td>
|
||||
<td>{{ $data->payment }}</td>
|
||||
</tr>
|
||||
<tr class="item">
|
||||
<td>Due</td>
|
||||
<td>{{ $data->due }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="item last">
|
||||
<td>Status</td>
|
||||
|
||||
<td>Product on Delivery</td>
|
||||
</tr>
|
||||
|
||||
<tr class="total">
|
||||
<td></td>
|
||||
|
||||
<td><input style="padding:5px;" value="Print Document" type="button" onclick="myFunction()" class="button"></input></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
function myFunction()
|
||||
{
|
||||
window.print();
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
@@ -0,0 +1,192 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Create New Invoice</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{url('/insert-invoice') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Name</label>
|
||||
<select id="name" name="name" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($customers as $c)
|
||||
<option value="{{$c->id}}">{{ $c->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" name="email" id="email">
|
||||
<!-- <label class="small mb-1" for="inputFirstName">Customer Email</label>
|
||||
<input class="form-control py-4" name="email" type="text"/> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" name="company" id="company">
|
||||
<!-- <label class="small mb-1" for="inputLastName">Company</label>
|
||||
<input class="form-control py-4" name="company" type="text" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" name="address" id="address">
|
||||
<!-- <label class="small mb-1" for="inputState">Address</label>
|
||||
<input class="form-control py-4" name="address" type="text" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" name="phone" id="phone">
|
||||
<!-- <label class="small mb-1" for="inputState">Phone No.</label>
|
||||
<input class="form-control py-4" name="phone" type="text" /> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">customer email</label>
|
||||
<select id="inputState" name="email" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($customers as $row)
|
||||
@if( $row->id > 1)
|
||||
<option>{{ $row->email }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Company</label>
|
||||
<input class="form-control py-4" name="company" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Address</label>
|
||||
<input class="form-control py-4" name="address" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Phone No.</label>
|
||||
<select id="inputState" name="phone" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($customers as $row)
|
||||
@if( $row->phone > 1)
|
||||
<option>{{ $row->phone }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Product Category</label>
|
||||
<select id="inputState" name="item" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($products as $row)
|
||||
@if( $row->stock > 1)
|
||||
<option>{{ $row->category }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Product Name</label>
|
||||
<select id="inputState" name="name" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($products as $row)
|
||||
@if( $row->stock > 1)
|
||||
<option>{{ $row->name }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Price (perUnit)</label>
|
||||
<input class="form-control py-4" name="unit_price" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Quantity</label>
|
||||
<input class="form-control py-4" name="quantity" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Total Price</label>
|
||||
<input class="form-control py-4" name="total" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Payment</label>
|
||||
<input class="form-control py-4" name="payment" type="text" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxy/1.6.1/scripts/jquery.ajaxy.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#name").change(function() {
|
||||
var c_name = $("#name").val();
|
||||
console.log(c_name);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "http://127.0.0.1:8000/api/get-customer",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
"id" : c_name
|
||||
},
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$("#email").html('<label class="small mb-1" for="inputFirstName">Customer Email</label>');
|
||||
var x = '<input class="form-control py-4" name="email" value="'+data.customer.email+'" type="text"/>';
|
||||
$("#email").append(x);
|
||||
|
||||
$("#company").html('<label class="small mb-1" for="inputFirstName">Customer company</label>');
|
||||
var x = '<input class="form-control py-4" name="company" value="'+data.customer.company+'" type="text"/>';
|
||||
$("#company").append(x);
|
||||
|
||||
$("#phone").html('<label class="small mb-1" for="inputFirstName">Customer Phone</label>');
|
||||
var x = '<input class="form-control py-4" name="phone" value="'+data.customer.phone+'" type="text"/>';
|
||||
$("#phone").append(x);
|
||||
|
||||
$("#address").html('<label class="small mb-1" for="inputFirstName">Customer Address</label>');
|
||||
var x = '<input class="form-control py-4" name="address" value="'+data.customer.address+'" type="text"/>';
|
||||
$("#address").append(x);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,130 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">New Order</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{url('/insert-new-order') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Customer Name</label>
|
||||
<select id="name" name="name" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($customers as $c)
|
||||
<option value="{{$c->id}}">{{ $c->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="email">
|
||||
<!-- <label class="small mb-1" for="inputFirstName">Customer Email</label>
|
||||
<input class="form-control py-4" name="email" type="text"/> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="company">
|
||||
<!-- <label class="small mb-1" for="inputLastName">Company</label>
|
||||
<input class="form-control py-4" name="company" type="text" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="address">
|
||||
<!-- <label class="small mb-1" for="inputState">Address</label>
|
||||
<input class="form-control py-4" name="address" type="text" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="phone">
|
||||
<!-- <label class="small mb-1" for="inputState">Phone No.</label>
|
||||
<input class="form-control py-4" name="phone" type="text" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Product Code</label>
|
||||
<select id="inputState" name="code" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($products as $row)
|
||||
@if( $row->stock > 1)
|
||||
<option>{{ $row->product_code }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputState">Product Name</label>
|
||||
<select id="inputState" name="name" class="form-control">
|
||||
<option selected>Choose...</option>
|
||||
@foreach($products as $row)
|
||||
@if( $row->stock > 1)
|
||||
<option value="{{$row->product_code}}">{{ $row->name }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Quantity</label>
|
||||
<input class="form-control py-4" name="quantity" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxy/1.6.1/scripts/jquery.ajaxy.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#name").change(function() {
|
||||
var c_name = $("#name").val();
|
||||
console.log(c_name);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "http://127.0.0.1:8000/api/get-customer",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
"id" : c_name
|
||||
},
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$("#email").html('<label class="small mb-1" for="inputFirstName">Customer Email</label>');
|
||||
var x = '<input class="form-control py-4" name="email" value="'+data.customer.email+'" type="text"/>';
|
||||
$("#email").append(x);
|
||||
|
||||
$("#company").html('<label class="small mb-1" for="inputFirstName">Customer company</label>');
|
||||
var x = '<input class="form-control py-4" name="company" value="'+data.customer.company+'" type="text"/>';
|
||||
$("#company").append(x);
|
||||
|
||||
$("#phone").html('<label class="small mb-1" for="inputFirstName">Customer Phone</label>');
|
||||
var x = '<input class="form-control py-4" name="phone" value="'+data.customer.phone+'" type="text"/>';
|
||||
$("#phone").append(x);
|
||||
|
||||
$("#address").html('<label class="small mb-1" for="inputFirstName">Customer Address</label>');
|
||||
var x = '<input class="form-control py-4" name="address" value="'+data.customer.address+'" type="text"/>';
|
||||
$("#address").append(x);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,96 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Pending Orders List
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order Id</th>
|
||||
<th>Product Code</th>
|
||||
<th>Product Name</th>
|
||||
<th>Customer Email</th>
|
||||
<th>Quantity</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($orders as $row)
|
||||
<tr>
|
||||
<td>{{ $row->id }}</td>
|
||||
<td>{{ $row->product_code }}</td>
|
||||
<td>{{ $row->product_name }}</td>
|
||||
<td>{{ $row->email }}</td>
|
||||
<td>{{ $row->quantity }}</td>
|
||||
<td>
|
||||
@if($row->order_status=='0')
|
||||
<a href="#" class="btn btn-sm btn-info">Pending</a>
|
||||
@else
|
||||
<a href="#" class="btn btn-sm btn-info">Delivered</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ 'add-invoice/'.$row->id }}" class="btn btn-sm btn-info">createInvoice</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$('#dataTable').DataTable({
|
||||
columnDefs: [
|
||||
{bSortable: false, targets: [6]}
|
||||
],
|
||||
dom: 'lBfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, ':visible' ]
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
exportOptions: {
|
||||
modifier: {
|
||||
page: 'current'
|
||||
},
|
||||
columns: [ 0, 1, 2, 5 ]
|
||||
}
|
||||
},
|
||||
'colvis'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,59 @@
|
||||
@extends('layouts.admin_master')
|
||||
|
||||
@section('content')
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-7">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-header"><h3 class="text-center font-weight-light my-4">Purchase Existing Product</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url('/insert-purchase-products') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Product Code</label>
|
||||
<input class="form-control py-4" name="code" type="text" value="{{ $product->product_code }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputFirstName">Product Name</label>
|
||||
<input class="form-control py-4" name="name" type="text" value="{{ $product->name }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Category</label>
|
||||
<input class="form-control py-4" name="category" type="text" value="{{ $product->category }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Products in Stock</label>
|
||||
<input class="form-control py-4" name="stock" type="text" value="{{ $product->stock }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="small mb-1" for="inputLastName">Add More Product in Stock</label>
|
||||
<input class="form-control py-4" name="purchase" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4 mb-0"><button class="btn btn-primary btn-block">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,31 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Sold Products
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Product Name</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($products as $row)
|
||||
<tr>
|
||||
<td>{{ $row->product_name }}</td>
|
||||
<td>{{ $row->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user