Correction bug #15929
This commit is contained in:
parent
69b49f07ff
commit
5d10fd8338
@ -294,38 +294,47 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
// Collecte des totaux par valeur de tva
|
// Collecte des totaux par valeur de tva
|
||||||
// dans le tableau tva["taux"]=total_tva
|
// dans le tableau tva["taux"]=total_tva
|
||||||
$tvaligne=$prop->lignes[$i]->price * $prop->lignes[$i]->qty;
|
$tvaligne=$prop->lignes[$i]->price * $prop->lignes[$i]->qty;
|
||||||
if ($prop->remise_percent) $tvaligne-=($tvaligne*$prop->remise_percent)/100;
|
if ($prop->remise_percent) $tvaligne-=($tvaligne*$prop->remise_percent)/100;
|
||||||
$this->tva[ (string)$prop->lignes[$i]->tva_tx ] += $tvaligne;
|
$this->tva[ (string)$prop->lignes[$i]->tva_tx ] += $tvaligne;
|
||||||
|
|
||||||
$nexY+=2; // Passe espace entre les lignes
|
$nexY+=2; // Passe espace entre les lignes
|
||||||
|
|
||||||
if ($nexY > 200 && $i < ($nblignes - 1))
|
if ($nexY > 200 && $i < ($nblignes - 1))
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY);
|
//$this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY);
|
||||||
$this->_pagefoot($pdf);
|
if ($pagenb == 1)
|
||||||
|
$this->_tableau($pdf, $tab_top, $nexY - $tab_top + 20, $nexY);
|
||||||
// Nouvelle page
|
else
|
||||||
$pdf->AddPage();
|
$this->_tableau($pdf, $tab_top_newpage, $nexY - $tab_top_newpage + 20, $nexY);
|
||||||
$pagenb++;
|
$this->_pagefoot($pdf);
|
||||||
$this->_pagehead($pdf, $prop, 0);
|
|
||||||
|
// Nouvelle page
|
||||||
$nexY = $tab_top_newpage + 8;
|
$pdf->AddPage();
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pagenb++;
|
||||||
$pdf->SetFont('Arial','', 10);
|
$this->_pagehead($pdf, $prop, 0);
|
||||||
|
|
||||||
|
$nexY = $tab_top_newpage + 8;
|
||||||
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
$pdf->SetFont('Arial','', 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// Affiche cadre tableau
|
// Affiche cadre tableau
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
//$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
||||||
$bottomlasttab=$tab_top + $tab_height + 1;
|
//$bottomlasttab=$tab_top + $tab_height + 1;
|
||||||
|
|
||||||
|
$this->_tableau($pdf, $tab_top, $nexY - $tab_top + 20, $nexY);
|
||||||
|
$bottomlasttab=$tab_top + $nexY - $tab_top + 20 + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $tab_height, $nexY);
|
//$this->_tableau($pdf, $tab_top_newpage, $tab_height, $nexY);
|
||||||
$bottomlasttab=$tab_top_newpage + $tab_height + 1;
|
//$bottomlasttab=$tab_top_newpage + $tab_height + 1;
|
||||||
|
$this->_tableau($pdf, $tab_top_newpage, $nexY - $tab_top_newpage + 20, $nexY);
|
||||||
|
$bottomlasttab=$tab_top_newpage + $nexY - $tab_top_newpage + 20 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$deja_regle = "";
|
$deja_regle = "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user