Jump to content

Faktura


czaka

Recommended Posts

Zdravim,

ja jsem to placnul primo souboru classes/PDF.php. Je to sice trochu prasarna, ale slape to :o) viz nize.
Akorad jsem musel zapoznamkovat logo, aby se mi nevkladalo do faktury.
Prepises pouze ta policka kde je napsano, co tam ma byt.

   function Header()
   {
       $conf = Configuration::getMultiple(array('PS_SHOP_NAME', 'PS_SHOP_ADDR1', 'PS_SHOP_CODE', 'PS_SHOP_CITY', 'PS_SHOP_COUNTRY'));
       $conf['PS_SHOP_NAME'] = isset($conf['PS_SHOP_NAME']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_NAME']) : 'Your company';
       $conf['PS_SHOP_ADDR1'] = isset($conf['PS_SHOP_ADDR1']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_ADDR1']) : 'Your company';
       $conf['PS_SHOP_CODE'] = isset($conf['PS_SHOP_CODE']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_CODE']) : 'Postcode';
       $conf['PS_SHOP_CITY'] = isset($conf['PS_SHOP_CITY']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_CITY']) : 'City';
       $conf['PS_SHOP_COUNTRY'] = isset($conf['PS_SHOP_COUNTRY']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_COUNTRY']) : 'Country';

//        if (file_exists(_PS_IMG_DIR_.'/logo.jpg'))
//            $this->Image(_PS_IMG_DIR_.'/logo.jpg', 10, 8, 0, 15);
       $this->SetFont(self::fontname(), '', 10);
       $this->Cell(0, 0, self::l('Dodavatel:'), 0, 2, 'L');
       $this->SetFont(self::fontname(), '', 9);
       $this->Cell(0, 8, self::l('Tady mam v jednom radku firmu vcetne adresy'), 0, 2, 'L');
       $this->Cell(0, 0, self::l('IČ : XXXXXX, DIČ : CZXXXXX'), 0, 2, 'L');
       $this->Cell(0, 7, self::l('Dalsi informace... treba tel.'), 0, 2, 'L');

       $this->SetFont(self::fontname(), 'B', 13);
       $this->Cell(115);

       if (self::$orderReturn)
           $this->Cell(80, -20, self::l('RETURN #').sprintf('d', self::$orderReturn->id), 0, 0, 'C');
       elseif (self::$orderSlip)
           $this->Cell(80, -20, self::l('SLIP #').sprintf('d', self::$orderSlip->id), 0, 0, 'C');
       else
           $this->Cell(80, -20, self::l('INVOICE #').sprintf('d', self::$order->id), 0, 0, 'C');
   }




Mám problém s PDF faktury. Poradí mi někdo, jak doplnit vzor o další informace, jako je bankovní spojení naší firmy..., atd.? Děkuji moc předem
Link to comment
Share on other sites

  • 11 months later...

Ahoj. Kdyz funkci function Header() zmenim dle vyse uvedeneho, hlasi generovani faktury v administraci error: FPDF error: Undefined font: arialmt . Nevite?

Edit: Tak výše uvedený error byl způsobený něčím jiným. Funguje. Jen je problém, že nečísluje faktury (negeneruje žádné číslo a nastavený prefix). Omlouvám se, je to asi jasné... ale holt tomu nevládnu, no nejak jsem to preeditoval a jede to.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...