Merge pull request #23678 from Hystepik/develop#1
fix : php 8.1 warnings
This commit is contained in:
commit
406c93bb1f
@ -144,9 +144,12 @@ $form = new Form($db);
|
|||||||
|
|
||||||
$title = $langs->trans("LT".$object->ltt)." - ".$langs->trans("Card");
|
$title = $langs->trans("LT".$object->ltt)." - ".$langs->trans("Card");
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
llxHeader('', $title, $helpurl);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
|
$datev = dol_mktime(12, 0, 0, GETPOST("datevmonth"), GETPOST("datevday"), GETPOST("datevyear"));
|
||||||
|
$datep = dol_mktime(12, 0, 0, GETPOST("datepmonth"), GETPOST("datepday"), GETPOST("datepyear"));
|
||||||
|
|
||||||
print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code));
|
print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code));
|
||||||
|
|
||||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" name="formlocaltax" method="post">'."\n";
|
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" name="formlocaltax" method="post">'."\n";
|
||||||
|
|||||||
@ -822,6 +822,9 @@ while ($i < min($num, $limit)) {
|
|||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'cd.qty';
|
$totalarray['pos'][$totalarray['nbfield']] = 'cd.qty';
|
||||||
}
|
}
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['val']['cd.qty'] = $obj->qty;
|
||||||
|
}
|
||||||
$totalarray['val']['cd.qty'] += $obj->qty;
|
$totalarray['val']['cd.qty'] += $obj->qty;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['cd.total_ht']['checked'])) {
|
if (!empty($arrayfields['cd.total_ht']['checked'])) {
|
||||||
|
|||||||
@ -66,6 +66,7 @@ $error = 0;
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
@ -291,13 +292,13 @@ if ($action == 'create') {
|
|||||||
// Date Start
|
// Date Start
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("DateStart").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("DateStart").'</td><td>';
|
||||||
print $form->selectDate($datestart ? $datestart : -1, 'start', '', '', '', 'add', 1, 1);
|
print $form->selectDate(!empty($datestart) ? $datestart : -1, 'start', '', '', '', 'add', 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date End
|
// Date End
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("DateEnd").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("DateEnd").'</td><td>';
|
||||||
print $form->selectDate($dateend ? $dateend : -1, 'end', '', '', '', 'add', 1, 1);
|
print $form->selectDate(!empty($dateend) ? $dateend : -1, 'end', '', '', '', 'add', 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Number of terms
|
// Number of terms
|
||||||
|
|||||||
@ -42,6 +42,7 @@ $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
|
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||||
@ -148,6 +149,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
$arrayfields = array();
|
||||||
|
|
||||||
// Complete request and execute it with limit
|
// Complete request and execute it with limit
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|||||||
@ -1485,7 +1485,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == 1 && $conf->workstation->enabled) {
|
if ($type == 1 && isModEnabled("workstation")) {
|
||||||
// Default workstation
|
// Default workstation
|
||||||
print '<tr><td>'.$langs->trans("DefaultWorkstation").'</td><td>';
|
print '<tr><td>'.$langs->trans("DefaultWorkstation").'</td><td>';
|
||||||
print img_picto($langs->trans("DefaultWorkstation"), 'workstation', 'class="pictofixedwidth"');
|
print img_picto($langs->trans("DefaultWorkstation"), 'workstation', 'class="pictofixedwidth"');
|
||||||
|
|||||||
@ -133,7 +133,7 @@ $helpurl = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$htmlother = new FormOther($db);
|
$htmlother = new FormOther($db);
|
||||||
if ($objp->stock_physique < 0) { print '<span class="warning">'; }
|
if (!empty($objp->stock_physique) && $objp->stock_physique < 0) { print '<span class="warning">'; }
|
||||||
|
|
||||||
$sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,';
|
$sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,';
|
||||||
$sql .= ' p.fk_product_type, p.tms as datem,';
|
$sql .= ' p.fk_product_type, p.tms as datem,';
|
||||||
|
|||||||
@ -72,7 +72,7 @@ if ($origin == 'reception') {
|
|||||||
} else {
|
} else {
|
||||||
if ($origin == 'supplierorder' || $origin == 'order_supplier') {
|
if ($origin == 'supplierorder' || $origin == 'order_supplier') {
|
||||||
$result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande');
|
$result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande');
|
||||||
} elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) {
|
} elseif (!$user->hasRight($origin, "lire") && !$user->hasRight($origin, "read")) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,6 +97,7 @@ $search_chq_number = GETPOST('search_chq_number', 'int');
|
|||||||
|
|
||||||
$filtre = GETPOST("filtre", 'restricthtml');
|
$filtre = GETPOST("filtre", 'restricthtml');
|
||||||
|
|
||||||
|
$search_type_id = '';
|
||||||
if (!GETPOST('search_type_id', 'int')) {
|
if (!GETPOST('search_type_id', 'int')) {
|
||||||
$newfiltre = str_replace('filtre=', '', $filtre);
|
$newfiltre = str_replace('filtre=', '', $filtre);
|
||||||
$filterarray = explode('-', $newfiltre);
|
$filterarray = explode('-', $newfiltre);
|
||||||
@ -532,6 +533,7 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
@ -697,7 +699,12 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
$totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
||||||
}
|
}
|
||||||
$totalarray['val']['totalttcfield'] += $obj->amount;
|
if (!$i) {
|
||||||
|
$totalarray['val']['totalttcfield'] = $obj->amount;
|
||||||
|
} else {
|
||||||
|
$totalarray['val']['totalttcfield'] += $obj->amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user