Fix bad value for total VAT on PDF
This commit is contained in:
parent
9db0b7d0ef
commit
6ddc4ba3a0
@ -575,7 +575,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
// 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)) {
|
||||||
|
|||||||
@ -800,7 +800,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
// 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)) {
|
||||||
|
|||||||
@ -749,9 +749,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (!isset($this->tva[$vatrate])) {
|
if (!isset($this->tva[$vatrate])) {
|
||||||
$this->tva[$vatrate] = 0;
|
$this->tva[$vatrate] = 0;
|
||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
$nexY = $posYAfterImage;
|
$nexY = $posYAfterImage;
|
||||||
|
|||||||
@ -887,9 +887,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
if (!isset($this->tva[$vatrate])) {
|
if (!isset($this->tva[$vatrate])) {
|
||||||
$this->tva[$vatrate] = 0;
|
$this->tva[$vatrate] = 0;
|
||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
$nexY = max($nexY, $posYAfterImage);
|
$nexY = max($nexY, $posYAfterImage);
|
||||||
|
|
||||||
|
|||||||
@ -685,7 +685,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
$nexY = $posYAfterImage;
|
$nexY = $posYAfterImage;
|
||||||
|
|||||||
@ -810,7 +810,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
$nexY = max($nexY, $posYAfterImage);
|
$nexY = max($nexY, $posYAfterImage);
|
||||||
|
|||||||
@ -746,7 +746,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
$nexY = $posYAfterImage;
|
$nexY = $posYAfterImage;
|
||||||
|
|||||||
@ -625,7 +625,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
$nexY = $posYAfterImage;
|
$nexY = $posYAfterImage;
|
||||||
|
|||||||
@ -619,7 +619,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
}
|
}
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
$vatcode = $object->lines[$i]->vat_src_code;
|
$vatcode = $object->lines[$i]->vat_src_code;
|
||||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=>$tvaligne);
|
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||||
|
|
||||||
if ($posYAfterImage > $posYAfterDescription) {
|
if ($posYAfterImage > $posYAfterDescription) {
|
||||||
$nexY = $posYAfterImage;
|
$nexY = $posYAfterImage;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user