diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 96f3eb133a0..360bb5760ff 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -433,7 +433,7 @@ class Adherent { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->fetch($obj->rowid); } } @@ -461,7 +461,7 @@ class Adherent if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $obj->rowid; $this->typeid = $obj->fk_adherent_type; @@ -508,7 +508,6 @@ class Adherent if ( $this->db->query( $sql) ){ if ($this->db->num_rows()){ - //$obj = $this->db->fetch_object(0); $tab = $this->db->fetch_array(); foreach ($tab as $key => $value){ @@ -534,7 +533,6 @@ class Adherent if ( $this->db->query( $sql) ){ if ($this->db->num_rows()){ - //$tab = $this->db->fetch_object(); //$array_name_options[]=$tab->Field; while ($tab = $this->db->fetch_object()){ if ($tab->Field != 'optid' && $tab->Field != 'tms' && $tab->Field != 'adhid'){ diff --git a/htdocs/adherents/adherent_type.class.php b/htdocs/adherents/adherent_type.class.php index d5cf0845061..2bb87de7703 100644 --- a/htdocs/adherents/adherent_type.class.php +++ b/htdocs/adherents/adherent_type.class.php @@ -167,7 +167,7 @@ class AdherentType if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $obj->rowid; $this->libelle = $obj->libelle; @@ -200,7 +200,7 @@ class AdherentType $i = 0; while ($i < $nump) { - $obj = $this->db->fetch_object($i); + $obj = $this->db->fetch_object(); $projets[$obj->rowid] = $obj->libelle; $i++; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 796e7128b11..42b0548898a 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -82,7 +82,7 @@ if ($result) $i = 0; while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); // attribut a remplacer $replace = array ( ucfirst(strtolower($objp->prenom)), diff --git a/htdocs/adherents/cartes/etiquette.php b/htdocs/adherents/cartes/etiquette.php index edc9594d283..7c19ca11a23 100755 --- a/htdocs/adherents/cartes/etiquette.php +++ b/htdocs/adherents/cartes/etiquette.php @@ -70,7 +70,7 @@ if ($result) $i = 0; while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); // imprime le texte specifique sur la carte $pdf->Add_PDF_card(sprintf("%s\n%s\n%s %s\n%s", ucfirst(strtolower($objp->prenom))." ".strtoupper($objp->nom), ucwords(strtolower($objp->adresse)), $objp->cp, strtoupper($objp->ville), ucfirst(strtolower($objp->pays))),'',''); $i++; diff --git a/htdocs/adherents/cotisation.class.php b/htdocs/adherents/cotisation.class.php index 686d2ff11b0..9700686c8af 100644 --- a/htdocs/adherents/cotisation.class.php +++ b/htdocs/adherents/cotisation.class.php @@ -289,7 +289,7 @@ class Cotisation if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $obj->rowid; $this->date = $obj->datedon; diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 79bced4cccb..dc2b95c8b11 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -62,13 +62,13 @@ if ($_POST["action"] == '2bank' && $_POST["rowid"] !=''){ $num = $db->num_rows(); if ($num>0) { - $objp = $db->fetch_object(0); + $objp = $db->fetch_object($result); $amount=$objp->cotisation; $acct=new Account($db,ADHERENT_BANK_ACCOUNT); $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"],ADHERENT_BANK_CATEGORIE); if ($insertid == '') { - print "
Probleme d'insertion : ".$db->error(); + dolibarr_print_error($db); } else { @@ -81,20 +81,19 @@ if ($_POST["action"] == '2bank' && $_POST["rowid"] !=''){ } else { - print "
Probleme d'insertion $sql : ".$db->error(); + dolibarr_print_error($db); } } } else { - print "
Probleme SQL : $sql : ".$db->error(); + dolibarr_print_error($db); } } else { - print "
Probleme SQL : $sql : ".$db->error(); + dolibarr_print_error($db); } - } } @@ -123,7 +122,7 @@ if ($result) $i = 0; while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $Total[strftime("%Y",$objp->dateadh)]+=price($objp->cotisation); $Number[strftime("%Y",$objp->dateadh)]+=1; $i++; @@ -145,77 +144,64 @@ if ($result) print_barre_liste("Liste des cotisations", $page, "cotisations.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield"); - print "
| Annee | "; - print 'Montant | '; - print "Nombre | "; - print "Moyenne | \n"; - print "Montant | '; + print "Nombre | "; + print "Moyenne | \n"; + print "\n"; foreach ($Total as $key=>$value){ $var=!$var; - print "
| $key | ".price($value)." | ".$Number[$key]." | ".price($value/$Number[$key])." |
| $key | ".price($value)." | ".$Number[$key]." | ".price($value/$Number[$key])." |
| Date | "; - print ''; + print ' | ||||||||
| ';
print_liste_field_titre("Date ","cotisations.php","c.dateadh","&page=$page&statut=$statut"); - print " | \n";
+ print "\n";
- //print "Montant | "; - print ''; + print ' | ';
print_liste_field_titre("Montant ","cotisations.php","c.cotisation","&page=$page&statut=$statut"); - print " | \n";
+ print "\n";
- //print "Prenom Nom / Société | "; - print ''; - // print_liste_field_titre("Prenom","cotisations.php","d.prenom","&page=$page&statut=$statut"); + print ' | ';
print_liste_field_titre("Prenom Nom ","cotisations.php","d.nom","&page=$page&statut=$statut"); - // print " / Société"; - print " | \n";
+ print "\n";
if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0){
- print ''; + print ' | ';
// print_liste_field_titre("Bank","cotisations.php","c.fk_bank","&page=$page&statut=$statut");
- print 'Bank (Type,Numéro,Libelle)'; - print " | \n";
+ print 'Bank|
| rowid&action=edit\">".strftime("%d %B %Y",$objp->dateadh)." | \n"; - print ''.price($objp->cotisation).' | '; - //$Total[strftime("%Y",$objp->dateadh)]+=price($objp->cotisation); + print "||||||||
| rowid&action=edit\">".strftime("%d %B %Y",$objp->dateadh)." | \n"; + print ''.price($objp->cotisation).' | '; $total+=price($objp->cotisation); - /* - if ($objp->societe != ''){ - print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)." | \n";
- }else{
- print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." | \n"; - } - */ - print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." | \n"; + print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." | \n"; if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0){ if ($objp->bank !='' ){ - print "Deposé | "; + print "Deposé | "; }else{ - print ""; + print " | "; print "\n"; - print " | \n"; + print "\n"; } } print "
| ".dolibarr_print_date($objp->dateadh)." | \n"; diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php index 8ec62c86da2..1670134687d 100644 --- a/htdocs/adherents/htpasswd.php +++ b/htdocs/adherents/htpasswd.php @@ -64,7 +64,7 @@ if ($result) print "|||||||||
| ".$objp->rowid." | \n"; diff --git a/htdocs/admin/adherent.php b/htdocs/admin/adherent.php index 6c5cd35e711..391af735737 100644 --- a/htdocs/admin/adherent.php +++ b/htdocs/admin/adherent.php @@ -245,8 +245,7 @@ function form_constantes($tableau){ print ''.$langs->trans("Description").' | '; print ''.$langs->trans("Value").' | '; print ''.$langs->trans("Type").' | '; - //print 'Note | '; - print "Action | "; + print ''.$langs->trans("Action").' | '; print "