Skip to content

Commit

Permalink
Merge pull request #869 from Healyhatman/add-employment-termination-p…
Browse files Browse the repository at this point in the history
…ayment-type-au

Update EarningsRate.php
  • Loading branch information
calcinai authored Sep 12, 2022
2 parents b685bf3 + 467a479 commit f417d09
Showing 1 changed file with 120 additions and 16 deletions.
136 changes: 120 additions & 16 deletions src/XeroPHP/Models/PayrollAU/PayItem/EarningsRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class EarningsRate extends Remote\Model
* Most payments are subject to tax, so you should only set this value if you are sure that a payment
* is exempt from PAYG withholding.
*
* @property string IsExemptFromTax
* @property bool IsExemptFromTax
*/

/**
* See the ATO website for details of which payments are exempt from SGC.
*
* @property string IsExemptFromSuper
* @property bool IsExemptFromSuper
*/

/**
Expand Down Expand Up @@ -71,7 +71,7 @@ class EarningsRate extends Remote\Model
/**
* Indicates that this earnings rate should accrue leave. Only applicable if RateType is MULTIPLE.
*
* @property float AccrueLeave
* @property bool AccrueLeave
*/

/**
Expand All @@ -82,40 +82,99 @@ class EarningsRate extends Remote\Model
*/
const ALLOWANCETYPE_CAR = 'CAR';

const ALLOWANCETYPE_TRANSPORT = 'TRANSPORT';

const ALLOWANCETYPE_TRAVEL = 'TRAVEL';

const ALLOWANCETYPE_LAUNDRY = 'LAUNDRY';

const ALLOWANCETYPE_MEALS = 'MEALS';

const ALLOWANCETYPE_TRANSPORT = 'TRANSPORT';
const ALLOWANCETYPE_JOBKEEPER = 'JOBKEEPER';

const ALLOWANCETYPE_TRAVEL = 'TRAVEL';
const ALLOWANCETYPE_TOOLS = 'TOOLS';

const ALLOWANCETYPE_OTHER = 'OTHER';
const ALLOWANCETYPE_TASKS = 'TASKS';

const ALLOWANCETYPE_QUALIFICATIONS = 'QUALIFICATIONS';

const ALLOWANCETYPE_OTHER = 'OTHER';

/**
* Option Amount for FIXEDAMOUNT RateType EarningsRate.
* An optional category that can be added when AllowanceType is OTHER
*
* @property float Amount
* @property string AllowanceCategory
*/
const EARNINGSTYPE_FIXED = 'FIXED';
const ALLOWANCECATEGORY_NONDEDUCTIBLE = 'NONDEDUCTIBLE';

const ALLOWANCECATEGORY_UNIFORM = 'UNIFORM';

const ALLOWANCECATEGORY_PRIVATEVEHICLE = 'PRIVATEVEHICLE';

const ALLOWANCECATEGORY_HOMEOFFICE = 'HOMEOFFICE';

const ALLOWANCECATEGORY_TRANSPORT = 'TRANSPORT';

const ALLOWANCECATEGORY_GENERAL = 'GENERAL';

const ALLOWANCECATEGORY_OTHER = 'OTHER';

/**
* The rate's Earnings Type
*
* @property string EarningsType
*/
const EARNINGSTYPE_ORDINARYTIMEEARNINGS = 'ORDINARYTIMEEARNINGS';

const EARNINGSTYPE_OVERTIMEEARNINGS = 'OVERTIMEEARNINGS';

const EARNINGSTYPE_ALLOWANCE = 'ALLOWANCE';


const EARNINGSTYPE_LUMPSUMA = 'LUMPSUMA';

const EARNINGSTYPE_LUMPSUMB = 'LUMPSUMB';

const EARNINGSTYPE_LUMPSUMD = 'LUMPSUMD';


const EARNINGSTYPE_LUMPSUME = 'LUMPSUME';

const EARNINGS_TYPE_EMPLOYMENTTERMINATIONPAYMENT = 'EMPLOYMENTTERMINATIONPAYMENT';

const EARNINGSTYPE_BONUSESANDCOMMISSIONS = 'BONUSESANDCOMMISSIONS';

const EARNINGSTYPE_LUMPSUMW = 'LUMPSUMW';

const EARNINGSTYPE_DIRECTORSFEES = 'DIRECTORSFEES';

const EARNINGSTYPE_PAIDPARENTALLEAVE = 'PAIDPARENTALLEAVE';

const EARNINGSTYPE_WORKERSCOMPENSATION = 'WORKERSCOMPENSATION';

/**
* @deprecated this Earning Type is no longer used
*/
const EARNINGSTYPE_FIXED = 'FIXED';

/**
* The rate's Rate Type
*
* @property string RateType
*/
const RATETYPE_FIXEDAMOUNT = 'FIXEDAMOUNT';

const RATETYPE_MULTIPLE = 'MULTIPLE';

const RATETYPE_RATEPERUNIT = 'RATEPERUNIT';

/**
* A required Payment Type when RateType is EMPLOYMENTTERMINATIONPAYMENT
*
* @property string EmploymentTerminationPaymentType
*/
const EMPLOYMENTTERMINATIONPAYMENTTYPE_O = 'O';

const EMPLOYMENTTERMINATIONPAYMENTTYPE_R = 'R';

/**
* Get the resource uri of the class (Contacts) etc.
*
Expand Down Expand Up @@ -181,17 +240,20 @@ public static function getProperties()
'Name' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
'AccountCode' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
'TypeOfUnits' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
'IsExemptFromTax' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
'IsExemptFromSuper' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
'IsExemptFromTax' => [true, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'IsExemptFromSuper' => [true, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'IsReportableAsW1' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'EarningsType' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],
'EarningsRateID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'RateType' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],
'RatePerUnit' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],
'Multiplier' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],
'AccrueLeave' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'Amount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],
'EmploymentTerminationPaymentType' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],
'CurrentRecord' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'AllowanceType' => [false, self::PROPERTY_TYPE_ENUM, null, false, false]
'AllowanceType' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],
'AllowanceCategory' => [false, self::PROPERTY_TYPE_ENUM, null, false, false]
];
}

Expand Down Expand Up @@ -432,15 +494,15 @@ public function setMultiplier($value)
}

/**
* @return float
* @return bool
*/
public function getAccrueLeave()
{
return $this->_data['AccrueLeave'];
}

/**
* @param float $value
* @param bool $value
*
* @return EarningsRate
*/
Expand Down Expand Up @@ -493,4 +555,46 @@ public function setCurrentRecord($value)

return $this;
}

/**
* @return string
*/
public function getEmploymentTerminationPaymentType()
{
return $this->_data['EmploymentTerminationPaymentType'];
}

/**
* @param string $value
*
* @return EarningRate
*/
public function setEmploymentTerminationPaymentType($value)
{
$this->propertyUpdated('EmploymentTerminationPaymentType', $value);
$this->_data['EmploymentTerminationPaymentType'] = $value;

return $this;
}

/**
* @return string
*/
public function getAllowanceCategory()
{
return $this->_data['AllowanceCategory'];
}

/**
* @param string $value
*
* @return EarningRate
*/
public function setAllowanceCategory($value)
{
$this->propertyUpdated('AllowanceCategory', $value);
$this->_data['AllowanceCategory'] = $value;

return $this;
}
}

0 comments on commit f417d09

Please sign in to comment.