Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0

This commit is contained in:
Laurent Destailleur 2024-06-29 20:49:03 +02:00
commit d4b49fac4a
7 changed files with 19 additions and 8 deletions

View File

@ -932,7 +932,7 @@ if (!empty($arrayfields['t.tms']['checked'])) {
print $form->selectDate($search_date_modification_start, 'search_date_modification_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
print '</div>';
print '<div class="nowrap">';
print $form->selectDate($search_date_modification_end, 'search_date_modification_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
print $form->selectDate($search_date_modification_end, 'search_date_modification_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
print '</div>';
print '</td>';
}

View File

@ -2697,7 +2697,10 @@ class Propal extends CommonObject
}
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
$sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($date_signature)."', fk_user_signature=".$fk_user_signature;
$sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."'";
if ($status == self::STATUS_SIGNED) {
$sql .= ", date_signature='".$this->db->idate($now)."', fk_user_signature = ".($fk_user_signature);
}
$sql .= " WHERE rowid = ".((int) $this->id);
$resql = $this->db->query($sql);

View File

@ -79,7 +79,11 @@ if ($usesublevelpermission && !isset($user->rights->$module->$element)) { // The
$searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ? GETPOST($htmlname, 'alpha') : ''));
// Add a security test to avoid to get content of all tables
restrictedArea($user, $objecttmp->element, $id);
if (!empty($objecttmp->module)) {
restrictedArea($user, $objecttmp->module, $id, $objecttmp->table_element, $objecttmp->element);
} else {
restrictedArea($user, $objecttmp->element, $id);
}
/*

View File

@ -1314,7 +1314,7 @@ class Cronjob extends CommonObject
$error++;
} else {
dol_syslog(get_class($this)."::run_jobs END");
$this->lastoutput = dol_substr((empty($object->output) ? "" : $object->output."\n").$errmsg, 0, $this::MAXIMUM_LENGTH_FOR_LASTOUTPUT_FIELD, 'UTF-8', 1);
$this->lastoutput = dol_substr((empty($object->output) ? "" : $object->output."\n"), 0, $this::MAXIMUM_LENGTH_FOR_LASTOUTPUT_FIELD, 'UTF-8', 1);
$this->lastresult = var_export($result, true);
$retval = $this->lastresult;
}

View File

@ -542,8 +542,7 @@ if (empty($reshook)) {
// CONTENT
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
$link = '<a href="'.$link.'">'.$link.'</a>';
$dateRefusEx = explode(" ", $object->date_refuse);
$message = $langs->transnoentities("ExpenseReportWaitingForReApprovalMessage", $dateRefusEx[0], $object->detail_refuse, $expediteur->getFullName($langs), $link);
$message = $langs->transnoentities("ExpenseReportWaitingForReApprovalMessage", dol_print_date($object->date_refuse, 'day'), $object->detail_refuse, $expediteur->getFullName($langs), get_date_range($object->date_debut, $object->date_fin, '', $langs), $link);
// Rebuild pdf
/*

View File

@ -507,7 +507,9 @@ if (empty($reshook)) {
if ($action == 'activate_price_by_qty') {
// Activating product price by quantity add a new price line with price_by_qty set to 1
$level = GETPOST('level', 'int');
$ret = $object->updatePrice(0, $object->price_base_type, $user, $object->tva_tx, 0, $level, $object->tva_npr, 1);
$basePrice = ($object->price_base_type == 'HT') ? $object->price : $object->price_ttc;
$basePriceMin = ($object->price_base_type == 'HT') ? $object->price_min : $object->price_min_ttc;
$ret = $object->updatePrice($basePrice, $object->price_base_type, $user, $object->tva_tx, $basePriceMin, $level, $object->tva_npr, 1);
if ($ret < 0) {
setEventMessages($object->error, $object->errors, 'errors');
@ -517,7 +519,9 @@ if (empty($reshook)) {
if ($action == 'disable_price_by_qty') {
// Disabling product price by quantity add a new price line with price_by_qty set to 0
$level = GETPOST('level', 'int');
$ret = $object->updatePrice(0, $object->price_base_type, $user, $object->tva_tx, 0, $level, $object->tva_npr, 0);
$basePrice = ($object->price_base_type == 'HT') ? $object->price : $object->price_ttc;
$basePriceMin = ($object->price_base_type == 'HT') ? $object->price_min : $object->price_min_ttc;
$ret = $object->updatePrice($basePrice, $object->price_base_type, $user, $object->tva_tx, $basePriceMin, $level, $object->tva_npr, 0);
if ($ret < 0) {
setEventMessages($object->error, $object->errors, 'errors');

View File

@ -275,6 +275,7 @@ if ($action == 'order' && GETPOST('valid')) {
} else {
$id = $result;
}
$i++;
} else {
$order->socid = $suppliersid[$i];
$order->fetch_thirdparty();