Jump to content

Poptávám kodéra na úpravu IČ a DIČ pro 1.3


vasikgreif

Recommended Posts

Není třeba, sám tu dávám dokupy shop na prestě tak proč se nepodělit... ;)

Takový dotaz, ve vygenerované faktuře se nevleze na jeden řádek název společnosti a jméno kontaktní osoby. Nevíte jak dát kontaktní osobu na další řádek?

Ještě jeden dotaz, jak udělat to, aby na vygenerované faktuře bylo jen 1x IČO a DIČ?
Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

Tak jsem si to vyřešil následnovně:

        if (!empty($delivery_address->company) OR !empty($invoice_address->company))
       {
           $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->company), 0, 'L');
           $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->company), 0, 'L');
           $pdf->Ln(5);
       }
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->lastname), 0, 'L');
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->lastname), 0, 'L');
       $pdf->Ln(5);
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address1.', '.$delivery_address->postcode.', '.$delivery_address->city), 0, 'L');  
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address1.', '.$invoice_address->postcode.', '.$invoice_address->city), 0, 'L');        $pdf->Ln(5);
       if (!empty($invoice_address->address2) OR !empty($delivery_address->address2))
       {
           $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address2), 0, 'L');
           $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address2), 0, 'L');
           $pdf->Ln(5);
       }
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->country.($deliveryState ? ' - '.$deliveryState->name : '')), 0, 'L');
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->country.($invoiceState ? ' - '.$invoiceState->name : '')), 0, 'L');
       $pdf->Ln(5);

       if (!empty($delivery_address->ic))
       {
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(),"IČ: $delivery_address->ic, DIČ: $delivery_address->dic"), 0, 'L');
   }
   if (!empty($invoice_address->ic)) 
   {
       $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(),"IČ:$invoice_address->ic, DIČ: $invoice_address->dic"), 0, 'L');
   }
       $pdf->Ln(5);


       $pdf->Cell($width, 10, $delivery_address->phone, 0, 'L');
       if($invoice_customer->dni != NULL)
           $pdf->Cell($width, 10, self::l('Tax ID number:').' '.Tools::iconv('utf-8', self::encoding(), $invoice_customer->dni), 0, 'L');
       if (!empty($delivery_address->phone_mobile))
       {
           $pdf->Cell($width, 10, self::l('PHONE:').' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->phone_mobile), 0, 'L');
       }



Je tam i úprava adresy na jeden řádek. Snad se to bude někomu hodit. Pokud má někdo elegantnější řešení rád se přiučím :)

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...