<?
set_time_limit(99999);
error_reporting(0);
$mod_strings = return_module_language($this->ecmlanguage, 'EcmSales', true);
if(!$this->blnShowHeader) return;
      
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return; 

if(isset($this->edt->logo_path) && $this->edt->logo_path != '' && file_exists($this->edt->logo_path)){
	$this->Image($this->edt->logo_path,15,5,0,23);
}

$this->SetFont('arialpl', '', 10);
// get document 
$doc = new EcmDocumentTemplate();   
$doc->retrieve('97700b0d-fbe9-e366-4016-4b260f058a47');
$footer_address = explode(",", $doc->footer_address);
// owner title
if($_REQUEST['type']=='proforma'){
    $owner_title=$mod_strings['LBL_PDF_TITLE_PROFORMA'];
} else { $owner_title=$mod_strings['LBL_PDF_TITLE_ZS'];}

$this->SetXY(15+30,5);
$this->SetFont ( 'arialpl', 'B', '10' );
$this->Cell ( 110, 4, $owner_title);
$this->Ln ();
$this->SetXY(15+30,10);
$this->SetFont ( 'arialpl', '', '10' );
$this->Cell ( 110, 4, $doc->name);

$this->Ln ();
$this->SetXY(15+30,14);
$this->Cell ( 110, 4,$footer_address[0]);
$this->Ln ();
$this->SetXY(15+30,18);
$this->Cell ( 110, 4,$footer_address[1] );
$this->Ln ();
$this->SetXY(15+30,22);
$this->Cell ( 20, 4, 'NIP: '.$doc->footer_nip );
$this->Ln ();

$this->Line(10,30,200,30);

?>