Commit 35476ea4 authored by Laurent's avatar Laurent

hotline #114506 a loan in history should not be late

parent 1246e123
Pipeline #10846 failed with stage
in 38 minutes and 29 seconds
- ticket #114506 : historique des prêts : n'affiche plus la mention "en retard"
\ No newline at end of file
......@@ -94,12 +94,15 @@ class Class_WebService_SIGB_Emprunt extends Class_WebService_SIGB_ExemplaireOper
*/
public function enRetard() {
if (!isset($this->enRetard)) {
$this->enRetard = ($this->getDateRetourTimestamp() <= strtotime('Yesterday'));
$this->enRetard = (!$this->_exemplaire->getIssueDate())
&&
($this->getDateRetourTimestamp() <= strtotime('Yesterday'));
}
return $this->enRetard;
}
public function isLate() {
return $this->enRetard();
}
......
......@@ -1493,6 +1493,13 @@ class NanookLoanHistoryTest extends NanookTestCase {
$this->assertEquals(231645, $this->loans_history->getLoans()[0]->getId());
}
/** @test */
public function firstLoanIdShouldNotBeLate() {
$this->assertFalse($this->loans_history->getLoans()[0]->isLate());
}
/** @test */
public function noticeNumberShouldBe464732() {
$this->assertEquals(464732, $this->loans_history->getLoans()[0]->getNoNotice());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment