From 27db2c8169c21c5d871a692ac2af6806833db7fb Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Wed, 28 Jan 2026 16:16:20 +0100 Subject: [PATCH] NEW add import of leave balance (Implementation) (#37011) * New add import Leave Balance * add eof * Update modHoliday.class.php --------- Co-authored-by: Lucas Marcouiller Co-authored-by: Laurent Destailleur --- htdocs/core/modules/modHoliday.class.php | 10 ++++++++++ htdocs/langs/en_US/holiday.lang | 3 +++ 2 files changed, 13 insertions(+) diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index fd351ee1104..aa805118980 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -308,6 +308,16 @@ class modHoliday extends DolibarrModules 'd.date_create' => 'DateCreation*' ); + // Import of leave balance + $r++; + $this->import_code[$r] = $this->rights_class.'_'.$r; + $this->import_label[$r] = "ListeLB"; // Translation key + $this->import_icon[$r] = 'holiday'; + $this->import_tables_array[$r] = array('d' => MAIN_DB_PREFIX.'holiday_users'); + $this->import_fields_array[$r] = array( + 'd.fk_user' => "Employee*", 'd.nb_holiday' => "LeaveBalance*", 'd.fk_type' => "LeaveType*" + ); + $keyforselect = 'holiday'; $keyforelement = 'holiday'; $keyforaliasextra = 'extra'; diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 829f76c1236..dad4ac7d687 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -165,3 +165,6 @@ HolidayMailSenderAdress=Email address for holiday requests HolidayMailSenderAdressHelp=If you leave this field blank, the default e-mail address will be used. WrongAmount=Wrong amount of days ErrorUpdatingUsersCP=Error updating users paid leaves +LeaveBalance=Leave balance +ListeLB=List of leave balance +LeaveType = Type of leave balance