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

This commit is contained in:
ldestailleur
2025-04-03 21:02:15 +02:00
3 changed files with 7 additions and 7 deletions

View File

@@ -209,7 +209,7 @@ class Ai
'error' => true,
'message' => $errormessage,
'code' => (empty($response['http_code']) ? 0 : $response['http_code']),
'curl_error_no' => (empty($response['curl_error_no']) ? $response['curl_error_no'] : ''),
'curl_error_no' => $response['curl_error_no']??'',
'format' => $format,
'service' => $this->apiService,
'function'=>$function

View File

@@ -1361,8 +1361,8 @@ class pdf_einstein extends ModelePDFCommandes
if (getDolGlobalString('PDF_SHOW_PROJECT_TITLE')) {
$object->fetch_projet();
if (!empty($object->project->ref)) {
$posy += 3;
if (!empty($object->project->title)) {
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R');
@@ -1373,20 +1373,20 @@ class pdf_einstein extends ModelePDFCommandes
$object->fetch_projet();
if (!empty($object->project->ref)) {
$outputlangs->load("projects");
$posy += 3;
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R');
}
}
$posy += 4;
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
if (!getDolGlobalString('MAIN_PDF_HIDE_CUSTOMER_CODE') && !empty($object->thirdparty->code_client)) {
$posy += 4;
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');

View File

@@ -164,7 +164,7 @@ $out = '';
$permok = $user->hasRight('agenda', 'myactions', 'create');
if ((!empty($objUser->id) || !empty($objcon->id)) && $permok) {
if (is_object($objUser) && get_class($objUser) == 'User') {
$out .= '&originid='.$objUser->id.($objUser->id > 0 ? '&userid='.$objUser->id : '').'&backtopage='.urlencode($_SERVER['PHP_SELF'].($objUser->id > 0 ? '?userid='.$objUser->id : ''));
$out .= '&originid='.$objUser->id.($objUser->id > 0 ? '&assignedtouser='.$objUser->id : '').'&backtopage='.urlencode($_SERVER['PHP_SELF'].($objUser->id > 0 ? '?id='.$objUser->id : ''));
}
$out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '');
$out .= '&datep='.dol_print_date(dol_now(), 'dayhourlog', 'tzuserrel');