Menu

## Payroll extends Model
in package
uses SoftDeletes, HasFactory

Payroll.php : 37

Class Payroll

Model for managing staff payroll records.

##### Tags

mixin

### Table of Contents

#### Properties

$comments : string
$created_at : DateTime
$deleted_at : DateTime
$end_date : DateTime
$id : int
$payrollno : string
$payslipitems : Collection|array<string|int, PayslipItem>
$salary : Salary
$salary_id : int
$school_id : int
$staff_id : int
$start_date : DateTime
$status : int
$transaction : PayrollTransaction
$updated_at : DateTime
$user : User
$fillable : mixed

#### Methods

getDaySalary() : mixed
getLeaveDays() : mixed
getTotalDays() : mixed
payslipitems() : HasMany
  Get the payslip items for this payroll.
salary() : BelongsTo
  Get the salary associated with this payroll.
salarypercentage() : mixed
scopeByDate() : mixed
totaldeductions() : mixed
totalearnings() : mixed
totalsalary() : mixed
transaction() : HasOne
  Get the transaction record for this payroll.
user() : BelongsTo
  Get the staff user associated with this payroll.

### Properties

#### $comments

Payroll.php : 0
`public string $comments`

#### $created_at

Payroll.php : 0
`public DateTime $created_at`

#### $deleted_at

Payroll.php : 0
`public DateTime $deleted_at`

#### $end_date

Payroll.php : 0
`public DateTime $end_date`

#### $id

Payroll.php : 0
`public int $id`

#### $payrollno

Payroll.php : 0
`public string $payrollno`

#### $payslipitems read-only

Payroll.php : 0
`public Collection|array<string|int, PayslipItem> $payslipitems`

#### $salary read-only

Payroll.php : 0
`public Salary $salary`

#### $salary_id

Payroll.php : 0
`public int $salary_id`

#### $school_id

Payroll.php : 0
`public int $school_id`

#### $staff_id

Payroll.php : 0
`public int $staff_id`

#### $start_date

Payroll.php : 0
`public DateTime $start_date`

#### $status

Payroll.php : 0
`public int $status`

#### $transaction read-only

Payroll.php : 0
`public PayrollTransaction $transaction`

#### $updated_at

Payroll.php : 0
`public DateTime $updated_at`

#### $user read-only

Payroll.php : 0
`public User $user`

#### $fillable

Payroll.php : 42
`protected mixed $fillable = ['school_id', 'payrollno', 'staff_id', 'salary_id', 'start_date', 'end_date', 'status', 'comments']`

### Methods

#### getDaySalary()

Payroll.php : 212
`public getDaySalary() : mixed`

#### getLeaveDays()

Payroll.php : 177
`public getLeaveDays(mixed $id, mixed $start_date, mixed $end_date) : mixed`

##### Parameters

$id : mixed
$start_date : mixed
$end_date : mixed

#### getTotalDays()

Payroll.php : 200
`public getTotalDays() : mixed`

#### payslipitems()

Payroll.php : 69

Get the payslip items for this payroll.

`public payslipitems() : HasMany`

##### Return values

HasMany

#### salary()

Payroll.php : 59

Get the salary associated with this payroll.

`public salary() : BelongsTo`

##### Return values

BelongsTo

#### salarypercentage()

Payroll.php : 122
`public salarypercentage() : mixed`

#### scopeByDate()

Payroll.php : 154
`public scopeByDate(mixed $query, mixed $start_date, mixed $end_date) : mixed`

##### Parameters

$query : mixed
$start_date : mixed
$end_date : mixed

#### totaldeductions()

Payroll.php : 102
`public totaldeductions() : mixed`

#### totalearnings()

Payroll.php : 84
`public totalearnings() : mixed`

#### totalsalary()

Payroll.php : 134
`public totalsalary() : mixed`

#### transaction()

Payroll.php : 79

Get the transaction record for this payroll.

`public transaction() : HasOne`

##### Return values

HasOne

#### user()

Payroll.php : 49

Get the staff user associated with this payroll.

`public user() : BelongsTo`

##### Return values

BelongsTo

## Search results