mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Debug v16
This commit is contained in:
@@ -523,9 +523,9 @@ class pdf_squille extends ModelePdfReception
|
||||
while ($pagenb < $pageposafter) {
|
||||
$pdf->setPage($pagenb);
|
||||
if ($pagenb == 1) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object);
|
||||
} else {
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object);
|
||||
}
|
||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||
$pagenb++;
|
||||
@@ -534,9 +534,9 @@ class pdf_squille extends ModelePdfReception
|
||||
}
|
||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||
if ($pagenb == 1) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object);
|
||||
} else {
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object);
|
||||
}
|
||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||
// New page
|
||||
@@ -550,10 +550,10 @@ class pdf_squille extends ModelePdfReception
|
||||
|
||||
// Show square
|
||||
if ($pagenb == 1) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object);
|
||||
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
} else {
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object);
|
||||
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
}
|
||||
|
||||
@@ -719,9 +719,10 @@ class pdf_squille extends ModelePdfReception
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @param int $hidetop Hide top bar of array
|
||||
* @param int $hidebottom Hide bottom bar of array
|
||||
* @param Object|NULL $object Object reception to generate
|
||||
* @return void
|
||||
*/
|
||||
protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $object = null)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -767,7 +768,18 @@ class pdf_squille extends ModelePdfReception
|
||||
$pdf->line($this->posxqtytoship - 1, $tab_top, $this->posxqtytoship - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxqtytoship, $tab_top + 1);
|
||||
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities("QtyToReceive"), '', 'C');
|
||||
$statusreceived = Reception::STATUS_CLOSED;
|
||||
if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION")) {
|
||||
$statusreceived = Reception::STATUS_VALIDATED;
|
||||
}
|
||||
if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) {
|
||||
$statusreceived = Reception::STATUS_CLOSED;
|
||||
}
|
||||
if ($object && $object->statut < $statusreceived) {
|
||||
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities('QtyToReceive'), '', 'C');
|
||||
} else {
|
||||
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities('QtyReceived'), '', 'C');
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) {
|
||||
|
||||
Reference in New Issue
Block a user