CHANGE_CONST_ADD_DOC

This commit is contained in:
Anthony Berton 2021-08-11 18:37:13 +02:00
parent 816648f283
commit 956bd00c13
12 changed files with 40 additions and 30 deletions

View File

@ -65,7 +65,7 @@ if ($action == 'update') {
if (GETPOSTISSET('MAIN_PROFID5_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", GETPOST("MAIN_PROFID5_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
if (GETPOSTISSET('MAIN_PROFID6_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", GETPOST("MAIN_PROFID6_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
if (GETPOSTISSET('MAIN_PDF_NO_SENDER_NAME')) dolibarr_set_const($db, "MAIN_PDF_NO_SENDER_NAME", GETPOST("MAIN_PDF_NO_SENDER_NAME"), 'chaine', 0, '', $conf->entity);
if (GETPOSTISSET('MAIN_PDF_HIDE_SENDER_NAME')) dolibarr_set_const($db, "MAIN_PDF_HIDE_SENDER_NAME", GETPOST("MAIN_PDF_HIDE_SENDER_NAME"), 'chaine', 0, '', $conf->entity);
if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", GETPOST("MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"), 'chaine', 0, '', $conf->entity);
@ -257,11 +257,11 @@ for ($i = 1; $i <= 6; $i++) {
// Show sender name
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_NO_SENDER_NAME").'</td><td>';
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_HIDE_SENDER_NAME").'</td><td>';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('MAIN_PDF_NO_SENDER_NAME');
print ajax_constantonoff('MAIN_PDF_HIDE_SENDER_NAME');
} else {
print $form->selectyesno('MAIN_PDF_NO_SENDER_NAME', (!empty($conf->global->MAIN_PDF_NO_SENDER_NAME)) ? $conf->global->MAIN_PDF_NO_SENDER_NAME : 0, 1);
print $form->selectyesno('MAIN_PDF_HIDE_SENDER_NAME', (!empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) ? $conf->global->MAIN_PDF_HIDE_SENDER_NAME : 0, 1);
}
print '</td></tr>';
print '</table>';

View File

@ -1418,7 +1418,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 60);
// Show sender name
if (empty($conf->global->MAIN_PDF_NO_SENDER_NAME)) {
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);

View File

@ -1604,10 +1604,12 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 60);
// Show sender name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
}
// Show sender information
$pdf->SetXY($posx + 2, $posy);

View File

@ -693,7 +693,7 @@ class pdf_strato extends ModelePDFContract
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
// Show sender name
if (empty($conf->global->MAIN_PDF_NO_SENDER_NAME)) {
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size);

View File

@ -1097,10 +1097,12 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetFillColor(255, 255, 255);
// Show sender name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
$posy = $pdf->getY();
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
$posy = $pdf->getY();
}
// Show sender information
$pdf->SetXY($posx + 2, $posy);

View File

@ -1047,7 +1047,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->SetFillColor(255, 255, 255);
// Show sender name
if (empty($conf->global->MAIN_PDF_NO_SENDER_NAME)) {
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');

View File

@ -1860,10 +1860,12 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetTextColor(0, 0, 60);
// Show sender name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
}
// Show sender information
$pdf->SetXY($posx + 2, $posy);

View File

@ -2098,10 +2098,12 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetTextColor(0, 0, 60);
// Show sender name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
}
// Show sender information
$pdf->SetXY($posx + 2, $posy);

View File

@ -649,7 +649,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
// Show sender name
if (empty($conf->global->MAIN_PDF_NO_SENDER_NAME)) {
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size);

View File

@ -1585,7 +1585,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 60);
// Show sender name
if (empty($conf->global->MAIN_PDF_NO_SENDER_NAME)) {
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);

View File

@ -1699,10 +1699,12 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 60);
// Show sender name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
$posy = $pdf->getY();
}
// Show sender information
$pdf->SetXY($posx + 2, $posy);

View File

@ -1992,7 +1992,7 @@ MAIN_PDF_MARGIN_TOP=Top margin on PDF
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line
MAIN_PDF_NO_SENDER_NAME=Hide sender name in address
MAIN_PDF_HIDE_SENDER_NAME=Hide sender name in address
MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF
NothingToSetup=There is no specific setup required for this module.
SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups