Przyjęcie produkcyjne
|
Numer:
|
' . $focus->document_no . '
|
|
|
Data wystawienia:
|
' . $focus->register_date . '
|
|
|
Wystawił:
|
' . $user->full_name . '
|
|
|
Magazyn RW:
|
' . $focus->rw_stock_name . '
|
|
|
Magazyn PW:
|
' . $focus->pw_stock_name . '
|
';
if ($focus->name && $focus->name != '') {
$content .= '
';
}
$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'
);
// set widths
$totals = array ();
$columns ['position'] ['width'] = '5';
$columns ['name'] ['width'] = '45';
$columns ['qty'] ['width'] = '10';
// rysujemy :)
$content .= '
';
foreach ( $columns as $col ) {
$content .= '
| ' . $col ['label'] . ' |
';
}
$content .= '
';
$pos_i=0;
$pos_comp=0;
foreach ( $positions as $pos ) {
if($pos['product_component']==1) {$pos_comp++; $color=''; } else
if($pos['product_component']==0){ $pos_i++;$pos_comp=0;$color='background-color:#D4D9DB;'; }
$content .= '';
foreach ( $columns as $col ) {
$content .= '';
foreach ( $col ['field'] as $f ) {
if($col['label']=='Lp.' && $pos['product_component']==0) {
$pos [$f]=$pos_i;$color='';
}
if($col['label']=='Lp.' && $pos['product_component']==1) {
$pos [$f]=$pos_i.'.'.$pos_comp;$color='';
}
if (! $pos [$f] || $pos [$f] == '')
$pos [$f] = '-';
$content .= $pos [$f].' ';
}
$content .= ' | ';
}
$content .= '
';
}
$content .= '
';
// summary table
// get currency symbol
$c = new Currency ();
$c->retrieve ( $focus->currency_id );
$symbol = $c->symbol;
unset ( $c );
$content .= '
' . $focus->pdf_text . '
';
//echo $content; die();