diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang index 2987021be4e..570242b8386 100644 --- a/htdocs/langs/en_US/salaries.lang +++ b/htdocs/langs/en_US/salaries.lang @@ -31,5 +31,9 @@ MakeTransferRequest=Make transfer request VirementOrder=Credit transfer request WithdrawalReceipt=Credit transfer order OrderWaiting=Pending order -FillEndOfMonth=Fill with end of month +FillEndOfMonth=End of month +PreviousMonthShort=PrevMonth +CurrentMonthShort=CurrMonth +PreviousWeekShort=PrevWeek +CurrentWeekShort=CurrWeek UserPaySlip=Pay Slip diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 04b44c2dcb3..0a0505fa8ec 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -1,13 +1,14 @@ * Copyright (C) 2014-2020 Laurent Destailleur - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Charlie BENKE - * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2023 Maxime Nicolas - * Copyright (C) 2023 Benjamin GREMBI - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Charlie BENKE + * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2023 Maxime Nicolas + * Copyright (C) 2023 Benjamin GREMBI + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 Nick Fragoulis * * 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 @@ -761,21 +762,67 @@ if ($id > 0) { ); //$formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); - $formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => -1); + if (!empty($object->dateep)) { + $formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => ($object->dateep) + 86400); + } else { + $formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => -1); + } $formquestion[] = array('type' => 'date', 'name' => 'clone_date_end', 'label' => $langs->trans("DateEnd"), 'value' => -1); $formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100 right'); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 280); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 300); - //Add fill with end of month button + //Add buttons to fill start and end dates $formconfirm .= "