Skip to content
Snippets Groups Projects
Commit 248a965b authored by lbrun's avatar lbrun
Browse files

hotline#33773_vsmart_impossible_de_se_connecter_a_son_compte_lecteur_lorsque_u...

hotline#33773_vsmart_impossible_de_se_connecter_a_son_compte_lecteur_lorsque_une_consultation_est_reservee: add verif + tests
parent 20c9a7ba
Branches
Tags
6 merge requests!1553Master,!1502Master,!1501Stable,!1312Master,!1304Master,!1303Hotline master
- ticket #33773 : VSmart: Impossible de se connecter a son compte lecteur lorsque une consultation est reservée
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software * along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
class Class_WebService_SIGB_VSmart_BorrowerReader { class Class_WebService_SIGB_VSmart_BorrowerReader {
...@@ -27,7 +27,7 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -27,7 +27,7 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
protected $_sigb_service; protected $_sigb_service;
protected $_xml_parser; protected $_xml_parser;
protected $_current_exemplaire_operation;
/** /**
* *
...@@ -110,11 +110,17 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -110,11 +110,17 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
} }
public function endReservation() {
$this->_current_exemplaire_operation = null;
}
/** /**
* @param string $data * @param string $data
*/ */
public function endLoan($data) { public function endLoan($data) {
$this->_emprunteur->empruntsAdd($this->_current_exemplaire_operation); $this->_emprunteur->empruntsAdd($this->_current_exemplaire_operation);
$this->_current_exemplaire_operation = null;
} }
...@@ -130,7 +136,9 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -130,7 +136,9 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
* @param string $data * @param string $data
*/ */
public function endTitle($data) { public function endTitle($data) {
$this->_current_exemplaire_operation->getExemplaire()->setTitre($data); xdebug_break();
if ($this->_current_exemplaire_operation)
$this->_current_exemplaire_operation->getExemplaire()->setTitre($data);
} }
...@@ -138,7 +146,8 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -138,7 +146,8 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
* @param string $data * @param string $data
*/ */
public function endDueDate($data) { public function endDueDate($data) {
$this->_current_exemplaire_operation->setDateRetour($data); if ($this->_current_exemplaire_operation)
$this->_current_exemplaire_operation->setDateRetour($data);
} }
...@@ -146,10 +155,11 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -146,10 +155,11 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
* @param string $data * @param string $data
*/ */
public function endItemBarcode($data) { public function endItemBarcode($data) {
$this->_current_exemplaire_operation->setId($data) if ($this->_current_exemplaire_operation)
->getExemplaire() $this->_current_exemplaire_operation->setId($data)
->setId($data) ->getExemplaire()
->setCodeBarre($data); ->setId($data)
->setCodeBarre($data);
} }
...@@ -157,7 +167,8 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -157,7 +167,8 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
* @param string $data * @param string $data
*/ */
public function endPlaceInQueue($data) { public function endPlaceInQueue($data) {
$this->_current_exemplaire_operation->setRang($data); if ($this->_current_exemplaire_operation)
$this->_current_exemplaire_operation->setRang($data);
} }
...@@ -165,7 +176,8 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { ...@@ -165,7 +176,8 @@ class Class_WebService_SIGB_VSmart_BorrowerReader {
* @param string $data * @param string $data
*/ */
public function endReservationNumber($data) { public function endReservationNumber($data) {
$this->_current_exemplaire_operation->setId($data); if ($this->_current_exemplaire_operation)
$this->_current_exemplaire_operation->setId($data);
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software * along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
class VSmartFixtures { class VSmartFixtures {
...@@ -178,7 +178,20 @@ class VSmartFixtures { ...@@ -178,7 +178,20 @@ class VSmartFixtures {
</Items> </Items>
</Reservation> </Reservation>
</Reservations> </Reservations>
<StackRequests /> <StackRequests>
<StackRequest>
<RequestNumber>DC00001093</RequestNumber>
<Status>Active</Status>
<RequestDateTime>26/11/2015 12:14:27</RequestDateTime>
<ExpiryDateTime>24/02/2016 23:59:00</ExpiryDateTime>
<Delivery>Liv</Delivery>
<HeldItem>RES_MCP271095</HeldItem>
<RecordId>1.179920</RecordId>
<Title>A Moulins...le marché cou</Title>
<MaterialType>LDA</MaterialType>
<MaterialType>LDA</MaterialType>
</StackRequest>
</StackRequests>
</Borrower> </Borrower>
</VubisSmart>'; </VubisSmart>';
} }
......
  • Ghost User @ghost

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Patrick Barroca :grin: @pbarroca

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Patrick Barroca :grin: @pbarroca

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Patrick Barroca :grin: @pbarroca

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Ghost User @ghost

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Ghislain Loas @gloas

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Ghislain Loas @gloas

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Ghost User @ghost

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • efalcy @efalcy

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Ghislain Loas @gloas

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
  • Ghislain Loas @gloas

    mentioned in commit 49ce66

    ·

    mentioned in commit 49ce66

    Toggle commit list
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