This commit is contained in:
Laurent Destailleur 2022-11-12 12:04:04 +01:00
parent e6d9b02fe0
commit e48966646d
2 changed files with 9 additions and 2 deletions

View File

@ -314,7 +314,7 @@ print load_fiche_titre($langs->trans("PDFAddressForging"), '', '');
print '<div class="div-table-responsive-no-min">';
print '<table summary="more" class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
print '<tr class="liste_titre"><td class="">'.$langs->trans("Parameter").'</td><td></td></tr>';
// Show sender name
@ -378,6 +378,7 @@ if ($conf->use_javascript_ajax) {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("MAIN_PDF_NO_RECIPENT_FRAME", $arrval, $conf->global->MAIN_PDF_NO_RECIPENT_FRAME);
}
print '</td></tr>';
//Invert sender and recipient

View File

@ -208,10 +208,16 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) {
$mysoc = new Societe($db);
$mysoc->setMysoc($conf);
// For some countries, we need to invert our address with customer address
// We set some specific default values according to country
if ($mysoc->country_code == 'DE' && !isset($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
// For DE, we need to invert our address with customer address
$conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1;
}
if ($mysoc->country_code == 'FR' && !isset($conf->global->MAIN_PROFID1_IN_ADDRESS)) {
// For FR, default value of option to show profid SIRET is on by default
$conf->global->MAIN_PROFID1_IN_ADDRESS = 1;
}
}