Skip to content
Snippets Groups Projects
Commit 78d9f803 authored by Laurent's avatar Laurent
Browse files

dev #81899 fix RT

parent cc9aa24a
Branches
Tags
1 merge request!2912hotline #82155 handle Can_Rsv WS Orphee
Pipeline #5415 passed with stage
in 30 minutes and 9 seconds
......@@ -22,7 +22,9 @@ class Class_WebService_SIGB_Orphee_Exemplaire extends Class_WebService_SIGB_Exem
CONST DISPO_LIBRE = 'En rayon';
protected $_allow_hold_available_items;
protected
$_allow_hold_available_items,
$_flag_can_hold = null;
public function __construct($id, $allow_hold_available_items=null) {
parent::__construct($id);
......@@ -31,11 +33,20 @@ class Class_WebService_SIGB_Orphee_Exemplaire extends Class_WebService_SIGB_Exem
public function isReservable() {
if ($this->_flag_can_hold !== null)
return $this->_flag_can_hold;
return parent::isReservable()
|| ( $this->isDisponible() && $this->_allow_hold_available_items );
}
public function setFlagCanHold($flag) {
$this->_flag_can_hold = $flag;
return $this;
}
public function isDisponible() {
return strtolower(self::DISPO_LIBRE) == strtolower(trim($this->disponibilite));
}
......
......@@ -81,7 +81,7 @@ class Class_WebService_SIGB_Orphee_GetLstDmtResponseReader extends Class_WebServ
public function endCan_Rsv($data) {
$this
->_current_exemplaire
->setReservable('1' === $data);
->setFlagCanHold('1' === $data);
}
......
......@@ -289,6 +289,7 @@ class OrpheeFixtures {
<no><![CDATA[148899]]></no>
<ntc><![CDATA[1301700727]]></ntc>
<carte><![CDATA[200014899]]></carte>
<can_rsv>1</can_rsv>
<sit><![CDATA[1]]></sit>
<lib_sit><![CDATA[ en rayon]]></lib_sit>
<loc><![CDATA[2]]></loc>
......@@ -323,7 +324,6 @@ class OrpheeFixtures {
<lib_droit_resa />
<titre><![CDATA[[Millenium (Larsson, Stieg (1954-2004))]]></titre>
<date_edi><![CDATA[2010]]></date_edi>
<can_rsv>1</can_rsv>
</document>
......
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