Menu

## Salary extends Model
in package
uses SoftDeletes, HasFactory

Salary.php : 37

Class Salary

Model for managing employee salary records.

##### Tags

mixin

### Table of Contents

#### Properties

$comments : string
$created_at : DateTime
$deleted_at : DateTime
$effective_date : DateTime
$gross_salary : float
$id : int
$payrolls : Collection|array<string|int, Payroll>
$payrolltemplate : PayrollTemplate
$salaryitems : Collection|array<string|int, SalaryItem>
$school_id : int
$staff_id : int
$template_id : int
$totaldeductions : float
$totalearnings : float
$totalsalary : float
$updated_at : DateTime
$user : User
$fillable : mixed

#### Methods

payrolls() : HasMany
  Get payrolls for this salary.
payrolltemplate() : BelongsTo
  Get the payroll template for this salary.
salaryitems() : HasMany
  Get salary items for this salary.
totaldeductions() : float
  Calculate total deductions for this salary.
totalearnings() : float
  Calculate total earnings for this salary.
totalsalary() : float
  Calculate total salary for this record.
user() : BelongsTo
  Get the user (staff) for this salary.

### Properties

#### $comments

Salary.php : 0
`public string $comments`

#### $created_at

Salary.php : 0
`public DateTime $created_at`

#### $deleted_at

Salary.php : 0
`public DateTime $deleted_at`

#### $effective_date

Salary.php : 0
`public DateTime $effective_date`

#### $gross_salary

Salary.php : 0
`public float $gross_salary`

#### $id

Salary.php : 0
`public int $id`

#### $payrolls read-only

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

#### $payrolltemplate read-only

Salary.php : 0
`public PayrollTemplate $payrolltemplate`

#### $salaryitems read-only

Salary.php : 0
`public Collection|array<string|int, SalaryItem> $salaryitems`

#### $school_id

Salary.php : 0
`public int $school_id`

#### $staff_id

Salary.php : 0
`public int $staff_id`

#### $template_id

Salary.php : 0
`public int $template_id`

#### $totaldeductions

Salary.php : 0
`public float $totaldeductions`

#### $totalearnings

Salary.php : 0
`public float $totalearnings`

#### $totalsalary

Salary.php : 0
`public float $totalsalary`

#### $updated_at

Salary.php : 0
`public DateTime $updated_at`

#### $user read-only

Salary.php : 0
`public User $user`

#### $fillable

Salary.php : 43
`protected mixed $fillable = ['school_id', 'staff_id', '', 'effective_date', 'comments']`

### Methods

#### payrolls()

Salary.php : 80

Get payrolls for this salary.

`public payrolls() : HasMany`

##### Return values

HasMany

#### payrolltemplate()

Salary.php : 50

Get the payroll template for this salary.

`public payrolltemplate() : BelongsTo`

##### Return values

BelongsTo

#### salaryitems()

Salary.php : 70

Get salary items for this salary.

`public salaryitems() : HasMany`

##### Return values

HasMany

#### totaldeductions()

Salary.php : 111

Calculate total deductions for this salary.

`public totaldeductions() : float`

##### Return values

float

#### totalearnings()

Salary.php : 90

Calculate total earnings for this salary.

`public totalearnings() : float`

##### Return values

float

#### totalsalary()

Salary.php : 136

Calculate total salary for this record.

`public totalsalary() : float`

##### Return values

float

#### user()

Salary.php : 60

Get the user (staff) for this salary.

`public user() : BelongsTo`

##### Return values

BelongsTo

## Search results