Projet

Général

Profil

Anomalie #1566 » 0001-Fix-close-expiries-closes-1566.patch

Guillaume AGNIERAY, 20/09/2021 21:14

Voir les différences:

galette/lib/Galette/Entity/Adherent.php
public function getDues()
{
$ret = '';
$date_now = new \DateTime();
$ddate = new \DateTime($this->_due_date);
$date_diff = $date_now->diff($ddate);
if ($this->isDueFree()) {
$ret = _T("Freed of dues");
} elseif ($this->_due_date == '') {
......
$ret = _T("Never contributed");
}
} elseif ($this->_days_remaining == 0) {
$ret = _T("Last day!");
if ($date_diff->invert == 0) {
$ret = _T("Last day!");
} else {
$ret = _T("Late since today!");
}
} elseif ($this->_days_remaining < 0) {
$patterns = array('/%days/', '/%date/');
$ddate = new \DateTime($this->_due_date);
$replace = array(
$this->_days_remaining * -1,
$ddate->format(__("Y-m-d"))
......
}
} else {
$patterns = array('/%days/', '/%date/');
$ddate = new \DateTime($this->_due_date);
$replace = array(
$this->_days_remaining,
$ddate->format(__("Y-m-d"))
galette/lib/Galette/Repository/Members.php
$now = new \DateTime();
$duedate = new \DateTime();
$duedate->modify('+1 month');
$select->where->greaterThanOrEqualTo(
$select->where->greaterThan(
'date_echeance',
$now->format('Y-m-d')
)->lessThan(
)->lessThanOrEqualTo(
'date_echeance',
$duedate->format('Y-m-d')
);
(1-1/4)