Przesuniecie magazynowe
|
Numer:
|
' . $focus->document_no . '
|
|
|
Data wystawienia:
|
' . $focus->register_date . '
|
|
|
Wystawił:
|
' . $user->full_name . '
|
|
|
Z magazynu:
|
' . $focus->stock_out_name . '
|
|
|
Na magazyn:
|
' . $focus->stock_in_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'
);
$columns ['price'] = array (
'field' => array (
'price'
),
'label' => 'Cena',
'align' => 'right'
);
$columns ['total'] = array (
'field' => array (
'total'
),
'label' => 'Wartość',
'align' => 'right'
);
if ($_REQUEST ['show_logistic_info']) {
$columns['logistic_info'] = array (
'field' => array(
'product_pieces_per_carton',
'product_cartons'
),
'label' => 'Ilość sztuk w kartonie
Ilość kartonów',
'align' => 'right',
'width' => '15'
);
}
// set widths
$totals = array ();
$columns ['position'] ['width'] = '5';
$columns ['name'] ['width'] = '45';
$columns ['qty'] ['width'] = '10';
$columns ['price'] ['width'] = '20';
$columns ['total'] ['width'] = '20';
// rysujemy :)
$content .= '
';
foreach ( $columns as $col ) {
$content .= '
| ' . $col ['label'] . ' |
';
}
$content .= '
';
foreach ( $positions as $pos ) {
$content .= '';
foreach ( $columns as $col ) {
$content .= '';
foreach ( $col ['field'] as $f ) {
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 .= '
';
$content .= '
|
Suma
|
' . format_number ( $focus->total) . ' ' . $symbol . '
|
';
$content .= '
' . $focus->pdf_text . '
';
//echo $content; die();