Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
3c9ba08369
@ -1039,7 +1039,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto
|
|||||||
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$';
|
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$';
|
||||||
}
|
}
|
||||||
foreach ($listofobjectref as $tmppdf) {
|
foreach ($listofobjectref as $tmppdf) {
|
||||||
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files
|
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\']+\.pdf$'; // To include PDF generated from ODX files
|
||||||
}
|
}
|
||||||
$listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true);
|
$listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true);
|
||||||
|
|
||||||
|
|||||||
@ -772,7 +772,7 @@ class Don extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function setPaid($id, $modepayment = 0)
|
public function setPaid($id, $modepayment = 0)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2, paid = 1";
|
||||||
if ($modepayment) {
|
if ($modepayment) {
|
||||||
$sql .= ", fk_payment = ".((int) $modepayment);
|
$sql .= ", fk_payment = ".((int) $modepayment);
|
||||||
}
|
}
|
||||||
@ -782,6 +782,7 @@ class Don extends CommonObject
|
|||||||
if ($resql) {
|
if ($resql) {
|
||||||
if ($this->db->affected_rows($resql)) {
|
if ($this->db->affected_rows($resql)) {
|
||||||
$this->statut = 2;
|
$this->statut = 2;
|
||||||
|
$this->paid = 1;
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -1206,12 +1206,18 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
unset($date);
|
unset($date);
|
||||||
} else {
|
} else {
|
||||||
|
$error++;
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int'));
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) {
|
if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) {
|
||||||
$object = new ExpenseReport($db);
|
$object = new ExpenseReport($db);
|
||||||
|
|||||||
@ -217,9 +217,10 @@ if ($action == "view_ticketlist") {
|
|||||||
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
||||||
|
|
||||||
$filter = array();
|
$filter = array();
|
||||||
$param = 'action=view_ticketlist';
|
|
||||||
|
$param = '&action=view_ticketlist';
|
||||||
if (!empty($entity) && !empty($conf->multicompany->enabled)) {
|
if (!empty($entity) && !empty($conf->multicompany->enabled)) {
|
||||||
$param .= '&entity='.$entity;
|
$param .= '&entity='.((int) $entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Definition of fields for list
|
// Definition of fields for list
|
||||||
@ -395,7 +396,7 @@ if ($action == "view_ticketlist") {
|
|||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
print_barre_liste($langs->trans('TicketList'), $page, 'public/list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket');
|
print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket');
|
||||||
|
|
||||||
// Search bar
|
// Search bar
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && !empty($conf->multicompany->enabled)?'?entity='.$entity:'').'" id="searchFormList" >'."\n";
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && !empty($conf->multicompany->enabled)?'?entity='.$entity:'').'" id="searchFormList" >'."\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user