'.$labels['LBL_PDF_DOCUMENT_NO'].' '.$focus->document_no.'

'; $content.=' '; $content.=' '; $content.='
'.$labels['LBL_PDF_CONTENT_INVOICE_FOR'].' '; if($focus->shipping_address_name!=''){ $content.= 'DOSTAWA DO'; } $content.= '
' . $focus->parent_name . ' '.$focus->shipping_address_name.'
' . $focus->parent_address_street . ' ' . $focus->shipping_address_street . '
'. $focus->parent_address_postalcode . ' ' . $focus->parent_address_city; if (!is_null($focus->parent_address_country) & $focus->parent_address_country!='') $content.=', '.$focus->parent_address_country; $content.=' '. $focus->shipping_address_postalcode . ' ' . $focus->shipping_address_city; if (!is_null($focus->shipping_address_country) & $focus->shipping_address_country!='') $content.=', '.$focus->shipping_address_country; $content.='
'; if (!is_null($focus->parent_nip) && $focus->parent_nip) { $content.=$labels['LBL_PDF_CONTENT_NIP'].' '.$focus->parent_nip; $nip = true; } if (!is_null($focus->parent_iln) && $focus->parent_iln) { if ($nip) $content.'
'; $nip = false; $content.='
ILN: '.$focus->parent_iln; } $content.='
'; if (!is_null($focus->shipping_nip) && $focus->shipping_nip) { $content.=$labels['LBL_PDF_CONTENT_NIP'].' '.$focus->parent_shipping_nip; $nip = true; } if (!is_null($focus->shipping_iln) && $focus->shipping_iln) { if ($nip) $content.'
'; $nip = false; $content.='ILN: '.$focus->shipping_iln; } $content.='

'; if ($focus->name && $focus->name != '') { $content .= '
' . $focus->name . '
'; } $content .= '
'.$labels['LBL_PDF_CONTENT_REGISTER_DATE'].' ' . $focus->register_date . ' '.($focus->delivery_date!="" ? '
Data dostawy: '.$focus->delivery_date.'': '').''.($focus->ads_text!="" ? '
Kod dostawcy: '.$focus->ads_text.'': ''); if ($focus->parent_id == '226a168c-2fef-b92f-0918-6200de91bb31') { $content .= '
Numer dostawcy: 12342'; $content .= '
GLN dostawcy: 5909000896239
'; } $content .= '

'; if($focus->wz_name!=''){ $content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_WZ'].':
'; } if($focus->order_no!=''){ $content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_NO'].'
'; } if($focus->category!=''){ $content .= 'Kategoria:
'; } $content.=$labels['LBL_STOCK_NAME'].':
'; $content.='
'; if($focus->wz_name!=''){ $content.='' . $focus->wz_name.'
'; } if($focus->order_no!=''){ $content.='' . $focus->order_no.'
'; } if($focus->category!=''){ $content.='' . $app_list_strings['ecmstockdocouts_category_list'][$focus->category] .'
'; } $content.='' . $focus->stock_name.'
'; $content.='
'; $content .= '
'; // start items table $columns = array (); $EcmSysInfo = new EcmSysInfo(); $columns ['position'] = array ( 'field' => array ( 'position' ), 'label' => 'Lp.', 'align' => 'center' ); $columns ['name'] = array ( 'field' => array ( 'name', 'product_code' ), 'label' => 'Nazwa
Indeks', 'align' => 'left' ); if($EcmSysInfo->getDatabaseName()=='preDb_0dcc87940d3655fa574b253df04ca1c3'){ $columns ['recipient_code'] = array ( 'field' => array ( 'recipient_code', ), 'label' => 'Kod odbiorcy', 'align' => 'left' ); } $columns ['qty'] = array ( 'field' => array ( 'quantity', 'unit_name' ), 'label' => 'Ilość
J.m.', 'align' => 'right' ); if ($focus->parent_id == '226a168c-2fef-b92f-0918-6200de91bb31') { $columns ['logistic_1'] = array ( 'field' => array ( 'product_pieces_per_carton', ), 'label' => 'PCB', 'align' => 'right' ); $columns ['logistic_2'] = array ( 'field' => array ( 'product_cartons' ), 'label' => 'Ilość kartonów', 'align' => 'right' ); } // set widths $totals = array (); $columns ['position'] ['width'] = '5'; $columns ['name'] ['width'] = '55'; if($EcmSysInfo->getDatabaseName()=='preDb_0dcc87940d3655fa574b253df04ca1c3'){ $columns ['recipient_code'] ['width'] = '10'; } $columns ['qty'] ['width'] = '10'; // rysujemy :) $content .= ' '; foreach ( $columns as $col ) { $content .= ' '; } $content .= ' '; $total_qty=0; foreach ( $positions as $pos ) { if ($pos['part_no'] && $pos['part_no']!='.') $pos['product_code'].= '
'.$pos['part_no']; $content .= ''; foreach ( $columns as $col ) { $content .= ''; } $content .= ''; $total_qty+=$pos['quantity']; } $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->parent_id == '226a168c-2fef-b92f-0918-6200de91bb31') { $total_cartoons = 0; foreach ( $positions as $pos ) { $total_cartoons += $pos['product_cartons']; } $content .= ' '; } $content .= '
Razem ilość: ' .$total_qty . '
Ilość kartonów: ' .$total_cartoons. '

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

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