template default

This commit is contained in:
effendy-dev
2025-12-02 07:51:23 +07:00
parent 461a740be0
commit efffe71082
21 changed files with 7 additions and 1836 deletions

View File

@@ -1,34 +0,0 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
<h1 align="center">App Test</h1>
<hr>
## Quick Installation
git clone https://github.com/epeneffendy/antrian-test-app.git
cd Inventory_Management_System
### Composer
composer update
### For Environment Variable Create
cp .env.example .env
### For Migration table in database [Create database name as ```IMS```]
php artisan migrate
### Server ON ```url: http://127.0.0.1:8000/```
php artisan serve
## Our valuable team👩💻👨💻 :
<p align="center">
<img src="https://contributors-img.web.app/image?repo=ekramasif/Inventory_Management_System" />
</p>

View File

@@ -1,58 +0,0 @@
@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

View File

@@ -1,102 +0,0 @@
@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

View File

@@ -1,64 +0,0 @@
@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

View File

@@ -1,71 +0,0 @@
@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

View File

@@ -1,94 +0,0 @@
@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

View File

@@ -1,94 +0,0 @@
@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

View File

@@ -1,101 +0,0 @@
@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

View File

@@ -1,96 +0,0 @@
@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

View File

@@ -1,49 +0,0 @@
@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

View File

@@ -1,49 +0,0 @@
@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

View File

@@ -1,58 +0,0 @@
@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

View File

@@ -1,206 +0,0 @@
@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')

View File

@@ -1,192 +0,0 @@
@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

View File

@@ -1,130 +0,0 @@
@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

View File

@@ -1,96 +0,0 @@
@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

View File

@@ -1,59 +0,0 @@
@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

View File

@@ -1,31 +0,0 @@
@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

View File

@@ -8,123 +8,7 @@
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item active">Dashboard</li>
</ol>
<div class="row">
<div class="col-xl-3 col-md-6">
<div class="card bg-primary text-white mb-4">
<div class="card-body">Stock</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<a class="small text-white stretched-link" href="{{ route('all.product') }}">View Details</a>
<div class="small text-white"><i class="fas fa-angle-right"></i></div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card bg-warning text-white mb-4">
<div class="card-body">Sold Products</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<a class="small text-white stretched-link" href="{{ route('sold.products') }}">View Details</a>
<div class="small text-white"><i class="fas fa-angle-right"></i></div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card bg-success text-white mb-4">
<div class="card-body">Available Products</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<a class="small text-white stretched-link" href="{{ route('available.products') }}">View Details</a>
<div class="small text-white"><i class="fas fa-angle-right"></i></div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card bg-danger text-white mb-4">
<div class="card-body">Pending Orders</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<a class="small text-white stretched-link" href="{{ route('pending.orders') }}">View Details</a>
<div class="small text-white"><i class="fas fa-angle-right"></i></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-6">
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-chart-area mr-1"></i>
Area Chart Example
</div>
<div class="card-body"><canvas id="myAreaChart" width="100%" height="40"></canvas></div>
</div>
</div>
<div class="col-xl-6">
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-chart-bar mr-1"></i>
Bar Chart Example
</div>
<div class="card-body"><canvas id="myBarChart" width="100%" height="40"></canvas></div>
</div>
</div>
</div>
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-table mr-1"></i>
DataTable Example
</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>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$86,000</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
@endsection

View File

@@ -6,7 +6,7 @@ Products<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>InventoryManagementSystem</title>
<title>Gomedis</title>
<link href="{{ asset('backend') }}/css/styles.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
@@ -15,7 +15,7 @@ Products<!DOCTYPE html>
</head>
<body class="sb-nav-fixed">
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand">Inventory Management</a>
<a class="navbar-brand">Gomedis</a>
<button class="btn btn-link btn-sm order-1 order-lg-0" id="sidebarToggle" href="#"><i class="fas fa-bars"></i></button>
<!-- Navbar Search-->
<form class="d-none d-md-inline-block form-inline ml-auto mr-0 mr-md-3 my-2 my-md-0">
@@ -54,76 +54,6 @@ Products<!DOCTYPE html>
Dashboard
</a>
<div class="sb-sidenav-menu-heading">Interface</div>
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseProducts" aria-expanded="false" aria-controls="collapseProducts">
<div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
Products
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapseProducts" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('add.product') }}">New Product</a>
<a class="nav-link" href="{{ route('all.product') }}">Stock Report</a>
<a class="nav-link" href="{{ route('available.products') }}">Available Products</a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseOrders" aria-expanded="false" aria-controls="collapseOrders">
<div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
Orders
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapseOrders" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('new.order')}}">New Order</a>
</nav>
</div>
<div class="collapse" id="collapseOrders" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('all.orders')}}">Orders List</a>
</nav>
</div>
<div class="collapse" id="collapseOrders" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('pending.orders')}}">Pending Orders</a>
</nav>
</div>
<div class="collapse" id="collapseOrders" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('delivered.orders')}}">Delivered Orders</a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseInvoice" aria-expanded="false" aria-controls="collapseInvoice">
<div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
Sales
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapseInvoice" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('new.invoice') }}">New Invoice</a>
<a class="nav-link" href="{{ route('all.invoices') }}">Invoices List</a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseAuthentication" aria-expanded="false" aria-controls="collapseAuthentication">
<div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
Customers
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapseAuthentication" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('add.customer') }}">New Customer</a>
</nav>
</div>
<div class="collapse" id="collapseAuthentication" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="{{ route('all.customers') }}">Customers List</a>
</nav>
</div>
</div>
</nav>
</div>

View File

@@ -22,65 +22,6 @@ Route::get('/', function () {
return view('auth.login');
});
//product
Route::get('/add-product', function () {
return view('Admin.add_product');
})->middleware(['auth'])->name('add.product');
Route::post('/insert-product',[ProductController::class,'store'])->middleware(['auth']);
Route::get('/all-product',[ProductController::class,'allProduct'])->middleware(['auth'])->name('all.product');
Route::get('/available-products',[ProductController::class,'availableProducts'])->middleware(['auth'])->name('available.products');
Route::get('/purchase-products/{id}', [ProductController::class,'purchaseData'])->middleware(['auth']);
Route::post('/insert-purchase-products',[ProductController::class,'storePurchase'])->middleware(['auth']);
//invoice
Route::get('/add-invoice/{id}', [InvoiceController::class,'formData'])->middleware(['auth']);
Route::get('/new-invoice', [InvoiceController::class,'newformData'])->middleware(['auth'])->name('new.invoice');
Route::post('/insert-invoice',[InvoiceController::class,'store'])->middleware(['auth']);
Route::get('/invoice-details', function () {
return view('Admin.invoice_details');
})->middleware(['auth'])->name('invoice.details');
Route::get('/all-invoice', [InvoiceController::class,'allInvoices'])->middleware(['auth'])->name('all.invoices');
Route::get('/sold-products',[InvoiceController::class,'soldProducts'])->middleware(['auth'])->name('sold.products');
// Route::get('/delete', [InvoiceController::class,'delete']);
//order
Route::get('/add-order/{name}', [ProductController::class,'formData'])->middleware(['auth'])->name('add.order');
Route::post('/insert-order',[OrderController::class,'store'])->middleware(['auth']);
Route::get('/all-orders',[OrderController::class,'ordersData'])->middleware(['auth'])->name('all.orders');
Route::get('/pending-orders',[OrderController::class,'pendingOrders'])->middleware(['auth'])->name('pending.orders');
Route::get('/delivered-orders',[OrderController::class,'deliveredOrders'])->middleware(['auth'])->name('delivered.orders');
Route::get('/new-order', [OrderController::class,'newformData'])->middleware(['auth'])->name('new.order');
Route::post('/insert-new-order',[OrderController::class,'newStore'])->middleware(['auth']);
//customer
Route::get('/add-customer', function () {
return view('Admin.add_customer');
})->middleware(['auth'])->name('add.customer');
Route::post('/insert-customer',[CustomerController::class,'store'])->middleware(['auth']);
Route::get('/all-customers',[CustomerController::class,'customersData'])->middleware(['auth'])->name('all.customers');
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth'])->name('dashboard');