Example #1
0
function invoice_body()
{
    global $invoice, $pdf, $id, $CONFIG;
    switch (ConfigHelper::getConfig('invoices.template_file')) {
        case "standard":
            $top = 800;
            invoice_dates(500, 800);
            invoice_address_box(400, 700);
            $top = invoice_title(30, $top);
            $top = $top - 20;
            $top = invoice_seller(30, $top);
            $top = $top - 20;
            $top = invoice_buyer(30, $top);
            $top = $top - 20;
            $return = invoice_data(30, $top, 530, 7, 2);
            invoice_expositor(30, $return[1] - 20);
            $top = $return[2] - 20;
            $top = invoice_to_pay(30, $top);
            $top = $top - 20;
            invoice_footnote(30, $top, 530, 10);
            break;
        case "FT-0100":
            $top = 800;
            invoice_dates(500, 800);
            invoice_address_box(400, 700);
            $top = invoice_title(30, $top);
            $top = $top - 10;
            $top = invoice_seller(30, $top);
            $top = $top - 10;
            $top = invoice_buyer(30, $top);
            $top = $top - 10;
            $return = invoice_data(30, $top, 430, 6, 1);
            invoice_footnote(470, $top, 90, 8);
            invoice_expositor(30, $return[1] - 20);
            $top = $return[2] - 10;
            invoice_to_pay(30, $top);
            invoice_main_form_fill(187, 3, 0.4);
            invoice_simple_form_fill(14, 3, 0.4);
            break;
        default:
            require MODULES_DIR . '/' . ConfigHelper::getConfig('invoices.template_file');
    }
    if (!$invoice['last']) {
        $id = $pdf->newPage(1, $id, 'after');
    }
}
Example #2
0
function invoice_body_ft0100()
{
    global $pdf;
    $page = $pdf->ezStartPageNumbers($pdf->ez['pageWidth'] / 2 + 10, $pdf->ez['pageHeight'] - 30, 8, '', trans('Page $a of $b', '{PAGENUM}', '{TOTALPAGENUM}'), 1);
    $top = $pdf->ez['pageHeight'] - 50;
    invoice_dates(500, $top);
    invoice_address_box(400, 700);
    $top = invoice_title(30, $top);
    $top = $top - 10;
    $top = invoice_seller(30, $top);
    $top = $top - 10;
    $top = invoice_buyer(30, $top);
    $top = $top - 10;
    invoice_footnote(470, $top, 90, 8);
    $return = new_invoice_data(30, $top, 430, 6, 1);
    $top = $return[2] - 10;
    invoice_expositor(30, $return[1]);
    invoice_to_pay(30, $top);
    check_page_length($top, 200);
    invoice_main_form_fill(187, 3, 0.4);
    invoice_simple_form_fill(14, 3, 0.4);
    $page = $pdf->ezStopPageNumbers(1, 1, $page);
}
Example #3
0
function invoice_body_ft0100()
{
    global $pdf, $invoice;
    $page = $pdf->ezStartPageNumbers($pdf->ez['pageWidth'] / 2 + 10, $pdf->ez['pageHeight'] - 30, 8, '', trans('Page $a of $b', '{PAGENUM}', '{TOTALPAGENUM}'), 1);
    $top = $pdf->ez['pageHeight'] - 50;
    invoice_dates(500, $top);
    invoice_address_box(400, 700);
    $top = invoice_title(30, $top);
    $top = $top - 10;
    $top = invoice_seller(30, $top);
    $top = $top - 10;
    $top = invoice_buyer(30, $top);
    $top = $top - 10;
    invoice_footnote(470, $top, 90, 8);
    $return = new_invoice_data(30, $top, 430, 6, 1);
    $top = $return[2] - 10;
    $return[1] += 5;
    invoice_expositor(30, $return[1]);
    invoice_to_pay(30, $top);
    check_page_length($top, 200);
    if ($invoice['customerbalance'] < 0 || ConfigHelper::checkValue(ConfigHelper::getConfig('invoices.always_show_form', true))) {
        invoice_main_form_fill(187, 3, 0.4);
        invoice_simple_form_fill(14, 3, 0.4);
    }
    $page = $pdf->ezStopPageNumbers(1, 1, $page);
}