diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 0416fa875e0..112b7479621 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -313,7 +313,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- print '
'; -// Last modified customer invoices +// Latest modified customer invoices if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { $langs->load("boxes"); @@ -323,7 +323,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $sql.= ", f.date_lim_reglement as datelimite"; $sql.= ", s.nom as name"; $sql.= ", s.rowid as socid"; - $sql.= ", s.code_client, s.code_compta"; + $sql.= ", s.code_client, s.code_compta, s.email"; $sql.= ", sum(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; @@ -338,7 +338,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $sql.=$hookmanager->resPrint; $sql.= " GROUP BY f.rowid, f.facnumber, f.fk_statut, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,"; - $sql.= " s.nom, s.rowid, s.code_client, s.code_compta"; + $sql.= " s.nom, s.rowid, s.code_client, s.code_compta, s.email"; $sql.= " ORDER BY f.tms DESC "; $sql.= $db->plimit($max, 0); @@ -374,6 +374,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $thirdpartystatic->id=$obj->socid; $thirdpartystatic->name=$obj->name; + $thirdpartystatic->email=$obj->email; $thirdpartystatic->client=1; $thirdpartystatic->code_client = $obj->code_client; //$thirdpartystatic->code_fournisseur = $obj->code_fournisseur; diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 417f175422f..5eafb29d330 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1828,9 +1828,12 @@ class SMTPs { $_errMsg = array(); - foreach ( $this->_smtpsErrors as $_err => $_info ) + if (is_array($this->_smtpsErrors)) { - $_errMsg[] = 'Error [' . $_info['num'] .']: '. $_info['msg']; + foreach ( $this->_smtpsErrors as $_err => $_info ) + { + $_errMsg[] = 'Error [' . $_info['num'] .']: '. $_info['msg']; + } } return implode("\n", $_errMsg);