dir==1){ $title='wypłaty'; // dla $parent_title='DLA:'; } else { $title='wpłaty'; // komu $parent_title='KOMU:'; } $content = '

Dowód '.$title.'

' . $focus->document_no . '

z dnia: ' . date("d.m.Y", strtotime($focus->date_entered)) . '




WYSTAWACA: '.$parent_title.'
'.$comp['name'].'
'.$addr[0].'
'.$addr[1].'
'.$comp['footer_nip'].'
'.$focus->parent_name.'
'.$focus->parent_address_street.'
'.$focus->parent_address_postalcode.' '.$focus->parent_address_city.'
'.$acc->to_vatid.'

'; if ($focus->name && $focus->name != '') { $content .= '
' . $focus->name . '
'; } $content .= '
'; // start items table $columns = array (); $columns ['price'] = array ( 'field' => array ( 'price' ), 'label' => 'Tytułem', 'height'=> '30', 'align' => 'center' ); $columns ['total'] = array ( 'field' => array ( 'total' ), 'label' => 'Kwota', 'align' => 'center' ); // set widths $totals = array (); $columns ['price'] ['width'] = '80'; $columns ['total'] ['width'] = '20'; // rysujemy :) $content .= ' '; foreach ( $columns as $col ) { $content .= ' '; } $content .= ' '; $content .= ''; $content .= ''; $content .= ''; $content .= ''; // waluty switch ($focus->currency_id) { case 'PLN': echo 'ok'; break; case '6336d9a0-ee5f-52e3-7d0c-4e6f1472b2bf': $kwota->setCurrency(array('euro', 'euro', 'euro'),array('eurocent', 'eurocenty', 'eurocentów')); break; case '3c8d317e-513b-9a9b-d0e6-511e2abee625': $kwota->setCurrency(array('funt', 'funty', 'funtów'),array('cent', 'centy', 'centów')); break; case '98b2b752-b0be-37c2-d2eb-511e29f81cab': $kwota->setCurrency(array('dolar', 'dolary', 'dolarów'),array('cent', 'centy', 'centów')); break; } $content .= '
' . $col ['label'] . '
'.$focus->ecmkpkw_name.''; $content .= ''.number_format($focus->amount,2,',', ' ').' '.$cur->name; $content .= '

Słownie: '.$kwota->convertPrice($focus->amount).'




Wystawił:
' . $user->full_name . '
.................................................
Kwotę powyższą otrzymałem
';