diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php
index 7b271fafdf2..6047d8d289c 100644
--- a/htdocs/core/ajax/row.php
+++ b/htdocs/core/ajax/row.php
@@ -99,6 +99,8 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
$perm = 1;
} elseif ($table_element_line == 'ecm_files' && $fk_element == 'fk_ticket' && !empty($user->rights->ticket->write)) {
$perm = 1;
+ } elseif ($table_element_line == 'projet_task' && $fk_element == 'fk_projet' && $user->rights->projet->creer) {
+ $perm = 1;
} else {
$tmparray = explode('_', $table_element_line);
$tmpmodule = $tmparray[0]; $tmpobject = preg_replace('/line$/', '', $tmparray[1]);
@@ -111,7 +113,7 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
// If we are here, it is a hack attempt, so we report a warning.
print 'Bad permission to modify position of lines for object in table '.$table_element_line;
- dol_syslog('Bad permission to modify position of lines for object in table '.$table_element_line.', fk_element '.$fk_element, LOG_WARNING);
+ dol_syslog('Bad permission to modify position of lines for object in table='.$table_element_line.', fk_element='.$fk_element, LOG_WARNING);
accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line);
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 381699f216b..9d6b9c48192 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -977,6 +977,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
}
+ // Computed progress
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress_calculated']['checked'])) {
print '
';
if ($total_projectlinesa_planned) {
@@ -984,6 +985,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
print ' ';
}
+
+ // Declared progress
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress']['checked'])) {
print '';
if ($total_projectlinesa_planned) {
diff --git a/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php b/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php
index 04f9aaa17cc..dd1462ecf5f 100644
--- a/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php
+++ b/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php
@@ -101,8 +101,11 @@ class InterfaceEventOrganization extends DolibarrTriggers
$defaultref = '';
}
$task->ref = $defaultref;
- $task->date_start = $object->date_start;
- $task->date_end = $object->date_end;
+
+ // TODO Can set offset for start date or endline from setup of task to create when creating event
+ $task->date_start = null;
+ $task->date_end = null;
+
$result = $task->create($user);
if ($result < 0) {
$this->errors=array_merge($this->errors, $task->errors);
diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php
index 737d2134ccc..1e92e1aba4b 100644
--- a/htdocs/emailcollector/class/emailcollector.class.php
+++ b/htdocs/emailcollector/class/emailcollector.class.php
@@ -966,7 +966,7 @@ class EmailCollector extends CommonObject
dol_syslog("EmailCollector::doCollectOneCollector start for id=".$this->id, LOG_DEBUG);
- $langs->loadLangs(array("project", "companies", "mails", "errors", "ticket", "agenda"));
+ $langs->loadLangs(array("project", "companies", "mails", "errors", "ticket", "agenda", "commercial"));
$error = 0;
$this->output = '';
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index a2660c2c592..c20e0a339f6 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -37,8 +37,8 @@ OtherInfo=Other information
DeleteCptCategory=Remove accounting account from group
ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group?
JournalizationInLedgerStatus=Status of journalization
-AlreadyInGeneralLedger=Already transferred in accounting journals and ledger
-NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger
+AlreadyInGeneralLedger=Already transferred to accounting journals and ledger
+NotYetInGeneralLedger=Not yet transferred to accouting journals and ledger
GroupIsEmptyCheckSetup=Group is empty, check setup of the personalized accounting group
DetailByAccount=Show detail by account
AccountWithNonZeroValues=Accounts with non-zero values
@@ -298,7 +298,7 @@ NoNewRecordSaved=No more record to journalize
ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account
ChangeBinding=Change the binding
Accounted=Accounted in ledger
-NotYetAccounted=Not yet accounted in the ledger
+NotYetAccounted=Not yet transferred to accounting
ShowTutorial=Show Tutorial
NotReconciled=Not reconciled
WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index ff406e33131..af1fb65337b 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -814,7 +814,7 @@ class Project extends CommonObject
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
- 'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project'
+ 'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project', 'entrepot'=>'fk_project'
);
foreach ($listoftables as $key => $value) {
$sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".((int) $this->id);
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index cd18a9b6819..085d092c2ac 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -181,8 +181,8 @@ class Task extends CommonObject
$sql .= ", '".$this->db->escape($this->description)."'";
$sql .= ", '".$this->db->idate($now)."'";
$sql .= ", ".((int) $user->id);
- $sql .= ", ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
- $sql .= ", ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
+ $sql .= ", ".($this->date_start ? "'".$this->db->idate($this->date_start)."'" : 'null');
+ $sql .= ", ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : 'null');
$sql .= ", ".(($this->planned_workload != '' && $this->planned_workload >= 0) ? ((int) $this->planned_workload) : 'null');
$sql .= ", ".(($this->progress != '' && $this->progress >= 0) ? ((int) $this->progress) : 'null');
$sql .= ")";
diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php
index c5e5b20fb88..b5325ca93b2 100644
--- a/htdocs/projet/ganttview.php
+++ b/htdocs/projet/ganttview.php
@@ -89,6 +89,7 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $c
$title = ($object->ref ? $object->ref.' '.$object->name.' - ' : '').$langs->trans("Gantt");
}
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
+
llxHeader("", $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss);
if (($id > 0 && is_numeric($id)) || !empty($ref)) {
@@ -136,29 +137,36 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
print '';
// Usage
- print '';
- print $langs->trans("Usage");
- print ' ';
- print '';
- if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
- print ' usage_opportunity ? ' checked="checked"' : '')).'"> ';
- $htmltext = $langs->trans("ProjectFollowOpportunity");
- print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
- print ' ';
+ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
+ print ' ';
+ print $langs->trans("Usage");
+ print ' ';
+ print '';
+ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
+ print ' usage_opportunity ? ' checked="checked"' : '')).'"> ';
+ $htmltext = $langs->trans("ProjectFollowOpportunity");
+ print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
+ print ' ';
+ }
+ if (empty($conf->global->PROJECT_HIDE_TASKS)) {
+ print ' usage_task ? ' checked="checked"' : '')).'"> ';
+ $htmltext = $langs->trans("ProjectFollowTasks");
+ print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
+ print ' ';
+ }
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
+ print ' usage_bill_time ? ' checked="checked"' : '')).'"> ';
+ $htmltext = $langs->trans("ProjectBillTimeDescription");
+ print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
+ print ' ';
+ }
+ if (!empty($conf->eventorganization->enabled)) {
+ print ' usage_organize_event ? ' checked="checked"' : '')).'"> ';
+ $htmltext = $langs->trans("EventOrganizationDescriptionLong");
+ print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
+ }
+ print ' ';
}
- if (empty($conf->global->PROJECT_HIDE_TASKS)) {
- print ' usage_task ? ' checked="checked"' : '')).'"> ';
- $htmltext = $langs->trans("ProjectFollowTasks");
- print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
- print ' ';
- }
- if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
- print ' usage_bill_time ? ' checked="checked"' : '')).'"> ';
- $htmltext = $langs->trans("ProjectBillTimeDescription");
- print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
- print ' ';
- }
- print '';
// Visibility
print ''.$langs->trans("Visibility").' ';
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 0b47b164c5a..2a814cd9cc5 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -555,7 +555,7 @@ if ($id > 0 || !empty($ref)) {
print '';
print '
';
- print '
';
+ print '';
// Usage
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
@@ -628,7 +628,7 @@ if ($id > 0 || !empty($ref)) {
print '';
print '
';
- print '
';
+ print '';
// Description
print ''.$langs->trans("Description").' ';
@@ -637,7 +637,7 @@ if ($id > 0 || !empty($ref)) {
// Categories
if ($conf->categorie->enabled) {
- print ' '.$langs->trans("Categories").' ';
+ print ' '.$langs->trans("Categories").' ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " ";
}