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->startTransaction();
|
||||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
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
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
|
|||||||
@ -474,7 +474,20 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
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
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
@ -482,6 +495,18 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$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);
|
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();
|
$pageposafter = $pdf->getPage();
|
||||||
$posyafter = $pdf->GetY();
|
$posyafter = $pdf->GetY();
|
||||||
|
|||||||
@ -639,10 +639,13 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
||||||
$posYAfterDescription = $pdf->GetY();
|
$posYAfterDescription = $pdf->GetY();
|
||||||
|
|
||||||
|
// Display extrafield if needed
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'display' => 'list',
|
'display' => 'list',
|
||||||
'documentpdfEnable' => array(3),
|
'printableEnable' => array(3),
|
||||||
'documentpdfEnableNotEmpty' => array(4)
|
'printableEnableNotEmpty' => array(4)
|
||||||
);
|
);
|
||||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||||
if(!empty($extrafieldDesc)){
|
if(!empty($extrafieldDesc)){
|
||||||
@ -658,8 +661,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$posYAfterDescription = $pdf->GetY();
|
$posYAfterDescription = $pdf->GetY();
|
||||||
$params = array(
|
$params = array(
|
||||||
'display' => 'list',
|
'display' => 'list',
|
||||||
'documentpdfEnable' => array(3),
|
'printableEnable' => array(3),
|
||||||
'documentpdfEnableNotEmpty' => array(4)
|
'printableEnableNotEmpty' => array(4)
|
||||||
);
|
);
|
||||||
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
$extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
||||||
if(!empty($extrafieldDesc)){
|
if(!empty($extrafieldDesc)){
|
||||||
|
|||||||
@ -622,6 +622,19 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
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();
|
$pageposafter = $pdf->getPage();
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
@ -630,6 +643,18 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$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);
|
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();
|
$pageposafter = $pdf->getPage();
|
||||||
$posyafter = $pdf->GetY();
|
$posyafter = $pdf->GetY();
|
||||||
|
|||||||
@ -556,6 +556,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
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();
|
$pageposafter = $pdf->getPage();
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
@ -564,6 +577,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$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);
|
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();
|
$pageposafter = $pdf->getPage();
|
||||||
$posyafter = $pdf->GetY();
|
$posyafter = $pdf->GetY();
|
||||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text
|
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