22 lines
441 B
Go
22 lines
441 B
Go
package payroll
|
|
|
|
type BaseSalaryRule struct{}
|
|
|
|
func NewBaseSalaryRule() *BaseSalaryRule {
|
|
return &BaseSalaryRule{}
|
|
}
|
|
|
|
func (r *BaseSalaryRule) Execute(data PayrollInput) []SalaryComponent {
|
|
stundenlohnCent := data.ContractSalaryHour * 100
|
|
|
|
monatsGehaltCent := stundenlohnCent * data.ContractHoursWeek * 4.33
|
|
|
|
return []SalaryComponent{
|
|
{
|
|
Name: "Grundgehalt",
|
|
Type: "Grundgehalt",
|
|
Amount: int64(monatsGehaltCent),
|
|
},
|
|
}
|
|
}
|