Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions sources/AppBundle/MembershipFee/MembershipFeeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public function getLatestByUserTypeAndId(MemberType $typePersonne, int $idPerson

public function getNextSubscriptionExpiration(?MembershipFee $cotisation = null): DateTime
{
$endSubscription = $cotisation ? $cotisation->getEndDate() : new DateTime();
$endDate = $cotisation?->getEndDate();
$endSubscription = $endDate !== null ? (clone $endDate)->setTime(23, 59, 59) : new DateTime();
$base = $now = new DateTime();

$year = new DateInterval('P1Y');
Expand All @@ -108,9 +109,6 @@ public function getNextSubscriptionExpiration(?MembershipFee $cotisation = null)

/**
* Renvoit la cotisation demandée
*
* @param $invoiceId Identifiant de la facture
* @param $token Token de la facture. Si null, pas de vérification
*/
public function getByInvoice(string $invoiceId, ?string $token = null): ?MembershipFee
{
Expand Down
Loading