Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
770a0fbe8d
@ -5397,16 +5397,20 @@ abstract class CommonObject
|
|||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
$outputlangs->charset_output = $sav_charset_output;
|
$outputlangs->charset_output = $sav_charset_output;
|
||||||
dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors);
|
$this->error = $obj->error;
|
||||||
|
$this->errors = $obj->errors;
|
||||||
|
dol_syslog("Error generating document for ".__CLASS__.". Error: ".$obj->error, LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$filefound) {
|
if (!$filefound) {
|
||||||
$this->error = $langs->trans("Error").' Failed to load doc generator with modelpaths='.$modelspath.' - modele='.$modele;
|
$this->error = $langs->trans("Error").' Failed to load doc generator with modelpaths='.$modelspath.' - modele='.$modele;
|
||||||
dol_print_error('', $this->error);
|
$this->errors[] = $this->error;
|
||||||
|
dol_syslog($this->error, LOG_ERR);
|
||||||
} else {
|
} else {
|
||||||
$this->error = $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $filefound);
|
$this->error = $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $filefound);
|
||||||
dol_print_error('', $this->error);
|
$this->errors[] = $this->error;
|
||||||
|
dol_syslog($this->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -211,6 +211,34 @@ if (empty($reshook)) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If massaction is close
|
||||||
|
if ($massaction == 'classifyclose') {
|
||||||
|
$error=0;
|
||||||
|
$selectids = GETPOST('toselect', 'array');
|
||||||
|
foreach ($selectids as $selectid) {
|
||||||
|
// $object->fetch($selectid);
|
||||||
|
$object->fetch($selectid);
|
||||||
|
$result = $object->setClosed();
|
||||||
|
}
|
||||||
|
|
||||||
|
$massaction = $action = 'classifyclose';
|
||||||
|
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$db->commit();
|
||||||
|
|
||||||
|
setEventMessage($langs->trans("Close Done"));
|
||||||
|
header('Location: '.$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$db->rollback();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -489,7 +517,7 @@ $param .= $hookmanager->resPrint;
|
|||||||
|
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||||
//'classifyclose'=>$langs->trans("Close"), TODO massive close shipment ie: when truck is charged
|
'classifyclose'=>$langs->trans("Close"),
|
||||||
'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||||
);
|
);
|
||||||
if (in_array($massaction, array('presend'))) {
|
if (in_array($massaction, array('presend'))) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user