From 6633478149462541251f5089e06b25dc27e4cedd Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 12 Apr 2011 10:29:39 +0000 Subject: [PATCH] Fix: don't show tva with rate 0 --- htdocs/includes/modules/commande/pdf_einstein.modules.php | 2 +- htdocs/includes/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/includes/modules/facture/doc/pdf_oursin.modules.php | 2 +- htdocs/includes/modules/propale/pdf_propale_azur.modules.php | 2 +- .../modules/supplier_invoice/pdf/pdf_canelle.modules.php | 2 +- .../modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- htdocs/lib/pdf.lib.php | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 25c42be3690..bb003d0b921 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -596,7 +596,7 @@ class pdf_einstein extends ModelePDFCommandes { foreach( $this->tva as $tvakey => $tvaval ) { - if ($tvakey) // On affiche pas taux 0 + if ($tvakey > 0) // On affiche pas taux 0 { $this->atleastoneratenotnull++; diff --git a/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php b/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php index 28c4bcb87f9..04c796b66fe 100755 --- a/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/doc/pdf_crabe.modules.php @@ -722,7 +722,7 @@ class pdf_crabe extends ModelePDFFactures { foreach( $this->tva as $tvakey => $tvaval ) { - if ($tvakey) // On affiche pas taux 0 + if ($tvakey > 0) // On affiche pas taux 0 { $this->atleastoneratenotnull++; diff --git a/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php b/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php index 857cb2d076f..dcbc8e44358 100755 --- a/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/doc/pdf_oursin.modules.php @@ -619,7 +619,7 @@ class pdf_oursin extends ModelePDFFactures { foreach( $this->tva as $tvakey => $tvaval ) { - if ($tvakey) // On affiche pas taux 0 + if ($tvakey > 0) // On affiche pas taux 0 { $this->atleastoneratenotnull++; diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index e9b13535ad4..ddb298517c8 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -607,7 +607,7 @@ class pdf_propale_azur extends ModelePDFPropales { foreach( $this->tva as $tvakey => $tvaval ) { - if ($tvakey) // On affiche pas taux 0 + if ($tvakey > 0) // On affiche pas taux 0 { $this->atleastoneratenotnull++; diff --git a/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 537d13757a8..3611f1f75b8 100755 --- a/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -421,7 +421,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices foreach( $this->tva as $tvakey => $tvaval ) { - if ($tvakey) // On affiche pas taux 0 + if ($tvakey > 0) // On affiche pas taux 0 { $this->atleastoneratenotnull++; diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php index 238f9a9afa5..ba664d9256e 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -423,7 +423,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders foreach( $this->tva as $tvakey => $tvaval ) { - if ($tvakey) // On affiche pas taux 0 + if ($tvakey > 0) // On affiche pas taux 0 { $this->atleastoneratenotnull++; diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 17167887201..3cdf6324bf4 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -657,7 +657,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide { if (empty($object->lines[$i]->fk_parent_line)) { - return $object->hooks[$object->lines[$i]->special_code]->pdf_writelinedesc($pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy); + return $object->hooks[$object->lines[$i]->special_code]->pdf_writelinedesc($pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref,$hidedesc,$issupplierline); } } else @@ -956,7 +956,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs) { if (empty($object->lines[$i]->fk_parent_line)) { - // TODO add hook function + return $object->hooks[$object->lines[$i]->special_code]->pdf_getlinetotalexcltax($object,$i,$outputlangs); } } else