mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
fix php 8
This commit is contained in:
parent
5faf5e08b3
commit
87ac58efb6
|
|
@ -1045,7 +1045,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
$line2 .= ($line2 ? " - " : "").$fromcompany->email;
|
||||
}
|
||||
}
|
||||
if ($showdetails == 2 || $showdetails == 3 || ($fromcompany->country_code == 'DE')) {
|
||||
if ($showdetails == 2 || $showdetails == 3 || (!empty($fromcompany->country_code) && $fromcompany->country_code == 'DE')) {
|
||||
// Managers
|
||||
if ($fromcompany->managers) {
|
||||
$line2 .= ($line2 ? " - " : "").$fromcompany->managers;
|
||||
|
|
@ -1054,11 +1054,11 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
|
||||
// Line 3 of company infos
|
||||
// Juridical status
|
||||
if ($fromcompany->forme_juridique_code) {
|
||||
if (!empty($fromcompany->forme_juridique_code) && $fromcompany->forme_juridique_code) {
|
||||
$line3 .= ($line3 ? " - " : "").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
}
|
||||
// Capital
|
||||
if ($fromcompany->capital) {
|
||||
if (!empty($fromcompany->capital) && $fromcompany->capital) {
|
||||
$tmpamounttoshow = price2num($fromcompany->capital); // This field is a free string
|
||||
if (is_numeric($tmpamounttoshow) && $tmpamounttoshow > 0) {
|
||||
$line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", price($tmpamounttoshow, 0, $outputlangs, 0, 0, 0, $conf->currency));
|
||||
|
|
@ -1067,7 +1067,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
}
|
||||
}
|
||||
// Prof Id 1
|
||||
if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) {
|
||||
if (!empty($fromcompany->idprof1) && $fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) {
|
||||
$field = $outputlangs->transcountrynoentities("ProfId1", $fromcompany->country_code);
|
||||
if (preg_match('/\((.*)\)/i', $field, $reg)) {
|
||||
$field = $reg[1];
|
||||
|
|
@ -1075,7 +1075,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
$line3 .= ($line3 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1);
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->idprof2) {
|
||||
if (!empty($fromcompany->idprof2) && $fromcompany->idprof2) {
|
||||
$field = $outputlangs->transcountrynoentities("ProfId2", $fromcompany->country_code);
|
||||
if (preg_match('/\((.*)\)/i', $field, $reg)) {
|
||||
$field = $reg[1];
|
||||
|
|
@ -1085,7 +1085,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
|
||||
// Line 4 of company infos
|
||||
// Prof Id 3
|
||||
if ($fromcompany->idprof3) {
|
||||
if (!empty($fromcompany->idprof3) && $fromcompany->idprof3) {
|
||||
$field = $outputlangs->transcountrynoentities("ProfId3", $fromcompany->country_code);
|
||||
if (preg_match('/\((.*)\)/i', $field, $reg)) {
|
||||
$field = $reg[1];
|
||||
|
|
@ -1093,7 +1093,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3);
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->idprof4) {
|
||||
if (!empty($fromcompany->idprof4) && $fromcompany->idprof4) {
|
||||
$field = $outputlangs->transcountrynoentities("ProfId4", $fromcompany->country_code);
|
||||
if (preg_match('/\((.*)\)/i', $field, $reg)) {
|
||||
$field = $reg[1];
|
||||
|
|
@ -1101,7 +1101,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4);
|
||||
}
|
||||
// Prof Id 5
|
||||
if ($fromcompany->idprof5) {
|
||||
if (!empty($fromcompany->idprof5) && $fromcompany->idprof5) {
|
||||
$field = $outputlangs->transcountrynoentities("ProfId5", $fromcompany->country_code);
|
||||
if (preg_match('/\((.*)\)/i', $field, $reg)) {
|
||||
$field = $reg[1];
|
||||
|
|
@ -1109,7 +1109,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof5);
|
||||
}
|
||||
// Prof Id 6
|
||||
if ($fromcompany->idprof6) {
|
||||
if (!empty($fromcompany->idprof6) && $fromcompany->idprof6) {
|
||||
$field = $outputlangs->transcountrynoentities("ProfId6", $fromcompany->country_code);
|
||||
if (preg_match('/\((.*)\)/i', $field, $reg)) {
|
||||
$field = $reg[1];
|
||||
|
|
@ -1117,7 +1117,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof6);
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '') {
|
||||
if (!empty($fromcompany->tva_intra) && $fromcompany->tva_intra != '') {
|
||||
$line4 .= ($line4 ? " - " : "").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||
|
||||
$sepaname = '______________________________________________';
|
||||
if ($thirdparty->id > 0) {
|
||||
$sepaname = $thirdparty->name.($object->account_owner ? ' ('.$object->account_owner.')' : '');
|
||||
$sepaname = $thirdparty->name.($object->proprio ? ' ('.$object->proprio.')' : '');
|
||||
}
|
||||
$posY = $pdf->GetY();
|
||||
$posY += 3;
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ if (in_array($modulepart, array('facture_paiement', 'unpaid'))) {
|
|||
*/
|
||||
|
||||
// If we have a hash public (hashp), we guess the original_file.
|
||||
$ecmfile='';
|
||||
if (!empty($hashp)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
||||
$ecmfile = new EcmFiles($db);
|
||||
|
|
|
|||
|
|
@ -773,16 +773,16 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||
$obj = $db->fetch_object($resql);
|
||||
$nbFactsClient = $obj->nb;
|
||||
$thirdTypeArray['customer'] = $langs->trans("customer");
|
||||
if ($conf->propal->enabled && $user->rights->propal->lire) {
|
||||
if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
|
||||
$elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals');
|
||||
}
|
||||
if ($conf->commande->enabled && $user->rights->commande->lire) {
|
||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
||||
$elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders');
|
||||
}
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire) {
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
|
||||
}
|
||||
if ($conf->contrat->enabled && $user->rights->contrat->lire) {
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
|
||||
}
|
||||
|
||||
|
|
@ -1304,7 +1304,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||
}
|
||||
print_liste_field_titre("DefaultRIB", '', '', '', '', '', '', '', 'center ');
|
||||
print_liste_field_titre('', '', '', '', '', '', '', '', 'center ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($rib_list as $rib) {
|
||||
|
|
@ -1393,7 +1393,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||
|
||||
$out = '';
|
||||
if (is_array($modellist) && count($modellist)) {
|
||||
$out .= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
|
||||
$out .= '<form action="'.$_SERVER["PHP_SELF"].(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
|
||||
$out .= '<input type="hidden" name="action" value="builddocrib">';
|
||||
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$out .= '<input type="hidden" name="socid" value="'.$object->id.'">';
|
||||
|
|
@ -1407,14 +1407,16 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||
$modelselected = $conf->global->BANKADDON_PDF;
|
||||
}
|
||||
|
||||
$out .= $form->selectarray('modelrib'.$rib->id, $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth100');
|
||||
$out .= $form->selectarray('modelrib'.$rib->id, $modellist, $modelselected, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100');
|
||||
$out .= ajax_combobox('modelrib'.$rib->id);
|
||||
|
||||
$allowgenifempty = 0;
|
||||
|
||||
// Language code (if multilang)
|
||||
if ($conf->global->MAIN_MULTILANGS) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
$formadmin = new FormAdmin($db);
|
||||
$defaultlang = $codelang ? $codelang : $langs->getDefaultLang();
|
||||
$defaultlang = $langs->getDefaultLang();
|
||||
$morecss = 'maxwidth150';
|
||||
if ($conf->browser->layout == 'phone') {
|
||||
$morecss = 'maxwidth100';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user