Fix creator in PDF. Add log to help to find strange bug
This commit is contained in:
parent
61e91656e0
commit
e41e0f069a
@ -366,7 +366,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||||
$pdf->SetSubject($outputlangs->transnoentities("PdfInvoiceTitle"));
|
$pdf->SetSubject($outputlangs->transnoentities("PdfInvoiceTitle"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($mysoc->name.($user->id > 0 ? ' - '.$outputlangs->convToOutputCharset($user->getFullName($outputlangs)) : ''));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
|
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
|
||||||
$pdf->SetCompression(false);
|
$pdf->SetCompression(false);
|
||||||
@ -374,10 +374,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
// Set certificate
|
// Set certificate
|
||||||
$cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT;
|
$cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT;
|
||||||
|
$certprivate = empty($user->conf->CERTIFICATE_CRT_PRIVATE) ? '' : $user->conf->CERTIFICATE_CRT_PRIVATE;
|
||||||
// If user has no certificate, we try to take the company one
|
// If user has no certificate, we try to take the company one
|
||||||
if (!$cert) {
|
if (!$cert) {
|
||||||
$cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT;
|
$cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT;
|
||||||
}
|
}
|
||||||
|
if (!$certprivate) {
|
||||||
|
$certprivate = empty($conf->global->CERTIFICATE_CRT_PRIVATE) ? '' : $conf->global->CERTIFICATE_CRT_PRIVATE;
|
||||||
|
}
|
||||||
// If a certificate is found
|
// If a certificate is found
|
||||||
if ($cert) {
|
if ($cert) {
|
||||||
$info = array(
|
$info = array(
|
||||||
@ -386,7 +390,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
'Reason' => 'INVOICE',
|
'Reason' => 'INVOICE',
|
||||||
'ContactInfo' => $this->emetteur->email
|
'ContactInfo' => $this->emetteur->email
|
||||||
);
|
);
|
||||||
$pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info);
|
$pdf->setSignature($cert, $certprivate, $this->emetteur->name, '', 2, $info);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
@ -814,6 +818,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
|
||||||
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||||
}
|
}
|
||||||
|
dol_syslog("bottomlasttab=".$bottomlasttab." this->page_hauteur=".$this->page_hauteur." heightforinfotot=".$heightforinfotot." heightforfreetext=".$heightforfreetext." heightforfooter=".$heightforfooter);
|
||||||
|
|
||||||
// Display info area
|
// Display info area
|
||||||
$posy = $this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs, $outputlangsbis);
|
$posy = $this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs, $outputlangsbis);
|
||||||
|
|||||||
@ -367,7 +367,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||||
$pdf->SetSubject($outputlangs->transnoentities("PdfInvoiceTitle"));
|
$pdf->SetSubject($outputlangs->transnoentities("PdfInvoiceTitle"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
$pdf->SetAuthor($mysoc->name.($user->id > 0 ? ' - '.$outputlangs->convToOutputCharset($user->getFullName($outputlangs)) : ''));
|
||||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||||
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
|
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
|
||||||
$pdf->SetCompression(false);
|
$pdf->SetCompression(false);
|
||||||
@ -375,10 +375,14 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
// Set certificate
|
// Set certificate
|
||||||
$cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT;
|
$cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT;
|
||||||
|
$certprivate = empty($user->conf->CERTIFICATE_CRT_PRIVATE) ? '' : $user->conf->CERTIFICATE_CRT_PRIVATE;
|
||||||
// If user has no certificate, we try to take the company one
|
// If user has no certificate, we try to take the company one
|
||||||
if (!$cert) {
|
if (!$cert) {
|
||||||
$cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT;
|
$cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT;
|
||||||
}
|
}
|
||||||
|
if (!$certprivate) {
|
||||||
|
$certprivate = empty($conf->global->CERTIFICATE_CRT_PRIVATE) ? '' : $conf->global->CERTIFICATE_CRT_PRIVATE;
|
||||||
|
}
|
||||||
// If a certificate is found
|
// If a certificate is found
|
||||||
if ($cert) {
|
if ($cert) {
|
||||||
$info = array(
|
$info = array(
|
||||||
@ -387,7 +391,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
'Reason' => 'INVOICE',
|
'Reason' => 'INVOICE',
|
||||||
'ContactInfo' => $this->emetteur->email
|
'ContactInfo' => $this->emetteur->email
|
||||||
);
|
);
|
||||||
$pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info);
|
$pdf->setSignature($cert, $certprivate, $this->emetteur->name, '', 2, $info);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|||||||
@ -159,7 +159,7 @@ HTPasswordExport=htpassword file generation
|
|||||||
NoThirdPartyAssociatedToMember=No third party associated with this member
|
NoThirdPartyAssociatedToMember=No third party associated with this member
|
||||||
MembersAndSubscriptions=Members and Contributions
|
MembersAndSubscriptions=Members and Contributions
|
||||||
MoreActions=Complementary action on recording
|
MoreActions=Complementary action on recording
|
||||||
MoreActionsOnSubscription=Complementary action, suggested by default when recording a contribution
|
MoreActionsOnSubscription=Complementary action suggested by default when recording a contribution, also done automatially on online payment of a contribution
|
||||||
MoreActionBankDirect=Create a direct entry on bank account
|
MoreActionBankDirect=Create a direct entry on bank account
|
||||||
MoreActionBankViaInvoice=Create an invoice, and a payment on bank account
|
MoreActionBankViaInvoice=Create an invoice, and a payment on bank account
|
||||||
MoreActionInvoiceOnly=Create an invoice with no payment
|
MoreActionInvoiceOnly=Create an invoice with no payment
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user