diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 6091915a31b..8707c9d6b14 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -15,15 +15,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/contrat/fiche.php \ingroup contrat \brief Fiche contrat - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -378,9 +376,10 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes') llxHeader('',$langs->trans("ContractCard"),"Contrat"); -$html = new Form($db); +$form = new Form($db); $contratlignestatic=new ContratLigne($db); + /********************************************************************* * * Mode creation @@ -430,71 +429,30 @@ if ($_GET["action"] == 'create') else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$soc->getAvailableDiscounts(); print '. '; - if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); + if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->trans("Currency".$conf->monnaie)); else print $langs->trans("CompanyHasNoAbsoluteDiscount"); print '.'; print ''; // Commercial suivi print ''.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").''; - print ''; + print $form->select_users('','commercial_suivi_id',1,''); + print ''; // Commercial signature print ''.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").''; - print ''; + print $form->select_users('','commercial_signature_id',1,''); + print ''; print ''.$langs->trans("Date").''; - $html->select_date('','','','','',"contrat"); + $form->select_date('','','','','',"contrat"); print ""; if ($conf->projet->enabled) { print ''.$langs->trans("Project").''; $proj = new Project($db); - $html->select_array("projetid",$proj->liste_array($soc->id),0,1); + $form->select_array("projetid",$proj->liste_array($soc->id),0,1); print ""; } @@ -632,7 +590,7 @@ else */ if ($_GET["action"] == 'delete') { - $html->form_confirm("fiche.php?id=$id",$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete"); + $form->form_confirm("fiche.php?id=$id",$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete"); print '
'; } @@ -642,7 +600,7 @@ else if ($_GET["action"] == 'valid') { //$numfa = contrat_get_num($soc); - $html->form_confirm("fiche.php?id=$id",$langs->trans("ValidateAContract"),$langs->trans("ConfirmValidateContract"),"confirm_valid"); + $form->form_confirm("fiche.php?id=$id",$langs->trans("ValidateAContract"),$langs->trans("ConfirmValidateContract"),"confirm_valid"); print '
'; } @@ -651,7 +609,7 @@ else */ if ($_GET["action"] == 'close') { - $html->form_confirm("fiche.php?id=$id",$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close"); + $form->form_confirm("fiche.php?id=$id",$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close"); print '
'; } @@ -708,11 +666,11 @@ else print ''; if ($_GET["action"] == "classer") { - $html->form_project("fiche.php?id=$id",$contrat->socid,$contrat->fk_projet,"projetid"); + $form->form_project("fiche.php?id=$id",$contrat->socid,$contrat->fk_projet,"projetid"); } else { - $html->form_project("fiche.php?id=$id",$contrat->socid,$contrat->fk_projet,"none"); + $form->form_project("fiche.php?id=$id",$contrat->socid,$contrat->fk_projet,"none"); } print ""; } @@ -896,7 +854,7 @@ else } print ''; print ''; - print $html->select_tva("eltva_tx",$objp->tva_tx,$mysoc,$contrat->societe); + print $form->select_tva("eltva_tx",$objp->tva_tx,$mysoc,$contrat->societe); print ''; print ''; print ''; @@ -904,23 +862,23 @@ else print ''; print '
'; print ''; - // Ligne dates pr�vues + // Ligne dates prevues print ""; print ''; print $langs->trans("DateStartPlanned").' '; - $html->select_date($objp->date_debut,"date_start_update",0,0,($objp->date_debut>0?0:1),"update"); + $form->select_date($objp->date_debut,"date_start_update",0,0,($objp->date_debut>0?0:1),"update"); print '   '.$langs->trans("DateEndPlanned").' '; - $html->select_date($objp->date_fin,"date_end_update",0,0,($objp->date_fin>0?0:1),"update"); + $form->select_date($objp->date_fin,"date_end_update",0,0,($objp->date_fin>0?0:1),"update"); if ($objp->statut >= 4) { print '
'; print $langs->trans("DateStartReal").' '; - $html->select_date($objp->date_debut_reelle,"date_start_real_update",0,0,($objp->date_debut_reelle>0?0:1),"update"); + $form->select_date($objp->date_debut_reelle,"date_start_real_update",0,0,($objp->date_debut_reelle>0?0:1),"update"); print '   '; if ($objp->statut == 5) { print $langs->trans("DateEndReal").' '; - $html->select_date($objp->date_fin_reelle,"date_end_real_update",0,0,($objp->date_fin_reelle>0?0:1),"update"); + $form->select_date($objp->date_fin_reelle,"date_end_real_update",0,0,($objp->date_fin_reelle>0?0:1),"update"); } } print ''; @@ -955,7 +913,7 @@ else $var=false; - // Service sur produit pr�d�fini + // Service sur produit predefini print '
'; print ''; print ''; @@ -965,9 +923,9 @@ else print ''; // multiprix if($conf->global->PRODUIT_MULTIPRICES == 1) - $html->select_produits('','p_idprod','',$conf->produit->limit_size,$contrat->societe->price_level); + $form->select_produits('','p_idprod','',$conf->produit->limit_size,$contrat->societe->price_level); else - $html->select_produits('','p_idprod','',$conf->produit->limit_size); + $form->select_produits('','p_idprod','',$conf->produit->limit_size); if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; print ''; print ''; @@ -980,9 +938,9 @@ else print ""; print ''; print $langs->trans("DateStartPlanned").' '; - $html->select_date('',"date_start",0,0,1,"addligne"); + $form->select_date('',"date_start",0,0,1,"addligne"); print '   '.$langs->trans("DateEndPlanned").' '; - $html->select_date('',"date_end",0,0,1,"addligne"); + $form->select_date('',"date_end",0,0,1,"addligne"); print ''; print ''; @@ -1000,7 +958,7 @@ else print ''; print ''; - $html->select_tva("tva_tx",$conf->defaulttx,$mysoc,$contrat->societe); + $form->select_tva("tva_tx",$conf->defaulttx,$mysoc,$contrat->societe); print ''; print ''; print ''; @@ -1012,9 +970,9 @@ else print ""; print ''; print $langs->trans("DateStartPlanned").' '; - $html->select_date('',"date_start_sl",0,0,1,"addligne_sl"); + $form->select_date('',"date_start_sl",0,0,1,"addligne_sl"); print '   '.$langs->trans("DateEndPlanned").' '; - $html->select_date('',"date_end_sl",0,0,1,"addligne_sl"); + $form->select_date('',"date_end_sl",0,0,1,"addligne_sl"); print ''; print '';