officelife icon indicating copy to clipboard operation
officelife copied to clipboard

employee modal - 500 error

Open AiFxApp opened this issue 2 years ago • 1 comments

Cant view employee modal - 500 error

When clicking in an employees to view or possibly add details i get this: image

AiFxApp avatar May 03 '22 00:05 AiFxApp

App\Helpers\HolidayHelper::getNumberOfDaysLeftToEarn(): Argument #1 ($ptoPolicy) must be of type App\Models\Company\CompanyPTOPolicy, null given,

C:\officelife-main\app\Helpers\HolidayHelper .php   : 34

     */

    public static function getHolidaysEarnedEachMonth(Employee $employee): float

    {

        return $employee->amount_of_allowed_holidays / 12;

    }



    /**

     * Return the number of days that an employee will earn as holidays from

     * today til the end of the year.

     *

     * @param CompanyPTOPolicy $ptoPolicy

     * @param Employee $employee

     *

     * @return float

     */

   LINE 34>>  public static function getNumberOfDaysLeftToEarn(CompanyPTOPolicy $ptoPolicy, Employee $employee): float

    {```

AiFxApp avatar May 03 '22 07:05 AiFxApp