Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug2
This commit is contained in:
commit
38b4b719f0
@ -702,6 +702,16 @@ class EmailCollector extends CommonObject
|
||||
*
|
||||
* @return int 0=OK, Nb of error if error
|
||||
*/
|
||||
|
||||
/**
|
||||
* overwitePropertiesOfObject
|
||||
*
|
||||
* @param object $object Current object
|
||||
* @param string $actionparam Action parameters
|
||||
* @param string $messagetext Body
|
||||
* @param string $subject Subject
|
||||
* @return int 0=OK, Nb of error if error
|
||||
*/
|
||||
private function overwritePropertiesOfObject(&$object, $actionparam, $messagetext, $subject)
|
||||
{
|
||||
$errorforthisaction = 0;
|
||||
|
||||
@ -431,4 +431,4 @@ SaleRepresentativeLogin=Login of sales representative
|
||||
SaleRepresentativeFirstname=First name of sales representative
|
||||
SaleRepresentativeLastname=Last name of sales representative
|
||||
ErrorThirdpartiesMerge=There was an error when deleting the third parties. Please check the log. Changes have been reverted.
|
||||
NewCustomerSupplierCodeProposed=New customer or vendor code suggested on duplicate code
|
||||
NewCustomerSupplierCodeProposed=Customer or vendor code already used, a new code is suggested
|
||||
|
||||
@ -184,6 +184,7 @@ ProjectsWithThisUserAsContact=Projects with this user as contact
|
||||
TasksWithThisUserAsContact=Tasks assigned to this user
|
||||
ResourceNotAssignedToProject=Not assigned to project
|
||||
ResourceNotAssignedToTheTask=Not assigned to the task
|
||||
NoUserAssignedToTheProject=No users assigned to this project
|
||||
TimeSpentBy=Time spent by
|
||||
TasksAssignedTo=Tasks assigned to
|
||||
AssignTaskToMe=Assign task to me
|
||||
@ -232,3 +233,4 @@ DontHaveTheValidateStatus=The project %s must be open to be closed
|
||||
RecordsClosed=%s project(s) closed
|
||||
SendProjectRef=Information project %s
|
||||
ModuleSalaryToDefineHourlyRateMustBeEnabled=Module 'Payment of employee wages' must be enabled to define employee hourly rate to have time spent valorized
|
||||
NewTaskRefSuggested=Task ref already used, a new task ref is suggested
|
||||
@ -246,7 +246,18 @@ if ($action == 'createtask' && $user->rights->projet->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($task->error,$task->errors,'errors');
|
||||
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$langs->load("projects");
|
||||
setEventMessages($langs->trans('NewTaskRefSuggested'),'', 'warnings');
|
||||
$duplicate_code_error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($task->error,$task->errors,'errors');
|
||||
}
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -462,7 +473,14 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Ref").'</span></td><td>';
|
||||
print ($_POST["ref"]?$_POST["ref"]:$defaultref);
|
||||
if (empty($duplicate_code_error))
|
||||
{
|
||||
print (GETPOSTISSET("ref")?GETPOST("ref",'alpha'):$defaultref);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $defaultref;
|
||||
}
|
||||
print '<input type="hidden" name="taskref" value="'.($_POST["ref"]?$_POST["ref"]:$defaultref).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user