Skip to content

Commit

Permalink
FIX avoid php warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Dec 12, 2024
1 parent eea5f23 commit d7237f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions htdocs/compta/facture/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@
$pageprev = $page - 1;
$pagenext = $page + 1;

// Security check
$fieldid = (!empty($ref) ? 'ref' : 'rowid');
if (!empty($user->socid)) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid);

$diroutputmassaction = $conf->facture->dir_output.'/temp/massgeneration/'.$user->id;

$now = dol_now();
Expand Down Expand Up @@ -308,13 +315,6 @@
$search_sale = $user->id;
}

// Security check
$fieldid = (!empty($ref) ? 'ref' : 'rowid');
if (!empty($user->socid)) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid);


/*
* Actions
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/actions_massactions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -891,13 +891,13 @@
$filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid")));
}
}
if ($year) {
if (!empty($year)) {
$filename .= '_'.$year;
}
if ($month) {
if (!empty($month)) {
$filename .= '_'.$month;
}
if ($pagecount) {
if (!empty($pagecount)) {
$now = dol_now();
$file = $diroutputmassaction.'/'.$filename.'_'.dol_print_date($now, 'dayhourlog').'.pdf';
$pdf->Output($file, 'F');
Expand Down

0 comments on commit d7237f0

Please sign in to comment.