Fix pdf cell padding for model cyan, erathosthene, espadon, cornas
This commit is contained in:
parent
6de74e774e
commit
7f2dd19bb0
@ -1112,16 +1112,17 @@ abstract class CommonDocGenerator
|
|||||||
* print standard column content
|
* print standard column content
|
||||||
*
|
*
|
||||||
* @param TCPDF $pdf pdf object
|
* @param TCPDF $pdf pdf object
|
||||||
* @param object $object CommonObject
|
* @param float $curY curent Y position
|
||||||
* @param string $colKey the column key
|
* @param string $colKey the column key
|
||||||
|
* @param object $object CommonObject
|
||||||
* @param $i
|
* @param $i
|
||||||
* @param $outputlangs
|
* @param $outputlangs
|
||||||
* @param float $curY curent Y position
|
|
||||||
* @param $hideref
|
* @param $hideref
|
||||||
* @param $hidedesc
|
* @param $hidedesc
|
||||||
* @param $issupplierline
|
* @param $issupplierline
|
||||||
|
* @return null
|
||||||
*/
|
*/
|
||||||
function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0)
|
public function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0)
|
||||||
{
|
{
|
||||||
// load desc col params
|
// load desc col params
|
||||||
$colDef = $this->cols[$colKey];
|
$colDef = $this->cols[$colKey];
|
||||||
|
|||||||
@ -546,9 +546,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
|
|
||||||
$iniY = $tab_top + $this->tabTitleHeight + 2;
|
$nexY = $tab_top + $this->tabTitleHeight;
|
||||||
$curY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
$nexY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
|
|
||||||
// Loop on each lines
|
// Loop on each lines
|
||||||
$pageposbeforeprintlines = $pdf->getPage();
|
$pageposbeforeprintlines = $pdf->getPage();
|
||||||
@ -567,12 +565,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||||
$pageposbefore = $pdf->getPage();
|
$pageposbefore = $pdf->getPage();
|
||||||
|
|
||||||
// Description of product line
|
|
||||||
$curX = $this->posxdesc - 1;
|
|
||||||
|
|
||||||
$showpricebeforepagebreak = 1;
|
$showpricebeforepagebreak = 1;
|
||||||
$posYAfterImage = 0;
|
$posYAfterImage = 0;
|
||||||
$posYAfterDescription = 0;
|
|
||||||
|
|
||||||
if ($this->getColumnStatus('photo'))
|
if ($this->getColumnStatus('photo'))
|
||||||
{
|
{
|
||||||
@ -603,19 +598,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
if ($this->getColumnStatus('desc'))
|
if ($this->getColumnStatus('desc'))
|
||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$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
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
$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
|
||||||
@ -624,7 +608,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$pageposafter = $pageposbefore;
|
$pageposafter = $pageposbefore;
|
||||||
//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);
|
|
||||||
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
$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
|
||||||
@ -651,7 +636,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
$pdf->commitTransaction();
|
$pdf->commitTransaction();
|
||||||
}
|
}
|
||||||
$posYAfterDescription = $pdf->GetY();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -788,11 +772,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
|
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
|
||||||
$pdf->SetLineStyle(array('dash'=>0));
|
$pdf->SetLineStyle(array('dash'=>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY += 2; // Add space between lines
|
|
||||||
|
|
||||||
// Detect if some page were added automatically and output _tableau for past pages
|
// Detect if some page were added automatically and output _tableau for past pages
|
||||||
while ($pagenb < $pageposafter)
|
while ($pagenb < $pageposafter)
|
||||||
@ -1704,7 +1687,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
// Default field style for content
|
// Default field style for content
|
||||||
$this->defaultContentsFieldsStyle = array(
|
$this->defaultContentsFieldsStyle = array(
|
||||||
'align' => 'R', // R,C,L
|
'align' => 'R', // R,C,L
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
);
|
);
|
||||||
|
|
||||||
// Default field style for content
|
// Default field style for content
|
||||||
@ -1741,10 +1724,11 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
||||||
// 'label' => ' ', // the final label
|
// 'label' => ' ', // the final label
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
'content' => array(
|
'content' => array(
|
||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
|
'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -418,9 +418,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
|
|
||||||
|
|
||||||
$iniY = $tab_top + $this->tabTitleHeight + 2;
|
$nexY = $tab_top + $this->tabTitleHeight;
|
||||||
$curY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
$nexY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
|
|
||||||
// Loop on each lines
|
// Loop on each lines
|
||||||
for ($i = 0; $i < $nblines; $i++)
|
for ($i = 0; $i < $nblines; $i++)
|
||||||
@ -473,40 +471,15 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
if ($this->getColumnStatus('desc'))
|
if ($this->getColumnStatus('desc'))
|
||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$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
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
$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
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
$pageposafter = $pageposbefore;
|
|
||||||
//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
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
$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();
|
||||||
@ -607,16 +580,13 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY += 3;
|
|
||||||
if ($weighttxt && $voltxt) $nexY += 2;
|
|
||||||
|
|
||||||
// Add line
|
// Add line
|
||||||
if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
|
if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
|
||||||
{
|
{
|
||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
$pdf->line($this->marge_gauche, $nexY - 1, $this->page_largeur - $this->marge_droite, $nexY - 1);
|
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
|
||||||
$pdf->SetLineStyle(array('dash'=>0));
|
$pdf->SetLineStyle(array('dash'=>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1146,7 +1116,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
// Default field style for content
|
// Default field style for content
|
||||||
$this->defaultContentsFieldsStyle = array(
|
$this->defaultContentsFieldsStyle = array(
|
||||||
'align' => 'R', // R,C,L
|
'align' => 'R', // R,C,L
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
);
|
);
|
||||||
|
|
||||||
// Default field style for content
|
// Default field style for content
|
||||||
@ -1183,10 +1153,10 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
||||||
// 'label' => ' ', // the final label
|
// 'label' => ' ', // the final label
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
'content' => array(
|
'content' => array(
|
||||||
'align' => 'L',
|
'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -582,9 +582,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
|
|
||||||
$iniY = $tab_top + $this->tabTitleHeight + 2;
|
$nexY = $tab_top + $this->tabTitleHeight;
|
||||||
$curY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
$nexY = $tab_top + $this->tabTitleHeight + 0;
|
|
||||||
|
|
||||||
// Loop on each lines
|
// Loop on each lines
|
||||||
$pageposbeforeprintlines = $pdf->getPage();
|
$pageposbeforeprintlines = $pdf->getPage();
|
||||||
@ -605,7 +603,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$showpricebeforepagebreak = 1;
|
$showpricebeforepagebreak = 1;
|
||||||
$posYAfterImage = 0;
|
$posYAfterImage = 0;
|
||||||
$posYAfterDescription = 0;
|
|
||||||
|
|
||||||
if ($this->getColumnStatus('photo'))
|
if ($this->getColumnStatus('photo'))
|
||||||
{
|
{
|
||||||
@ -640,6 +637,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
$pageposafter = $pdf->getPage();
|
$pageposafter = $pdf->getPage();
|
||||||
|
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
|
|||||||
@ -564,9 +564,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
|
|
||||||
$iniY = $tab_top + $this->tabTitleHeight + 2;
|
$nexY = $tab_top + $this->tabTitleHeight;
|
||||||
$curY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
$nexY = $tab_top + $this->tabTitleHeight + 2;
|
|
||||||
|
|
||||||
// Loop on each lines
|
// Loop on each lines
|
||||||
$pageposbeforeprintlines = $pdf->getPage();
|
$pageposbeforeprintlines = $pdf->getPage();
|
||||||
@ -621,40 +619,17 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
if ($this->getColumnStatus('desc'))
|
if ($this->getColumnStatus('desc'))
|
||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
$pageposafter = $pdf->getPage();
|
$pageposafter = $pdf->getPage();
|
||||||
|
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
$pageposafter = $pageposbefore;
|
|
||||||
//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
|
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||||
$params = array(
|
|
||||||
'display' => 'list',
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
||||||
'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();
|
||||||
@ -819,11 +794,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
|
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
|
||||||
$pdf->SetLineStyle(array('dash'=>0));
|
$pdf->SetLineStyle(array('dash'=>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY += 2; // Add space between lines
|
|
||||||
|
|
||||||
// Detect if some page were added automatically and output _tableau for past pages
|
// Detect if some page were added automatically and output _tableau for past pages
|
||||||
while ($pagenb < $pageposafter)
|
while ($pagenb < $pageposafter)
|
||||||
@ -1865,7 +1840,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
// Default field style for content
|
// Default field style for content
|
||||||
$this->defaultContentsFieldsStyle = array(
|
$this->defaultContentsFieldsStyle = array(
|
||||||
'align' => 'R', // R,C,L
|
'align' => 'R', // R,C,L
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
);
|
);
|
||||||
|
|
||||||
// Default field style for content
|
// Default field style for content
|
||||||
@ -1902,10 +1877,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
||||||
// 'label' => ' ', // the final label
|
// 'label' => ' ', // the final label
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
'content' => array(
|
'content' => array(
|
||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
|
'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -496,9 +496,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
$height_note = 0;
|
$height_note = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$iniY = $tab_top + 7;
|
$nexY = $tab_top + 5;
|
||||||
$curY = $tab_top + 7;
|
|
||||||
$nexY = $tab_top + 7;
|
|
||||||
|
|
||||||
// Use new auto collum system
|
// Use new auto collum system
|
||||||
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
@ -555,40 +553,14 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
if ($this->getColumnStatus('desc'))
|
if ($this->getColumnStatus('desc'))
|
||||||
{
|
{
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc, 1);
|
||||||
$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
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
$pageposafter = $pageposbefore;
|
|
||||||
//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
|
$this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc, 1);
|
||||||
$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();
|
||||||
@ -750,12 +722,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
|
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
|
||||||
$pdf->SetLineStyle(array('dash'=>0));
|
$pdf->SetLineStyle(array('dash'=>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY += 2; // Add space between lines
|
|
||||||
|
|
||||||
// Detect if some page were added automatically and output _tableau for past pages
|
// Detect if some page were added automatically and output _tableau for past pages
|
||||||
while ($pagenb < $pageposafter)
|
while ($pagenb < $pageposafter)
|
||||||
{
|
{
|
||||||
@ -1509,7 +1479,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
// Default field style for content
|
// Default field style for content
|
||||||
$this->defaultContentsFieldsStyle = array(
|
$this->defaultContentsFieldsStyle = array(
|
||||||
'align' => 'R', // R,C,L
|
'align' => 'R', // R,C,L
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
);
|
);
|
||||||
|
|
||||||
// Default field style for content
|
// Default field style for content
|
||||||
@ -1546,10 +1516,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
||||||
// 'label' => ' ', // the final label
|
// 'label' => ' ', // the final label
|
||||||
'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
'content' => array(
|
'content' => array(
|
||||||
'align' => 'L',
|
'align' => 'L',
|
||||||
|
'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user