Browse Source

Fix : php warning 8.1

Hystepik 2 years ago
parent
commit
a2aac30ded

+ 3 - 2
htdocs/compta/bank/various_payment/list.php

@@ -47,6 +47,7 @@ if ($user->socid) {
 
 $optioncss = GETPOST('optioncss', 'alpha');
 $mode      = GETPOST('mode', 'alpha');
+$massaction = GETPOST('massaction', 'aZ09');
 
 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
 $search_ref = GETPOST('search_ref', 'int');
@@ -679,7 +680,7 @@ while ($i < $imaxinloop) {
 
 		// Date payment
 		if ($arrayfields['datep']['checked']) {
-			print '<td class="center">'.dol_print_date($obj->datep, 'day')."</td>";
+			print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>";
 			if (!$i) {
 				$totalarray['nbfield']++;
 			}
@@ -688,7 +689,7 @@ while ($i < $imaxinloop) {
 
 		// Date value
 		if ($arrayfields['datev']['checked']) {
-			print '<td class="center">'.dol_print_date($obj->datev, 'day')."</td>";
+			print '<td class="center">'.dol_print_date($db->jdate($obj->datev), 'day')."</td>";
 			if (!$i) {
 				$totalarray['nbfield']++;
 			}

+ 6 - 0
htdocs/compta/prelevement/list.php

@@ -223,6 +223,12 @@ if ($optioncss != '') {
 	$param .= '&optioncss='.urlencode($optioncss);
 }
 
+$arrayofmassactions = array(
+	//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
+	//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
+);
+$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
+
 print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
 print '<input type="hidden" name="token" value="'.newToken().'">';
 if ($optioncss != '') {

+ 5 - 1
htdocs/compta/prelevement/orders_list.php

@@ -172,7 +172,6 @@ $num = $db->num_rows($resql);
 llxHeader('', $title, $help_url);
 
 $arrayofselected = is_array($toselect) ? $toselect : array();
-
 $param = '';
 $param .= "&statut=".urlencode($statut);
 if ($type == 'bank-transfer') {
@@ -191,6 +190,11 @@ if ($optioncss != '') {
 	$param .= '&optioncss='.urlencode($optioncss);
 }
 
+$arrayofmassactions = array(
+	//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
+	//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
+);
+$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
 
 print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
 print '<input type="hidden" name="token" value="'.newToken().'">';

+ 6 - 6
htdocs/core/boxes/box_factures_fourn_imp.php

@@ -160,12 +160,12 @@ class box_factures_fourn_imp extends ModeleBoxes
 					$thirdpartystatic->email = $objp->email;
 					$thirdpartystatic->entity = $objp->entity;
 					$thirdpartystatic->tva_intra = $objp->tva_intra;
-					$thirdpartystatic->idprof1 = $objp->idprof1;
-					$thirdpartystatic->idprof2 = $objp->idprof2;
-					$thirdpartystatic->idprof3 = $objp->idprof3;
-					$thirdpartystatic->idprof4 = $objp->idprof4;
-					$thirdpartystatic->idprof5 = $objp->idprof5;
-					$thirdpartystatic->idprof6 = $objp->idprof6;
+					$thirdpartystatic->idprof1 = !empty($objp->idprof1) ? $objp->idprof1 : '';
+					$thirdpartystatic->idprof2 = !empty($objp->idprof2) ? $objp->idprof2 : '';
+					$thirdpartystatic->idprof3 = !empty($objp->idprof3) ? $objp->idprof3 : '';
+					$thirdpartystatic->idprof4 = !empty($objp->idprof4) ? $objp->idprof4 : '';
+					$thirdpartystatic->idprof5 = !empty($objp->idprof5) ? $objp->idprof5 : '';
+					$thirdpartystatic->idprof6 = !empty($objp->idprof6) ? $objp->idprof6 : '';
 
 					$late = '';
 					if ($facturestatic->hasDelay()) {

+ 4 - 4
htdocs/core/class/html.formticket.class.php

@@ -857,9 +857,9 @@ class FormTicket
 					}
 
 					// If selected is text, we compare with code, otherwise with id
-					if (preg_match('/[a-z]/i', $selected) && $selected == $arraycategories['code']) {
+					if (isset($selected) && preg_match('/[a-z]/i', $selected) && $selected == $arraycategories['code']) {
 						print ' selected="selected"';
-					} elseif ($selected == $id) {
+					} elseif (isset($selected) && $selected == $id) {
 						print ' selected="selected"';
 					} elseif ($arraycategories['use_default'] == "1" && !$selected && !$empty) {
 						print ' selected="selected"';
@@ -1194,9 +1194,9 @@ class FormTicket
 				}
 
 				// If text is selected, we compare with code, otherwise with id
-				if (preg_match('/[a-z]/i', $selected) && $selected == $arrayseverities['code']) {
+				if (isset($selected) && preg_match('/[a-z]/i', $selected) && $selected == $arrayseverities['code']) {
 					print ' selected="selected"';
-				} elseif ($selected == $id) {
+				} elseif (isset($selected) && $selected == $id) {
 					print ' selected="selected"';
 				} elseif ($arrayseverities['use_default'] == "1" && !$selected && !$empty) {
 					print ' selected="selected"';

+ 1 - 1
htdocs/core/modules/ticket/mod_ticket_simple.php

@@ -147,7 +147,7 @@ class mod_ticket_simple extends ModeleNumRefTicket
 		$date = empty($ticket->datec) ? dol_now() : $ticket->datec;
 
 		//$yymm = strftime("%y%m",time());
-		$yymm = strftime("%y%m", $date);
+		$yymm = dol_print_date($date, "%y%m");
 
 		if ($max >= (pow(10, 4) - 1)) {
 			$num = $max + 1;

+ 2 - 0
htdocs/loan/card.php

@@ -249,6 +249,8 @@ if (empty($reshook)) {
 
 $form = new Form($db);
 $formproject = new FormProjets($db);
+$morehtmlright = '';
+$outputlangs = $langs;
 if (isModEnabled('accounting')) {
 	$formaccounting = new FormAccounting($db);
 }

+ 2 - 0
htdocs/loan/schedule.php

@@ -57,6 +57,8 @@ $echeances->fetchAll($object->id);
 
 if ($object->paid > 0 && count($echeances->lines) == 0) {
 	$pay_without_schedule = 1;
+} else {
+	$pay_without_schedule = 0;
 }
 
 /*