NEW add import of leave balance (Implementation) (#37011)

* New add import Leave Balance

* add eof

* Update modHoliday.class.php

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Lucas Marcouiller 2026-01-28 16:16:20 +01:00 committed by GitHub
parent d3bb30c1d5
commit 27db2c8169
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -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';

View file

@ -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