diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index 11c43a011d8..15ca95d0a14 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -46,7 +46,7 @@ class Contrat extends CommonObject var $ref; var $socid; var $societe; // Objet societe - + var $statut=0; // 0=Draft, var $product; var $user_author; @@ -66,8 +66,8 @@ class Contrat extends CommonObject var $fk_projet; - var $statuts=array(); - + var $lignes=array(); + /** * \brief Constructeur de la classe @@ -82,11 +82,6 @@ class Contrat extends CommonObject $this->societe = new Societe($DB); $this->user_service = new User($DB); $this->user_cloture = new User($DB); - - // Statut 0=ouvert, 1=actif, 2=clotur� - $this->statuts[0]=$langs->trans("Draft"); - $this->statuts[1]=$langs->trans("Validated"); - $this->statuts[2]=$langs->trans("Closed"); } /** @@ -344,9 +339,11 @@ class Contrat extends CommonObject */ function fetch_lignes() { - $this->lignes = array(); - - // Selectionne les lignes contrats li�es � un produit + $this->nbofserviceswait=0; + $this->nbofservicesopened=0; + $this->nbofservicesclosed=0; + + // Selectionne les lignes contrats liees a un produit $sql = "SELECT p.label, p.description as product_desc, p.ref,"; $sql.= " d.rowid, d.statut, d.description, d.price_ht, d.tva_tx, d.qty, d.remise_percent, d.subprice,"; $sql.= " d.info_bits, d.fk_product,"; @@ -391,6 +388,11 @@ class Contrat extends CommonObject $this->lignes[] = $ligne; //dolibarr_syslog("1 ".$ligne->desc); //dolibarr_syslog("2 ".$ligne->product_desc); + + if ($ligne->statut == 0) $this->nbofserviceswait++; + if ($ligne->statut == 4) $this->nbofservicesopened++; + if ($ligne->statut == 5) $this->nbofservicesclosed++; + $i++; } $this->db->free($result); @@ -401,7 +403,7 @@ class Contrat extends CommonObject return -3; } - // Selectionne les lignes contrat li�es � aucun produit + // Selectionne les lignes contrat liees a aucun produit $sql = "SELECT d.rowid, d.statut, d.qty, d.description, d.price_ht, d.subprice, d.tva_tx, d.rowid, d.remise_percent,"; $sql.= " d.date_ouverture_prevue, d.date_ouverture,"; $sql.= " d.date_fin_validite, d.date_cloture"; @@ -413,9 +415,9 @@ class Contrat extends CommonObject if ($result) { $num = $this->db->num_rows($result); - $j = 0; + $i = 0; - while ($j < $num) + while ($i < $num) { $objp = $this->db->fetch_object($result); $ligne = new ContratLigne($this->db); @@ -436,9 +438,12 @@ class Contrat extends CommonObject $ligne->date_fin_prevue = $objp->date_fin_validite; $ligne->date_fin_reel = $objp->date_cloture; + if ($ligne->statut == 0) $this->nbofserviceswait++; + if ($ligne->statut == 4) $this->nbofservicesopened++; + if ($ligne->statut == 5) $this->nbofservicesclosed++; + $this->lignes[] = $ligne; $i++; - $j++; } $this->db->free($result); @@ -450,19 +455,21 @@ class Contrat extends CommonObject return -2; } + $this->nbofservices=sizeof($this->lignes); + return $this->lignes; } /** - * \brief Cr�e un contrat vierge en base - * \param user Utilisateur qui cr�e + * \brief Cree un contrat vierge en base + * \param user Utilisateur qui cree * \param langs Environnement langue de l'utilisateur - * \param conf Environnement de configuration lors de l'op�ration - * \return int <0 si erreur, id contrat cr�� sinon + * \param conf Environnement de configuration lors de l'operation + * \return int <0 si erreur, id contrat cre sinon */ function create($user,$langs='',$conf='') { - // Controle validit� des param�tres + // Check parameters $paramsok=1; if ($this->commercial_signature_id <= 0) { @@ -481,14 +488,14 @@ class Contrat extends CommonObject $this->db->begin(); - // Ins�re contrat + // Insert contract $sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (datec, fk_soc, fk_user_author, date_contrat"; -// $sql.= ", fk_commercial_signature, fk_commercial_suivi"; + $sql.= ", fk_commercial_signature, fk_commercial_suivi"; $sql.= " , ref)"; $sql.= " VALUES (now(),".$this->socid.",".$user->id; $sql.= ",".$this->db->idate($this->date_contrat); -// $sql.= ",".($this->commercial_signature_id>=0?$this->commercial_signature_id:"null"); -// $sql.= ",".($this->commercial_suivi_id>=0?$this->commercial_suivi_id:"null"); + $sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL"); + $sql.= ",".($this->commercial_suivi_id>0?$this->commercial_suivi_id:"NULL"); $sql .= ", " . (strlen($this->ref)<=0 ? "null" : "'".$this->ref."'"); $sql.= ")"; $resql=$this->db->query($sql); @@ -737,7 +744,7 @@ class Contrat extends CommonObject $resql=$this->db->query($sql); if ($resql) { - $result=$this->update_price(); + $result=$this->update_statut(); if ($result > 0) { $this->db->commit(); @@ -766,17 +773,17 @@ class Contrat extends CommonObject } /** - * \brief Mets � jour une ligne de contrat + * \brief Mets a jour une ligne de contrat * \param rowid Id de la ligne de facture * \param desc Description de la ligne * \param pu Prix unitaire - * \param qty Quantit� + * \param qty Quantite * \param remise_percent Pourcentage de remise de la ligne - * \param date_start Date de debut pr�vue - * \param date_end Date de fin pr�vue + * \param date_start Date de debut prevue + * \param date_end Date de fin prevue * \param tvatx Taux TVA - * \param date_debut_reel Date de debut r�elle - * \param date_fin_reel Date de fin r�elle + * \param date_debut_reel Date de debut reelle + * \param date_fin_reel Date de fin reelle * \return int < 0 si erreur, > 0 si ok */ function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, @@ -827,7 +834,7 @@ class Contrat extends CommonObject $result = $this->db->query($sql); if ($result) { - $result=$this->update_price(); + $result=$this->update_statut(); if ($result >= 0) { $this->db->commit(); @@ -891,19 +898,30 @@ class Contrat extends CommonObject /** - * \brief Mets a jour le prix total du contrat + * \brief Update statut of contract according to services * \return int <0 si ko, >0 si ok */ - function update_price() + function update_statut() { - // Function empty because there is no total in contract parent table + // If draft, we keep it (should not happen) + if ($this->statut == 0) return 1; + + // Load $this->lignes array +// $this->fetch_lignes(); + + $newstatut=1; + foreach($this->lignes as $key => $contractline) + { +// if ($contractline) // Loop on each service + } + return 1; } /** - * \brief Retourne le libell� du statut du contrat - * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto + * \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� */ function getLibStatut($mode) @@ -912,10 +930,10 @@ class Contrat extends CommonObject } /** - * \brief Renvoi le libell� d'un statut donn� + * \brief Renvoi le libelle d'un statut donne * \param statut id statut - * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� 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 Libelle */ function LibStatut($statut,$mode) { @@ -923,9 +941,9 @@ class Contrat extends CommonObject $langs->load("contracts"); if ($mode == 0) { - if ($statut == 0) { return $langs->trans("ContractStatusDraft"); } - if ($statut == 1) { return $langs->trans("ContractStatusValidated"); } - if ($statut == 2) { return $langs->trans("ContractStatusClosed"); } + if ($statut == 0) { return $langs->trans("ContractStatusDraft").$text; } + if ($statut == 1) { return $langs->trans("ContractStatusValidated").$text; } + if ($statut == 2) { return $langs->trans("ContractStatusClosed").$text; } } if ($mode == 1) { @@ -947,7 +965,16 @@ class Contrat extends CommonObject } if ($mode == 4) { - if ($statut == 0) { return img_picto($langs->trans('ContractStatusDraft'),'statut0').' '.$langs->trans("ContractStatusDraft"); } + $line=new ContratLigne($this->db); + $text=($this->nbofserviceswait+$this->nbofservicesopened+$this->nbofservicesclosed); + $text.=' '.$langs->trans("Services"); + $text.=':     '; + $text.=$this->nbofserviceswait.' '.$line->LibStatut(0,3).'   '; + $text.=$this->nbofservicesopened.' '.$line->LibStatut(4,3).'   '; + $text.=$this->nbofservicesclosed.' '.$line->LibStatut(5,3); + return $text; + + if ($statut == 0) { return img_picto($langs->trans('ContractStatusDraft'),'statut0').' '.$langs->trans("ContractStatusDraft"); } if ($statut == 1) { return img_picto($langs->trans('ContractStatusValidated'),'statut4').' '.$langs->trans("ContractStatusValidated"); } if ($statut == 2) { return img_picto($langs->trans('ContractStatusClosed'),'statut6').' '.$langs->trans("ContractStatusClosed"); } } @@ -960,7 +987,34 @@ class Contrat extends CommonObject } - /* + /** + \brief Renvoie nom clicable (avec eventuellement le picto) + \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul + \param option Sur quoi pointe le lien + \return string Chaine avec URL + */ + function getNomUrl($withpicto=0,$option='') + { + global $langs; + + $result=''; + + $lien = ''; + $lienfin=''; + + $picto='bill'; + if ($this->type == 1) $picto.='r'; + if ($this->type == 2) $picto.='a'; + + $label=$langs->trans("ShowContract").': '.$this->ref; + + if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); + if ($withpicto && $withpicto != 2) $result.=' '; + if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin; + return $result; + } + + /* * \brief Charge les informations d'ordre info dans l'objet contrat * \param id id du contrat a charger */ @@ -1138,7 +1192,7 @@ class ContratLigne var $tms; var $fk_contrat; var $fk_product; - var $statut; // 4 active, 5 closed + var $statut; // 0 inactive, 4 active, 5 closed var $label; var $description; var $date_commande; @@ -1173,15 +1227,10 @@ class ContratLigne } - function is_activated() - { - return $this->statut == 4 ; - } - /** - * \brief Retourne le libell� du statut du contrat - * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto - * \return string Libell� + * \brief Retourne le libelle du statut de la ligne de contrat + * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * \return string Libelle */ function getLibStatut($mode) { @@ -1189,10 +1238,10 @@ class ContratLigne } /** - * \brief Renvoi le libell� d'un statut donn� + * \brief Renvoi le libelle d'un statut donne * \param statut id statut - * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� 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 Libelle */ function LibStatut($statut,$mode) { @@ -1331,12 +1380,12 @@ class ContratLigne /* - * \brief Update database + * \brief Update database for contract line * \param user User that modify * \param notrigger 0=no, 1=yes (no update trigger) * \return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user, $notrigger=0) { global $conf, $langs; @@ -1388,16 +1437,22 @@ class ContratLigne $sql.= " total_tva='".$this->total_tva."',"; $sql.= " total_ttc='".$this->total_ttc."',"; $sql.= " info_bits='".$this->info_bits."',"; - $sql.= " fk_user_author='".$this->fk_user_author."',"; - $sql.= " fk_user_ouverture='".$this->fk_user_ouverture."',"; - $sql.= " fk_user_cloture='".$this->fk_user_cloture."',"; + $sql.= " fk_user_author=".($this->fk_user_author >= 0?$this->fk_user_author:"NULL").","; + $sql.= " fk_user_ouverture=".($this->fk_user_ouverture > 0?$this->fk_user_ouverture:"NULL").","; + $sql.= " fk_user_cloture=".($this->fk_user_cloture > 0?$this->fk_user_cloture:"NULL").","; $sql.= " commentaire='".addslashes($this->commentaire)."'"; $sql.= " WHERE rowid=".$this->id; dolibarr_syslog("Contratdet::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - if (! $resql) + if ($resql) { + $contrat=new Contrat($this->db); + $contrat->fetch($this->fk_contrat); + $result=$contrat->update_statut(); + } + else + { $this->error="Error ".$this->db->lasterror(); dolibarr_syslog("Contratdet::update ".$this->error, LOG_ERR); return -1; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 7de847ebc67..cbbcc135d4a 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -589,6 +589,8 @@ else if ($mesg) print $mesg; + $nbofservices=sizeof($contrat->lignes); + $author = new User($db); $author->id = $contrat->user_author_id; $author->fetch(); @@ -669,7 +671,8 @@ else // Statut contrat print ''.$langs->trans("Status").''; - print $contrat->getLibStatut(2); + if ($contrat->statut==0) print $contrat->getLibStatut(2); + else print $contrat->getLibStatut(4); print ""; // Date @@ -708,7 +711,6 @@ else echo '
'; $servicepos=(isset($_REQUEST["servicepos"])?$_REQUEST["servicepos"]:1); - $nbofservices=sizeof($contrat->lignes); $colorb='333333'; /* @@ -1202,12 +1204,18 @@ else else print ''.$langs->trans("CreateBill").''; } - $numclos=$contrat->array_detail(5); // Tableau des lignes au statut clos - if ($contrat->statut == 1 && $nbofservices == sizeof($numclos)) + if ($contrat->nbofservicesclosed < $nbofservices) { - print ''.$langs->trans("Close").''; + //if (! $numactive) + //{ + print ''.$langs->trans("CloseAllContracts").''; + //} + //else + //{ + // print ''.$langs->trans("Close").''; + //} } - + // On peut supprimer entite si // - Droit de creer + mode brouillon (erreur creation) // - Droit de supprimer diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 46de4e5024c..fdb8cd5e73c 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -87,6 +87,73 @@ print $staticcontratligne->LibStatut(5,4).'
'; print ''; print ''; +/** + * Draft contratcs + */ +if ($conf->contrat->enabled && $user->rights->contrat->lire) +{ + $sql = "SELECT c.rowid as ref, c.rowid,"; + $sql.= " s.nom, s.rowid as socid"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; + $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE s.rowid = c.fk_soc AND c.statut = 0"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + + if ($socid) + { + $sql .= " AND f.fk_soc = ".$socid; + } + + $resql = $db->query($sql); + + if ( $resql ) + { + $var = false; + $num = $db->num_rows($resql); + + print '
'; + print ''; + print ''; + print ''; + if ($num) + { + $companystatic=new Societe($db); + + $i = 0; + $tot_ttc = 0; + while ($i < $num && $i < 20) + { + $obj = $db->fetch_object($resql); + print ''; + print ''; + print ''; + $tot_ttc+=$obj->total_ttc; + $i++; + $var=!$var; + } + } + else + { + print ''; + } + print "
'.$langs->trans("DraftContracts").($num?' ('.$num.')':'').'
'; + $staticcontrat->ref=$obj->ref; + $staticcontrat->id=$obj->rowid; + print $staticcontrat->getNomUrl(1,''); + print ''; + $companystatic->id=$obj->socid; + $companystatic->nom=$obj->nom; + $companystatic->client=1; + print $companystatic->getNomUrl(1,'',16); + print '
'.$langs->trans("NoContracts").'

"; + $db->free($resql); + } + else + { + dolibarr_print_error($db); + } +} print ''; @@ -104,12 +171,12 @@ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; $sql.= " ".MAIN_DB_PREFIX."contrat as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; -$sql.= " WHERE c.fk_soc = s.rowid "; +$sql.= " WHERE c.fk_soc = s.rowid AND c.statut > 0"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid > 0) $sql .= " AND s.rowid = ".$socid; $sql.= " GROUP BY c.rowid, c.datec, c.statut, s.nom, s.rowid"; -$sql.= " ORDER BY c.datec DESC"; -$sql.= " LIMIT $max"; +$sql.= " ORDER BY c.tms DESC"; +$sql.= " LIMIT ".$max; $result=$db->query($sql); if ($result) @@ -121,7 +188,7 @@ if ($result) print ''.$langs->trans("LastContracts",5).''; print ''.$langs->trans("DateCreation").''; - print ''.$langs->trans("Status").''; + //print ''.$langs->trans("Status").''; print ''.$langs->trans("Services").''; print "\n"; @@ -139,7 +206,7 @@ if ($result) print ''; print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''; print ''.dolibarr_print_date($obj->datec).''; - print ''.$staticcontrat->LibStatut($obj->statut,2).''; + //print ''.$staticcontrat->LibStatut($obj->statut,2).''; print ''.($obj->nb_initial>0 ? $obj->nb_initial.$staticcontratligne->LibStatut(0,3):'').''; print ''.($obj->nb_running+$obj->nb_late>0 ? ($obj->nb_running+$obj->nb_late).$staticcontratligne->LibStatut(4,3):'').''; print ''.($obj->nb_closed>0 ? $obj->nb_closed.$staticcontratligne->LibStatut(5,3):'').''; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index 6009776f7af..50274b7dc72 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ $sql.= ' sum('.$db->ifsql("cd.statut=0",1,0).') as nb_initial,'; $sql.= ' sum('.$db->ifsql("cd.statut=4 AND cd.date_fin_validite > sysdate()",1,0).') as nb_running,'; $sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite <= sysdate())",1,0).') as nb_late,'; $sql.= ' sum('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,'; -$sql.= " c.rowid as cid, c.ref, c.datec, c.statut, s.nom, s.rowid as socid"; +$sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut, s.nom, s.rowid as socid"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; @@ -98,8 +98,9 @@ if ($resql) $param.='&search_nom='.$search_nom; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'width="50"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","$param","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder); print ''.$staticcontratligne->LibStatut(0,3).''; print ''.$staticcontratligne->LibStatut(4,3).''; print ''.$staticcontratligne->LibStatut(5,3).''; @@ -114,7 +115,7 @@ if ($resql) print ''; print ''; print ' '; - print ' '; + //print ' '; print ''; print ""; print "\n"; @@ -132,8 +133,9 @@ if ($resql) if ($obj->nb_late) print img_warning($langs->trans("Late")); print ''; print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''; - print ''.dolibarr_print_date($obj->datec).''; - print ''.$staticcontrat->LibStatut($obj->statut,3).''; + //print ''.dolibarr_print_date($obj->datec).''; + print ''.dolibarr_print_date($obj->date_contrat).''; + //print ''.$staticcontrat->LibStatut($obj->statut,3).''; print ''.($obj->nb_initial>0?$obj->nb_initial:'').''; print ''.($obj->nb_running+$obj->nb_late>0?$obj->nb_running+$obj->nb_late:'').''; print ''.($obj->nb_closed>0?$obj->nb_closed:'').''; diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index 941fbcb0631..655b483aa8f 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -1,7 +1,7 @@ # Dolibarr language file - en_US - contracts ContractsArea=Contracts area ListOfContracts=List of contracts -LastContracts=Last %s contracts +LastContracts=Last %s modified contracts AllContracts=All contracts ContractCard=Contract card ContractStatus=Contract status @@ -30,11 +30,12 @@ DeleteAContract=Delete a contract CloseAContract=Close a contract ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? ConfirmValidateContract=Are you sure you want to validate this contract ? -ConfirmCloseContract=Are you sure you want to close this contract ? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? ConfirmCloseService=Are you sure you want to close this service with date %s ? ValidateAContract=Validate a contract ActivateService=Activate service ConfirmActivateService=Are you sure you want to activate this service with date of %s ? +DateContract=Contract date DateServiceActivate=Date of service activation DateServiceUnactivate=Date of service unactivation DateServiceStart=Date for beginning of service @@ -65,6 +66,9 @@ ServicesNomberShort=%s service(s) RunningServices=Running services BoardRunningServices=Expired running services ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it +CloseAllContracts=Close all contracts ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract diff --git a/htdocs/langs/fr_FR/contracts.lang b/htdocs/langs/fr_FR/contracts.lang index 3cc56352bbe..7898f8bf5e9 100644 --- a/htdocs/langs/fr_FR/contracts.lang +++ b/htdocs/langs/fr_FR/contracts.lang @@ -1,7 +1,7 @@ # Dolibarr language file - fr_FR - contracts ContractsArea=Espace contrats ListOfContracts=Liste des contrats -LastContracts=Les %s derniers contrats +LastContracts=Les %s derniers contrats modifiés AllContracts=Tous les contrats ContractCard=Fiche contrat ContractStatus=État du contrat @@ -30,11 +30,12 @@ DeleteAContract=Supprimer un contract CloseAContract=Cloturer un contract ConfirmDeleteAContract=Etes-vous sûr de vouloir supprimer ce contrat et tous ses services ? ConfirmValidateContract=Etes-vous sûr de vouloir valider ce contrat ? -ConfirmCloseContract=Etes-vous sûr de vouloir cloturer ce contrat ? +ConfirmCloseContract=Ceci fermera tous les services actifs et inactifs. Etes-vous sûr de vouloir cloturer ce contrat ? ConfirmCloseService=Etes-vous sûr de vouloir fermer ce service à la date du %s ? ValidateAContract=Valider un contrat ActivateService=Activer le service ConfirmActivateService=Etes-vous sûr de vouloir activer ce service en date du %s ? +DateContract=Date contrat DateServiceActivate=Date activation du service DateServiceUnactivate=Date désactivation du service DateServiceStart=Date début du service @@ -65,6 +66,9 @@ ServicesNomberShort=%s service(s) RunningServices=Services actifs BoardRunningServices=Services actifs expirés ServiceStatus=Statut du service +DraftContracts=Contrats brouillons +CloseRefusedBecauseOneServiceActive=Fermeture du contrat impossible car il y a au moins un service actif +CloseAllContracts=Tout clôturer ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Commercial signataire du contrat TypeContact_contrat_internal_SALESREPFOLL=Commercial suivi du contrat