Commit 980151bc authored by Laurent's avatar Laurent

hotline #114506 a loan in history should not be late

parent 1246e123
Pipeline #10845 failed with stage
in 38 minutes and 36 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();
}
......
......@@ -126,7 +126,7 @@ abstract class AbonneControllerPretsListThreePretsTestCase extends AbstractAbonn
'titre_principal' => 'Potter',
'type_doc' => Class_TypeDoc::LIVRE,
'url_image' => 'https://monimage.org',
'unimarc' => '00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103  aEng1 aHarry Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l\'agglomération de Saint-Omer apm'])]));
'unimarc' => file_get_contents(ROOT_PATH . 'tests/fixtures/potter_reliques.uni')])]));
$potter->parseExtraAttributes(['Dateretourprevue' => '29/10/2022',
'Section' => 'Espace jeunesse',
......@@ -147,7 +147,7 @@ abstract class AbonneControllerPretsListThreePretsTestCase extends AbstractAbonn
['id' => 889,
'titre_principal' => 'Potter',
'type_doc' => 1,
'unimarc' => '00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103  aEng1 aHarry Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l\'agglomération de Saint-Omer apm'])]);
'unimarc' => file_get_contents(ROOT_PATH . 'tests/fixtures/potter_reliques.uni')])]);
$alice = new Class_WebService_SIGB_Emprunt('13', new Class_WebService_SIGB_Exemplaire(456));
$alice
......
01175cam0 22002771 450 001001500000010003700015100004100052101000800093102000700101105001800108106000600126200009300132210002400225211001300249215006400262300002400326307002900350330027300379345001800652461005600670700001800726701003000744801003300774856008300807940000700890frOr0354235228 a978-2-35592-635-8bbr.d7,65 EUR a20140225d2014 | |0fre|0103||||ba afre aFR a 0||y| ar1 aAlice au royaume de TrèfleeCheshire cat Waltzh5fQuinRosegdessin Mamenosuke Fujimaru aPariscKi-oond2014 1a20140227 a1 vol. (164 p.)cillustrations en noir et blancd18 x 13 cm aTraduit du japonais aSens de lecture japonais aPerdue dans la forêt aux portes, Alice tombe nez à nez avec Ace. Devenue malgré elle la confidente du chevalier, elle ne sait comment repousser ses avances. Lorsque le chat du Cheshire, qui a assisté à la scène, intervient, la rencontre tourne à l'affrontement. b9782355926358 1tAlice au royaume de Trèfle : Cheshire cat Waltzv5 1aQuinRose4070 1aFujimarubMamenosuke4440 aFRbElectrec20140225gAFNOR uhttp://www.electre.com//GetBlob.ashx?Ean=9782355926358,0-1913692&Size=Original aLR
\ No newline at end of file
00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103  aEng1 aHarry Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l'agglomération de Saint-Omer apm
\ No newline at end of file
......@@ -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());
......
......@@ -2081,7 +2081,7 @@ abstract class TemplatesIntonationAccountTestCase extends TemplatesIntonationTes
'titre_principal' => 'Potter',
'type_doc' => Class_TypeDoc::LIVRE,
'url_image' => 'https://monimage.org',
'unimarc' => '00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103  aEng1 aHarry Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l\'agglomération de Saint-Omer apm'])]));
'unimarc' => file_get_contents(ROOT_PATH . 'tests/fixtures/potter_reliques.uni')])]));
$potter
->parseExtraAttributes(['Dateretourprevue' => '29/10/1990',
......@@ -2101,7 +2101,7 @@ abstract class TemplatesIntonationAccountTestCase extends TemplatesIntonationTes
['id' => 889,
'titre_principal' => 'Potter',
'type_doc' => 1,
'unimarc' => '00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103  aEng1 aHarry Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l\'agglomération de Saint-Omer apm'])]);
'unimarc' => file_get_contents(ROOT_PATH . 'tests/fixtures/potter_reliques.uni')])]);
$alice = new Class_WebService_SIGB_Emprunt('13', new Class_WebService_SIGB_Exemplaire(456));
$alice
......@@ -2117,7 +2117,8 @@ abstract class TemplatesIntonationAccountTestCase extends TemplatesIntonationTes
'notice' => $this->fixture('Class_Notice',
['id' => 827,
'titre_principal' => 'Alice',
'unimarc' => '01175cam0 22002771 450 001001500000010003700015100004100052101000800093102000700101105001800108106000600126200009300132210002400225211001300249215006400262300002400326307002900350330027300379345001800652461005600670700001800726701003000744801003300774856008300807940000700890frOr0354235228 a978-2-35592-635-8bbr.d7,65 EUR a20140225d2014 | |0fre|0103||||ba afre aFR a 0||y| ar1 aAlice au royaume de TrèfleeCheshire cat Waltzh5fQuinRosegdessin Mamenosuke Fujimaru aPariscKi-oond2014 1a20140227 a1 vol. (164 p.)cillustrations en noir et blancd18 x 13 cm aTraduit du japonais aSens de lecture japonais aPerdue dans la forêt aux portes, Alice tombe nez à nez avec Ace. Devenue malgré elle la confidente du chevalier, elle ne sait comment repousser ses avances. Lorsque le chat du Cheshire, qui a assisté à la scène, intervient, la rencontre tourne à l\'affrontement. b9782355926358 1tAlice au royaume de Trèfle : Cheshire cat Waltzv5 1aQuinRose4070 1aFujimarubMamenosuke4440 aFRbElectrec20140225gAFNOR uhttp://www.electre.com//GetBlob.ashx?Ean=9782355926358,0-1913692&Size=Original aLR'])]));
'unimarc' => file_get_contents(ROOT_PATH . 'tests/fixtures/alice_trefle.uni')])]));
$alice->parseExtraAttributes(['Dateretourprevue' => '21/10/2010',
'Section' => 'Espace jeunesse',
......@@ -2146,7 +2147,7 @@ abstract class TemplatesIntonationAccountTestCase extends TemplatesIntonationTes
['id' => 820,
'titre_principal' => 'Dobby',
'type_doc' => Class_TypeDoc::DVD,
'unimarc' => '00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103  aEng1 aDobby Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l\'agglomération de Saint-Omer apm']);
'unimarc' => file_get_contents(ROOT_PATH . 'tests/fixtures/potter_reliques.uni')]);
$dobby =
(new Class_WebService_SIGB_Reservation('12',
......
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