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

This commit is contained in:
Laurent Destailleur 2024-06-29 20:48:39 +02:00
commit 00b58c94c3
6 changed files with 18 additions and 7 deletions

View File

@ -1137,7 +1137,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

@ -2651,7 +2651,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

@ -83,7 +83,11 @@ if (!is_object($objecttmp)) {
$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);
}
$arrayresult = $form->selectForFormsList($objecttmp, $htmlname, '', 0, $searchkey, '', '', '', 0, 1, 0, '', $filter);

View File

@ -541,8 +541,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

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