Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
df6d160374
@ -193,7 +193,7 @@ if (empty($reshook)) {
|
||||
exit();
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
setEventMessages($objectutil->error, $objectutil->errors, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
} elseif ($action == 'reopen' && $usercanreopen) {
|
||||
|
||||
@ -1235,14 +1235,20 @@ class Facture extends CommonInvoice
|
||||
$result = $object->create($user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$this->error = $object->error;
|
||||
$this->errors = $object->errors;
|
||||
} else {
|
||||
// copy internal contacts
|
||||
if ($object->copy_linked_contact($this, 'internal') < 0) {
|
||||
$error++;
|
||||
$this->error = $object->error;
|
||||
$this->errors = $object->errors;
|
||||
} elseif ($this->socid == $object->socid) {
|
||||
// copy external contacts if same company
|
||||
if ($object->copy_linked_contact($this, 'external') < 0) {
|
||||
$error++;
|
||||
$this->error = $object->error;
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user