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'); } }
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'); }