FIX#21093

This commit is contained in:
Faustin 2022-06-11 00:41:15 +02:00
parent ef959ecddd
commit 71ef074987
2 changed files with 10 additions and 31 deletions

View File

@ -618,7 +618,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->useTemplate($tplidx);
}
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
$this->_pagehead($pdf, $object, 1, $outputlangs);
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$pdf->setPage($pageposafter + 1);
}
@ -814,7 +814,7 @@ class pdf_crabe extends ModelePDFFactures
}
$pagenb++;
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
$this->_pagehead($pdf, $object, 1, $outputlangs);
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
}
}
@ -939,7 +939,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->useTemplate($tplidx);
}
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
$this->_pagehead($pdf, $object, 1, $outputlangs);
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$pdf->setPage($current_page);
$this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top + $y - 3, $tab3_width, $tab3_height);
@ -1001,7 +1001,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->useTemplate($tplidx);
}
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
$this->_pagehead($pdf, $object, 1, $outputlangs);
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$pdf->setPage($current_page);
$this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top + $y - 3, $tab3_width, $tab3_height);

View File

@ -1139,11 +1139,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$object->country = $tmparray['label'];
}
$object->forme_juridique_code = GETPOST('forme_juridique_code');
// We set multicurrency_code if enabled
if (!empty($conf->multicurrency->enabled)) {
$object->multicurrency_code = GETPOST('multicurrency_code') ? GETPOST('multicurrency_code') : $conf->currency;
}
/* Show create form */
$linkback = "";
@ -1610,11 +1605,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Capital
print '<tr><td>'.$form->editfieldkey('Capital', 'capital', '', $object, 0).'</td>';
print '<td colspan="3"><input type="text" name="capital" id="capital" class="maxwidth100" value="'.$object->capital.'"> ';
if (!empty($conf->multicurrency->enabled)) {
print '<span class="hideonsmartphone">'.$langs->trans("Currency".$object->multicurrency_code).'</span></td></tr>';
} else {
print '<span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
}
print '<span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
if (!empty($conf->global->MAIN_MULTILANGS)) {
print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'."\n";
print img_picto('', 'language', 'class="pictofixedwidth"').$formadmin->select_language(GETPOST('default_lang', 'alpha') ? GETPOST('default_lang', 'alpha') : ($object->default_lang ? $object->default_lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone');
@ -1664,7 +1656,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr>';
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ? GETPOST('multicurrency_code') : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency)), 'multicurrency_code', 1);
print $form->selectMultiCurrency(($object->multicurrency_code ? $object->multicurrency_code : $conf->currency), 'multicurrency_code', 1);
print '</td></tr>';
}
@ -1862,11 +1854,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$object->country_code = $tmparray['code'];
$object->country = $tmparray['label'];
}
// We set multicurrency_code if enabled
if (!empty($conf->multicurrency->enabled)) {
$object->multicurrency_code = GETPOST('multicurrency_code') ? GETPOST('multicurrency_code') : $object->multicurrency_code;
}
}
if ($object->localtax1_assuj == 0) {
@ -2298,11 +2285,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr><td>'.$form->editfieldkey('Capital', 'capital', '', $object, 0).'</td>';
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="';
print $object->capital != '' ? dol_escape_htmltag(price($object->capital)) : '';
if (!empty($conf->multicurrency->enabled)) {
print '"> <span class="hideonsmartphone">'.$langs->trans("Currency".$object->multicurrency_code).'</span></td></tr>';
} else {
print '"> <span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
}
print '"> <span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
// Default language
if (!empty($conf->global->MAIN_MULTILANGS)) {
@ -2357,7 +2340,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr>';
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ? GETPOST('multicurrency_code') : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency)), 'multicurrency_code', 1);
print $form->selectMultiCurrency(($object->multicurrency_code ? $object->multicurrency_code : $conf->currency), 'multicurrency_code', 1);
print '</td></tr>';
}
@ -2780,11 +2763,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Capital
print '<tr><td>'.$langs->trans('Capital').'</td><td>';
if ($object->capital) {
if (!empty($conf->multicurrency->enabled) && !empty($object->multicurrency_code)) {
print price($object->capital, '', $langs, 0, -1, -1, $object->multicurrency_code);
} else {
print price($object->capital, '', $langs, 0, -1, -1, $conf->currency);
}
print price($object->capital, '', $langs, 0, -1, -1, $conf->currency);
} else {
print '&nbsp;';
}