diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 918d3f89898033e9626676ee06a459743c8be096..7e3b03e739f555c27f779d1a6b6eb4f57678ee5b 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1480,7 +1480,14 @@ class CommandeFournisseur extends Commande $line->desc=$langs->trans("Description")." ".$xnbp; $line->qty=1; $line->subprice=100; - $line->tva_tx=19.6; + $line->price=100; + $line->tva_tx=19.6; + $line->localtax1_tx=0; + $line->localtax2_tx=0; + $line->remise_percent=10; + $line->total_ht=90; + $line->total_ttc=107.64; // 90 * 1.196 + $line->total_tva=17.64; $line->ref_fourn='SUPPLIER_REF_'.$xnbp; $prodid = rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4c8cc8ee4d7f708fb9f94e9425f3512470bc3a27..d07f4dacd994034e11e2f8bb47b242f9a3e0700e 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1043,7 +1043,13 @@ class FactureFournisseur extends Facture $line->qty=1; $line->subprice=100; $line->price=100; - $line->tva_tx=19.6; + $line->tva_tx=19.6; + $line->localtax1_tx=0; + $line->localtax2_tx=0; + $line->remise_percent=10; + $line->total_ht=90; + $line->total_ttc=107.64; // 90 * 1.196 + $line->total_tva=17.64; $prodid = rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; $line->product_type=0; diff --git a/htdocs/includes/modules/commande/pdf_edison.modules.php b/htdocs/includes/modules/commande/pdf_edison.modules.php index f21495756ee427b9239d0be18e53fddb8f591eb5..c566d992e724edeee29e9a3e984ab37a453cf551 100644 --- a/htdocs/includes/modules/commande/pdf_edison.modules.php +++ b/htdocs/includes/modules/commande/pdf_edison.modules.php @@ -464,7 +464,7 @@ class pdf_edison extends ModelePDFCommandes $langs->load("bills"); $default_font_size = pdf_getPDFFontSize($outputlangs); - $pdf->SetFont('','', $default_font_size); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY(30,$tab_top + 2); $pdf->MultiCell(0,4,$outputlangs->transnoentities("Designation"),0,'L'); diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 31d5e15fc79908dc38658a727833623c40f6f0bb..4f6170ac4a73da1fbe5023b84b636d3470866be2 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -782,8 +782,8 @@ class pdf_einstein extends ModelePDFCommandes if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); - $pdf->SetXY ($this->posxtva-1, $tab_top+1); - $pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C'); + $pdf->SetXY ($this->posxtva-3, $tab_top+1); + $pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C'); } $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 9664c36fee7272fe0e901d036386abe1719336f0..f949e0354c88cba71b22f2c58b8fd079fa566c1b 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -933,8 +933,8 @@ class pdf_crabe extends ModelePDFFactures if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); - $pdf->SetXY ($this->posxtva-1, $tab_top+1); - $pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C'); + $pdf->SetXY ($this->posxtva-3, $tab_top+1); + $pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C'); } $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index aacffb03c6d28771efb965927892fa6106741c1e..00024fa8dd2e14d3a6834b2040e6afdeaeeffa09 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -734,19 +734,18 @@ class pdf_oursin extends ModelePDFFactures $pdf->line( $this->marges['g'], $tab_top+8, 210-$this->marges['d'], $tab_top+8 ); $pdf->line( $this->marges['g'], $tab_top + $tab_height, 210-$this->marges['d'], $tab_top + $tab_height ); - $pdf->SetFont('','B', $default_font_size); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY($this->marges['g'],$tab_top + 1); $pdf->MultiCell(0, 4, $outputlangs->transnoentities("Designation"), 0, 'L'); - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) + + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { - if ($this->franchise!=1) - { - $pdf->SetXY($this->marges['g']+120,$tab_top + 1); - $pdf->MultiCell(0, 4, $outputlangs->transnoentities("VAT"), 0, 'L'); - } + $pdf->SetXY($this->marges['g']+120,$tab_top + 1); + $pdf->MultiCell(0, 4, $outputlangs->transnoentities("VAT"), 0, 'L'); } - $pdf->SetXY($this->marges['g']+135,$tab_top + 1); + + $pdf->SetXY($this->marges['g']+135,$tab_top + 1); $pdf->MultiCell(0, 4, $outputlangs->transnoentities("PriceUHT"), 0, 'L'); $pdf->SetXY($this->marges['g']+153,$tab_top + 1); $pdf->MultiCell(0, 4, $outputlangs->transnoentities("Qty"), 0, 'L'); diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php index e8d7bc5d40fa58b4bedaafc27a5951dd69b2e9c7..64019db7cb49d3907f1f1bf10fb411518f307256 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php @@ -313,7 +313,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs) { $default_font_size = pdf_getPDFFontSize($outputlangs); - $pdf->SetFont('','', $default_font_size); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY(30, $tab_top+1); $pdf->MultiCell(60, 2, $outputlangs->transnoentities("Designation"), 0, 'L'); diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index a874729831a794be27c1b613b74edb6197583a60..9e30bfcbd6ad9685c5af08b46953cc9fca81874a 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -450,7 +450,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6); $pdf->SetTextColor(0,0,0); - $pdf->SetFont('','', $default_font_size); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY ($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(80,2, $outputlangs->transnoentities("Designation"),'','L'); diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 76af2c475664038c62207b3003ee5dd9422c2d47..e56085604b1627cf083a7f2e6d33cd437bf9a45d 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -807,8 +807,8 @@ class pdf_propale_azur extends ModelePDFPropales if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); - $pdf->SetXY ($this->posxtva-1, $tab_top+1); - $pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C'); + $pdf->SetXY ($this->posxtva-3, $tab_top+1); + $pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C'); } $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index 5e4fbf6f1a12fe65e941dd27fe993a00c0eb3867..006a96593e2655b88a68f24f1da9029babaa1a29 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -458,7 +458,7 @@ class pdf_propale_jaune extends ModelePDFPropales $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); - $pdf->SetFont('','', $default_font_size + 1); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY(10,$tab_top); $pdf->MultiCell(20,10,$outputlangs->transnoentities("Ref"),0,'L',1); 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 027df3ae8adad730136e3d9d077e2b2d64725b3f..4b651d77c4f92892d0365d02d7fdc3b64a6fd718 100755 --- a/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -188,7 +188,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetAutoPageBreak(1,0); - // New page + // Positionne $this->atleastonediscount si on a au moins une remise + for ($i = 0 ; $i < $nblignes ; $i++) + { + if ($object->lines[$i]->remise_percent) + { + $this->atleastonediscount++; + } + } + + // New page $pdf->AddPage(); $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); @@ -496,7 +505,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // line prend une position y en 3eme param $pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6); - $pdf->SetFont('','', $default_font_size); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY ($this->posxdesc-1, $tab_top+2); $pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L'); @@ -504,8 +513,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); - $pdf->SetXY ($this->posxtva-1, $tab_top+2); - $pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C'); + $pdf->SetXY ($this->posxtva-3, $tab_top+2); + $pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C'); } $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); @@ -517,6 +526,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); $pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); + if ($this->atleastonediscount) { $pdf->SetXY ($this->posxdiscount-1, $tab_top+2); 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 409b94f5dc216942a5f421821ef1e3929f001074..b15fdc4f27053f6c291af5754b9adf245d7e4c45 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -506,7 +506,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // line prend une position y en 3eme param $pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6); - $pdf->SetFont('','', $default_font_size); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY ($this->posxdesc-1, $tab_top+2); $pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L'); @@ -514,8 +514,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); - $pdf->SetXY ($this->posxtva-1, $tab_top+2); - $pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C'); + $pdf->SetXY ($this->posxtva-3, $tab_top+2); + $pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C'); } $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);