diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index bba05c88c5f..ad8b563e477 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -655,7 +655,6 @@ if ($id) if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); - if ($id != 25) $valuetoshow.="*"; } if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); } if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 68486080ee7..147c140bdd1 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -106,8 +106,17 @@ if ($result) $i = 0; + if (! empty($user->rights->accounting->fiscalyear)) + { + $addbutton = '' . $langs->trans("NewFiscalYear") . ''; + } + else + { + $addbutton = '' . $langs->trans("NewFiscalYear") . ''; + } + $title = $langs->trans('AccountingPeriods'); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $addbutton, '', $limit, 1); // Load attribute_label print ''; @@ -143,17 +152,5 @@ if ($result) } -// Buttons -print '
'; -if (! empty($user->rights->accounting->fiscalyear)) -{ - print '' . $langs->trans("NewFiscalYear") . ''; -} -else -{ - print '' . $langs->trans("NewFiscalYear") . ''; -} -print '
'; - llxFooter(); $db->close(); \ No newline at end of file diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 5e5ff6e3ce8..987033d35e3 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -145,7 +145,7 @@ class Fiscalyear extends CommonObject $sql .= " SET label = '".$this->db->escape($this->label)."'"; $sql .= ", date_start = '".$this->db->idate($this->date_start)."'"; $sql .= ", date_end = ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null"); - $sql .= ", statut = '".$this->db->escape($this->statut)."'"; + $sql .= ", statut = '".$this->db->escape($this->statut?$this->statut:0)."'"; $sql .= ", datec = " . ($this->datec != '' ? "'".$this->db->idate($this->datec)."'" : 'null'); $sql .= ", fk_user_modif = " . $user->id; $sql .= " WHERE rowid = ".$this->id;