Compare commits

..

3 Commits
main ... hr

Author SHA1 Message Date
bf44886663 Attendance module 2024-04-16 17:23:35 +05:45
2c2526ef72 first commit 2024-04-16 11:29:08 +05:45
9a50f296fe calendar 2024-04-16 11:27:13 +05:45
30 changed files with 2206 additions and 1578 deletions

View File

@ -14,7 +14,8 @@ class CalendarController extends Controller
*/
public function index()
{
return view('admin::index');
$data['title'] = 'Calendar';
return view('admin::calendars.index', $data);
}
/**
@ -22,7 +23,7 @@ class CalendarController extends Controller
*/
public function create()
{
return view('admin::create');
return view('admin::calendars.create');
}
/**
@ -38,7 +39,7 @@ class CalendarController extends Controller
*/
public function show($id)
{
return view('admin::show');
return view('admin::calendars.show');
}
/**
@ -46,7 +47,7 @@ class CalendarController extends Controller
*/
public function edit($id)
{
return view('admin::edit');
return view('admin::calendars.edit');
}
/**

File diff suppressed because it is too large Load Diff

View File

@ -6,15 +6,24 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Attendance\Repositories\AttendanceRepository;
class AttendanceController extends Controller
{
private $attendanceRepository;
public function __construct(AttendanceRepository $attendanceRepository)
{
$this->attendanceRepository = $attendanceRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
return view('attendance::index');
$data['title'] = 'Attendance Lists';
$data['attendanceLists'] = $this->attendanceRepository->findAll();
return view('attendance::attendances.index', $data);
}
/**
@ -22,7 +31,9 @@ class AttendanceController extends Controller
*/
public function create()
{
return view('attendance::create');
$data['title'] = 'Create Attendance';
$data['editable'] = false;
return view('attendance::attendances.create', $data);
}
/**
@ -30,7 +41,17 @@ class AttendanceController extends Controller
*/
public function store(Request $request): RedirectResponse
{
//
$request->merge([
'date' => $request->date ? $request->date : now()->format('Y-m-d'),
]);
try {
$this->attendanceRepository->create($request->all());
toastr()->success('Attendance Created Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('attendance.index');
}
/**
@ -38,7 +59,7 @@ class AttendanceController extends Controller
*/
public function show($id)
{
return view('attendance::show');
return view('attendance::attendances.show');
}
/**
@ -46,7 +67,17 @@ class AttendanceController extends Controller
*/
public function edit($id)
{
return view('attendance::edit');
try {
$data['title'] = 'Edit Attendance';
$data['editable'] = true;
$data['attendance'] = $this->attendanceRepository->getAttendanceById($id);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return view('attendance::attendances.edit', $data);
}
/**
@ -54,7 +85,15 @@ class AttendanceController extends Controller
*/
public function update(Request $request, $id): RedirectResponse
{
//
try {
$this->attendanceRepository->update($id, $request->all());
toastr()->success('Attendance Updated Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('attendance.index');
}
/**
@ -62,6 +101,12 @@ class AttendanceController extends Controller
*/
public function destroy($id)
{
//
try {
$this->attendanceRepository->delete($id);
toastr()->success('Attendance Deleted Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('attendance.index');
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace Modules\Attendance\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Attendance\Database\factories\AttendanceFactory;
class Attendance extends Model
{
use HasFactory;
protected $table = 'tbl_attendances';
protected $primaryKey = 'attendance_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'clock_in_time',
'clock_out_time',
'work_from_type',
'date',
'status',
'total_hours',
'description',
'remarks',
'createdBy',
'updatedBy',
];
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Attendance\Repositories;
interface AttendanceInterface
{
public function findAll();
public function getAttendanceById($attendanceId);
public function delete($attendanceId);
public function create(array $attendanceDetails);
public function update($attendanceId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Attendance\Repositories;
use Modules\Attendance\Models\Attendance;
class AttendanceRepository implements AttendanceInterface
{
public function findAll()
{
return Attendance::get();
}
public function getAttendanceById($attendanceId)
{
return Attendance::findOrFail($attendanceId);
}
public function delete($attendanceId)
{
Attendance::destroy($attendanceId);
}
public function create(array $attendanceDetails)
{
return Attendance::create($attendanceDetails);
}
public function update($attendanceId, array $newDetails)
{
return Attendance::where('attendance_id', $attendanceId)->update($newDetails);
}
}

View File

@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tbl_attendances', function (Blueprint $table) {
$table->unsignedTinyInteger('attendance_id')->autoIncrement();
$table->unsignedBigInteger('employee_id')->nullable();
$table->time('clock_in_time')->nullable();
$table->time('clock_out_time')->nullable();
$table->string('work_from_type')->nullable();
$table->date('date')->nullable();
$table->integer('status')->nullable();
$table->integer('total_hours')->nullable();
$table->mediumText('description')->nullable();
$table->mediumText('remarks')->nullable();
$table->unsignedBigInteger('createdBy')->nullable();
$table->unsignedBigInteger('updatedBy')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_attendances');
}
};

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->form('POST')->route('attendance.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('attendance::partials.attendances.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->modelForm($attendance, 'PUT')->route('attendance.update', $attendance->attendance_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('attendance::partials.attendances.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,238 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class="card">
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
<div class="flex-shrink-0">
<a href="{{ route('attendance.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i>Mark Attendance</a>
</div>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="dataTable table-bordered table-hover mt-3 table" id="example">
<thead class="thead-light">
<tr>
<th class="px-2" style="vertical-align: middle;">Employee</th>
<th class="f-11 pl-1 pr-2">1
<br>
<span class="text-dark-grey f-10">
Mon
</span>
</th>
<th class="f-11 pl-1 pr-2">2
<br>
<span class="text-dark-grey f-10">
Tue
</span>
</th>
<th class="f-11 pl-1 pr-2">3
<br>
<span class="text-dark-grey f-10">
Wed
</span>
</th>
<th class="f-11 pl-1 pr-2">4
<br>
<span class="text-dark-grey f-10">
Thu
</span>
</th>
<th class="f-11 pl-1 pr-2">5
<br>
<span class="text-dark-grey f-10">
Fri
</span>
</th>
<th class="f-11 pl-1 pr-2">6
<br>
<span class="text-dark-grey f-10">
Sat
</span>
</th>
<th class="f-11 pl-1 pr-2">7
<br>
<span class="text-dark-grey f-10">
Sun
</span>
</th>
<th class="f-11 pl-1 pr-2">8
<br>
<span class="text-dark-grey f-10">
Mon
</span>
</th>
<th class="f-11 pl-1 pr-2">9
<br>
<span class="text-dark-grey f-10">
Tue
</span>
</th>
<th class="f-11 pl-1 pr-2">10
<br>
<span class="text-dark-grey f-10">
Wed
</span>
</th>
<th class="f-11 pl-1 pr-2">11
<br>
<span class="text-dark-grey f-10">
Thu
</span>
</th>
<th class="f-11 pl-1 pr-2">12
<br>
<span class="text-dark-grey f-10">
Fri
</span>
</th>
<th class="f-11 pl-1 pr-2">13
<br>
<span class="text-dark-grey f-10">
Sat
</span>
</th>
<th class="f-11 pl-1 pr-2">14
<br>
<span class="text-dark-grey f-10">
Sun
</span>
</th>
<th class="f-11 pl-1 pr-2">15
<br>
<span class="text-dark-grey f-10">
Mon
</span>
</th>
<th class="f-11 pl-1 pr-2">16
<br>
<span class="text-dark-grey f-10">
Tue
</span>
</th>
<th class="f-11 pl-1 pr-2">17
<br>
<span class="text-dark-grey f-10">
Wed
</span>
</th>
<th class="f-11 pl-1 pr-2">18
<br>
<span class="text-dark-grey f-10">
Thu
</span>
</th>
<th class="f-11 pl-1 pr-2">19
<br>
<span class="text-dark-grey f-10">
Fri
</span>
</th>
<th class="f-11 pl-1 pr-2">20
<br>
<span class="text-dark-grey f-10">
Sat
</span>
</th>
<th class="f-11 pl-1 pr-2">21
<br>
<span class="text-dark-grey f-10">
Sun
</span>
</th>
<th class="f-11 pl-1 pr-2">22
<br>
<span class="text-dark-grey f-10">
Mon
</span>
</th>
<th class="f-11 pl-1 pr-2">23
<br>
<span class="text-dark-grey f-10">
Tue
</span>
</th>
<th class="f-11 pl-1 pr-2">24
<br>
<span class="text-dark-grey f-10">
Wed
</span>
</th>
<th class="f-11 pl-1 pr-2">25
<br>
<span class="text-dark-grey f-10">
Thu
</span>
</th>
<th class="f-11 pl-1 pr-2">26
<br>
<span class="text-dark-grey f-10">
Fri
</span>
</th>
<th class="f-11 pl-1 pr-2">27
<br>
<span class="text-dark-grey f-10">
Sat
</span>
</th>
<th class="f-11 pl-1 pr-2">28
<br>
<span class="text-dark-grey f-10">
Sun
</span>
</th>
<th class="f-11 pl-1 pr-2">29
<br>
<span class="text-dark-grey f-10">
Mon
</span>
</th>
<th class="f-11 pl-1 pr-2">30
<br>
<span class="text-dark-grey f-10">
Tue
</span>
</th>
<th class="px-2 text-right">Total</th>
</tr>
</thead>
<tbody>
<tr>
<td class="w-10 px-2">
<div class="align-items-center mw-50">
<div class="text-truncate">
<h5 class="f-12 mb-0">
<a href="https://demo.worksuite.biz/account/employees/1" class="text-darkest-grey">Mr.
Fletcher Berge <span class="badge badge-secondary ml-1 pr-1">It's you</span></a>
</h5>
<p class="f-12 text-dark-grey mb-0">
Junior
</p>
</div>
</div>
</td>
<td class="text-dark f-w-500 attendance-total w-100 px-2 text-right">
0 / <span class="text-lightest">30</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,32 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Employee')->class('form-label') }}
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Clock In')->class('form-label') }}
{{ html()->time('clock_in_time')->class('form-control') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Clock Out')->class('form-label') }}
{{ html()->time('clock_out_time')->class('form-control') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Date')->class('form-label') }}
{{ html()->date('date')->class('form-control')->placeholder('Attendance Date') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Working From')->class('form-label') }}
{{ html()->select('work_from_type', ['home' => 'Home', 'office' => 'Office', 'other' => 'Other'])->class('form-select')->placeholder('Working From') }}
</div>
<div class="text-end">
{{ html()->button($editable ? 'Update' : 'Mark Attendance', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -10,7 +10,7 @@ class Employee extends Model
protected $table = 'tbl_employees';
protected $primaryKey = 'id';
protected $guarded = [];
protected $appends = ['full_name'];
protected $appends = (['full_name']);
protected function getFullNameAttribute()
{

View File

@ -2,7 +2,6 @@
namespace Modules\Employee\Repositories;
use Illuminate\Support\Facades\DB;
use Modules\Employee\Models\Employee;
class EmployeeRepository implements EmployeeInterface
@ -39,7 +38,7 @@ class EmployeeRepository implements EmployeeInterface
public function pluck()
{
return Employee::pluck(DB::raw('CONCAT(first_name," ", middle_name , " ",last_name) AS full_name'), 'id');
return Employee::pluck('first_name', 'id');
}
// public function uploadImage($file)

View File

@ -34,7 +34,6 @@
{{ html()->label('Date of Birth')->class('form-label') }}
{{ html()->date('dob')->class('form-control')->placeholder('Choose Date of Birth')->required() }}
{{ html()->div('Please choose dob')->class('invalid-feedback') }}
</div>
<div class="col-md-4">
@ -56,9 +55,7 @@
<div class="col-md-4">
{{ html()->label('Upload Profile Picture')->class('form-label') }}
{{ html()->file('profile_picture')->class('form-control') }}
</div>
</div>
<div class="row gy-1 mt-1">

View File

@ -1,91 +0,0 @@
<?php
namespace Modules\Taxation\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\Companies;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Modules\Employee\Repositories\EmployeeInterface;
class InvoiceController extends Controller
{
private $employeeRepository;
public function __construct(EmployeeInterface $employeeRepository)
{
$this->employeeRepository = $employeeRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Invoice List';
$data['invoices'] = [];
return view('taxation::invoice.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Invoice';
$data['companyList'] = Companies::pluck('title', 'company_id');
$data['employeeList'] = $this->employeeRepository->pluck();
return view('taxation::invoice.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
//
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('taxation::invoice.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
return view('taxation::invoice.edit');
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
public function cloneProduct(Request $request)
{
$data = [];
$numInc = $request->numberInc;
$script = true;
return response()->json([
'view' => view('taxation::invoice.clone-product', compact('data', 'numInc', 'script'))->render(),
]);
}
}

View File

@ -1,39 +0,0 @@
<div class="card card-body product-card card-border-secondary mb-2 border">
<div class="row gy-2 mb-2">
<div class="col-md-4">
{{ html()->label('Product')->class('form-label') }}
{{ html()->text('product_id')->class('form-control')->placeholder('Enter Product Name')->required() }}
</div>
<div class="col-md-2">
{{ html()->label('Unit')->class('form-label') }}
{{ html()->text('unit')->class('form-control')->placeholder('Enter Unit')->required() }}
</div>
<div class="col-md-2">
{{ html()->label('Rate')->class('form-label') }}
{{ html()->text('rate')->class('form-control product-price cleave-numeral')->placeholder('Enter Rate')->attributes(['id' => 'cleave-numeral']) }}
</div>
<div class="col-md-2">
{{ html()->label('Quantity')->class('form-label') }}
{{ html()->text('qty')->class('form-control product-quantity cleave-numeral')->placeholder('Enter QTY')->attributes(['id' => 'cleave-numeral']) }}
</div>
<div class="col-md-2">
{{ html()->label('Amount')->class('form-label') }}
{{ html()->text('amt')->class('form-control product-line-price bg-light')->placeholder('Enter Amount')->isReadOnly() }}
</div>
<div class="col-md-6">
{{ html()->label('Description')->class('form-label') }}
{{ html()->text('desc')->class('form-control')->placeholder('Enter Description') }}
</div>
<div class="col-md-6 d-flex justify-content-end align-items-end">
<button type="button" class="btn btn-danger btn-icon waves-effect btn-remove waves-light"><i
class="ri-delete-bin-5-line"></i></button>
</div>
</div>
</div>

View File

@ -1,207 +0,0 @@
<div class="row gy-1">
<h5 class="text-primary text-center">Invoice Details</h5>
<div class="border border-dashed"></div>
<div class="col-md-4">
{{ html()->label('Company')->class('form-label') }}
{{ html()->select('company_id', $companyList)->class('form-control')->placeholder('Select Company')->required() }}
{{ html()->div('Please select company')->class('invalid-feedback') }}
</div>
<div class="col-md-4">
{{ html()->label('Invoice No.')->class('form-label') }}
{{ html()->text('invoice_no')->class('form-control')->placeholder('Enter Invoice No')->attributes(['id' => 'cleave-prefix']) }}
</div>
<div class="col-md-4">
{{ html()->label('VAT No.')->class('form-label') }}
{{ html()->text('vat_no')->class('form-control')->placeholder('Enter VAT No') }}
</div>
<div class="col-md-4">
{{ html()->label('Sales Date')->class('form-label') }}
{{ html()->date('sale_date')->class('form-control')->placeholder('Choose Sales Date')->required() }}
{{ html()->div('Please choose invoice date')->class('invalid-feedback') }}
</div>
<div class="col-md-4">
{{ html()->label('Bill Issue Date')->class('form-label') }}
{{ html()->date('isse_date')->class('form-control')->placeholder('Choose Bill Issue Date')->required() }}
{{ html()->div('Please choose invoice date')->class('invalid-feedback') }}
</div>
</div>
<div class="row gy-1 my-2">
<h5 class="text-primary text-center">Buyer Details</h5>
<div class="border border-dashed"></div>
<div class="col-md-4">
{{ html()->label('Buyer')->class('form-label') }}
{{ html()->select('buyer_id', $employeeList)->class('form-control')->placeholder('Select Buyer') }}
</div>
<div class="col-md-4">
{{ html()->label('Address No.')->class('form-label') }}
{{ html()->text('buyer_address')->class('form-control')->placeholder('Enter Address') }}
</div>
<div class="col-md-4">
{{ html()->label('VAT No.')->class('form-label') }}
{{ html()->text('vat_no')->class('form-control')->placeholder('Enter Buyer VAT No') }}
</div>
<div class="col-md-4">
{{ html()->label('Contact No')->class('form-label') }}
{{ html()->date('sale_date')->class('form-control')->placeholder('Enter Contact No') }}
</div>
<div class="col-md-4">
{{ html()->label('Mode of Payment')->class('form-label') }}
{{ html()->select('buyer_id', [1 => 'Cash', 2 => 'Bank', 3 => 'Credit'])->class('form-control')->placeholder('Select Payment Mode') }}
</div>
</div>
{{-- <div class="row mt-2">
<p class="text-primary">Shipping Details</p>
<div class="border border-dashed"></div>
<div class="col-md-4">
{{ html()->label('Address')->class('form-label') }}
{{ html()->text('address')->class('form-control')->placeholder('Enter Address') }}
</div>
<div class="col-md-4">
{{ html()->label('Shipping Date')->class('form-label') }}
{{ html()->date('shiiping_date')->class('form-control')->placeholder('Enter Temporary Address') }}
</div>
</div> --}}
<div class="row gy-1 gx-2 mt-1">
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-info btn-icon add-btn text-end"><i class="ri-add-line"></i></button>
</div>
@include('taxation::invoice.clone-product')
<div class="appendProductCard"></div>
</div>
<div class="d-flex justify-content-end w-30 mb-2">
<table class="table-borderless align-middle">
<tbody>
<tr>
<th scope="row">Sub Total</th>
<td style="width:150px;">
<input type="text" class="form-control bg-light border-0" id="subtotal" placeholder="$0.00"
readonly="">
</td>
</tr>
<tr>
<th scope="row">Estimated Tax (11%)</th>
<td>
<input type="text" class="form-control bg-light border-0" id="tax" placeholder="$0.00"
readonly="">
</td>
</tr>
<tr>
<th scope="row">Discount</th>
<td>
<input type="text" class="form-control bg-light border-0" id="discount" placeholder="$0.00"
readonly="">
</td>
</tr>
<tr class="border-top border-top-dashed">
<th scope="row">Total Amount</th>
<td>
<input type="text" class="form-control bg-light border-0" id="total" placeholder="$0.00"
readonly="">
</td>
</tr>
</tbody>
</table>
</div>
<div class="mb-4 text-end">
<button type="submit" class="btn btn-success w-sm">Save</button>
</div>
@push('js')
<script src="{{ asset('assets/libs/cleave.js/cleave.min.js') }}"></script>
<script src="{{ asset('assets/js/pages/form-masks.init.js') }}"></script>
<script>
$("body").on('click', '.add-btn', function(e) {
e.preventDefault();
numberInc = $('.product-card').length
$.ajax({
type: 'get',
url: '{{ route('cloneProduct') }}',
data: {
numberInc: numberInc
},
success: function(response) {
$('.appendProductCard').append(response.view)
// $('#invoice-container').html(response.view).fadeIn()
},
error: function(xhr) {
},
});
});
$("body").on('click', '.btn-remove', function() {
if ($('.product-card').length > 1) {
$(this).parents(".product-card").remove();
}
recalculate();
});
function amountKeyup() {
$("body").on('keyup', '.product-price', function() {
var priceInput = $(this);
var qtyInput = priceInput.closest(".row").find(".product-quantity");
var linePrice = priceInput.closest(".row").find(".product-line-price");
updateQuantity(priceInput.val(), qtyInput.val(), linePrice);
});
$("body").on('keyup', '.product-quantity', function() {
var priceInput = $(this);
var qtyInput = priceInput.closest(".row").find(".product-price");
var linePrice = priceInput.closest(".row").find(".product-line-price");
updateQuantity(priceInput.val(), qtyInput.val(), linePrice);
});
}
amountKeyup()
function updateQuantity(rate, qty, linePriceInput) {
var amount = (rate * qty).toFixed(2);
linePriceInput.val(amount);
recalculate();
}
function recalculate() {
var subtotal = 0;
$(".product-line-price").each(function() {
if ($(this).val()) {
subtotal += parseFloat($(this).val());
}
});
var tax = subtotal * 0.125;
var discount = subtotal * 0.15;
var shipping = subtotal > 0 ? 65 : 0;
var total = subtotal + tax + shipping - discount;
$("#subtotal").val(subtotal.toFixed(2));
$("#tax").val(tax.toFixed(2));
$("#discount").val(discount.toFixed(2));
$("#shipping").val(shipping.toFixed(2));
$("#total").val(total.toFixed(2));
// $("#totalamountInput").val(total.toFixed(2));
// $("#amountTotalPay").val(total.toFixed(2));
}
</script>
@endpush

View File

@ -6,16 +6,19 @@
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class="card">
<div class="card-body">
<form action="{{ route('invoice.store') }}" class="needs-validation" novalidate method="post">
@csrf
@include('taxation::invoice.partials.action')
</form>
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-body">
<form action="{{ route('leaveType.store') }}" class="needs-validation" novalidate method="post">
@csrf
@include('leave::leave.partials.action')
</form>
</div>
</div>
</div>
</div>
<!--end row-->
</div>
<!-- container-fluid -->

View File

@ -9,9 +9,9 @@
<div class="col-lg-12">
<div class="card">
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
<h5 class="card-title flex-grow-1 mb-0">Leave Lists</h5>
<div class="flex-shrink-0">
<a href="{{ route('invoice.create') }}" class="btn btn-success waves-effect waves-light"><i
<a href="{{ route('leaveType.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Add</a>
</div>
</div>
@ -22,14 +22,14 @@
<thead>
<tr>
<th>S.N</th>
<th>Id</th>
<th>Leave Type</th>
<th>Created By</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse ($invoices as $key => $leaveType)
@forelse ($leaveTypes as $key => $leaveType)
<tr>
<td>{{ $key + 1 }}</td>
<td>{{ $leaveType->employee_id }}</td>

View File

@ -0,0 +1,25 @@
<div class="mb-3">
<label for="employee_id" class="form-label">Employee Name</label>
{{ html()->select('employee_id', $employeeList)->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="mb-3">
<label for="start_date" class="form-label">Start Leave Date</label>
<input type="date" class="form-control" id="start_date" name="start_date"
value="{{ old('start_date', $leave->start_date ?? '') }}">
</div>
<div class="mb-3">
<label for="end_date" class="form-label">End Leave Date</label>
<input type="date" class="form-control" id="end_date" name="end_date"
value="{{ old('end_date', $leave->end_date ?? '') }}">
</div>
<div class="text-end">
<button type="submit" class="btn btn-primary">{{ isset($leave) ? 'Update' : 'Add Leave' }}</button>
</div>
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
@endpush

View File

@ -1,7 +1,6 @@
<?php
use Illuminate\Support\Facades\Route;
use Modules\Taxation\Http\Controllers\InvoiceController;
use Modules\Taxation\Http\Controllers\TaxationController;
/*
@ -13,11 +12,8 @@ use Modules\Taxation\Http\Controllers\TaxationController;
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
*/
Route::group([], function () {
Route::resource('taxation', TaxationController::class)->names('taxation');
Route::resource('invoice', InvoiceController::class)->names('invoice');
Route::get('clone-product', [InvoiceController::class, 'cloneProduct'])->name('cloneProduct');
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,74 +1 @@
var cleaveDate,
cleaveDateFormat,
cleaveTime,
cleaveTimeFormat,
cleaveNumeral,
cleaveDelimiter,
cleaveDelimiters,
cleavePrefix,
cleaveBlocks;
document.querySelector("#cleave-date") &&
(cleaveDate = new Cleave("#cleave-date", {
date: !0,
delimiter: "-",
datePattern: ["d", "m", "Y"],
})),
document.querySelector("#cleave-date-format") &&
(cleaveDateFormat = new Cleave("#cleave-date-format", {
date: !0,
datePattern: ["m", "y"],
})),
document.querySelector("#cleave-time") &&
(cleaveTime = new Cleave("#cleave-time", {
time: !0,
timePattern: ["h", "m", "s"],
})),
document.querySelector("#cleave-time-format") &&
(cleaveTimeFormat = new Cleave("#cleave-time-format", {
time: !0,
timePattern: ["h", "m"],
})),
document.querySelectorAll(".cleave-numeral").forEach(function (element) {
new Cleave(element, {
numeral: !0,
numeralThousandsGroupStyle: "thousand",
});
});
// document.querySelector("cleave-numeral") &&
// (cleaveNumeral = new Cleave(".cleave-numeral", {
// numeral: !0,
// numeralThousandsGroupStyle: "thousand",
// })),
document.querySelector("#cleave-ccard") &&
(cleaveBlocks = new Cleave("#cleave-ccard", {
blocks: [4, 4, 4, 4],
uppercase: !0,
})),
document.querySelector("#cleave-delimiter") &&
(cleaveDelimiter = new Cleave("#cleave-delimiter", {
delimiter: "·",
blocks: [3, 3, 3],
uppercase: !0,
})),
document.querySelector("#cleave-delimiters") &&
(cleaveDelimiters = new Cleave("#cleave-delimiters", {
delimiters: [".", ".", "-"],
blocks: [3, 3, 3, 2],
uppercase: !0,
})),
document.querySelector("#cleave-prefix") &&
(cleavePrefix = new Cleave("#cleave-prefix", {
prefix: "INV",
delimiter: "-",
blocks: [3, 4, 4, 4],
uppercase: !0,
})),
document.querySelector("#cleave-phone") &&
(cleaveBlocks = new Cleave("#cleave-phone", {
delimiters: ["(", ")", "-"],
blocks: [0, 3, 3, 4],
}));
var cleaveDate,cleaveDateFormat,cleaveTime,cleaveTimeFormat,cleaveNumeral,cleaveDelimiter,cleaveDelimiters,cleavePrefix,cleaveBlocks;document.querySelector("#cleave-date")&&(cleaveDate=new Cleave("#cleave-date",{date:!0,delimiter:"-",datePattern:["d","m","Y"]})),document.querySelector("#cleave-date-format")&&(cleaveDateFormat=new Cleave("#cleave-date-format",{date:!0,datePattern:["m","y"]})),document.querySelector("#cleave-time")&&(cleaveTime=new Cleave("#cleave-time",{time:!0,timePattern:["h","m","s"]})),document.querySelector("#cleave-time-format")&&(cleaveTimeFormat=new Cleave("#cleave-time-format",{time:!0,timePattern:["h","m"]})),document.querySelector("#cleave-numeral")&&(cleaveNumeral=new Cleave("#cleave-numeral",{numeral:!0,numeralThousandsGroupStyle:"thousand"})),document.querySelector("#cleave-ccard")&&(cleaveBlocks=new Cleave("#cleave-ccard",{blocks:[4,4,4,4],uppercase:!0})),document.querySelector("#cleave-delimiter")&&(cleaveDelimiter=new Cleave("#cleave-delimiter",{delimiter:"·",blocks:[3,3,3],uppercase:!0})),document.querySelector("#cleave-delimiters")&&(cleaveDelimiters=new Cleave("#cleave-delimiters",{delimiters:[".",".","-"],blocks:[3,3,3,2],uppercase:!0})),document.querySelector("#cleave-prefix")&&(cleavePrefix=new Cleave("#cleave-prefix",{prefix:"PREFIX",delimiter:"-",blocks:[6,4,4,4],uppercase:!0})),document.querySelector("#cleave-phone")&&(cleaveBlocks=new Cleave("#cleave-phone",{delimiters:["(",")","-"],blocks:[0,3,3,4]}));

View File

@ -110,7 +110,7 @@
<script src="{{ asset('assets/libs/feather-icons/feather.min.js') }}"></script>
{{-- <script src="{{ asset('assets/js/pages/plugins/lord-icon-2.1.0.js') }}"></script> --}}
<script src="{{ asset('assets/js/plugins.js') }}"></script>
<script src="{{ asset('assets/libs/@ckeditor/ckeditor5-build-classic/build/ckeditor.js') }}"></script>
@ -123,7 +123,9 @@
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
<script src="{{ asset('assets/libs/fullcalendar/index.global.min.j') }}s"></script>
<script src="{{ asset('assets/libs/fullcalendar/index.global.min.js') }}"></script>
<script src="{{ asset('assets/libs/choices.js') }}"></script>
<script src="{{ asset('assets/js/pages/calendar.init.js') }}"></script>

View File

@ -39,6 +39,7 @@
aria-controls="MenuOne">
<i class="ri-building-2-line"></i> <span data-key="t-companies">Company Setup</span>
</a>
<div class="menu-dropdown collapse" id="MenuOne">
<ul class="nav nav-sm flex-column">
@ -51,13 +52,28 @@
<a href="{{ route('company.index') }}"
class="nav-link @if (\Request::is('company') || \Request::is('company/*')) active @endif">Company</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link menu-link" href="#MenuAttendance" data-bs-toggle="collapse" role="button"
aria-expanded="false" aria-controls="MenuAttendance">
<i class="ri-shopping-cart-2-line"></i> <span data-key="t-attendances">Attendance</span>
</a>
<div class="menu-dropdown collapse" id="MenuAttendance">
<ul class="nav nav-sm flex-column">
<li class="nav-item">
<a href="{{ route('attendance.index') }}"
class="nav-link @if (\Request::is('attendance')) active @endif">Attendance Report</a>
</li>
</ul>
</div>
</li>
{{-- <li class="nav-item">
<a class="nav-link menu-link" href="#MenuTwo" data-bs-toggle="collapse" role="button" aria-expanded="false"
aria-controls="MenuTwo">
<i class="ri-shopping-cart-2-line"></i> <span data-key="t-vendors">Vendor Setup</span>
@ -76,7 +92,7 @@
</li>
</ul>
</div>
</li>
</li> --}}
<li class="nav-item">
<a class="nav-link menu-link @if (\Request::is('employee') || \Request::is('employee/*')) active @endif"
@ -86,11 +102,11 @@
</li>
<li class="nav-item">
<a class="nav-link menu-link @if (\Request::is('calendar') || \Request::is('calendar/*')) active @endif"
href="{{ route('calendar.index') }}">
<i class="ri-team-line"></i> <span data-key="t-widgets">Calendar</span>
</a>
</li>
<a class="nav-link menu-link @if (\Request::is('calendar') || \Request::is('calendar/*')) active @endif"
href="{{ route('calendar.index') }}">
<i class="ri-calendar-line"></i> <span data-key="t-widgets">Calendar</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link menu-link" href="#leave" data-bs-toggle="collapse" role="button" aria-expanded="false"
@ -100,6 +116,7 @@
<div class="menu-dropdown collapse" id="leave">
<ul class="nav nav-sm flex-column">
<li class="nav-item">
<a href="{{ route('leaveType.index') }}"
class="nav-link @if (\Request::is('leavetype') || \Request::is('leavetype/*')) active @endif">Leave Type</a>
@ -110,11 +127,15 @@
class="nav-link @if (\Request::is('leave') || \Request::is('leave/*')) active @endif">Apply Leave</a>
</li>
<li class="nav-item">
<a href="" class="nav-link @if (\Request::is('leaveReport') || \Request::is('leaveReport/*')) active @endif">Leave Report</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
{{-- <li class="nav-item">
<a class="nav-link menu-link" href="#taxation" data-bs-toggle="collapse" role="button" aria-expanded="false"
aria-controls="taxation">
<i class="ri-book-2-line"></i> <span data-key="t-masters">Taxation</span>
@ -124,11 +145,11 @@
<li class="nav-item">
<a href="{{ route('user.index') }}"
class="nav-link @if (\Request::is('user') || \Request::is('user/*')) active @endif">Create Invoice</a>
class="nav-link @if (\Request::is('user') || \Request::is('user/*')) active @endif">Users</a>
</li>
</ul>
</div>
</li>
</li> --}}
<li class="nav-item">
<a class="nav-link menu-link" href="#MenuThree" data-bs-toggle="collapse" role="button"

View File

@ -19,7 +19,7 @@ Route::get('/', function () {
return view('welcome');
});
Route::get('/invoice-test', function () {
Route::get('/invoice', function () {
return view('invoice');
});