From a2b9dbfbe396459bddfb94867398302a3dd7c2c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Mar 2018 11:13:28 +0100 Subject: [PATCH 01/12] Fix list must show only employee --- htdocs/holiday/define_holiday.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 8f0cb2862a7..2d4c7504a30 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -220,6 +220,7 @@ if (!empty($search_name)) { $filters.=natural_search(array('u.firstname','u.lastname'), $search_name); } if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2); +$filters.= ' AND employee = 1'; // Only employee users are visible $listUsers = $holiday->fetchUsers(false, true, $filters); if (is_numeric($listUsers) && $listUsers < 0) @@ -356,8 +357,10 @@ else print ''; if ($canedit) print ''; print ''; + + // Button modify print ''; - if (! empty($user->rights->holiday->define_holiday)) + if (! empty($user->rights->holiday->define_holiday)) // Allowed to set the balance of any user { print ''; } From b3bb6d88e6713e9c20dbded65b9fd41427e42acb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Mar 2018 19:17:42 +0100 Subject: [PATCH 02/12] Fix list of leave not complete for a manager --- htdocs/holiday/class/holiday.class.php | 228 ++++++++++++------------- htdocs/holiday/list.php | 11 +- 2 files changed, 120 insertions(+), 119 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index c3c541bb8ce..950c297fb3b 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -50,7 +50,7 @@ class Holiday extends CommonObject var $date_fin=''; // Date end in PHP server TZ var $date_debut_gmt=''; // Date start in GMT var $date_fin_gmt=''; // Date end in GMT - var $halfday=''; + var $halfday=''; // 0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning var $statut=''; // 1=draft, 2=validated, 3=approved var $fk_validator; var $date_valid=''; @@ -276,12 +276,12 @@ class Holiday extends CommonObject } /** - * List holidays for a particular user + * List holidays for a particular user or list of users * - * @param int $user_id ID of user to list - * @param string $order Sort order - * @param string $filter SQL Filter - * @return int -1 if KO, 1 if OK, 2 if no result + * @param int|string $user_id ID of user to list, or comma separated list of IDs of users to list + * @param string $order Sort order + * @param string $filter SQL Filter + * @return int -1 if KO, 1 if OK, 2 if no result */ function fetchByUser($user_id, $order='', $filter='') { @@ -321,8 +321,8 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua"; $sql.= " WHERE cp.entity IN (".getEntity('holiday').")"; - $sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau - $sql.= " AND cp.fk_user = ".$user_id; + $sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid"; // Hack pour la recherche sur le tableau + $sql.= " AND cp.fk_user IN (".$user_id.")"; // Filtre de séléction if(!empty($filter)) { @@ -553,7 +553,7 @@ class Holiday extends CommonObject } else { $error++; } - $sql.= " halfday = ".$this->halfday.","; + $sql.= " halfday = ".$this->halfday.","; if(!empty($this->statut) && is_numeric($this->statut)) { $sql.= " statut = ".$this->statut.","; } else { @@ -714,10 +714,10 @@ class Holiday extends CommonObject if ($infos_CP['statut'] == 4) continue; // ignore not validated holidays if ($infos_CP['statut'] == 5) continue; // ignore not validated holidays /* - var_dump("--"); - var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']); - var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday); - */ + var_dump("--"); + var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']); + var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday); + */ if ($halfday == 0) { @@ -797,7 +797,7 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp"; $sql.= " WHERE cp.entity IN (".getEntity('holiday').")"; $sql.= " AND cp.fk_user = ".(int) $fk_user; - $sql.= " AND date_debut <= '".$this->db->idate($timestamp)."' AND date_fin >= '".$this->db->idate($timestamp)."'"; + $sql.= " AND date_debut <= '".$this->db->idate($timestamp)."' AND date_fin >= '".$this->db->idate($timestamp)."'"; $resql = $this->db->query($sql); if ($resql) @@ -837,7 +837,7 @@ class Holiday extends CommonObject } else dol_print_error($this->db); - return array('morning'=>$isavailablemorning, 'afternoon'=>$isavailableafternoon); + return array('morning'=>$isavailablemorning, 'afternoon'=>$isavailableafternoon); } @@ -860,10 +860,10 @@ class Holiday extends CommonObject //if ($option != 'nolink') //{ - // Add param to save lastsearch_values or not - $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; - if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; //} $linkstart = ''; @@ -1147,15 +1147,15 @@ class Holiday extends CommonObject } if ($result) - { + { $this->db->commit(); return 1; - } - else - { - $this->db->rollback(); + } + else + { + $this->db->rollback(); return -1; - } + } } return 0; @@ -1210,7 +1210,7 @@ class Holiday extends CommonObject return 1; } else - { + { return -1; } } @@ -1395,7 +1395,7 @@ class Holiday extends CommonObject } else { - // We want only list of vacation balance for user ids + // We want only list of vacation balance for user ids $sql = "SELECT DISTINCT cpu.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE cpu.fk_user = u.user"; @@ -1427,7 +1427,7 @@ class Holiday extends CommonObject return $stringlist; } else - { + { // Erreur SQL $this->error="Error ".$this->db->lasterror(); return -1; @@ -1454,46 +1454,46 @@ class Holiday extends CommonObject else $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; - $sql.= " AND u.statut > 0"; - if ($filters) $sql.=$filters; + $sql.= " AND u.statut > 0"; + if ($filters) $sql.=$filters; - $resql=$this->db->query($sql); + $resql=$this->db->query($sql); - // Si pas d'erreur SQL - if ($resql) - { - $i = 0; - $tab_result = $this->holiday; - $num = $this->db->num_rows($resql); + // Si pas d'erreur SQL + if ($resql) + { + $i = 0; + $tab_result = $this->holiday; + $num = $this->db->num_rows($resql); - // Boucles du listage des utilisateurs - while($i < $num) { + // Boucles du listage des utilisateurs + while($i < $num) { - $obj = $this->db->fetch_object($resql); + $obj = $this->db->fetch_object($resql); - $tab_result[$i]['rowid'] = $obj->rowid; - $tab_result[$i]['name'] = $obj->lastname; // deprecated - $tab_result[$i]['lastname'] = $obj->lastname; - $tab_result[$i]['firstname'] = $obj->firstname; - $tab_result[$i]['gender'] = $obj->gender; - $tab_result[$i]['status'] = $obj->statut; - $tab_result[$i]['employee'] = $obj->employee; - $tab_result[$i]['photo'] = $obj->photo; - $tab_result[$i]['fk_user'] = $obj->fk_user; - //$tab_result[$i]['type'] = $obj->type; - //$tab_result[$i]['nb_holiday'] = $obj->nb_holiday; + $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['name'] = $obj->lastname; // deprecated + $tab_result[$i]['lastname'] = $obj->lastname; + $tab_result[$i]['firstname'] = $obj->firstname; + $tab_result[$i]['gender'] = $obj->gender; + $tab_result[$i]['status'] = $obj->statut; + $tab_result[$i]['employee'] = $obj->employee; + $tab_result[$i]['photo'] = $obj->photo; + $tab_result[$i]['fk_user'] = $obj->fk_user; + //$tab_result[$i]['type'] = $obj->type; + //$tab_result[$i]['nb_holiday'] = $obj->nb_holiday; - $i++; + $i++; + } + // Retoune le tableau des utilisateurs + return $tab_result; + } + else + { + // Erreur SQL + $this->errors[]="Error ".$this->db->lasterror(); + return -1; } - // Retoune le tableau des utilisateurs - return $tab_result; - } - else - { - // Erreur SQL - $this->errors[]="Error ".$this->db->lasterror(); - return -1; - } } else { @@ -1637,32 +1637,32 @@ class Holiday extends CommonObject $sql.= ")"; $resql=$this->db->query($sql); - if (! $resql) - { - $error++; $this->errors[]="Error ".$this->db->lasterror(); - } + if (! $resql) + { + $error++; $this->errors[]="Error ".$this->db->lasterror(); + } - if (! $error) - { - $this->optRowid = $this->db->last_insert_id(MAIN_DB_PREFIX."holiday_logs"); - } + if (! $error) + { + $this->optRowid = $this->db->last_insert_id(MAIN_DB_PREFIX."holiday_logs"); + } - // Commit or rollback - if ($error) - { - foreach($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::addLogCP ".$errmsg, LOG_ERR); - $this->error.=($this->error?', '.$errmsg:$errmsg); - } - $this->db->rollback(); - return -1*$error; - } - else - { - $this->db->commit(); + // Commit or rollback + if ($error) + { + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::addLogCP ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } + else + { + $this->db->commit(); return $this->optRowid; - } + } } /** @@ -1702,43 +1702,43 @@ class Holiday extends CommonObject $resql=$this->db->query($sql); // Si pas d'erreur SQL - if ($resql) { + if ($resql) { - $i = 0; - $tab_result = $this->logs; - $num = $this->db->num_rows($resql); + $i = 0; + $tab_result = $this->logs; + $num = $this->db->num_rows($resql); - // Si pas d'enregistrement - if(!$num) { + // Si pas d'enregistrement + if(!$num) { return 2; - } + } - // On liste les résultats et on les ajoutent dans le tableau - while($i < $num) { + // On liste les résultats et on les ajoutent dans le tableau + while($i < $num) { - $obj = $this->db->fetch_object($resql); + $obj = $this->db->fetch_object($resql); - $tab_result[$i]['rowid'] = $obj->rowid; - $tab_result[$i]['date_action'] = $obj->date_action; - $tab_result[$i]['fk_user_action'] = $obj->fk_user_action; - $tab_result[$i]['fk_user_update'] = $obj->fk_user_update; - $tab_result[$i]['type_action'] = $obj->type_action; - $tab_result[$i]['prev_solde'] = $obj->prev_solde; - $tab_result[$i]['new_solde'] = $obj->new_solde; - $tab_result[$i]['fk_type'] = $obj->fk_type; + $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['date_action'] = $obj->date_action; + $tab_result[$i]['fk_user_action'] = $obj->fk_user_action; + $tab_result[$i]['fk_user_update'] = $obj->fk_user_update; + $tab_result[$i]['type_action'] = $obj->type_action; + $tab_result[$i]['prev_solde'] = $obj->prev_solde; + $tab_result[$i]['new_solde'] = $obj->new_solde; + $tab_result[$i]['fk_type'] = $obj->fk_type; - $i++; - } - // Retourne 1 et ajoute le tableau à la variable - $this->logs = $tab_result; - return 1; - } - else - { - // Erreur SQL - $this->error="Error ".$this->db->lasterror(); - return -1; - } + $i++; + } + // Retourne 1 et ajoute le tableau à la variable + $this->logs = $tab_result; + return 1; + } + else + { + // Erreur SQL + $this->error="Error ".$this->db->lasterror(); + return -1; + } } diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 63d9527c132..c7227e16472 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -48,7 +48,7 @@ $contextpage= GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'myobjectl $backtopage = GETPOST('backtopage','alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print') -$childis = $user->getAllChildIds(1); +$childids = $user->getAllChildIds(1); // Security check $socid=0; @@ -107,7 +107,6 @@ $fieldstosearchall = array( 'uu.firstname'=>'EmployeeFirstname' ); -$childids = $user->getAllChildIds(1); /* @@ -275,14 +274,16 @@ if ($id > 0) $search_employee = $user_id; } -// Récupération des congés payés de l'utilisateur ou de tous les users +// Récupération des congés payés de l'utilisateur ou de tous les users de sa hierarchy +// Load array $holiday->holiday if (empty($user->rights->holiday->read_all) || $id > 0) { - $result = $holiday->fetchByUser($user_id,$order,$filter); // Load array $holiday->holiday + if ($id > 0) $result = $holiday->fetchByUser($id, $order, $filter); + else $result = $holiday->fetchByUser(join(',',$childids), $order, $filter); } else { - $result = $holiday->fetchAll($order,$filter); // Load array $holiday->holiday + $result = $holiday->fetchAll($order, $filter); } // Si erreur SQL if ($result == '-1') From 227b830aa2c1d73e4bd5e9b1901c0c7e528709e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 09:41:30 +0100 Subject: [PATCH 03/12] Fix visible rounding of abandonned amount --- htdocs/compta/facture/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 37f38b732fe..56b7adc01d5 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4048,7 +4048,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { print ''; print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = ''; } @@ -4056,7 +4056,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') { print ''; print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; // $resteapayeraffiche=0; $cssforamountpaymentcomplete = ''; } @@ -4064,7 +4064,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') { print ''; print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = ''; } @@ -4075,7 +4075,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->close_note) $text .= '

' . $langs->trans("Reason") . ':' . $object->close_note; print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); - print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; + print '' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . ' '; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = ''; } From 9e4a66b1a9c53863d1ffdf2c507184dcbee5b264 Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 22 Mar 2018 10:46:54 +0100 Subject: [PATCH 04/12] Fix hidden oprion PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION --- htdocs/product/class/product.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ec831b91458..e36d5970e8f 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1225,7 +1225,7 @@ class Product extends CommonObject $sql2.= " SET "; $sql2.= " label='".$this->db->escape($this->label)."',"; $sql2.= " description='".$this->db->escape($this->description)."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->note)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->other)."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } else @@ -1235,7 +1235,7 @@ class Product extends CommonObject $sql2.= ")"; $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->label)."',"; $sql2.= " '".$this->db->escape($this->description)."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->note)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->other)."'"; $sql2.= ")"; } dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key); @@ -1260,7 +1260,7 @@ class Product extends CommonObject $sql2.= " SET "; $sql2.= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2.= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->multilangs["$key"]["note"])."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->multilangs["$key"]["other"])."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } else @@ -1270,7 +1270,7 @@ class Product extends CommonObject $sql2.= ")"; $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2.= " '".$this->db->escape($this->multilangs["$key"]["description"])."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->note)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'"; $sql2.= ")"; } From 3765bc4775b4dc5a1d4397ae644d210ec514b1e2 Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 22 Mar 2018 10:48:03 +0100 Subject: [PATCH 05/12] Fix html escape for edit label --- htdocs/product/traduction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index fd13aee1ea2..d0740f7cd71 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -251,7 +251,7 @@ if ($action == 'edit') print '
'; print ''; - print ''; + print ''; print '
'.$langs->trans('Label').'
'.$langs->trans('Label').'
'.$langs->trans('Description').''; $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); From 68a4058387b4f3f3c4ca69f7cdac2016707a1a21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 13:03:12 +0100 Subject: [PATCH 06/12] Fix translation --- htdocs/langs/en_US/projects.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 86d09ff3edc..1ecbf5f4179 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -216,6 +216,7 @@ LatestProjects=Latest %s projects LatestModifiedProjects=Latest %s modified projects OtherFilteredTasks=Other filtered tasks NoAssignedTasks=No assigned tasks (assign project/tasks the current user from the top select box to enter time on it) +ProjectValidatedInDolibarr=Project validated # Comments trans AllowCommentOnTask=Allow user comments on tasks AllowCommentOnProject=Allow user comments on projects From 4eec7db73108e3ea209397b4233f778b51f37d76 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 13:13:04 +0100 Subject: [PATCH 07/12] Prepare 7.0.1 --- ChangeLog | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/ChangeLog b/ChangeLog index 803225db301..2bf1a93f460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,74 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 7.0.1 compared to 7.0.0 ***** +FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php +FIX: #8200 +FIX: #8219 +FIX: #8232 +FIX: #8269 +FIX: #8277 +FIX: #8285 Extrafields now reported by /api/index.php/agendaevents/{id} +FIX: #8289 add a configuration for stock calculation +FIX: Activate all also if there are inactive services +FIX: add planned delivery to order exports +FIX: approval date was not visible if leave was canceled after +FIX: avoid "Array" on screen +FIX: Avoid empty value to fk_multicurrency attribute +FIX: Bad var for substitution of free text +FIX: Can't activate tasks on projects configuration +FIX: Can use odx templates that does not include lines tags +FIX: check shipping on delete order +FIX: check verif exped on delete order +FIX: comment on tasks +FIX: country must not be mandatory for accounting report groups +FIX: css +FIX: Delete tasks on project delete will now trigger TASK_DELETE +FIX: Do not lose filter when editing comment of a time spent in task view +FIX: duplicate confirm message. Missing reposition class +FIX: Duplicate product_type asignement on order addline +FIX: email use the validate user instead of approver in holiday approval +FIX: Error management in leave request +FIX: for nondisplay of fk_element 's id in REST API response +FIX: Generic substitution of constant disabled for sensitive constant +FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back +FIX: Import process must stop after ending line nb to import +FIX: Infinite loop on deletion of temp file when there is symbolic links +FIX: Input of holiday for subordinates was ko +FIX: invoice creation fails when next date not defined +FIX: Label of event show twice +FIX: letter for month March +FIX: Look and feel v7 +FIX: Make a redirect after the remove_file action to avoid deletion done +FIX: migration script for product photo +FIX: missing email of customer in stripe info payments +FIX: missing object entity in fetch +FIX: Missing restore_lastsearch_values +FIX: multicompany compatibility and fix reports +FIX: natural search double quote +FIX: navigation and filters on holiday list +FIX: Parameter must be an array or an object that implements Countable +FIX: Payment mode not correctly set in donation and document +FIX: Permission in list of holiday +FIX: Properties updated if update successfull. +FIX: reverse field to have object loaded in doaction +FIX: Saving wrong localtax on order addline +FIX: Search criteria on vat +FIX: security report by DIGITEMIS CYBERSECURITY & PRIVACY +FIX: show status on societe banner +FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup +FIX: Subscription events not recorded into agenda +FIX: Subscription not correctly log in blockedlog +FIX: Temporary dir for mail files must be cleaned at beginning of form +FIX: Trad and creation date in subscription create +FIX: translation of holiday types +FIX: Unknown column 'pl.amount_requested' in compta/prelevement/factures.php +FIX: Useless clean of tree +FIX: Use of undefined constant _ROWS_2 +FIX: warning when adding ECM files using old photo path + + ***** ChangeLog for 7.0.0 compared to 6.0.5 ***** For users: NEW: Add a preview icon after files that can be previewed (pdf + images) From 658b145ff448870e33db2afa6d07af95a9f6cc0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 13:16:38 +0100 Subject: [PATCH 08/12] Missing translation --- .../core/triggers/interface_50_modAgenda_ActionsAuto.class.php | 2 +- htdocs/langs/en_US/projects.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 78053a0631c..a3b11222a0f 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -760,7 +760,7 @@ class InterfaceActionsAuto extends DolibarrTriggers $langs->load("projects"); if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectModifiedInDolibarr",$object->ref); - $object->actionmsg=$langs->transnoentities("ProjectModifieddInDolibarr",$object->ref); + $object->actionmsg=$langs->transnoentities("ProjectModifiedInDolibarr",$object->ref); $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; $object->sendtoid=0; diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 1ecbf5f4179..879382bd070 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -137,6 +137,7 @@ ProjectReportDate=Change task dates according to new project start date ErrorShiftTaskDate=Impossible to shift task date according to new project start date ProjectsAndTasksLines=Projects and tasks ProjectCreatedInDolibarr=Project %s created +ProjectValidatedInDolibarr=Project %s validated ProjectModifiedInDolibarr=Project %s modified TaskCreatedInDolibarr=Task %s created TaskModifiedInDolibarr=Task %s modified @@ -216,7 +217,6 @@ LatestProjects=Latest %s projects LatestModifiedProjects=Latest %s modified projects OtherFilteredTasks=Other filtered tasks NoAssignedTasks=No assigned tasks (assign project/tasks the current user from the top select box to enter time on it) -ProjectValidatedInDolibarr=Project validated # Comments trans AllowCommentOnTask=Allow user comments on tasks AllowCommentOnProject=Allow user comments on projects From 3793fd69e64025899fac96eba7c942ca9a41359c Mon Sep 17 00:00:00 2001 From: vabeltran Date: Thu, 22 Mar 2018 13:18:06 +0100 Subject: [PATCH 09/12] FIX PropalStatusValidatedShort missing in langs/en_US/propal.lang Added PropalStatusValidatedShort value, missing in lang/en_US/propal.lang file. --- htdocs/langs/en_US/propal.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index 29c4fe16b64..c934bd50ab6 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -33,6 +33,7 @@ PropalStatusSigned=Signed (needs billing) PropalStatusNotSigned=Not signed (closed) PropalStatusBilled=Billed PropalStatusDraftShort=Draft +PropalStatusValidatedShort=Open PropalStatusClosedShort=Closed PropalStatusSignedShort=Signed PropalStatusNotSignedShort=Not signed From 2ee0e68d67b531fbc20605bebfaa81f585cafd80 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 13:22:33 +0100 Subject: [PATCH 10/12] Fic packaging tools --- build/generate_filelist_xml.php | 8 +++++++- build/makepack-dolibarr.pl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index e6336e30e97..f6790291811 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -17,7 +17,7 @@ */ /** - * \file build/generate_filecheck_xml.php + * \file build/generate_filelist_xml.php * \ingroup dev * \brief This script create a xml checksum file */ @@ -68,6 +68,12 @@ while ($i < $argc) $i++; } +// If release is auto, we take current version +if ($release == 'auto') +{ + $release = DOL_VERSION; +} + if (empty($includecustom)) { if (DOL_VERSION != $release) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 839a8092a7c..77d78da1dc5 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -388,7 +388,7 @@ if ($nboftargetok) { #----------------------- if ($CHOOSEDTARGET{'-CHKSUM'}) { - print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; + print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; $ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; print $ret."\n"; # Copy to final dir From 4c1dcc37d141aca1197489ec503d62e9573f91aa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 13:38:28 +0100 Subject: [PATCH 11/12] Fix packager --- build/generate_filelist_xml.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index f6790291811..5f54c95d7e0 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -45,7 +45,7 @@ $includeconstants=array(); if (empty($argv[1])) { - print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; exit -1; } @@ -69,16 +69,19 @@ while ($i < $argc) } // If release is auto, we take current version -if ($release == 'auto') +$tmpver=explode('-', $release, 2); +if ($tmpver[0] == 'auto') { - $release = DOL_VERSION; + $release=DOL_VERSION; + if ($tmpver[1]) $release.='-'.$tmpver[1]; } if (empty($includecustom)) { - if (DOL_VERSION != $release) + $tmpver=explode('-', $release, 2); + if (DOL_VERSION != $tmpver[0]) { - print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n"; + print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n"; print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n"; exit -1; } From 0bb7d4d494d5fa93b5250e35673cdbf70d0430ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 14:04:33 +0100 Subject: [PATCH 12/12] Update propal.lang --- htdocs/langs/en_US/propal.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index c934bd50ab6..7745dde08da 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -33,7 +33,7 @@ PropalStatusSigned=Signed (needs billing) PropalStatusNotSigned=Not signed (closed) PropalStatusBilled=Billed PropalStatusDraftShort=Draft -PropalStatusValidatedShort=Open +PropalStatusValidatedShort=Validated PropalStatusClosedShort=Closed PropalStatusSignedShort=Signed PropalStatusNotSignedShort=Not signed