'.$labels['LBL_PDF_CONTENT_NAME'].' '.$focus->document_no.'
SPRZEDAWCA
' . $focus->parent_name . '
' . $focus->parent_address_street . '
'. $focus->parent_address_postalcode . ' ' . $focus->parent_address_city; $content.='
'; if (!is_null($focus->parent_nip) && $focus->parent_nip) { $content.=$labels['LBL_PARENT_NIP'].': '.$focus->parent_nip; $nip = true; } if (!is_null($focus->parent_iln) && $focus->parent_iln) { if ($nip) $content.'
'; $nip = false; $content.=$labels['LBL_PDF_CONTENT_ILN'].' '.$focus->parent_iln; } $content.='

'; if ($focus->name && $focus->name != '') { $content .= '
' . $focus->name . '
'; } $content .= '
'.$labels['LBL_PDF_CONTENT_REGISTER_DATE'].':
'.$labels['LBL_PDF_CONTENT_DELIVERY_DATE'].':
' . $focus->register_date . '
' . $focus->delivery_date . '
'; if($focus->wz_name!=''){ $content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_WZ'].':
'; } if($focus->order_no!=''){ $content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_NO'].':
'; } $content.='
'; if($focus->wz_name!=''){ $content.='' . $focus->wz_name.'
'; } if($focus->order_no!=''){ $content.='' . $focus->order_no.'
'; } $content.='

'; // start items table $columns = array (); $columns ['position'] = array ( 'field' => array ( 'position' ), 'label' => 'Lp.', 'align' => 'center' ); $columns ['name'] = array ( 'field' => array ( 'name', 'product_code' ), 'label' => 'Nazwa
Indeks', 'align' => 'left' ); $columns ['qty'] = array ( 'field' => array ( 'quantity', 'unit_name' ), 'label' => 'Ilość
J.m.', 'align' => 'right' ); $columns ['price_start'] = array ( 'field' => array ( 'price_start' ), 'label' => 'Cena netto', 'align' => 'right' ); $columns ['total_netto'] = array ( 'field' => array ( 'total_netto' ), 'label' => 'Wartość netto', 'align' => 'right' ); // set widths $totals = array (); $columns ['position'] ['width'] = '5'; $columns ['name'] ['width'] = '45'; $columns ['qty'] ['width'] = '10'; $columns ['price_start'] ['width'] = '20'; $columns ['total_netto'] ['width'] = '20'; // rysujemy :) $content .= ' '; foreach ( $columns as $col ) { $content .= ' '; } $content .= ' '; foreach ( $positions as $pos ) { $content .= ''; foreach ( $columns as $col ) { $content .= ''; } $content .= ''; } $content .= '
' . $col ['label'] . '
'; foreach ( $col ['field'] as $f ) { if (! $pos [$f] || $pos [$f] == '') $pos [$f] = '-'; $content .= $pos [$f] . '
'; } $content .= '
'; // summary table // get currency symbol $c = new Currency (); $c->retrieve ( $focus->currency_id ); $symbol = $c->symbol; unset ( $c ); $content.='

'; $content.=' '; if ($focus->to_is_vat_free=='0') { $vats = explode(",", $focus->vats_summary); foreach ($vats as $v) { $vats2 = explode(":", $v); if ($vats2[0]=='') continue; $content.=' '; } $content.=' '; } $content .= '
Suma netto '.format_number($focus->total_netto).' '.$symbol.'
'.$vats2[0].' '.format_number($vats2[1]).' '.$symbol.'
Suma brutto '.format_number($focus->total_brutto).' '.$symbol.'

'.$labels['LBL_PDF_CONTENT_ISSUED_BY'].' '.$user->full_name.'



' . $focus->pdf_text . ' '; //echo $content; die();