update addon HRM
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 3m30s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-04 23:04:09 +07:00
parent 7be161f4e4
commit 3e1b64e008
131 changed files with 8281 additions and 290 deletions

View File

@@ -0,0 +1,34 @@
<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Date') }}</th>
<th class="text-start d-print-none">{{ __('Month') }}</th>
<th class="text-start">{{ __('Shift') }}</th>
<th class="text-start">{{ __('Time In') }}</th>
<th class="text-start">{{ __('Time Out') }}</th>
<th class="text-start">{{ __('Duration') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr>
<td>{{ ($attendances->currentPage() - 1) * $attendances->perPage() + $loop->iteration }}</td>
<td class="text-start">{{ $attendance->employee->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($attendance->date) }}</td>
<td class="text-start d-print-none">{{ ucfirst($attendance->month) }}</td>
<td class="text-start">{{ $attendance->shift->name ?? '' }}</td>
<td class="text-start">{{ formatted_time($attendance->time_in) }}</td>
<td class="text-start">{{ formatted_time($attendance->time_out) }}</td>
<td class="text-start">{{ formatTimeToWords($attendance->duration) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-3">
{{ $attendances->links('vendor.pagination.bootstrap-5') }}
</div>

View File

@@ -0,0 +1,28 @@
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Date') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start">{{ __('Shift') }}</th>
<th class="text-start">{{ __('Time In') }}</th>
<th class="text-start">{{ __('Time Out') }}</th>
<th class="text-start">{{ __('Duration') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr>
<td>{{ $loop->iteration }}</td>
<td class="text-start">{{ $attendance->employee->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($attendance->date) }}</td>
<td class="text-start">{{ ucfirst($attendance->month) }}</td>
<td class="text-start">{{ $attendance->shift->name ?? '' }}</td>
<td class="text-start">{{ formatted_time($attendance->time_in) }}</td>
<td class="text-start">{{ formatted_time($attendance->time_out) }}</td>
<td class="text-start">{{ formatTimeToWords($attendance->duration) }}</td>
</tr>
@endforeach
</tbody>
</table>

View File

@@ -0,0 +1,106 @@
@extends('layouts.business.master')
@section('title')
{{ __('Attendance Report') }}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16 d-print-none">
<h4>{{ __('Attendance Report') }}</h4>
</div>
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 class="mt-2">{{ __('Attendance Report List') }}</h4>
</div>
<div class="table-top-form p-16-0">
<div class="d-flex align-items-center gap-1 flex-wrap">
<form action="{{ route('hrm.attendance-reports.index') }}" method="GET" class="filter-form d-print-none" table="#attendances-data">
<div class="table-top-left d-flex gap-3 margin-l-16">
<div class="gpt-up-down-arrow position-relative">
<select name="per_page" class="form-control">
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
</select>
<span></span>
</div>
<div class="table-search position-relative">
<input type="text" name="search" class="form-control" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
<span class="position-absolute">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" />
<path d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z" stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round" />
</svg>
</span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none employee-select">
<select name="employee" class="form-control">
<option value="">{{ __('Select employee') }}</option>
@foreach ($employees as $employee)
<option value="{{ $employee->id }}" @selected(request('employee') == $employee->id) >{{ $employee->name }}</option>
@endforeach
</select>
<span></span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none">
<select name="month" class="form-control">
<option value="">{{ __('All month') }}</option>
@for ($month = 1; $month <= 12; $month++)
@php
$monthSlug = strtolower(date('F', mktime(0, 0, 0, $month, 1)));
@endphp
<option value="{{ $monthSlug }}">
{{ date('F', mktime(0, 0, 0, $month, 1)) }}
</option>
@endfor
</select>
<span></span>
</div>
</div>
</form>
</div>
<div class="table-top-btn-group d-print-none">
<ul>
<li>
<a href="{{ route('hrm.attendance-reports.csv') }}">
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
</a>
</li>
<li>
<a href="{{ route('hrm.attendance-reports.excel') }}">
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
</a>
</li>
<li>
<a target="blank" href="{{ route('hrm.attendance-reports.pdf') }}">
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
</a>
</li>
<li>
<a onclick="window.print()" class="print-window">
<img src="{{ asset('assets/images/logo/printer.svg') }}" alt="">
</a>
</li>
</ul>
</div>
</div>
</div>
<div id="attendances-data">
@include('hrmaddon::reports.attendances.datas')
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,50 @@
@extends('layouts.business.pdf.pdf_layout')
@section('pdf_title')
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;" class="">{{ __('Attendance Report List') }}</h4>
</div>
@endsection
@section('pdf_content')
<table width="100%" cellpadding="6" cellspacing="0"
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
id="datatable">
<thead>
<tr style="background-color: #C52127; color: white;">
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Employee') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Shift') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Time In') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Time Out') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Duration') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
<td style="border:1px solid gainsboro; text-align:center;">
{{ $attendance->employee->name ?? '' }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_date($attendance->date) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $attendance->shift->name ?? '' }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_time($attendance->time_in) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_time($attendance->time_out) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatTimeToWords($attendance->duration) }}
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,47 @@
<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
<th class="d-print-none">{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start d-print-none">{{ __('Department') }}</th>
<th class="text-start">{{ __('Start Date') }}</th>
<th class="text-start">{{ __('End Date') }}</th>
<th class="text-start">{{ __('Leave Type') }}</th>
<th class="text-start d-print-none">{{ __('Leave Duration') }}</th>
<th class="text-center">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($leaves as $leave)
<tr>
<td class="d-print-none">{{ ($leaves->currentPage() - 1) * $leaves->perPage() + $loop->iteration }}</td>
<td class="text-start">{{ $leave->employee->name ?? '' }}</td>
<td class="text-start">{{ ucfirst($leave->month) }}</td>
<td class="text-start d-print-none">{{ $leave->department->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($leave->start_date) }}</td>
<td class="text-start">{{ formatted_date($leave->end_date) }}</td>
<td class="text-start">{{ $leave->leave_type->name ?? '' }}</td>
<td class="text-start d-print-none">{{ $leave->leave_duration }} {{ __('Days') }}</td>
@if ($leave->status == 'pending')
<td class="text-warning text-center">
<div class="padding-status">{{__('Pending')}}</div>
</td>
@elseif ($leave->status == 'approved')
<td class="text-warning text-center">
<div class="approved-status">{{__('Approved')}}</div>
</td>
@elseif ($leave->status == 'rejected')
<td class="text-warning text-center">
<div class="rejected-status">{{__('Rejected')}}</div>
</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-3">
{{ $leaves->links('vendor.pagination.bootstrap-5') }}
</div>

View File

@@ -0,0 +1,42 @@
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start">{{ __('Department') }}</th>
<th class="text-start">{{ __('Start Date') }}</th>
<th class="text-start">{{ __('End Date') }}</th>
<th class="text-start">{{ __('Leave Type') }}</th>
<th class="text-start">{{ __('Leave Duration') }}</th>
<th class="text-center">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($leaves as $leave)
<tr>
<td>{{ $loop->iteration }}</td>
<td class="text-start">{{ $leave->employee->name ?? '' }}</td>
<td class="text-start">{{ ucfirst($leave->month) }}</td>
<td class="text-start">{{ $leave->department->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($leave->start_date) }}</td>
<td class="text-start">{{ formatted_date($leave->end_date) }}</td>
<td class="text-start">{{ $leave->leave_type->name ?? '' }}</td>
<td class="text-start">{{ $leave->leave_duration }} {{ __('Days') }}</td>
@if ($leave->status == 'pending')
<td class="text-warning text-center">
<div class="padding-status">{{__('Pending')}}</div>
</td>
@elseif ($leave->status == 'approved')
<td class="text-warning text-center">
<div class="approved-status">{{__('Approved')}}</div>
</td>
@elseif ($leave->status == 'rejected')
<td class="text-warning text-center">
<div class="rejected-status">{{__('Rejected')}}</div>
</td>
@endif
</tr>
@endforeach
</tbody>
</table>

View File

@@ -0,0 +1,106 @@
@extends('layouts.business.master')
@section('title')
{{ __('Leave Report') }}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16 d-print-none">
<h4>{{ __('Leave Report') }}</h4>
</div>
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 class="mt-2">{{ __('Leave Report List') }}</h4>
</div>
<div class="table-top-form p-16-0">
<div class="d-flex align-items-center gap-1 flex-wrap">
<form action="{{ route('hrm.leave-reports.index') }}" method="GET" class="filter-form d-print-none" table="#leaves-report-data">
<div class="table-top-left d-flex gap-3 margin-l-16">
<div class="gpt-up-down-arrow position-relative">
<select name="per_page" class="form-control">
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
</select>
<span></span>
</div>
<div class="table-search position-relative">
<input type="text" name="search" class="form-control" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
<span class="position-absolute">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z" stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round"/>
</svg>
</span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none employee-select">
<select name="employee" class="form-control">
<option value="">{{ __('Select employee') }}</option>
@foreach ($employees as $employee)
<option value="{{ $employee->id }}" @selected(request('employee') == $employee->id) >{{ $employee->name }}</option>
@endforeach
</select>
<span></span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none ">
<select name="month" class="form-control">
<option value="">{{ __('All month') }}</option>
@for ($month = 1; $month <= 12; $month++)
@php
$monthSlug = strtolower(date('F', mktime(0, 0, 0, $month, 1)));
@endphp
<option value="{{ $monthSlug }}">
{{ date('F', mktime(0, 0, 0, $month, 1)) }}
</option>
@endfor
</select>
<span></span>
</div>
</div>
</form>
</div>
<div class="table-top-btn-group d-print-none">
<ul>
<li>
<a href="{{ route('hrm.leave-reports.csv') }}">
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
</a>
</li>
<li>
<a href="{{ route('hrm.leave-reports.excel') }}">
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
</a>
</li>
<li>
<a target="blank" href="{{ route('hrm.leave-reports.pdf') }}">
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
</a>
</li>
<li>
<a onclick="window.print()" class="print-window">
<img src="{{ asset('assets/images/logo/printer.svg') }}" alt="">
</a>
</li>
</ul>
</div>
</div>
</div>
<div id="leaves-report-data">
@include('hrmaddon::reports.leaves.datas')
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,60 @@
@extends('layouts.business.pdf.pdf_layout')
@section('pdf_title')
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;" class="">{{ __('Leave Report List') }}</h4>
</div>
@endsection
@section('pdf_content')
<table width="100%" cellpadding="6" cellspacing="0"
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
id="datatable">
<thead>
<tr style="background-color: #C52127; color: white;">
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Employee') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Month') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Start Date') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('End Date') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Leave Type') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Duration') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($leaves as $leave)
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
<td style="border:1px solid gainsboro; text-align:center;">
{{ $leave->employee?->name }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ ucfirst($leave->month) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_date($leave->start_date) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_date($leave->end_date) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $leave->leave_type?->name }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $leave->leave_duration }} {{ __('Days') }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
@if ($leave->status == 'pending')
{{__('Pending')}}
@elseif ($leave->status == 'approved')
{{__('Approved')}}
@elseif ($leave->status == 'rejected')
{{__('Rejected')}}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,53 @@
<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Date') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start">{{ __('Slip No') }}</th>
<th class="text-start">{{ __('Amount') }}</th>
<th class="text-start">{{ __('Payment Type') }}</th>
<th class="text-center">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($payrolls as $payroll)
<tr>
<td>{{ ($payrolls->currentPage() - 1) * $payrolls->perPage() + $loop->iteration }}</td>
<td class="text-start">{{ $payroll->employee->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($payroll->date) }}</td>
<td class="text-start">{{ ucfirst($payroll->month) }}</td>
<td class="text-start">{{ $payroll->puid }}</td>
<td class="text-start">{{ currency_format($payroll->amount, currency: business_currency()) }}</td>
<td class="text-start">{{ $payroll->payment_type->name ?? 'Cash' }}</td>
@if ($payroll->status == 'unpaid')
<td class="text-warning text-center">
<div class="padding-status">Unpaid</div>
</td>
@else
<td class="text-warning text-center">
<div class="approved-status">Paid</div>
</td>
@endif
</tr>
@endforeach
</tbody>
@if ($payrolls->count() > 0)
<tr class="table-footer">
<td class="text-start">{{__('Total')}}</td>
<td class="text-start"></td>
<td class="text-start"></td>
<td class="text-start"></td>
<td class="text-start"></td>
<td class="text-start">{{ currency_format($payrolls->sum('amount'), currency: business_currency()) }}</td>
<td class="text-start"></td>
<td class="text-start"></td>
</tr>
@endif
</table>
</div>
<div class="mt-3">
{{ $payrolls->links('vendor.pagination.bootstrap-5') }}
</div>

View File

@@ -0,0 +1,48 @@
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Date') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start">{{ __('Slip No') }}</th>
<th class="text-start">{{ __('Amount') }}</th>
<th class="text-start">{{ __('Payment Type') }}</th>
<th class="text-center">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($payrolls as $payroll)
<tr>
<td>{{ $loop->iteration }}</td>
<td class="text-start">{{ $payroll->employee->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($payroll->date) }}</td>
<td class="text-start">{{ ucfirst($payroll->month) }}</td>
<td class="text-start">{{ $payroll->puid }}</td>
<td class="text-start">{{ currency_format($payroll->amount, currency: business_currency()) }}</td>
<td class="text-start">{{ $payroll->payment_type->name ?? 'Cash' }}</td>
@if ($payroll->status == 'unpaid')
<td class="text-warning text-center">
<div class="padding-status">Unpaid</div>
</td>
@else
<td class="text-warning text-center">
<div class="approved-status">Paid</div>
</td>
@endif
</tr>
@endforeach
</tbody>
@if ($payrolls->count() > 0)
<tr class="table-footer">
<td class="text-start">{{__('Total')}}</td>
<td class="text-start"></td>
<td class="text-start"></td>
<td class="text-start"></td>
<td class="text-start"></td>
<td class="text-start">{{ currency_format($payrolls->sum('amount'), currency: business_currency()) }}</td>
<td class="text-start"></td>
<td class="text-start"></td>
</tr>
@endif
</table>

View File

@@ -0,0 +1,104 @@
@extends('layouts.business.master')
@section('title')
{{ __('Payroll Report') }}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16 d-print-none">
<h4>{{ __('Payroll Report') }}</h4>
</div>
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 class="mt-2">{{ __('Payroll Report List') }}</h4>
</div>
<div class="table-top-form p-16-0">
<div class="d-flex align-items-center gap-1 flex-wrap">
<form action="{{ route('hrm.payroll-reports.index') }}" method="GET" class="filter-form d-print-none" table="#payrolls-data">
<div class="table-top-left d-flex gap-3 margin-l-16">
<div class="gpt-up-down-arrow position-relative">
<select name="per_page" class="form-control">
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
</select>
<span></span>
</div>
<div class="table-search position-relative">
<input type="text" name="search" class="form-control" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
<span class="position-absolute">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z" stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round"/>
</svg>
</span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none employee-select">
<select name="employee" class="form-control custom-days">
<option value="">{{ __('Select employee') }}</option>
@foreach ($employees as $employee)
<option value="{{ $employee->id }}" @selected(request('employee_id') == $employee->id) >{{ $employee->name }}</option>
@endforeach
</select>
<span></span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none">
<select name="month" class="form-control custom-days">
<option value="">{{ __('All month') }}</option>
@for ($month = 1; $month <= 12; $month++)
@php
$monthSlug = strtolower(date('F', mktime(0, 0, 0, $month, 1)));
@endphp
<option value="{{ $monthSlug }}">
{{ date('F', mktime(0, 0, 0, $month, 1)) }}
</option>
@endfor
</select>
<span></span>
</div>
</div>
</form>
</div>
<div class="table-top-btn-group d-print-none">
<ul>
<li>
<a href="{{ route('hrm.payroll-reports.csv') }}">
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
</a>
</li>
<li>
<a href="{{ route('hrm.payroll-reports.excel') }}">
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
</a>
</li>
<li>
<a target="blank" href="{{ route('hrm.payroll-reports.pdf') }}">
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
</a>
</li>
<li>
<a onclick="window.print()" class="print-window">
<img src="{{ asset('assets/images/logo/printer.svg') }}" alt="">
</a>
</li>
</ul>
</div>
</div>
</div>
<div id="payrolls-data">
@include('hrmaddon::reports.payrolls.datas')
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,65 @@
@extends('layouts.business.pdf.pdf_layout')
@section('pdf_title')
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;" class="">{{ __('Payroll Report List') }}</h4>
</div>
@endsection
@section('pdf_content')
<table width="100%" cellpadding="6" cellspacing="0"
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
id="datatable">
<thead>
<tr style="background-color: #C52127; color: white;">
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Employee') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Slip No') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Amount') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Payment') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($payrolls as $payroll)
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
<td style="border:1px solid gainsboro; text-align:center;">
{{ $payroll->employee->name ?? '' }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_date($payroll->date) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $payroll->puid }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ currency_format($payroll->amount, currency: business_currency()) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $payroll->payment_type->name ?? 'Cash' }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $payroll->status == 'unpaid' ? 'Unpaid' : 'Paid' }}
</td>
</tr>
@endforeach
</tbody>
@if ($payrolls->count() > 0)
<tfoot>
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
<td style="border:1px solid gainsboro; text-align:center; color: white">
{{ __('Total') }}
</td>
<td style="border:1px solid gainsboro; text-align:center;"></td>
<td style="border:1px solid gainsboro; text-align:center;"></td>
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
{{ currency_format($payrolls->sum('amount'), currency: business_currency()) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;"></td>
</tr>
</tfoot>
@endif
</table>
@endsection