Fix warnings
This commit is contained in:
parent
f97f73aa2a
commit
c6da6763de
5 changed files with 17 additions and 14 deletions
|
|
@ -254,15 +254,15 @@ function pdfCertifMentionblockedLog(&$pdf, $outputlangs, $seller, $default_font_
|
|||
/**
|
||||
* sumAmountsForUnalterableEvent
|
||||
*
|
||||
* @param BlockedLog $block Object BlockedLog
|
||||
* @param array<string,int> $refinvoicefound Array of ref of invoice already found (to avoid duplicates. Should be useless but just in case of)
|
||||
* @param array<string,float> $totalhtamount Array of total per code event and module
|
||||
* @param array<string,float> $totalvatamount Array of total per code event and module
|
||||
* @param array<string,float> $totalamount Array of total per code event and module
|
||||
* @param float $total_ht Total HT
|
||||
* @param float $total_vat Total VAT
|
||||
* @param float $total_ttc Total TTC
|
||||
* @return int Return > 0
|
||||
* @param BlockedLog $block Object BlockedLog
|
||||
* @param array<string,int> $refinvoicefound Array of ref of invoice already found (to avoid duplicates. Should be useless but just in case of)
|
||||
* @param array<string,array<string,float>> $totalhtamount Array of total per code event and module
|
||||
* @param array<string,array<string,float>> $totalvatamount Array of total per code event and module
|
||||
* @param array<string,array<string,float>> $totalamount Array of total per code event and module
|
||||
* @param float $total_ht Total HT
|
||||
* @param float $total_vat Total VAT
|
||||
* @param float $total_ttc Total TTC
|
||||
* @return int Return > 0
|
||||
*/
|
||||
function sumAmountsForUnalterableEvent($block, &$refinvoicefound, &$totalhtamount, &$totalvatamount, &$totalamount, &$total_ht, &$total_vat, &$total_ttc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -129,14 +129,14 @@ $ssec = 0;
|
|||
if ($object->id > 0) {
|
||||
// When object is know, we must define first the end date (stored in database with different components) and deduct the start date
|
||||
if (empty($object->day_close) && !empty($object->month_close)) {
|
||||
$dateend = dol_mktime($object->hour_close, $object->min_close, $object->sec_close, $object->month_close, $object->day_close, $object->year_close, 'gmt');
|
||||
$dateend = dol_mktime((int) $object->hour_close, (int) $object->min_close, (int) $object->sec_close, $object->month_close, $object->day_close, $object->year_close, 'gmt');
|
||||
$datestart = dol_time_plus_duree($dateend, -1, 'y', 0);
|
||||
} elseif (empty($object->day_close) && empty($object->month_close)) {
|
||||
$dateend = dol_mktime($object->hour_close, $object->min_close, $object->sec_close, 12, 31, $object->year_close, 'gmt');
|
||||
$datestart = dol_mktime($object->hour_close, $object->min_close, $object->sec_close, 12, 1, $object->year_close, 'gmt');
|
||||
$dateend = dol_mktime((int) $object->hour_close, (int) $object->min_close, (int) $object->sec_close, 12, 31, $object->year_close, 'gmt');
|
||||
$datestart = dol_mktime((int) $object->hour_close, (int) $object->min_close, (int) $object->sec_close, 12, 1, $object->year_close, 'gmt');
|
||||
$datestart = dol_time_plus_duree($datestart, -1, 'm', 0);
|
||||
} else {
|
||||
$dateend = dol_mktime($object->hour_close, $object->min_close, $object->sec_close, $object->month_close, $object->day_close, $object->year_close, 'gmt');
|
||||
$dateend = dol_mktime((int) $object->hour_close, (int) $object->min_close, (int) $object->sec_close, $object->month_close, $object->day_close, $object->year_close, 'gmt');
|
||||
$datestart = dol_time_plus_duree($dateend, -1, 'd', 0);
|
||||
}
|
||||
$datestart += 1; // Add 1 second
|
||||
|
|
|
|||
|
|
@ -2418,7 +2418,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
|||
|
||||
// login infos
|
||||
if (!empty($user->admin)) {
|
||||
$dropdownBody .= '<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin).($user->admin ? ' '.img_picto('', 'admin') : '');
|
||||
$dropdownBody .= '<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin).' '.img_picto('', 'admin');
|
||||
}
|
||||
$company = '';
|
||||
if (!empty($user->socid)) { // Add third party for external users
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@
|
|||
* @var Translate $langs
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Hookmanager $hookmanager
|
||||
* @var User $user
|
||||
*
|
||||
* @var CommonObject $object
|
||||
* @var int $noMoreLinkedObjectBlockAfter
|
||||
* @var int $showImportButton
|
||||
* @var CommonObject[] $linkedObjectBlock
|
||||
* @var string $action
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ require '../main.inc.php'; // Load $user and permissions
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
* @var Societe $mysoc
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
|
|||
Loading…
Reference in a new issue