From a55fa93acc257a87307ad30e37c85d3ce899d7da Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 11 Apr 2005 13:20:04 +0000 Subject: [PATCH] Prise en compte de l'increment sur les factures --- htdocs/compta/export/ComptaJournalVente.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/export/ComptaJournalVente.class.php b/htdocs/compta/export/ComptaJournalVente.class.php index 7630cc719fd..6339148dfbf 100644 --- a/htdocs/compta/export/ComptaJournalVente.class.php +++ b/htdocs/compta/export/ComptaJournalVente.class.php @@ -146,6 +146,12 @@ class ComptaJournalVente { $price = abs(price($obj->price)); $tva = abs($obj->tva); + $facnumber = $obj->facnumber; + if (strlen(trim($obj->increment)) > 0) + { + $facnumber = $obj->increment; + } + if (strlen($obj->nom) > 31) { $socnom = substr($obj->nom, 0 , 31); @@ -184,7 +190,7 @@ class ComptaJournalVente { $pdf->cell($wc[3],$hligne,'4110000'); $pdf->cell($wc[4],$hligne,$obj->code_compta); $pdf->cell($wc[5],$hligne,$socnom .' '.$libelle); - $pdf->cell($wc[6],$hligne,$obj->facnumber); + $pdf->cell($wc[6],$hligne,$facnumber); $pdf->cell($wc[7],$hligne,$amount,0,0,'R'); $pdf->cell($wc[8],$hligne,$d); $pdf->cell($wc[9],$hligne,strftime('%d%m%y',$obj->dp),0,0,'R'); @@ -195,7 +201,7 @@ class ComptaJournalVente { $pdf->cell($wc[3],$hligne,'4457119'); $pdf->cell($wc[4],$hligne,''); $pdf->cell($wc[5],$hligne,$socnom .' '.$libelle); - $pdf->cell($wc[6],$hligne,$obj->facnumber); + $pdf->cell($wc[6],$hligne,$facnumber); $pdf->cell($wc[7],$hligne,$tva,0,0,'R'); $pdf->cell($wc[8],$hligne,$c); $pdf->cell($wc[9],$hligne,strftime('%d%m%y',$obj->dp),0,0,'R'); @@ -207,7 +213,7 @@ class ComptaJournalVente { $pdf->cell($wc[3],$hligne,$obj->numero); $pdf->cell($wc[4],$hligne,''); $pdf->cell($wc[5],$hligne,$socnom .' '.$libelle); - $pdf->cell($wc[6],$hligne,$obj->facnumber); + $pdf->cell($wc[6],$hligne,$facnumber); $pdf->cell($wc[7],$hligne,$price,0,0,'R'); $pdf->cell($wc[8],$hligne,$c); $pdf->cell($wc[9],$hligne,strftime('%d%m%y',$obj->dp),0,0,'R');