From 44e91d96dde81229619386471bd42df56429fce2 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 29 Oct 2003 12:39:13 +0000 Subject: [PATCH] Application patch Roland Mas --- .../modules/facture/pdf_tourteau.modules.php | 31 +++++++++++++++---- htdocs/main.inc.php | 13 ++++++-- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/htdocs/includes/modules/facture/pdf_tourteau.modules.php b/htdocs/includes/modules/facture/pdf_tourteau.modules.php index 6e6255b3415..4f10477a27b 100644 --- a/htdocs/includes/modules/facture/pdf_tourteau.modules.php +++ b/htdocs/includes/modules/facture/pdf_tourteau.modules.php @@ -152,6 +152,25 @@ Class pdf_tourteau { $pdf->SetXY (174, $tab2_top + 16); $pdf->MultiCell(26, 8, price($fac->total_ttc), 1, 'R', 1); + $deja_regle = $fac->getSommePaiement(); + + if ($deja_regle > 0) + { + $pdf->Rect(132, $tab2_top+$tab2_height, 68, 16); + + $pdf->SetXY (132, $tab2_top + 24); + $pdf->MultiCell(42, 8, "Déjà réglé", 0, 'R', 0); + + $pdf->SetXY (132, $tab2_top + 32); + $pdf->MultiCell(42, 8, "Reste à payer", 1, 'R', 1); + + $pdf->SetXY (174, $tab2_top + 24); + $pdf->MultiCell(26, 8, price($deja_regle), 0, 'R', 0); + + $pdf->SetXY (174, $tab2_top + 32); + $pdf->MultiCell(26, 8, price($fac->total_ttc - $deja_regle), 1, 'R', 1); + } + /* * */ @@ -269,24 +288,24 @@ Class pdf_tourteau { { $pdf->SetTextColor(0,0,200); $pdf->SetFont('Arial','B',14); - $pdf->MultiCell(60, 8, FAC_PDF_INTITULE, 0, 'L'); + $pdf->MultiCell(76, 8, FAC_PDF_INTITULE, 0, 'L'); } $pdf->SetTextColor(70,70,170); if (defined("FAC_PDF_ADRESSE")) { $pdf->SetFont('Arial','',12); - $pdf->MultiCell(40, 5, FAC_PDF_ADRESSE); + $pdf->MultiCell(76, 5, FAC_PDF_ADRESSE); } if (defined("FAC_PDF_TEL")) { $pdf->SetFont('Arial','',10); - $pdf->MultiCell(40, 5, "Tél : ".FAC_PDF_TEL); + $pdf->MultiCell(76, 5, "Tél : ".FAC_PDF_TEL); } if (defined("FAC_PDF_SIREN")) { $pdf->SetFont('Arial','',10); - $pdf->MultiCell(40, 5, "SIREN : ".FAC_PDF_SIREN); + $pdf->MultiCell(76, 5, "SIREN : ".FAC_PDF_SIREN); } if (defined("FAC_PDF_INTITULE2")) @@ -303,10 +322,10 @@ Class pdf_tourteau { $pdf->SetFont('Arial','B',12); $fac->fetch_client(); $pdf->SetXY(102,42); - $pdf->MultiCell(66,5, $fac->client->nom); + $pdf->MultiCell(96,5, $fac->client->nom); $pdf->SetFont('Arial','B',11); $pdf->SetXY(102,47); - $pdf->MultiCell(66,5, $fac->client->adresse . "\n" . $fac->client->cp . " " . $fac->client->ville); + $pdf->MultiCell(96,5, $fac->client->adresse . "\n" . $fac->client->cp . " " . $fac->client->ville); $pdf->rect(100, 40, 100, 40); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index cc4396bccb5..6e3a5f9e613 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -409,8 +409,17 @@ function top_menu($head, $title="") print ''.strftime(" %d %B - %H:%M",time()).''; - print ''.$user->login.''; - print ''; + print '' ; + + if (empty ($GLOBALS["REMOTE_USER"])) + { + print ''.$user->login.'' ; + } + else + { + print $user->login ; + } + print ''; // print ''; /*