Release
This commit is contained in:
@@ -23,12 +23,14 @@ class CostUnitRepository {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getCurrentEvents() : array {
|
public function getCurrentEvents(bool $disableAccessCheck = false) : array {
|
||||||
return $this->getCostUnitsByCriteria([
|
return $this->getCostUnitsByCriteria([
|
||||||
'allow_new' => true,
|
'allow_new' => true,
|
||||||
'type' => CostUnitType::COST_UNIT_TYPE_EVENT,
|
'type' => CostUnitType::COST_UNIT_TYPE_EVENT,
|
||||||
'archived' => false
|
'archived' => false
|
||||||
]);
|
],
|
||||||
|
true,
|
||||||
|
$disableAccessCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRunningJobs() : array {
|
public function getRunningJobs() : array {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class CloseCostUnit implements CronTask {
|
|||||||
$billingResetEnd = clone $now;
|
$billingResetEnd = clone $now;
|
||||||
$billingResetEnd->add(new \DateInterval('P6W'));
|
$billingResetEnd->add(new \DateInterval('P6W'));
|
||||||
/** @var CostUnit $costUnit */
|
/** @var CostUnit $costUnit */
|
||||||
foreach ($costUnitRepository->getCurrentEvents() as $costUnit) {
|
foreach ($costUnitRepository->getCurrentEvents(true) as $costUnit) {
|
||||||
$billingEnd = $costUnit['billing_deadline'];
|
$billingEnd = $costUnit['billing_deadline'];
|
||||||
|
|
||||||
if ($billingEnd === null) {
|
if ($billingEnd === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user