Commit 32face6b authored by Patrick Barroca's avatar Patrick Barroca 🐧

Merge branch…

Merge branch 'hotline#105149_statut_d_un_exemplaire_koha_disponibilite_bouton_reserver_portail_bokeh' into 'hotline'

hotline#105149: do not display "place hold" button when item is not available for loan

See merge request !3405
parents fb6cf332 f9e2296c
Pipeline #9555 passed with stage
in 43 minutes and 14 seconds
- ticket #105149 : Ne pas afficher le bouton "Réserver" dans le portail Bokeh si le status Koha est "Indisponible"
\ No newline at end of file
......@@ -123,9 +123,9 @@ class Class_WebService_SIGB_Koha_GetRecordsResponseReader {
$this
->_handleItemWithdrawn()
->_handleItemDateDue()
->_handleItemNotForLoan()
->_handleItemNumber()
->_handleItemDateDue()
->_handleItemBarCode()
->_handleItemLost()
->_handleItemDamaged()
......@@ -253,11 +253,14 @@ class Class_WebService_SIGB_Koha_GetRecordsResponseReader {
$data = (string)$this->_xml_item->notforloan;
if (!array_key_exists($data, $this->_not_for_loan_status)
|| $this->_item->isPiege())
|| $this->_item->isPiege()) {
$this->_item->setReservable(false);
return $this;
}
if (0 < (int)$data)
$this->_item->notForLoan();
$this->_item->notForLoan()
->setReservable(false);
if ('' == $this->_item->getDateRetour())
$this->_item->setDisponibilite($this->_not_for_loan_status[$data]);
......
......@@ -811,6 +811,30 @@ class KohaFixtures {
<dateaccessioned>2011-02-18</dateaccessioned>
<itype>LIV</itype>
</item>
<!-- 12 -->
<item>
<biblioitemnumber>33270</biblioitemnumber>
<wthdrawn>0</wthdrawn>
<holdingbranchname>Bibliothèque Départementale de la Meuse</holdingbranchname>
<notforloan>8</notforloan>
<replacementpricedate>2011-02-18</replacementpricedate>
<itemnumber>0239427</itemnumber>
<ccode>ROMJEUN</ccode>
<itemcallnumber>JR ROW h</itemcallnumber>
<date_due></date_due>
<barcode>2661660441</barcode>
<itemlost>0</itemlost>
<datelastseen>2011-02-18</datelastseen>
<homebranch>BDM</homebranch>
<homebranchname>Bibliothèque Départementale de la Meuse</homebranchname>
<biblionumber>33233</biblionumber>
<holdingbranch>BDM</holdingbranch>
<timestamp>2011-02-18 14:24:01</timestamp>
<damaged>0</damaged>
<cn_sort>JR_ROW_H</cn_sort>
<dateaccessioned>2011-02-18</dateaccessioned>
<itype>LIV</itype>
</item>
</items>
</record>
</GetRecords>';
......
......@@ -233,8 +233,8 @@ class KohaServiceGetNoticeHarryPotterTest extends KohaServiceGetNoticeHarryPotte
/** @test */
public function getExemplairesShouldReturnAnArrayWithSizeEleven() {
$this->assertEquals(11, count($this->potter->getExemplaires()));
public function getExemplairesShouldReturnAnArrayWithSizeTwelve() {
$this->assertEquals(12, count($this->potter->getExemplaires()));
}
/** @test */
......@@ -382,6 +382,12 @@ class KohaServiceGetNoticeHarryPotterTest extends KohaServiceGetNoticeHarryPotte
public function eleventhExemplaireShouldNotBePilonne() {
$this->assertFalse($this->potter->exemplaireAt(10)->isPilonne());
}
/** @test */
public function twelfthExemplaireShouldNotBeReservable() {
$this->assertFalse($this->potter->exemplaireAt(11)->isReservable());
}
}
......
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