Fix: add width and minimum height of cells parameters
This commit is contained in:
parent
d7c8f4d5c3
commit
14b6173d87
@ -694,12 +694,14 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
* @param Translate $outputlangs Object lang
|
||||
* @param int $posx X
|
||||
* @param int $posy Y
|
||||
* @param float $w Width of cells. If 0, they extend up to the right margin of the page.
|
||||
* @param float $h Cell minimum height. The cell extends automatically if needed.
|
||||
* @param int $align Align
|
||||
* @param string $default_font_size Font size
|
||||
* @param HookManager $hookmanager Hook manager object
|
||||
* @return void
|
||||
*/
|
||||
function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$align,$default_font_size,$hookmanager=false)
|
||||
function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size,$hookmanager=false)
|
||||
{
|
||||
$linkedobjects = pdf_getLinkedObjects($object,$outputlangs,$hookmanager);
|
||||
if (! empty($linkedobjects))
|
||||
@ -709,13 +711,13 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$align,$d
|
||||
$posy+=3;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->MultiCell(100, 3, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align);
|
||||
$pdf->MultiCell($w, $h, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align);
|
||||
|
||||
if (! empty($linkedobject["date_title"]) && ! empty($linkedobject["date_value"]))
|
||||
{
|
||||
$posy+=3;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->MultiCell(100, 3, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align);
|
||||
$pdf->MultiCell($w, $h, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -653,7 +653,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$posy+=1;
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager);
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'L', $default_font_size, $hookmanager);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -930,7 +930,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy+=2;
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager);
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
|
||||
@ -1125,7 +1125,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy+=2;
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager);
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
|
||||
@ -1003,7 +1003,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$posy+=1;
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager);
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'L', $default_font_size, $hookmanager);
|
||||
|
||||
// Amount in (at tab_top - 1)
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
@ -985,7 +985,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$posy+=2;
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager);
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user