dolibarr 25.0.0-alpha
download_pdf.php File Reference

Script to generate and download a PDF from AI assistant data. More...

Go to the source code of this file.

Functions

 aiPdfFieldLabel ($k)
 Translated header for a raw API field name (mirrors FIELD_LABELS in ai_assistant.js).
 
 aiPdfFormatValue ($k, $v)
 Localized display value for a raw API field (money, dates, flags); strips any HTML a report tool embedded.
 

Detailed Description

Script to generate and download a PDF from AI assistant data.

Definition in file download_pdf.php.

Function Documentation

◆ aiPdfFieldLabel()

aiPdfFieldLabel ( $k)

Translated header for a raw API field name (mirrors FIELD_LABELS in ai_assistant.js).

Parameters
string$kRaw field name
Returns
string Translated header, or the prettified raw name

Definition at line 63 of file download_pdf.php.

References dol_ucfirst().

◆ aiPdfFormatValue()

aiPdfFormatValue ( $k,
$v )

Localized display value for a raw API field (money, dates, flags); strips any HTML a report tool embedded.

Parameters
string$kRaw field name
mixed$vRaw value
Returns
string Display value
Returns
bool Select only fields other than url and rowid
bool Select only fields other than url and rowid

Definition at line 90 of file download_pdf.php.

References dol_print_date(), dol_string_nohtmltag(), and price().