Beispiel #1
0
function invoice_expositor($x, $y)
{
    global $pdf, $invoice;
    $expositor = isset($invoice['user']) ? $invoice['user'] : $invoice['division_author'];
    if ($expositor) {
        $y = $y - text_align_left($x, $y, 10, iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Expositor:')) . ' ' . iconv("UTF-8", "ISO-8859-2//TRANSLIT", $expositor));
    }
    return $y;
}
Beispiel #2
0
function receipt_data($x, $y)
{
    global $receipt, $pdf;
    $font_size = 12;
    $yy = $y;
    $xmax = $x + 420;
    $pdf->line($x, $y, $xmax, $y);
    $y -= 8;
    text_align_center($x + 140, $y, 8, iconv("UTF-8", "ISO-8859-2", trans('For what')));
    text_align_center($x + 315, $y, 8, iconv("UTF-8", "ISO-8859-2", trans('Value')));
    text_align_center($x + 385, $y, 8, iconv("UTF-8", "ISO-8859-2", trans('Number')));
    $y -= 2;
    $pdf->line($x, $y, $xmax, $y);
    $y -= $font_size;
    $i = 0;
    if ($receipt['contents']) {
        foreach ($receipt['contents'] as $item) {
            $i++;
            text_align_left($x + 2, $y, $font_size - 2, '<b>' . $i . '.</b>');
            $y = text_wrap($x + 15, $y, 270, $font_size - 2, iconv("UTF-8", "ISO-8859-2", $item['description']), '');
            text_align_right($x + 345, $y + $font_size, $font_size - 2, iconv("UTF-8", "ISO-8859-2", moneyf($item['value'])));
        }
    }
    $y += $font_size / 2;
    $pdf->line($x, $y, $xmax, $y);
    $y -= $font_size;
    text_align_right($x + 275, $y - 6, $font_size - 2, '<b>' . iconv("UTF-8", "ISO-8859-2", trans('Total:')) . '</b>');
    text_align_right($x + 345, $y - 6, $font_size - 2, '<b>' . iconv("UTF-8", "ISO-8859-2", moneyf($receipt['total'])) . '</b>');
    $y -= text_align_center($x + 385, $y, 8, 'Symbole');
    $y -= text_align_center($x + 385, $y, 8, 'PL. KAS. Nr');
    $pdf->line($x, $yy, $x, $y);
    $pdf->line($x + 280, $yy, $x + 280, $y);
    $pdf->line($x + 350, $yy, $x + 350, $y);
    $pdf->line($xmax, $yy, $xmax, $y);
    $pdf->line($x, $y, $xmax, $y);
    $y -= 16;
    text_align_left($x + 2, $y, 8, iconv("UTF-8", "ISO-8859-2", trans('In words:')));
    $y = text_wrap($x + 40, $y, 300, $font_size - 2, iconv("UTF-8", "ISO-8859-2", trans('$a dollars $b cents', to_words(floor($receipt['total'])), to_words($receipt['totalg']))), '');
    $y -= 8;
    $y += $font_size / 2;
    $pdf->line($x, $yy, $x, $y);
    $pdf->line($x + 350, $yy, $x + 350, $y);
    $pdf->line($xmax, $yy, $xmax, $y);
    $pdf->line($x, $y, $xmax, $y);
    return $y;
}
Beispiel #3
0
function invoice_footnote($x, $y, $width, $font_size)
{
    global $pdf, $CONFIG;
    if (ConfigHelper::getConfig('invoices.footer')) {
        $y = $y - $pdf->getFontHeight($font_size);
        $y = $y - text_align_left($x, $y, $font_size, '<b>' . iconv("UTF-8", "ISO-8859-2", trans('Notes:')) . '</b>');
        $tmp = iconv("UTF-8", "ISO-8859-2", ConfigHelper::getConfig('invoices.footer'));
        $tmp = explode("\n", $tmp);
        foreach ($tmp as $line) {
            $y = text_wrap($x, $y, $width, $font_size, $line, "full");
        }
    }
}
function invoice_expositor($x, $y)
{
    global $pdf, $invoice;
    $expositor = $invoice['division_author'];
    if ($expositor) {
        $y = $y - text_align_left($x, $y, 10, trans('Expositor:') . ' ' . $expositor);
    }
    return $y;
}
Beispiel #5
0
function invoice_footnote($x, $y, $width, $font_size)
{
    global $pdf, $invoice;
    if (!empty($invoice['division_footer'])) {
        $y = $y - $pdf->getFontHeight($font_size);
        $y = $y - text_align_left($x, $y, $font_size, '<b>' . iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Notes:')) . '</b>');
        $tmp = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $invoice['division_footer']);
        $tmp = preg_split('/\\r?\\n/', $tmp);
        foreach ($tmp as $line) {
            $y = text_wrap($x, $y, $width, $font_size, $line, "full");
        }
    }
}