Skip to content
Snippets Groups Projects
Commit 2fe3e5ff authored by jgaimard's avatar jgaimard
Browse files

fix annexe à 0 dans les réservations pergames

parent 1a12684d
5 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!63Rf13038,!56Rf13038 Front,!42Hotline 6.40,!35Hotline Jgaimard
......@@ -212,8 +212,8 @@ class Class_Systeme_PergameService
// Controle connexion
if(!$this->user->ID_USER) $ret["erreur"]="Vous devez être connecté pour réserver un document";
else if(!$this->user->IDABON) $ret["erreur"]="Vous devez être connecté en tant qu'abonné pour réserver un document";
// Lire exemplaire et notice
if(!$exemplaire) return array("erreur"=>"Une erreur s'est produite lors de la lecture de la notice.");
$notice= $exemplaire->getNotice();
......@@ -251,11 +251,13 @@ class Class_Systeme_PergameService
}
// Ecrire enreg reservation
if(!$id_bib) $id_bib=1;
$req="insert into reservations(ID_SITE,ID_PERGAME,IDABON,ORDREABON,DATE_RESA,SUPPORT,ID_NOTICE_ORIGINE)";
$req.="Values($id_bib,0,$id_abon,$ordre_abon,'".date("Y-m-d")."',$support,'$id_origine')";
sqlExecute($req);
// Ecrire enreg transaction
if(!$code_annexe) $code_annexe=1;
$date=date("Y-m-d H:i:s");
$heure=date("H");
$this->ecrireTransaction(6,array($id_abon,$ordre_abon,$support,$id_origine,$date,$code_annexe,$heure));
......@@ -309,7 +311,7 @@ class Class_Systeme_PergameService
// Controle si le doc est réservé
if($regles["Interdire_si_reservation"]==1)
{
$controle=fetchOne("Select Count(*) From reservations Where ID_NOTICE_ORIGINE=".$pret["ID_NOTICE_ORIGINE"]." and IDABON='".$pret["ID_ABON"]."'");
$controle=fetchOne("Select Count(*) From reservations Where ID_NOTICE_ORIGINE=".$pret["ID_NOTICE_ORIGINE"]);
if($controle>0) return array('statut'=>0,"erreur"=>"Le prêt n'a pas pu être prolongé car il est réservé.".$complement_msg);
}
......
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