Ejemplo n.º 1
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);
}
Ejemplo n.º 2
0
function invoice_body_ft0100()
{
    global $pdf, $invoice;
    invoice_date();
    invoice_title();
    invoice_seller();
    invoice_buyer();
    invoice_data();
    invoice_to_pay();
    invoice_balance();
    invoice_dates();
    invoice_expositor();
    invoice_footnote();
    /* draw FT-0100 form */
    invoice_simple_form_draw();
    invoice_main_form_draw();
    /* fill FT-0100 form */
    invoice_simple_form_fill();
    invoice_main_form_fill();
    if (!$invoice['fullnumber']) {
        $docnumber = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']);
    } else {
        $docnumber = $invoice['fullnumber'];
    }
    if ($invoice['type'] == DOC_INVOICE_PRO) {
        $pdf->SetTitle('Faktura Pro Forma Nr. ' . $docnumber);
    } else {
        $pdf->SetTitle(trans('Invoice No. $a', $docnumber));
    }
    $pdf->SetAuthor($invoice['division_name']);
    /* setup your cert & key file */
    $cert = 'file://' . LIB_DIR . '/tcpdf/config/lms.cert';
    $key = 'file://' . LIB_DIR . '/tcpdf/config/lms.key';
    /* setup signature additional information */
    if ($invoice['type'] == DOC_INVOICE_PRO) {
        $info = array('Name' => $invoice['division_name'], 'Location' => trans('Invoices'), 'Reason' => 'Faktura Pro Forma Nr. ' . $docnumber, 'ContactInfo' => $invoice['division_author']);
    } else {
        $info = array('Name' => $invoice['division_name'], 'Location' => trans('Invoices'), 'Reason' => trans('Invoice No. $a', $docnumber), 'ContactInfo' => $invoice['division_author']);
    }
    if (get_conf('invoices.set_protection', '1')) {
        /* set document digital signature & protection */
        if (file_exists($cert) && file_exists($key)) {
            $pdf->setSignature($cert, $key, 'inetlms-invoices', '', 1, $info);
            $pdf->setSignatureAppearance(13, 10, 50, 20);
        }
        $pdf->SetProtection(array('modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble'), '', 'PASSWORD_CHANGEME', '1');
    }
}
Ejemplo n.º 3
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');
    }
}
Ejemplo n.º 4
0
function invoice_body_ft0100()
{
    global $pdf, $invoice;
    invoice_date();
    invoice_title();
    invoice_seller();
    invoice_buyer();
    invoice_data();
    invoice_to_pay();
    invoice_balance();
    invoice_dates();
    invoice_expositor();
    invoice_footnote();
    if ($invoice['customerbalance'] < 0 || ConfigHelper::checkValue(ConfigHelper::getConfig('invoices.always_show_form', true))) {
        /* draw FT-0100 form */
        invoice_simple_form_draw();
        invoice_main_form_draw();
        /* fill FT-0100 form */
        invoice_simple_form_fill();
        invoice_main_form_fill();
    }
    $docnumber = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']);
    $pdf->SetTitle(trans('Invoice No. $a', $docnumber));
    $pdf->SetAuthor($invoice['division_name']);
    /* setup your cert & key file */
    $cert = 'file://' . LIB_DIR . '/tcpdf/config/lms.cert';
    $key = 'file://' . LIB_DIR . '/tcpdf/config/lms.key';
    /* setup signature additional information */
    $info = array('Name' => $invoice['division_name'], 'Location' => trans('Invoices'), 'Reason' => trans('Invoice No. $a', $docnumber), 'ContactInfo' => $invoice['division_author']);
    /* set document digital signature & protection */
    if (file_exists($cert) && file_exists($key)) {
        $pdf->setSignature($cert, $key, 'lms-invoices', '', 1, $info);
        $pdf->setSignatureAppearance(13, 10, 50, 20);
    }
    $pdf->SetProtection(array('modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble'), '', 'PASSWORD_CHANGEME', '1');
}
Ejemplo n.º 5
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);
}