!!relance_liste!!
".$msg["relance_export_empr_cb"]." ".$msg["relance_export_empr_name"]." ".$msg["relance_export_empr_surname"]." ".$msg["relance_export_empr_adr1"]." ".$msg["relance_export_empr_adr2"]." ".$msg["relance_export_empr_cp"]." ".$msg["relance_export_empr_ville"]." ".$msg["relance_export_empr_mail"]." ".$msg["relance_export_empr_tel1"]." ".$msg["relance_export_empr_tel2"]." ".$msg["relance_export_empr_niveau_suppose"]." ".$msg["relance_export_empr_total_amende"]." ".$msg["relance_export_empr_frais_relance"]." ".$msg["relance_export_expl_titre"]." ".$msg["relance_export_expl_cb"]." ".$msg["relance_export_expl_pret_date"]." ".$msg["relance_export_expl_pret_retour"]." ".$msg["relance_export_expl_niveau_relance"]." ".$msg["relance_export_expl_date_relance"]." ".$msg["relance_export_expl_mail"]." ".$msg["relance_export_expl_printed"]." ".$msg["relance_export_expl_amende"]."
"; $req ="select id_empr from empr, pret, exemplaires, empr_categ where 1 "; $req.= "and pret_retourid_empr); } print str_replace("!!relance_liste!!",$relance_liste,$export_relance_tpl); function get_relance($id_empr){ global $dbh,$charset, $msg, $pmb_gestion_financiere, $pmb_gestion_amende; // liste des relances if (($pmb_gestion_financiere)&&($pmb_gestion_amende)) { $amende=new amende($id_empr); $level=$amende->get_max_level(); $niveau_min=$level["level_min"]; $id_expl=$level["level_min_id_expl"]; $total_amende = $amende->get_total_amendes(); } $niveau_suppose = $level["level_normal"]; $cpt_id=comptes::get_compte_id_from_empr($id_empr,2); $cpt=new comptes($cpt_id); $frais_relance=$cpt->summarize_transactions("","",0,$realisee=-1); if ($frais_relance<0) $frais_relance=-$frais_relance; else $frais_relance=0; $empr=new emprunteur($id_empr,'', FALSE, 0); $info_empr=" ".$empr->cb." ".$empr->nom." ".$empr->prenom." ".$empr->adr1." ".$empr->adr2." ".$empr->cp." ".$empr->ville." ".$empr->mail." ".$empr->tel1." ".$empr->tel2." ".$niveau_suppose." ".$total_amende." ".$frais_relance." "; $reqexpl = "select pret_idexpl as expl from pret where pret_retourexpl."' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id "; $res_det_expl = mysql_query($requete) ; $expl = mysql_fetch_object($res_det_expl); $amd = $amende->get_amende($liste->expl); $reqlog = "select sum(log.log_printed) as printed, sum(log.log_mail) as mail from log_retard as log, log_expl_retard as expl where log.idempr=$id_empr and log.niveau_reel='".$expl->niveau_relance."' and expl.num_log_retard=log.id_log and expl_id='".$liste->expl."' "; $reslog=mysql_query($reqlog); if($log=mysql_fetch_object($reslog)) { $printed=$log->printed; $mail=$log->mail; } else { $printed=0; $mail=0; } $info.=" $info_empr ".htmlentities($expl->tit,ENT_QUOTES,$charset)." ".htmlentities($expl->expl_cb,ENT_QUOTES,$charset)." ".format_date($expl->pret_date)." ".format_date($expl->pret_retour)." ".$expl->niveau_relance." ".format_date($expl->date_relance)." ".htmlentities($mail,ENT_QUOTES,$charset)." ".htmlentities($printed,ENT_QUOTES,$charset)." ".htmlentities($amd["valeur"],ENT_QUOTES,$charset)." "; } return $info; } ?>