From 6769a2b512c40d7f9970f8a899ccc07c7c7d59be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Jul 2008 10:31:58 +0000 Subject: [PATCH] Fix: Bad status report for contracts --- htdocs/comm/fiche.php | 26 +++++++++++++++++--------- htdocs/contrat/contrat.class.php | 4 ++-- htdocs/contrat/fiche.php | 3 +++ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index def88991da4..1665e0cfdaf 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -202,7 +202,7 @@ if ($socid > 0) print ''; print ''; - // Conditions de r�glement par d�faut + // Conditions de reglement par defaut $langs->load('bills'); $html = new Form($db); print ''; @@ -223,7 +223,7 @@ if ($socid > 0) print ""; print ''; - // Mode de r�glement + // Mode de reglement print ''; print '"; print ''; - // R�ductions relative (Remises-Ristournes-Rabbais) + // Reductions relative (Remises-Ristournes-Rabbais) print '
'; print $langs->trans('PaymentMode'); @@ -242,7 +242,7 @@ if ($socid > 0) print "
'; print ''; print ''; - // R�ductions absolues (Remises-Ristournes-Rabbais) + // Reductions absolues (Remises-Ristournes-Rabbais) print '
'; print $langs->trans("CustomerRelativeDiscountShort"); @@ -255,7 +255,7 @@ if ($socid > 0) print ''.($objsoc->remise_client?$objsoc->remise_client.'%':$langs->trans("DiscountNone")).'
'; print ''; print ''; print ''; - // multiprix + // Multiprix if ($conf->global->PRODUIT_MULTIPRICES) { print '"; - print '\n"; + print '\n"; print '\n"; print ''; - print '\n"; + print '\n"; print ''; $i++; } diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index c79f2ecf942..cda7e0ceb9e 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -979,8 +979,8 @@ class Contrat extends CommonObject /** * \brief Retourne le libelle du statut du contrat - * \param mode 0=libell� long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * \return string Libell� + * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * \return string Label */ function getLibStatut($mode) { diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 5ecdde625f3..af271b28944 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -393,6 +393,9 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes') +/* + * View + */ llxHeader('',$langs->trans("ContractCard"),"Contrat");
'; @@ -275,7 +275,7 @@ if ($socid > 0) print '
'; @@ -332,7 +332,7 @@ if ($socid > 0) print ''; - // Nbre max d'�l�ments des petites listes + // Nbre max d'elements des petites listes $MAXLIST=4; // Lien recap @@ -475,14 +475,22 @@ if ($socid > 0) $i = 0; while ($i < $num && $i < $MAXLIST) { + $contrat=new Contrat($db); + $objp = $db->fetch_object($resql); $var=!$var; print "
'.img_object($langs->trans("ShowContract"),"contract").' ' - .(!isset($objp->ref) ? $objp->id : $objp->ref) ."'; + $contrat->id=$objp->id; + $contrat->ref=$objp->ref; + print $contrat->getNomUrl(1); + print "'.dolibarr_print_date($objp->dc)." '.$contratstatic->LibStatut($objp->statut,5)."'; + $contrat->fetch_lignes(); + print $contrat->getLibStatut(4); + print "