";
if ($pmb_gestion_abonnement) {
$cpt_id=comptes::get_compte_id_from_empr($this->id,1);
$cpt=new comptes($cpt_id);
$solde=$cpt->update_solde();
$novalid=$cpt->summarize_transactions("","",0,0);
if ($cpt_id) {
$compte.="
";
if ($novalid)
$compte.="
".$msg["finance_not_validated"]." : ".comptes::format($novalid)."
";
$compte.="
";
}
$n_c++;
}
if ($pmb_gestion_tarif_prets) {
$cpt_id=comptes::get_compte_id_from_empr($this->id,3);
$cpt=new comptes($cpt_id);
$solde=$cpt->update_solde();
$novalid=$cpt->summarize_transactions("","",0,0);
if ($cpt_id) {
$compte.="
";
if ($novalid)
$compte.="
".$msg["finance_not_validated"]." : ".comptes::format($novalid)."
";
$compte.="
";
}
$n_c++;
}
if ($pmb_gestion_amende) {
$cpt_id=comptes::get_compte_id_from_empr($this->id,2);
$cpt=new comptes($cpt_id);
$solde=$cpt->update_solde();
$novalid=$cpt->summarize_transactions("","",0,0);
if ($cpt_id) {
//Calcul des amendes
$amende=new amende($this->id,true);
$total_amende=$amende->get_total_amendes();
$this->nb_amendes=$amende->nb_amendes;
$compte.="
";
if ($novalid)
$compte.="
".$msg["finance_not_validated"]." : ".comptes::format($novalid)."
";
if ($total_amende)
$compte.="
".$msg["finance_pret_amende_en_cours"]." : ".comptes::format($total_amende)."
";
$compte.="
";
}
$n_c++;
}
// Autre compte, que s'il y a des types de transaction
$transactype=new transactype_list();
if ($transactype->get_count()) {
$cpt_id=comptes::get_compte_id_from_empr($this->id,4);
$cpt=new comptes($cpt_id);
$solde=$cpt->update_solde();
$novalid=$cpt->summarize_transactions("","",0,0);
$compte.="
";
if ($novalid)
$compte.="
".$msg["finance_not_validated"]." : ".comptes::format($novalid)."
";
$compte.="
";
$n_c++;
}
if ($n_c<3) {
for ($i=$n_c; $i<4; $i++)
$compte.="
";
}
$compte.="