Skip to content

Commit

Permalink
fix stars extrafields on pdf (#31913)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daoud-mohamed authored Nov 15, 2024
1 parent 0507db7 commit 62ba788
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions htdocs/core/class/commondocgenerator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,14 @@ public function getExtrafieldContent($object, $extrafieldKey, $outputlangs = nul
$extrafieldOutputContent = dol_string_nohtmltag($extrafieldOutputContent);
}

// Display stars extrafield as simple string
if ($extrafields->attributes[$object->table_element]['type'][$extrafieldKey] == 'stars') {
$extrafieldOutputContent = '';
for ($i = 0; $i < $object->array_options[$extrafieldOptionsKey]; $i++) {
$extrafieldOutputContent .= ' *';
}
}

$parameters = array(
'object' => $object,
'extrafields' => $extrafields,
Expand Down

0 comments on commit 62ba788

Please sign in to comment.