Skip to content
Snippets Groups Projects

Hotline

Merged Patrick Barroca requested to merge hotline into master
Compare and
4 files
+ 64
15
Preferences
Compare changes
Files
4
@@ -451,6 +451,7 @@ class Class_Exemplaire extends Storm_Model_Abstract {
return null;
}
public function toRaw() {
$raw = $this->getRawAttributes() ;
// LL: pour Opsys nous avons besoin de l'identifiant de l'annexe, d'où sauvegarde pour réutilisation dans ReservationLink
@@ -470,6 +471,7 @@ class Class_Exemplaire extends Storm_Model_Abstract {
return $this->annexe;
}
public function getNbResas() {
return $this->getSigbExemplaire()->getNbReservations();
}
@@ -490,15 +492,15 @@ class Class_Exemplaire extends Storm_Model_Abstract {
public function getBundle() {
if (!$data_profile = $this->getDataProfile())
if ((!$id_int_bib = $this->getIdIntBib())
|| (!$data_profile = $this->getDataProfile())
|| (!$bundle_id_field = $data_profile->getBundleIdField())
|| (!$id_origine = $this->getSubfield($bundle_id_field)))
return null;
$bundle_id_field = $data_profile->getBundleIdField();
$bundle_id = $this->getSubfield($bundle_id_field);
$bundle_item = Class_Exemplaire::getLoader()
->findFirstBy(['id_int_bib' => $this->getIdIntBib(),
'id_origine' => $bundle_id]);
->findFirstBy(['id_int_bib' => $id_int_bib,
'id_origine' => $id_origine]);
return $bundle_item
? $bundle_item->getNotice()