Duyuruyu Kapat
Facebook Gözat
Twitter Gözat

fpdf php yardım

Konu, 'PHP' kısmında koboy tarafından paylaşıldı.

  1. koboy

    koboy Üye

    Kayıt:
    5 Ocak 2012
    Mesajlar:
    188
    Beğenilen Mesajlar:
    1
    Merhaba fpdf yi localhostta id numrası vermeden yani
    ex.php şekilde kullanınca pdf dosyasını ekliyor

    bu şekilde link yapınca pdf dosyasını eklemiyor.

    adminver/index.php?islem=mukellef_fatura_ekle&durum=mukellef_fatura_ekle&id=129



    PHP:
    <?php
    // (c) Xavier Nicolay
    // Exemple de génération de devis/facture PDF

    require('invoice.php');

    include
    "invoice.php";
    $image="logo.png";

    $html $_POST['html'];
    $title $_POST['title'];
    $url $_POST['url'];
    $author $_POST['author'];

    $pdf = new PDF_Invoice'P''mm''A4' );

    $pdf->AddPage();

    $pdf-> Image('logo.png',10,5,85,0);   

    $pdf->addSociete"MaSociete",
                      
    "MonAdresse\n" .
                      
    "75000 PARIS\n".
                      
    "R.C.S. PARIS B 000 000 50\n" .
                      
    "Capital : 18000 " ,10,20,33,0);
                     
                 
                     
    $pdf->fact_dev"FATURA" );
    $pdf->temporaire"" );
    $pdf->addDate"03/12/2003");
    $pdf->addClient("CL01");
    $pdf->addPageNumber("1");
    $pdf->addClientAdresse("Ste\nM. XXXX\n3ème étage\n33, rue d'ailleurs\n75000 PARIS");
    $pdf->addReglement("Chèque à réception de facture");
    $pdf->addEcheance("03/12/2003");
    $pdf->addNumTVA("FR888777666");
    //$pdf->addReference("Devis ... du ....");
    $cols=array( "SIRA"    => 23,
                 
    "AÇIKLAMA"  => 78,
                 
    "MIKTAR"     => 22,
                 
    "BIRIM FIYAT"      => 26,
                 
    "TOPLAM" => 30,
                 
    "KDV"          => 11 );
    $pdf->addCols$cols);
    $cols=array( "SIRA"    => "L",
                 
    "AÇIKLAMA"  => "L",
                 
    "MIKTAR"     => "C",
                 
    "BIRIM FIYAT"      => "R",
                 
    "TOPLAM" => "R",
                 
    "KDV"          => "C" );
    $pdf->addLineFormat$cols);
    $pdf->addLineFormat($cols);

    $y    109;


    $line = array( "SIRA"    => "REF1",
                   
    "AÇIKLAMA"  => $title,
                   
    "MIKTAR"     => "1",
                   
    "BIRIM FIYAT"      => "850.00",
                   
    "TOPLAM" => "950.00",
                   
    "KDV"          => "50" );
    $size $pdf->addLine$y$line );
    //$y   += $size + 2;


    $pdf->addCadreTVAs();
           
    // invoice = array( "px_unit" => value,
    //                  "qte"     => qte,
    //                  "tva"     => code_tva );
    // tab_tva = array( "1"       => 19.6,
    //                  "2"       => 5.5, ... );
    // params  = array( "RemiseGlobale" => [0|1],
    //                      "remise_tva"     => [1|2...],  // {la remise s'applique sur ce code TVA}
    //                      "remise"         => value,     // {montant de la remise}
    //                      "remise_percent" => percent,   // {pourcentage de remise sur ce montant de TVA}
    //                  "FraisPort"     => [0|1],
    //                      "portTTC"        => value,     // montant des frais de ports TTC
    //                                                     // par defaut la TVA = 19.6 %
    //                      "portHT"         => value,     // montant des frais de ports HT
    //                      "portTVA"        => tva_value, // valeur de la TVA a appliquer sur le montant HT
    //                  "AccompteExige" => [0|1],
    //                      "accompte"         => value    // montant de l'acompte (TTC)
    //                      "accompte_percent" => percent  // pourcentage d'acompte (TTC)
    //                  "Remarque" => "texte"              // texte
    $tot_prods = array( array ( "px_unit" => 600"qte" => 1"tva" => ),
                        array ( 
    "px_unit" =>  10"qte" => 1"tva" => ));
    $tab_tva = array( "1"       => 19.6,
                      
    "2"       => 5.5);
    $params  = array( "RemiseGlobale" => 1,
                          
    "remise_tva"     => 1,       // {la remise s'applique sur ce code TVA}
                          
    "remise"         => 0,       // {montant de la remise}
                          
    "remise_percent" => 10,      // {pourcentage de remise sur ce montant de TVA}
                      
    "FraisPort"     => 1,
                          
    "portTTC"        => 10,      // montant des frais de ports TTC
                                                       // par defaut la TVA = 19.6 %
                          
    "portHT"         => 0,       // montant des frais de ports HT
                          
    "portTVA"        => 19.6,    // valeur de la TVA a appliquer sur le montant HT
                      
    "AccompteExige" => 1,
                          
    "accompte"         => 0,     // montant de l'acompte (TTC)
                          
    "accompte_percent" => 15,    // pourcentage d'acompte (TTC)
                      
    "Remarque" => "Avec un acompte, svp..." );

    $pdf->addTVAs$params$tab_tva$tot_prods);
    $pdf->addCadreEurosFrancs();

        
    $contect =    $pdf->Output($title $_POST['title'].'.pdf''F');
    $pdf->Output();

       
    ?>