From 0ec4484fff636c95b70ff8800cc31fab2afb3aeb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Aug 2005 00:27:31 +0000 Subject: [PATCH] =?UTF-8?q?Am=E9lioration=20du=20modele=20facture=20crabe?= =?UTF-8?q?=20et=20propal=20azur=20pour=20mis=20en=20conformit=E9=20r=E9gl?= =?UTF-8?q?ementaires=20(france)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/facture/pdf_crabe.modules.php | 49 +++++++++---------- .../propale/pdf_propale_azur.modules.php | 41 +++++++--------- htdocs/langs/en_US/companies.lang | 1 + htdocs/langs/fr_FR/companies.lang | 3 +- 4 files changed, 43 insertions(+), 51 deletions(-) diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index e8fcb8a0722..bd9affbad80 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -665,6 +665,7 @@ class pdf_crabe extends ModelePDFFactures // Emetteur $posy=42; + $hautcadre=40; $pdf->SetTextColor(0,0,0); $pdf->SetFont('Arial','',8); $pdf->SetXY(10,$posy-5); @@ -673,7 +674,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY(10,$posy); $pdf->SetFillColor(230,230,230); - $pdf->MultiCell(82, 34, "", 0, 'R', 1); + $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); $pdf->SetXY(10,$posy+3); @@ -721,6 +722,8 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY(102,$posy-5); $pdf->MultiCell(80,5, $langs->trans("BillTo").":"); $fac->fetch_client(); + // Cadre client destinataire + $pdf->rect(100, $posy, 100, $hautcadre); // Nom client $pdf->SetXY(102,$posy+3); @@ -735,9 +738,6 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY(102,$posy+7); $pdf->MultiCell(86,4, $carac_client); - // Cadre client destinataire - $pdf->rect(100, $posy, 100, 34); - // Montants exprimés en $pdf->SetTextColor(0,0,0); $pdf->SetFont('Arial','',10); @@ -768,6 +768,7 @@ class pdf_crabe extends ModelePDFFactures $footy=13; $pdf->SetFont('Arial','',8); + // Premiere ligne d'info réglementaires $ligne=""; if ($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE) { @@ -775,44 +776,38 @@ class pdf_crabe extends ModelePDFFactures } if ($conf->global->MAIN_INFO_CAPITAL) { - $ligne.=($ligne?" - ":"")."Capital de " . MAIN_INFO_CAPITAL." ".$langs->trans("Currency".$conf->monnaie); + $ligne.=($ligne?" - ":"").$langs->trans("CapitalOf",$conf->global->MAIN_INFO_CAPITAL)." ".$langs->trans("Currency".$conf->monnaie); } if ($conf->global->MAIN_INFO_SIREN) { - $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->code_pays).": ".MAIN_INFO_SIREN; + $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->code_pays).": ".$conf->global->MAIN_INFO_SIREN; } if ($conf->global->MAIN_INFO_SIRET) { - $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->code_pays).": ".MAIN_INFO_SIRET; - } - if ($conf->global->MAIN_INFO_RCS) - { - $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->code_pays).": ".MAIN_INFO_RCS; + $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->code_pays).": ".$conf->global->MAIN_INFO_SIRET; } if ($ligne) { - $pdf->SetY(-$footy); - $pdf->MultiCell(190, 3, $ligne, 0, 'C'); + $pdf->SetXY(8,-$footy); + $pdf->MultiCell(200, 2, $ligne, 0, 'C', 0); } - // Affiche le numéro de TVA intracommunautaire - if ($conf->global->MAIN_INFO_TVAINTRA == 'MAIN_INFO_TVAINTRA') { - $footy-=3; - $pdf->SetY(-$footy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('Arial','B',8); - $pdf->MultiCell(190, 3, $langs->trans("ErrorVATIntraNotConfigured"),0,'L',0); - $pdf->MultiCell(190, 3, $langs->trans("ErrorGoToGlobalSetup"),0,'L',0); - $pdf->SetTextColor(0,0,0); + // Deuxieme ligne d'info réglementaires + $ligne=""; + if ($conf->global->MAIN_INFO_RCS) + { + $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->code_pays).": ".$conf->global->MAIN_INFO_RCS; } - elseif ($conf->global->MAIN_INFO_TVAINTRA != '') { - $footy-=3; - $pdf->SetY(-$footy); - $pdf->MultiCell(190, 3, $langs->trans("TVAIntra").": ".MAIN_INFO_TVAINTRA, 0, 'C'); + if ($conf->global->MAIN_INFO_TVAINTRA != '') + { + $ligne.=($ligne?" - ":"").$langs->trans("VATIntraShort").": ".$conf->global->MAIN_INFO_TVAINTRA; } + $footy-=3; + $pdf->SetY(-$footy); + $pdf->MultiCell(200, 2, $ligne , 0, 'C'); $pdf->SetXY(-20,-$footy); - $pdf->MultiCell(10, 3, $pdf->PageNo().'/{nb}', 0, 'R'); + $pdf->MultiCell(10, 2, $pdf->PageNo().'/{nb}', 0, 'R', 0); } } diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 5f3466d9a9f..68088542562 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -695,6 +695,7 @@ class pdf_propale_azur extends ModelePDFPropales $footy=13; $pdf->SetFont('Arial','',8); + // Premiere ligne d'info réglementaires $ligne=""; if ($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE) { @@ -702,44 +703,38 @@ class pdf_propale_azur extends ModelePDFPropales } if ($conf->global->MAIN_INFO_CAPITAL) { - $ligne.=($ligne?" - ":"")."Capital de " . MAIN_INFO_CAPITAL." ".$langs->trans("Currency".$conf->monnaie); + $ligne.=($ligne?" - ":"").$langs->trans("CapitalOf",$conf->global->MAIN_INFO_CAPITAL)." ".$langs->trans("Currency".$conf->monnaie); } if ($conf->global->MAIN_INFO_SIREN) { - $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->code_pays).": ".MAIN_INFO_SIREN; + $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->code_pays).": ".$conf->global->MAIN_INFO_SIREN; } if ($conf->global->MAIN_INFO_SIRET) { - $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->code_pays).": ".MAIN_INFO_SIRET; - } - if ($conf->global->MAIN_INFO_RCS) - { - $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->code_pays).": ".MAIN_INFO_RCS; + $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->code_pays).": ".$conf->global->MAIN_INFO_SIRET; } if ($ligne) { - $pdf->SetY(-$footy); - $pdf->MultiCell(190, 3, $ligne, 0, 'C'); + $pdf->SetXY(8,-$footy); + $pdf->MultiCell(200, 2, $ligne, 0, 'C', 0); } - // Affiche le numéro de TVA intracommunautaire - if ($conf->global->MAIN_INFO_TVAINTRA == 'MAIN_INFO_TVAINTRA') { - $footy-=3; - $pdf->SetY(-$footy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('Arial','B',8); - $pdf->MultiCell(190, 3, $langs->trans("ErrorVATIntraNotConfigured"),0,'L',0); - $pdf->MultiCell(190, 3, $langs->trans("ErrorGoToGlobalSetup"),0,'L',0); - $pdf->SetTextColor(0,0,0); + // Deuxieme ligne d'info réglementaires + $ligne=""; + if ($conf->global->MAIN_INFO_RCS) + { + $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->code_pays).": ".$conf->global->MAIN_INFO_RCS; } - elseif ($conf->global->MAIN_INFO_TVAINTRA != '') { - $footy-=3; - $pdf->SetY(-$footy); - $pdf->MultiCell(190, 3, $langs->trans("TVAIntra").": ".MAIN_INFO_TVAINTRA, 0, 'C'); + if ($conf->global->MAIN_INFO_TVAINTRA != '') + { + $ligne.=($ligne?" - ":"").$langs->trans("VATIntraShort").": ".$conf->global->MAIN_INFO_TVAINTRA; } + $footy-=3; + $pdf->SetY(-$footy); + $pdf->MultiCell(200, 2, $ligne , 0, 'C'); $pdf->SetXY(-20,-$footy); - $pdf->MultiCell(10, 3, $pdf->PageNo().'/{nb}', 0, 'R'); + $pdf->MultiCell(10, 2, $pdf->PageNo().'/{nb}', 0, 'R', 0); } } diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index fcb5e361789..7729a79384f 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -79,6 +79,7 @@ LastContacts=Last contacts MyContacts=My contacts Phones=Phones Capital=Capital +CapitalOf=Capital of %s EditCompany=Edit company ThisUserIsNot=This user is not a prospect, customer nor supplier VATIntraCheckableOnEUSite=Intracomunnautary VAT can be checked on European commision site diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index ef88ea6209b..1e81e721984 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -46,7 +46,7 @@ ProfId2PT=Social security number ProfId3PT=Commercial Record number ProfId4PT=Conservatory TVAIntra=Numéro de TVA Intracommunautaire -VATIntraShort=Num TVA Intra-communautaire +VATIntraShort=N° TVA Intra-communautaire ProspectCustomer=Prospect / Client Prospect=Prospect CustomerCard=Fiche Client @@ -79,6 +79,7 @@ LastContacts=Derniers contacts MyContacts=Mes contacts Phones=Téléphones Capital=Capital +CapitalOf=Capital de %s EditCompany=Modification société ThisUserIsNot=Cet utilisateur n'est ni un prospect, ni un client, ni un fournisseur VATIntraCheckableOnEUSite=(Vérifiable sur le site de la Commission Européenne)