|
@@ -32,6 +32,8 @@ class Utils
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Test si l'organisation est un dernier parent ET appartient à la CMF.
|
|
* Test si l'organisation est un dernier parent ET appartient à la CMF.
|
|
|
|
|
+ * @see config/opentalent/modulesbyconditions.yaml
|
|
|
|
|
+ *
|
|
|
* @param Organization $organization
|
|
* @param Organization $organization
|
|
|
* @return bool
|
|
* @return bool
|
|
|
* @see UtilsTest::testIsLastParentAndCMF()
|
|
* @see UtilsTest::testIsLastParentAndCMF()
|
|
@@ -41,8 +43,24 @@ class Utils
|
|
|
return $this->networkOrganizationRepository->isLastParent($organization) && $this->networkUtils->isCMF($organization);
|
|
return $this->networkOrganizationRepository->isLastParent($organization) && $this->networkUtils->isCMF($organization);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Test si l'organisation est une structure (non manager)
|
|
|
|
|
+ * @see config/opentalent/modulesbyconditions.yaml
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param Organization $organization
|
|
|
|
|
+ * @return bool
|
|
|
|
|
+ * @see UtilsTest::testIsStructure()
|
|
|
|
|
+ */
|
|
|
|
|
+ public function isStructure(Organization $organization): bool
|
|
|
|
|
+ {
|
|
|
|
|
+ return true; // TODO: revoir la définition dans la V1 : https://gitlab.2iopenservice.com/opentalent/opentalent-platform/-/blob/master/src/AppBundle/Services/Cotisation/Utils.php#L144
|
|
|
|
|
+// return $this->organizationUtils->isStructure($organization);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Test si l'organisation est une structure (non manager) ET appartient à la CMF
|
|
* Test si l'organisation est une structure (non manager) ET appartient à la CMF
|
|
|
|
|
+ * @see config/opentalent/modulesbyconditions.yaml
|
|
|
|
|
+ *
|
|
|
* @param Organization $organization
|
|
* @param Organization $organization
|
|
|
* @return bool
|
|
* @return bool
|
|
|
* @see UtilsTest::testIsStructureAndCMF()
|
|
* @see UtilsTest::testIsStructureAndCMF()
|
|
@@ -54,6 +72,8 @@ class Utils
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Test si la structure est un manager ET qu'elle appartient à la CMF
|
|
* Test si la structure est un manager ET qu'elle appartient à la CMF
|
|
|
|
|
+ * @see config/opentalent/modulesbyconditions.yaml
|
|
|
|
|
+ *
|
|
|
* @param Organization $organization
|
|
* @param Organization $organization
|
|
|
* @return bool
|
|
* @return bool
|
|
|
* @see UtilsTest::testIsManagerAndCMF()
|
|
* @see UtilsTest::testIsManagerAndCMF()
|
|
@@ -65,6 +85,8 @@ class Utils
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Test si l'organisation est un manager ET un dernier parent ET appartient à la CMF
|
|
* Test si l'organisation est un manager ET un dernier parent ET appartient à la CMF
|
|
|
|
|
+ * @see config/opentalent/modulesbyconditions.yaml
|
|
|
|
|
+ *
|
|
|
* @param Organization $organization
|
|
* @param Organization $organization
|
|
|
* @return bool
|
|
* @return bool
|
|
|
* @see UtilsTest::testIsManagerAndLastParentAndCMF()
|
|
* @see UtilsTest::testIsManagerAndLastParentAndCMF()
|
|
@@ -76,6 +98,8 @@ class Utils
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Test si l'organisation est un manager ET n'est pas un dernier parent ET appartient à la CMF
|
|
* Test si l'organisation est un manager ET n'est pas un dernier parent ET appartient à la CMF
|
|
|
|
|
+ * @see config/opentalent/modulesbyconditions.yaml
|
|
|
|
|
+ *
|
|
|
* @param Organization $organization
|
|
* @param Organization $organization
|
|
|
* @return bool
|
|
* @return bool
|
|
|
* @see UtilsTest::testIsManagerAndNotLastParentAndCMF()
|
|
* @see UtilsTest::testIsManagerAndNotLastParentAndCMF()
|
|
@@ -88,6 +112,7 @@ class Utils
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Retourne le niveau d'alerte de l'appel de cotisation pour une année.
|
|
* Retourne le niveau d'alerte de l'appel de cotisation pour une année.
|
|
|
|
|
+ *
|
|
|
* @param Organization $organization
|
|
* @param Organization $organization
|
|
|
* @param int $year
|
|
* @param int $year
|
|
|
* @return string|null
|
|
* @return string|null
|
|
@@ -114,6 +139,7 @@ class Utils
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Retourne dans quelle année de cotisation on est aujourd'hui
|
|
* Retourne dans quelle année de cotisation on est aujourd'hui
|
|
|
|
|
+ *
|
|
|
* @return int
|
|
* @return int
|
|
|
* @throws \Exception
|
|
* @throws \Exception
|
|
|
* @see UtilsTest::testGetCurrentCotisationYear()
|
|
* @see UtilsTest::testGetCurrentCotisationYear()
|