/[dolibarr]/dolibarr/htdocs/includes/modules/propale/pdf_propale_azur.modules.php
ViewVC logotype

Diff of /dolibarr/htdocs/includes/modules/propale/pdf_propale_azur.modules.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by hregis, Sun Aug 21 15:51:37 2005 UTC revision 1.18 by eldy, Sun Aug 21 19:23:55 2005 UTC
# Line 74  class pdf_propale_azur extends ModelePDF Line 74  class pdf_propale_azur extends ModelePDF
74          }          }
75          $this->db->free($result);          $this->db->free($result);
76    
77            $this->tva=array();
78    
79          // Defini position des colonnes          // Defini position des colonnes
80          $this->posxdesc=11;          $this->posxdesc=11;
81          $this->posxtva=121;          $this->posxtva=121;
# Line 224  class pdf_propale_azur extends ModelePDF Line 226  class pdf_propale_azur extends ModelePDF
226    
227                      // Collecte des totaux par valeur de tva                      // Collecte des totaux par valeur de tva
228                      // dans le tableau tva["taux"]=total_tva                      // dans le tableau tva["taux"]=total_tva
229                                          $tvaligne=$fac->lignes[$i]->price * $fac->lignes[$i]->qty;                                          $tvaligne=$prop->lignes[$i]->price * $prop->lignes[$i]->qty;
230                                          if ($fac->remise_percent) $tvaligne-=($tvaligne*$fac->remise_percent)/100;                                          if ($prop->remise_percent) $tvaligne-=($tvaligne*$prop->remise_percent)/100;
231                                          $this->tva[ (string)$fac->lignes[$i]->tva_taux ] += $tvaligne;                                          $this->tva[ (string)$prop->lignes[$i]->tva_taux ] += $tvaligne;
232    
233                      if ($nexY > 200 && $i < $nblignes - 1)                      if ($nexY > 200 && $i < $nblignes - 1)
234                      {                      {
# Line 449  class pdf_propale_azur extends ModelePDF Line 451  class pdf_propale_azur extends ModelePDF
451          if (! $atleastoneratenotnull)          if (! $atleastoneratenotnull)
452          {          {
453              $index++;              $index++;
454          $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);              $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
455          $pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalVAT"), 0, 'L', 1);              $pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalVAT"), 0, 'L', 1);
456        
457          $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);              $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
458          $pdf->MultiCell(26, $tab2_hl, price($prop->total_tva), 0, 'R', 1);              $pdf->MultiCell(26, $tab2_hl, price($prop->total_tva), 0, 'R', 1);
459            }
460            
461          $useborder=0;          $useborder=0;
462                    
463          $index++;          $index++;
464          $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);          $pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
465          $pdf->SetTextColor(0,0,60);          $pdf->SetTextColor(0,0,60);
466          $pdf->SetFont('Arial','B', 9);          $pdf->SetFillColor(224,224,224);
467          $pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalTTC"), $useborder, 'L', 1);          $pdf->MultiCell($col2x-$col1x, $tab2_hl, $langs->trans("TotalTTC"), $useborder, 'L', 1);
468    
469          $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * ($index+1));          $pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
470          $pdf->MultiCell(26, $tab2_hl, price($prop->total_ttc), $useborder, 'R', 1);          $pdf->MultiCell(26, $tab2_hl, price($prop->total_ttc), $useborder, 'R', 1);
471          $pdf->SetFont('Arial','', 9);          $pdf->SetFont('Arial','', 9);
472          $pdf->SetTextColor(0,0,0);          $pdf->SetTextColor(0,0,0);
# Line 594  class pdf_propale_azur extends ModelePDF Line 597  class pdf_propale_azur extends ModelePDF
597          $pdf->MultiCell(82, 34, "", 0, 'R', 1);          $pdf->MultiCell(82, 34, "", 0, 'R', 1);
598    
599    
600          $pdf->SetXY(10,$posy+4);          $pdf->SetXY(10,$posy+3);
601    
602          // Nom emetteur          // Nom emetteur
603          $pdf->SetTextColor(0,0,60);          $pdf->SetTextColor(0,0,60);
# Line 614  class pdf_propale_azur extends ModelePDF Line 617  class pdf_propale_azur extends ModelePDF
617          {          {
618              $pdf->MultiCell(80, 4, FAC_PDF_ADRESSE);              $pdf->MultiCell(80, 4, FAC_PDF_ADRESSE);
619          }          }
620            $pdf->MultiCell(80, 4, "\n");
621          if (defined("FAC_PDF_TEL") && FAC_PDF_TEL)          if (defined("FAC_PDF_TEL") && FAC_PDF_TEL)
622          {          {
623              $pdf->MultiCell(80, 4, $langs->trans("Phone").": ".FAC_PDF_TEL);              $pdf->MultiCell(80, 4, $langs->trans("Phone").": ".FAC_PDF_TEL);
# Line 631  class pdf_propale_azur extends ModelePDF Line 635  class pdf_propale_azur extends ModelePDF
635                          $pdf->MultiCell(80, 4, $langs->trans("Web").": ".FAC_PDF_WWW);                          $pdf->MultiCell(80, 4, $langs->trans("Web").": ".FAC_PDF_WWW);
636          }          }
637    
         $pdf->SetFont('Arial','',7);  
         if (defined("MAIN_INFO_SIREN") && MAIN_INFO_SIREN)  
         {  
             $pdf->MultiCell(80, 4, $langs->transcountry("ProfId1",$this->code_pays).": ".MAIN_INFO_SIREN);  
         }  
         elseif (defined("MAIN_INFO_SIRET") && MAIN_INFO_SIRET)  
         {  
             $pdf->MultiCell(80, 4, $langs->transcountry("ProfId2",$this->code_pays).": ".MAIN_INFO_SIRET);  
         }  
   
   
638          // Client destinataire          // Client destinataire
639          $posy=42;          $posy=42;
640          $pdf->SetTextColor(0,0,0);          $pdf->SetTextColor(0,0,0);
# Line 650  class pdf_propale_azur extends ModelePDF Line 643  class pdf_propale_azur extends ModelePDF
643          $pdf->MultiCell(80,5, $langs->trans("BillTo").":");          $pdf->MultiCell(80,5, $langs->trans("BillTo").":");
644                  $prop->fetch_client();                  $prop->fetch_client();
645                  // Nom client                  // Nom client
646          $pdf->SetXY(102,$posy+4);          $pdf->SetXY(102,$posy+3);
647          $pdf->SetFont('Arial','B',11);          $pdf->SetFont('Arial','B',11);
648          $pdf->MultiCell(86,4, $prop->client->nom, 0, 'L');          $pdf->MultiCell(86,4, $prop->client->nom, 0, 'L');
649    
650                  // Caractéristiques client                  // Caractéristiques client
651          $pdf->SetFont('Arial','B',9);          $carac_client=$prop->client->adresse;
652          $pdf->SetXY(102,$posy+12);          $carac_client.="\n".$prop->client->cp . " " . $prop->client->ville."\n";
653          $pdf->MultiCell(86,4, $prop->client->adresse . "\n" . $prop->client->cp . " " . $prop->client->ville);                  if ($prop->client->tva_intra) $carac_client.="\n".$langs->trans("VATIntraShort").': '.$prop->client->tva_intra;
654            $pdf->SetFont('Arial','',9);
655            $pdf->SetXY(102,$posy+7);
656            $pdf->MultiCell(86,4, $carac_client);
657    
658          // Cadre client destinataire          // Cadre client destinataire
659          $pdf->rect(100, $posy, 100, 34);          $pdf->rect(100, $posy, 100, 34);
660    
# Line 694  class pdf_propale_azur extends ModelePDF Line 691  class pdf_propale_azur extends ModelePDF
691          $ligne="";          $ligne="";
692          if ($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE)          if ($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE)
693          {          {
694              $ligne=($ligne?" - ":"").$html->forme_juridique_name($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);              $ligne.=($ligne?" - ":"").$html->forme_juridique_name($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
695          }          }
696          if ($conf->global->MAIN_INFO_CAPITAL)          if ($conf->global->MAIN_INFO_CAPITAL)
697          {          {
698              $ligne=($ligne?" - ":"")."Capital de " . MAIN_INFO_CAPITAL." ".$langs->trans("Currency".$conf->monnaie);              $ligne.=($ligne?" - ":"")."Capital de " . MAIN_INFO_CAPITAL." ".$langs->trans("Currency".$conf->monnaie);
699          }          }
700          if ($conf->global->MAIN_INFO_SIREN)          if ($conf->global->MAIN_INFO_SIREN)
701          {          {
702              $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->code_pays).": ".MAIN_INFO_SIREN;              $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->code_pays).": ".MAIN_INFO_SIREN;
703              }          }
704          if ($conf->global->MAIN_INFO_SIRET)          if ($conf->global->MAIN_INFO_SIRET)
705          {          {
706              $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->code_pays).": ".MAIN_INFO_SIRET;              $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->code_pays).": ".MAIN_INFO_SIRET;
707              }          }
708          if ($conf->global->MAIN_INFO_RCS)          if ($conf->global->MAIN_INFO_RCS)
709          {          {
710              $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->code_pays).": ".MAIN_INFO_RCS;              $ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->code_pays).": ".MAIN_INFO_RCS;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26