Le lundi 22 août 2005 à 02:16 +0200, Laurent Destailleur (Eldy) a
écrit :
> Patch appliqué.
Génial.
Alors, peut-être cela te dit-il d'appliquer la même chose (même si j'ai
bien vu qu'une partie a déjà été incluse) au modèle crabe de facture par
le patch joint
--
Christophe
--- dolibarrcvs/htdocs/includes/modules/facture/pdf_crabe.modules.php 2005-08-21 22:14:47.000000000 -0400
+++ dolibarr/htdocs/includes/modules/facture/pdf_crabe.modules.php 2005-08-21 22:56:13.000000000 -0400
@@ -193,7 +193,7 @@
// TVA
$pdf->SetXY ($this->posxtva, $curY);
- $pdf->MultiCell(10, 5, $fac->lignes[$i]->tva_taux, 0, 'R');
+ $pdf->MultiCell(10, 5, ($fac->lignes[$i]->tva_taux < 0 ? '*':'').abs($fac->lignes[$i]->tva_taux), 0, 'R');
// Prix unitaire HT avant remise
$pdf->SetXY ($this->posxup, $curY);
@@ -480,7 +480,7 @@
}
// Tableau total
- $col1x=120; $col2x=174;
+ $lltot = 200; $col1x = 120; $col2x = 182; $largcol2 = $lltot - $col2x;
// Total HT
$pdf->SetFillColor(256,256,256);
@@ -488,7 +488,7 @@
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalHT"), 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + 0);
- $pdf->MultiCell(26, $tab2_hl, price($fac->total_ht + $fac->remise), 0, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ht + $fac->remise), 0, 'R', 1);
// Remise globale
if ($fac->remise > 0)
@@ -497,13 +497,13 @@
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("GlobalDiscount"), 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl);
- $pdf->MultiCell(26, $tab2_hl, "-".$fac->remise_percent."%", 0, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, "-".$fac->remise_percent."%", 0, 'R', 1);
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * 2);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, "Total HT après remise", 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * 2);
- $pdf->MultiCell(26, $tab2_hl, price($fac->total_ht), 0, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ht), 0, 'R', 1);
$index = 2;
}
@@ -523,10 +523,11 @@
$index++;
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
- $pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalVAT").' '.$tvakey.'%', 0, 'L', 1);
+ $tvacompl = ( (float)$tvakey < 0 ) ? " (".$langs->trans("NonPercuRecuperable").")" : '' ;
+ $pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalVAT").' '.abs($tvakey).'%'.$tvacompl, 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
- $pdf->MultiCell(26, $tab2_hl, price($tvaval * (float)$tvakey / 100 ), 0, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval * (float)$tvakey / 100 ), 0, 'R', 1);
}
}
if (! $atleastoneratenotnull)
@@ -536,7 +537,7 @@
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalVAT"), 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
- $pdf->MultiCell(26, $tab2_hl, price(0), 0, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, price(0), 0, 'R', 1);
}
$useborder=0;
@@ -548,7 +549,7 @@
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalTTC"), $useborder, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
- $pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc), $useborder, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ttc), $useborder, 'R', 1);
$pdf->SetFont('Arial','', 9);
$pdf->SetTextColor(0,0,0);
@@ -560,7 +561,7 @@
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("AlreadyPayed"), 0, 'L', 0);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
- $pdf->MultiCell(26, $tab2_hl, price($deja_regle), 0, 'R', 0);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
$index++;
$pdf->SetTextColor(0,0,60);
@@ -569,12 +570,16 @@
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("RemainderToPay"), $useborder, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
- $pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc - $deja_regle), $useborder, 'R', 1);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ttc - $deja_regle), $useborder, 'R', 1);
$pdf->SetFont('Arial','', 9);
$pdf->SetTextColor(0,0,0);
}
$index++;
+ $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
+ $pdf->MultiCell($col2x-$col1x+$largcol2, $tab2_hl, $langs->trans('DispenseMontantLettres'), 0, 'L' );
+
+ $index++;
return ($tab2_top + ($tab2_hl * $index));
}
_______________________________________________
Dolibarr-dev mailing list
[EMAIL PROTECTED]
http://lists.nongnu.org/mailman/listinfo/dolibarr-dev