Fix: Adjust end dates of unavailabilities for Groups.swiss
This commit is contained in:
@@ -144,8 +144,10 @@ class GroupsSwissService implements SingletonInterface, LoggerAwareInterface
|
|||||||
'status' => $contingentStatus,
|
'status' => $contingentStatus,
|
||||||
];
|
];
|
||||||
} elseif (null !== $item && $itemStatus !== $contingentStatus) {
|
} elseif (null !== $item && $itemStatus !== $contingentStatus) {
|
||||||
// Set end date of current chart item to previous contingent's date
|
// Set end date of current chart item to previous day when following
|
||||||
$item['to'] = $contingent->getEnd();
|
// status is OK
|
||||||
|
$item['to'] = Contingent::STATUS_OK !== $contingentStatus ?
|
||||||
|
$contingent->getEnd() : $contingent->getEnd()->modify('-1 day');
|
||||||
// Translate status code for Groups.swiss
|
// Translate status code for Groups.swiss
|
||||||
$statusCode = Contingent::STATUS_ONREQUEST === $item['status'] ? 1 : 2;
|
$statusCode = Contingent::STATUS_ONREQUEST === $item['status'] ? 1 : 2;
|
||||||
// Post chart item to API
|
// Post chart item to API
|
||||||
|
|||||||
Reference in New Issue
Block a user