Travel reimburse feature added
This commit is contained in:
@@ -28,4 +28,30 @@ class API_portalsettings extends API
|
||||
|
||||
return ($items);
|
||||
}
|
||||
|
||||
public function updatePortalSettingsOfficeTravelReimburse()
|
||||
{
|
||||
$setParts = [
|
||||
'office_travelreimburse_cents_homework_incl = :homework_incl',
|
||||
'office_travelreimburse_cents_homework_excl = :homework_excl',
|
||||
'office_travelreimburse_cents_business_incl = :business_incl',
|
||||
'office_travelreimburse_cents_business_excl = :business_excl',
|
||||
];
|
||||
|
||||
$params = [
|
||||
':homework_incl' => $this->data['office_travelreimburse_cents_homework_incl'],
|
||||
':homework_excl' => $this->data['office_travelreimburse_cents_homework_excl'],
|
||||
':business_incl' => $this->data['office_travelreimburse_cents_business_incl'],
|
||||
':business_excl' => $this->data['office_travelreimburse_cents_business_excl'],
|
||||
':portal_uuid' => $this->data['portal_uuid'],
|
||||
];
|
||||
|
||||
$query = "UPDATE system_settings SET " . implode(", ", $setParts) . "
|
||||
WHERE portal_uuid = :portal_uuid";
|
||||
|
||||
$stmt = $this->pdo->prepare($query);
|
||||
$stmt->execute($params);
|
||||
|
||||
$this->apiOutput(200, ['success' => 'portal settings updated successfully.']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user