diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 7206dc532a5..a2f8e54bf6b 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1350,10 +1350,10 @@ else print ''; } - print ''; - $linkback = ''.$langs->trans("BackToList").''; + print '
'; + print ''; print ''; print '
'.$langs->trans("User").''; @@ -1564,12 +1564,6 @@ else print ''; - // Ref - /* - print '';*/ - // Author print ''; print ''; @@ -1586,7 +1580,7 @@ else print ''; print ''; print ''; print ''; if (! empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) @@ -1596,13 +1590,6 @@ else print ''; print ''; } - // Status - /* - print ''; - print ''; - print ''; - print ''; - */ // Amount print ''; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index d0dc205fc0e..e8e4d3b9c12 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -54,7 +54,7 @@ $now=dol_now(); // If create a request if ($action == 'create') { - $cp = new Holiday($db); + $object = new Holiday($db); // If no right to create a request if (($userid == $user->id && empty($user->rights->holiday->write)) || ($userid != $user->id && empty($user->rights->holiday->write_all))) @@ -115,7 +115,7 @@ if ($action == 'create') } // Check if there is already holiday for this period - $verifCP = $cp->verifDateHolidayCP($userID, $date_debut, $date_fin, $halfday); + $verifCP = $object->verifDateHolidayCP($userID, $date_debut, $date_fin, $halfday); if (! $verifCP) { setEventMessages($langs->trans("alreadyCPexist"), null, 'errors'); @@ -145,15 +145,15 @@ if ($action == 'create') if (! $error) { - $cp->fk_user = $userid; - $cp->description = $description; - $cp->date_debut = $date_debut; - $cp->date_fin = $date_fin; - $cp->fk_validator = $valideur; - $cp->halfday = $halfday; - $cp->fk_type = $type; + $object->fk_user = $userid; + $object->description = $description; + $object->date_debut = $date_debut; + $object->date_fin = $date_fin; + $object->fk_validator = $valideur; + $object->halfday = $halfday; + $object->fk_type = $type; - $result = $cp->create($user); + $result = $object->create($user); } // If no SQL error we redirect to the request card @@ -161,7 +161,7 @@ if ($action == 'create') { $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -191,13 +191,13 @@ if ($action == 'update') exit; } - $cp = new Holiday($db); - $cp->fetch($id); + $object = new Holiday($db); + $object->fetch($id); - $canedit=(($user->id == $cp->fk_user && $user->rights->holiday->write) || ($user->id != $cp->fk_user && $user->rights->holiday->write_all)); + $canedit=(($user->id == $object->fk_user && $user->rights->holiday->write) || ($user->id != $object->fk_user && $user->rights->holiday->write_all)); // If under validation - if ($cp->statut == 1) + if ($object->statut == 1) { // If this is the requestor or has read/write rights if ($canedit) @@ -207,25 +207,25 @@ if ($action == 'update') // If no start date if (empty($_POST['date_debut_'])) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&action=edit&error=nodatedebut'); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=nodatedebut'); exit; } // If no end date if (empty($_POST['date_fin_'])) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&action=edit&error=nodatefin'); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=nodatefin'); exit; } // If start date after end date if ($date_debut > $date_fin) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&action=edit&error=datefin'); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=datefin'); exit; } // If no validator designated if ($valideur < 1) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&action=edit&error=Valideur'); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=Valideur'); exit; } @@ -233,32 +233,32 @@ if ($action == 'update') $nbopenedday=num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); if ($nbopenedday < 0.5) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&action=edit&error=DureeHoliday'); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=DureeHoliday'); exit; } - $cp->description = $description; - $cp->date_debut = $date_debut; - $cp->date_fin = $date_fin; - $cp->fk_validator = $valideur; - $cp->halfday = $halfday; + $object->description = $description; + $object->date_debut = $date_debut; + $object->date_fin = $date_fin; + $object->fk_validator = $valideur; + $object->halfday = $halfday; // Update - $verif = $cp->update($user->id); + $verif = $object->update($user->id); if ($verif > 0) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { // Otherwise we display the request form with the SQL error message - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&action=edit&error=SQL_Create&msg='.$cp->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=SQL_Create&msg='.$object->error); exit; } } } else { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } } @@ -270,18 +270,18 @@ if ($action == 'confirm_delete' && GETPOST('confirm') == 'yes' && $user->rights- $db->begin(); - $cp = new Holiday($db); - $cp->fetch($id); + $object = new Holiday($db); + $object->fetch($id); - $canedit=(($user->id == $cp->fk_user && $user->rights->holiday->write) || ($user->id != $cp->fk_user && $user->rights->holiday->write_all)); + $canedit=(($user->id == $object->fk_user && $user->rights->holiday->write) || ($user->id != $object->fk_user && $user->rights->holiday->write_all)); // If this is a rough draft - if ($cp->statut == 1 || $cp->statut == 3) + if ($object->statut == 1 || $object->statut == 3) { // Si l'utilisateur à le droit de lire cette demande, il peut la supprimer if ($canedit) { - $result=$cp->delete($cp->id); + $result=$object->delete($object->id); } else { @@ -304,36 +304,36 @@ if ($action == 'confirm_delete' && GETPOST('confirm') == 'yes' && $user->rights- // Si envoi de la demande if ($action == 'confirm_send') { - $cp = new Holiday($db); - $cp->fetch($id); + $object = new Holiday($db); + $object->fetch($id); - $canedit=(($user->id == $cp->fk_user && $user->rights->holiday->write) || ($user->id != $cp->fk_user && $user->rights->holiday->write_all)); + $canedit=(($user->id == $object->fk_user && $user->rights->holiday->write) || ($user->id != $object->fk_user && $user->rights->holiday->write_all)); // Si brouillon et créateur - if($cp->statut == 1 && $canedit) + if($object->statut == 1 && $canedit) { - $cp->statut = 2; + $object->statut = 2; - $verif = $cp->update($user->id); + $verif = $object->update($user->id); // Si pas d'erreur SQL on redirige vers la fiche de la demande if ($verif > 0) { // To $destinataire = new User($db); - $destinataire->fetch($cp->fk_validator); + $destinataire->fetch($object->fk_validator); $emailTo = $destinataire->email; if (!$emailTo) { dol_syslog("Expected validator has no email, so we redirect directly to finished page without sending email"); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } // From $expediteur = new User($db); - $expediteur->fetch($cp->fk_user); + $expediteur->fetch($object->fk_user); $emailFrom = $expediteur->email; // Subject @@ -347,26 +347,26 @@ if ($action == 'confirm_send') $message.= "\n"; $message.= $langs->transnoentities("HolidaysToValidateBody")."\n"; - $delayForRequest = $cp->getConfCP('delayForRequest'); + $delayForRequest = $object->getConfCP('delayForRequest'); //$delayForRequest = $delayForRequest * (60*60*24); $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); // Si l'option pour avertir le valideur en cas de délai trop court - if($cp->getConfCP('AlertValidatorDelay')) + if($object->getConfCP('AlertValidatorDelay')) { - if($cp->date_debut < $nextMonth) + if($object->date_debut < $nextMonth) { $message.= "\n"; - $message.= $langs->transnoentities("HolidaysToValidateDelay",$cp->getConfCP('delayForRequest'))."\n"; + $message.= $langs->transnoentities("HolidaysToValidateDelay",$object->getConfCP('delayForRequest'))."\n"; } } // Si l'option pour avertir le valideur en cas de solde inférieur à la demande - if ($cp->getConfCP('AlertValidatorSolde')) + if ($object->getConfCP('AlertValidatorSolde')) { - $nbopenedday=num_open_day($cp->date_debut_gmt,$cp->date_fin_gmt,0,1,$cp->halfday); - if ($nbopenedday > $cp->getCPforUser($cp->fk_user, $cp->fk_type)) + $nbopenedday=num_open_day($object->date_debut_gmt,$object->date_fin_gmt,0,1,$object->halfday); + if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) { $message.= "\n"; $message.= $langs->transnoentities("HolidaysToValidateAlertSolde")."\n"; @@ -375,8 +375,8 @@ if ($action == 'confirm_send') $message.= "\n"; $message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->id."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin,'day')."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -386,16 +386,16 @@ if ($action == 'confirm_send') if (!$result) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=mail&error_content='.$mail->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=mail&error_content='.$mail->error); exit; } - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=SQL_Create&msg='.$cp->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=SQL_Create&msg='.$object->error); exit; } } @@ -405,48 +405,48 @@ if ($action == 'confirm_send') // Si Validation de la demande if ($action == 'confirm_valid') { - $cp = new Holiday($db); - $cp->fetch($id); + $object = new Holiday($db); + $object->fetch($id); // Si statut en attente de validation et valideur = utilisateur - if ($cp->statut == 2 && $user->id == $cp->fk_validator) + if ($object->statut == 2 && $user->id == $object->fk_validator) { - $cp->date_valid = dol_now(); - $cp->fk_user_valid = $user->id; - $cp->statut = 3; + $object->date_valid = dol_now(); + $object->fk_user_valid = $user->id; + $object->statut = 3; - $verif = $cp->update($user->id); + $verif = $object->update($user->id); // Si pas d'erreur SQL on redirige vers la fiche de la demande if ($verif > 0) { // Calculcate number of days consummed - $nbopenedday=num_open_day($cp->date_debut_gmt,$cp->date_fin_gmt,0,1,$cp->halfday); + $nbopenedday=num_open_day($object->date_debut_gmt,$object->date_fin_gmt,0,1,$object->halfday); - $soldeActuel = $cp->getCpforUser($cp->fk_user, $cp->fk_type); - $newSolde = $soldeActuel - ($nbopenedday * $cp->getConfCP('nbHolidayDeducted')); + $soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type); + $newSolde = $soldeActuel - ($nbopenedday * $object->getConfCP('nbHolidayDeducted')); // On ajoute la modification dans le LOG - $cp->addLogCP($user->id, $cp->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $cp->fk_type); + $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type); // Mise à jour du solde - $cp->updateSoldeCP($cp->fk_user, $newSolde, $cp->fk_type); + $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); // To $destinataire = new User($db); - $destinataire->fetch($cp->fk_user); + $destinataire->fetch($object->fk_user); $emailTo = $destinataire->email; if (!$emailTo) { dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } // From $expediteur = new User($db); - $expediteur->fetch($cp->fk_validator); + $expediteur->fetch($object->fk_validator); $emailFrom = $expediteur->email; // Subject @@ -458,11 +458,11 @@ if ($action == 'confirm_valid') // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; - $message.= $langs->transnoentities("HolidaysValidatedBody", dol_print_date($cp->date_debut,'day'),dol_print_date($cp->date_fin,'day'))."\n"; + $message.= $langs->transnoentities("HolidaysValidatedBody", dol_print_date($object->date_debut,'day'),dol_print_date($object->date_fin,'day'))."\n"; $message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->id."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -471,15 +471,15 @@ if ($action == 'confirm_valid') $result=$mail->sendfile(); if(!$result) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=mail&error_content='.$mail->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=mail&error_content='.$mail->error); exit; } - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=SQL_Create&msg='.$cp->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=SQL_Create&msg='.$object->error); exit; } @@ -491,36 +491,36 @@ if ($action == 'confirm_refuse') { if (! empty($_POST['detail_refuse'])) { - $cp = new Holiday($db); - $cp->fetch($id); + $object = new Holiday($db); + $object->fetch($id); // Si statut en attente de validation et valideur = utilisateur - if ($cp->statut == 2 && $user->id == $cp->fk_validator) + if ($object->statut == 2 && $user->id == $object->fk_validator) { - $cp->date_refuse = date('Y-m-d H:i:s', time()); - $cp->fk_user_refuse = $user->id; - $cp->statut = 5; - $cp->detail_refuse = $_POST['detail_refuse']; + $object->date_refuse = date('Y-m-d H:i:s', time()); + $object->fk_user_refuse = $user->id; + $object->statut = 5; + $object->detail_refuse = $_POST['detail_refuse']; - $verif = $cp->update($user->id); + $verif = $object->update($user->id); // Si pas d'erreur SQL on redirige vers la fiche de la demande if ($verif > 0) { // To $destinataire = new User($db); - $destinataire->fetch($cp->fk_user); + $destinataire->fetch($object->fk_user); $emailTo = $destinataire->email; if (!$emailTo) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } // From $expediteur = new User($db); - $expediteur->fetch($cp->fk_validator); + $expediteur->fetch($object->fk_validator); $emailFrom = $expediteur->email; // Subject @@ -532,12 +532,12 @@ if ($action == 'confirm_refuse') // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; - $message.= $langs->transnoentities("HolidaysRefusedBody", dol_print_date($cp->date_debut,'day'), dol_print_date($cp->date_fin,'day'))."\n"; + $message.= $langs->transnoentities("HolidaysRefusedBody", dol_print_date($object->date_debut,'day'), dol_print_date($object->date_fin,'day'))."\n"; $message.= GETPOST('detail_refuse','alpha')."\n\n"; $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->id."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -546,22 +546,22 @@ if ($action == 'confirm_refuse') $result=$mail->sendfile(); if(!$result) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=mail&error_content='.$mail->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=mail&error_content='.$mail->error); exit; } - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=SQL_Create&msg='.$cp->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=SQL_Create&msg='.$object->error); exit; } } } else { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=NoMotifRefuse'); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=NoMotifRefuse'); exit; } } @@ -569,34 +569,34 @@ if ($action == 'confirm_refuse') // Si Validation de la demande if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') { - $cp = new Holiday($db); - $cp->fetch($id); + $object = new Holiday($db); + $object->fetch($id); // Si statut en attente de validation et valideur = utilisateur - if (($cp->statut == 2 || $cp->statut == 3) && ($user->id == $cp->fk_validator || $user->id == $cp->fk_user)) + if (($object->statut == 2 || $object->statut == 3) && ($user->id == $object->fk_validator || $user->id == $object->fk_user)) { $db->begin(); - $oldstatus = $cp->statut; - $cp->date_cancel = dol_now(); - $cp->fk_user_cancel = $user->id; - $cp->statut = 4; + $oldstatus = $object->statut; + $object->date_cancel = dol_now(); + $object->fk_user_cancel = $user->id; + $object->statut = 4; - $result = $cp->update($user->id); + $result = $object->update($user->id); if ($result >= 0 && $oldstatus == 3) // holiday was already validated, status 3, so we must increase back sold { // Calculcate number of days consummed - $nbopenedday=num_open_day($cp->date_debut_gmt,$cp->date_fin_gmt,0,1,$cp->halfday); + $nbopenedday=num_open_day($object->date_debut_gmt,$object->date_fin_gmt,0,1,$object->halfday); - $soldeActuel = $cp->getCpforUser($cp->fk_user, $cp->fk_type); - $newSolde = $soldeActuel + ($nbopenedday * $cp->getConfCP('nbHolidayDeducted')); + $soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type); + $newSolde = $soldeActuel + ($nbopenedday * $object->getConfCP('nbHolidayDeducted')); // On ajoute la modification dans le LOG - $result1=$cp->addLogCP($user->id, $cp->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde, $cp->fk_type); + $result1=$object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde, $object->fk_type); // Mise à jour du solde - $result2=$cp->updateSoldeCP($cp->fk_user, $newSolde, $cp->fk_type); + $result2=$object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); if ($result1 < 0 || $result2 < 0) { @@ -618,18 +618,18 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') { // To $destinataire = new User($db); - $destinataire->fetch($cp->fk_user); + $destinataire->fetch($object->fk_user); $emailTo = $destinataire->email; if (!$emailTo) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } // From $expediteur = new User($db); - $expediteur->fetch($cp->fk_user_cancel); + $expediteur->fetch($object->fk_user_cancel); $emailFrom = $expediteur->email; // Subject @@ -642,10 +642,10 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; - $message.= $langs->transnoentities("HolidaysCanceledBody", dol_print_date($cp->date_debut,'day'), dol_print_date($cp->date_fin,'day'))."\n"; + $message.= $langs->transnoentities("HolidaysCanceledBody", dol_print_date($object->date_debut,'day'), dol_print_date($object->date_fin,'day'))."\n"; $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->id."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -655,17 +655,17 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') if(!$result) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=mail&error_content='.$mail->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=mail&error_content='.$mail->error); exit; } - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$cp->id.'&error=SQL_Create&msg='.$cp->error); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=SQL_Create&msg='.$object->error); exit; } @@ -680,7 +680,7 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') */ $form = new Form($db); -$cp = new Holiday($db); +$object = new Holiday($db); $listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon")); @@ -732,7 +732,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create } - $delayForRequest = $cp->getConfCP('delayForRequest'); + $delayForRequest = $object->getConfCP('delayForRequest'); //$delayForRequest = $delayForRequest * (60*60*24); $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); @@ -774,10 +774,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create dol_fiche_head(); $out=''; - $typeleaves=$cp->getTypes(1,1); + $typeleaves=$object->getTypes(1,1); foreach($typeleaves as $key => $val) { - $nb_type = $cp->getCPforUser($user->id, $val['rowid']); + $nb_type = $object->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; $out .= ' - '.$val['label'].': '.($nb_type?price2num($nb_type):0).'
'; } @@ -789,7 +789,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create dol_fiche_head(); - //print ''.$langs->trans('DelayToRequestCP',$cp->getConfCP('delayForRequest')).'

'; + //print ''.$langs->trans('DelayToRequestCP',$object->getConfCP('delayForRequest')).'

'; print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); - print '
'.$langs->trans("User").'
'.$langs->trans("Period").''; - print get_date_range($object->date_debut,$object->date_fin,'',$langs,0); + print get_date_range($object->date_debut,$object->date_fin,'day',$langs,0); print '
'.$object->libelle_paiement.'
'.$langs->trans("Statut").''.$object->getLibStatut(4).'
'; print ''; @@ -811,7 +811,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create print ''; print ''; print '
'.$langs->trans("Type").''; - $typeleaves=$cp->getTypes(1,-1); + $typeleaves=$object->getTypes(1,-1); $arraytypeleaves=array(); foreach($typeleaves as $key => $val) { @@ -900,15 +900,15 @@ else // Affichage de la fiche d'une demande de congés payés if ($id > 0) { - $cp->fetch($id); + $object->fetch($id); - $canedit=(($user->id == $cp->fk_user && $user->rights->holiday->write) || ($user->id != $cp->fk_user && $user->rights->holiday->write_all)); + $canedit=(($user->id == $object->fk_user && $user->rights->holiday->write) || ($user->id != $object->fk_user && $user->rights->holiday->write_all)); $valideur = new User($db); - $valideur->fetch($cp->fk_validator); + $valideur->fetch($object->fk_validator); $userRequest = new User($db); - $userRequest->fetch($cp->fk_user); + $userRequest->fetch($object->fk_user); //print load_fiche_titre($langs->trans('TitreRequestCP')); @@ -956,61 +956,62 @@ else { if ($user->rights->holiday->delete) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); } } // Si envoi en validation - if ($action == 'sendToValidate' && $cp->statut == 1) + if ($action == 'sendToValidate' && $object->statut == 1) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); } // Si validation de la demande if ($action == 'valid') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); } // Si refus de la demande if ($action == 'refuse') { $array_input = array(array('type'=>"text",'label'=> $langs->trans('DetailRefusCP'),'name'=>"detail_refuse",'size'=>"50",'value'=>"")); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); } // Si annulation de la demande if ($action == 'cancel') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cp->id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); } - $head=holiday_prepare_head($cp); + $head=holiday_prepare_head($object); - if ($action == 'edit' && $cp->statut == 1) + if ($action == 'edit' && $object->statut == 1) { $edit = true; - print '
'."\n"; + print ''."\n"; print ''."\n"; - print ''."\n"; + print ''."\n"; } dol_fiche_head($head,'card',$langs->trans("CPTitreMenu"),0,'holiday'); - print ''; + $linkback=''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref'); + + + print '
'; + print '
'; + print '
'; + + print '
'; print ''; - $linkback=''.$langs->trans("BackToList").''; - print ''; - print ''; - print ''; - print ''; - - print ''; + print ''; print ''; @@ -1019,19 +1020,19 @@ else print ''; print ''; print ''; print ''; - $starthalfday=($cp->halfday == -1 || $cp->halfday == 2)?'afternoon':'morning'; - $endhalfday=($cp->halfday == 1 || $cp->halfday == 2)?'morning':'afternoon'; + $starthalfday=($object->halfday == -1 || $object->halfday == 2)?'afternoon':'morning'; + $endhalfday=($object->halfday == 1 || $object->halfday == 2)?'morning':'afternoon'; if(!$edit) { print ''; print ''; - print ''; @@ -1042,7 +1043,7 @@ else print ''; print ''; print ''; @@ -1053,7 +1054,7 @@ else { print ''; print ''; - print ''; @@ -1064,7 +1065,7 @@ else print ''; print ''; print ''; @@ -1072,19 +1073,14 @@ else } print ''; print ''; - print ''; + print ''; print ''; - // Status - print ''; - print ''; - print ''; - print ''; - if ($cp->statut == 5) + if ($object->statut == 5) { print ''; print ''; - print ''; + print ''; print ''; } @@ -1093,84 +1089,92 @@ else { print ''; print ''; - print ''; + print ''; print ''; } else { print ''; print ''; - print ''; + print ''; print ''; } print ''; print '
'.$langs->trans("Ref").''; - print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref'); - print '
'.$langs->trans("User").''.$langs->trans("User").''; print $userRequest->getNomUrl(-1, 'leave'); print '
'.$langs->trans("Type").''; - $typeleaves=$cp->getTypes(1,-1); - print $typeleaves[$cp->fk_type]['label']; + $typeleaves=$object->getTypes(1,-1); + print empty($typeleaves[$object->fk_type]['label']) ? $langs->trans("TypeWasDisabledOrRemoved",$object->fk_type) : $typeleaves[$object->fk_type]['label']; print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'.dol_print_date($cp->date_debut,'day'); + print ''.dol_print_date($object->date_debut,'day'); print '     '; print $langs->trans($listhalfday[$starthalfday]); print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'; - $form->select_date($cp->date_debut,'date_debut_'); + $form->select_date($object->date_debut,'date_debut_'); print '     '; print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'.dol_print_date($cp->date_fin,'day'); + print ''.dol_print_date($object->date_fin,'day'); print '     '; print $langs->trans($listhalfday[$endhalfday]); print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'; - $form->select_date($cp->date_fin,'date_fin_'); + $form->select_date($object->date_fin,'date_fin_'); print '     '; print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print '
'.$langs->trans('NbUseDaysCP').''.num_open_day($cp->date_debut_gmt, $cp->date_fin_gmt, 0, 1, $cp->halfday).''.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).'
'.$langs->trans('StatutCP').''.$cp->getLibStatut(2).'
'.$langs->trans('DetailRefusCP').''.$cp->detail_refuse.''.$object->detail_refuse.'
'.$langs->trans('DescCP').''.nl2br($cp->description).''.nl2br($object->description).'
'.$langs->trans('DescCP').'
'."\n"; - print '

'; - + print ''; + print '
'; + print '
'; + + print '
'; + // Info workflow - print ''."\n"; + print '
'."\n"; print ''; - print ''; - print ''; - print ''; - if (! empty($cp->fk_user_create)) + if (! empty($object->fk_user_create)) { $userCreate=new User($db); - $userCreate->fetch($cp->fk_user_create); + $userCreate->fetch($object->fk_user_create); print ''; - print ''; + print ''; print ''; print ''; } if (!$edit) { print ''; - print ''; + print ''; print ''; print ''; } else { print ''; - print ''; + print ''; print ''; print ''; } print ''; print ''; - print ''; + print ''; print ''; - if ($cp->statut == 3) { + if ($object->statut == 3) { print ''; print ''; - print ''; + print ''; print ''; } - if ($cp->statut == 4) { + if ($object->statut == 4) { print ''; print ''; - print ''; + print ''; print ''; } - if ($cp->statut == 5) { + if ($object->statut == 5) { print ''; print ''; - print ''; + print ''; print ''; } print ''; print '
'.$langs->trans("InfosWorkflowCP").'
'.$langs->trans('RequestByCP').''.$langs->trans('RequestByCP').''.$userCreate->getNomUrl(-1).'
'.$langs->trans('ReviewedByCP').''.$langs->trans('ReviewedByCP').''.$valideur->getNomUrl(-1).'
'.$langs->trans('ReviewedByCP').''.$langs->trans('ReviewedByCP').''; - print $form->select_dolusers($cp->fk_user, "valideur", 1, ($user->admin ? '' : array($user->id))); // By default, hierarchical parent + print $form->select_dolusers($object->fk_user, "valideur", 1, ($user->admin ? '' : array($user->id))); // By default, hierarchical parent print '
'.$langs->trans('DateCreateCP').''.dol_print_date($cp->date_create,'dayhour').''.dol_print_date($object->date_create,'dayhour').'
'.$langs->trans('DateValidCP').''.dol_print_date($cp->date_valid,'dayhour').''.dol_print_date($object->date_valid,'dayhour').'
'.$langs->trans('DateCancelCP').''.dol_print_date($cp->date_cancel,'dayhour').''.dol_print_date($object->date_cancel,'dayhour').'
'.$langs->trans('DateRefusCP').''.dol_print_date($cp->date_refuse,'dayhour').''.dol_print_date($object->date_refuse,'dayhour').'
'; + print '
'; + print '
'; + print ''; + + print '
'; + dol_fiche_end(); - if ($action == 'edit' && $cp->statut == 1) + + if ($action == 'edit' && $object->statut == 1) { print '
'; - if ($canedit && $cp->statut == 1) + if ($canedit && $object->statut == 1) { print ''; } @@ -1185,28 +1189,28 @@ else print '
'; // Boutons d'actions - if ($canedit && $cp->statut == 1) + if ($canedit && $object->statut == 1) { - print ''.$langs->trans("EditCP").''; + print ''.$langs->trans("EditCP").''; } - if ($canedit && $cp->statut == 1) + if ($canedit && $object->statut == 1) { - print ''.$langs->trans("Validate").''; + print ''.$langs->trans("Validate").''; } - if ($user->rights->holiday->delete && $cp->statut == 1) // If draft + if ($user->rights->holiday->delete && $object->statut == 1) // If draft { - print ''.$langs->trans("DeleteCP").''; + print ''.$langs->trans("DeleteCP").''; } - if ($user->id == $cp->fk_validator && $cp->statut == 2) + if ($user->id == $object->fk_validator && $object->statut == 2) { - print ''.$langs->trans("Approve").''; - print ''.$langs->trans("ActionRefuseCP").''; + print ''.$langs->trans("Approve").''; + print ''.$langs->trans("ActionRefuseCP").''; } - if (($user->id == $cp->fk_validator || $user->id == $cp->fk_user) && ($cp->statut == 2 || $cp->statut == 3)) // Status validated or approved + if (($user->id == $object->fk_validator || $user->id == $object->fk_user) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved { - if (($cp->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; + if (($object->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; else print ''.$langs->trans("ActionCancelCP").''; } diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index dc9adcd7725..78bc1582a65 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -36,7 +36,8 @@ class Holiday extends CommonObject public $table_element='holiday'; protected $isnolinkedbythird = 1; // No field fk_soc protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - + public $picto = 'holiday'; + /** * @deprecated * @see id @@ -785,7 +786,17 @@ class Holiday extends CommonObject if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); } - + if ($mode == 6) + { + $pictoapproved='statut6'; + if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; + if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'),'statut0'); // Draft + if ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'),'statut1'); // Waiting approval + if ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'),$pictoapproved); + if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); + if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); + } + return $statut; } diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index edc85ca0060..1d30e33f189 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -108,28 +108,29 @@ if ($object->id) } - print ''; - - $linkback=''.$langs->trans("BackToList").''; - + $linkback=''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref'); + + + print '
'; + //print '
'; + print '
'; + + print '
'; + print ''; - print ''; - print ''; - print ''; - - print ''; - print ''; + print ''; + print ''; // Type print ''; print ''; print ''; print ''; @@ -138,57 +139,52 @@ if ($object->id) if(!$edit) { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; } else { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; } if (!$edit) { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; } else { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; } print ''; print ''; print ''; print ''; - // Status - print ''; - print ''; - print ''; - print ''; if ($object->statut == 5) { print ''; @@ -200,25 +196,93 @@ if ($object->id) // Description if (!$edit) { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; } else { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; } print ''; print ''; + + print ''; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref'); - print '
'.$langs->trans("User").''; - print $userRequest->getNomUrl(-1); - print '
'.$langs->trans("User").''; + print $userRequest->getNomUrl(-1, 'leave'); + print '
'.$langs->trans("Type").''; $typeleaves=$object->getTypes(1,-1); - print $typeleaves[$object->fk_type]['label']; + print empty($typeleaves[$object->fk_type]['label']) ? $langs->trans("TypeWasDisabledOrRemoved",$object->fk_type) : $typeleaves[$object->fk_type]['label']; print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'.dol_print_date($object->date_debut,'day'); - print '     '; - print $langs->trans($listhalfday[$starthalfday]); - print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'.dol_print_date($object->date_debut,'day'); + print '     '; + print $langs->trans($listhalfday[$starthalfday]); + print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'; - $form->select_date($object->date_debut,'date_debut_'); - print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); - print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'; + $form->select_date($object->date_debut,'date_debut_'); + print '     '; + print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); + print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'.dol_print_date($object->date_fin,'day'); - print '     '; - print $langs->trans($listhalfday[$endhalfday]); - print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'.dol_print_date($object->date_fin,'day'); + print '     '; + print $langs->trans($listhalfday[$endhalfday]); + print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'; - $form->select_date($object->date_fin,'date_fin_'); - print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); - print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'; + $form->select_date($object->date_fin,'date_fin_'); + print '     '; + print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); + print '
'.$langs->trans('NbUseDaysCP').''.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).'
'.$langs->trans('StatutCP').''.$object->getLibStatut(2).'
'.$langs->trans('DescCP').''.nl2br($object->description).'
'.$langs->trans('DescCP').''.nl2br($object->description).'
'.$langs->trans('DescCP').'
'.$langs->trans('DescCP').'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'."\n"; +/* + print '
'; + print '
'; + print '
'; + + print '
'; + + // Info workflow + print ''."\n"; + print ''; + if (! empty($object->fk_user_create)) + { + $userCreate=new User($db); + $userCreate->fetch($object->fk_user_create); + print ''; + print ''; + print ''; + print ''; + } + + if (!$edit) { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + print ''; + } + + print ''; + print ''; + print ''; + print ''; + if ($object->statut == 3) { + print ''; + print ''; + print ''; + print ''; + } + if ($object->statut == 4) { + print ''; + print ''; + print ''; + print ''; + } + if ($object->statut == 5) { + print ''; + print ''; + print ''; + print ''; + } + print ''; print '
'.$langs->trans('RequestByCP').''.$userCreate->getNomUrl(-1).'
'.$langs->trans('ReviewedByCP').''.$valideur->getNomUrl(-1).'
'.$langs->trans('ReviewedByCP').''; + print $form->select_dolusers($object->fk_user, "valideur", 1, ($user->admin ? '' : array($user->id))); // By default, hierarchical parent + print '
'.$langs->trans('DateCreateCP').''.dol_print_date($object->date_create,'dayhour').'
'.$langs->trans('DateValidCP').''.dol_print_date($object->date_valid,'dayhour').'
'.$langs->trans('DateCancelCP').''.dol_print_date($object->date_cancel,'dayhour').'
'.$langs->trans('DateRefusCP').''.dol_print_date($object->date_refuse,'dayhour').'
'; + print '
'; + print '
'; */ + print '
'; + + print '
'; + dol_fiche_end(); + + $modulepart = 'holiday'; $permission = $user->rights->holiday->write; diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 38dc854b5f9..7933be96aba 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -78,6 +78,7 @@ ManualUpdate=Manual update HolidaysCancelation=Leave request cancelation EmployeeLastname=Employee lastname EmployeeFirstname=Employee firstname +TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed ## Configuration du Module ## LastUpdateCP=Latest automatic update of leaves allocation diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang index 900b424f3e7..9cb992f6af3 100644 --- a/htdocs/langs/en_US/trips.lang +++ b/htdocs/langs/en_US/trips.lang @@ -59,31 +59,23 @@ DATE_REFUS=Deny date DATE_SAVE=Validation date DATE_CANCEL=Cancelation date DATE_PAIEMENT=Payment date - BROUILLONNER=Reopen ValidateAndSubmit=Validate and submit for approval ValidatedWaitingApproval=Validated (waiting for approval) - NOT_AUTHOR=You are not the author of this expense report. Operation cancelled. - ConfirmRefuseTrip=Are you sure you want to deny this expense report? - ValideTrip=Approve expense report ConfirmValideTrip=Are you sure you want to approve this expense report? - PaidTrip=Pay an expense report ConfirmPaidTrip=Are you sure you want to change status of this expense report to "Paid"? - ConfirmCancelTrip=Are you sure you want to cancel this expense report? - BrouillonnerTrip=Move back expense report to status "Draft" ConfirmBrouillonnerTrip=Are you sure you want to move this expense report to status "Draft"? - SaveTrip=Validate expense report ConfirmSaveTrip=Are you sure you want to validate this expense report? - NoTripsToExportCSV=No expense report to export for this period. ExpenseReportPayment=Expense report payment - ExpenseReportsToApprove=Expense reports to approve ExpenseReportsToPay=Expense reports to pay +CloneExpenseReport=Clone expese report +ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? \ No newline at end of file