Add extrafields on PDF object lines desc for compatible pdf
This commit is contained in:
parent
41c18a7884
commit
377b9a6b88
@ -604,7 +604,20 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
{
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
$pdf->rollbackTransaction(true);
|
||||
|
||||
@ -474,7 +474,20 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
{
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
$pdf->rollbackTransaction(true);
|
||||
@ -482,6 +495,18 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posyafter = $pdf->GetY();
|
||||
|
||||
@ -639,10 +639,13 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'documentpdfEnable' => array(3),
|
||||
'documentpdfEnableNotEmpty' => array(4)
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
@ -658,8 +661,8 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'documentpdfEnable' => array(3),
|
||||
'documentpdfEnableNotEmpty' => array(4)
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
|
||||
@ -622,6 +622,19 @@ class pdf_cyan extends ModelePDFPropales
|
||||
{
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
@ -630,6 +643,18 @@ class pdf_cyan extends ModelePDFPropales
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posyafter = $pdf->GetY();
|
||||
|
||||
@ -556,6 +556,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
{
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
@ -564,6 +577,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||
$posYAfterDescription = $pdf->GetY();
|
||||
|
||||
// Display extrafield if needed
|
||||
$params = array(
|
||||
'display' => 'list',
|
||||
'printableEnable' => array(3),
|
||||
'printableEnableNotEmpty' => array(4)
|
||||
);
|
||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||
if(!empty($extrafieldDesc)){
|
||||
$this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
||||
}
|
||||
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posyafter = $pdf->GetY();
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text
|
||||
|
||||
Loading…
Reference in New Issue
Block a user