mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix php8.2 warnings
This commit is contained in:
@@ -180,7 +180,7 @@ $arrayfields = array(
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
|
||||
'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60, 'csslist'=>'nowraponall'),
|
||||
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65, 'csslist'=>'nowraponall'),
|
||||
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>!getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position'=>65, 'csslist'=>'nowraponall'),
|
||||
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled("expedition")),
|
||||
'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
|
||||
'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
|
||||
@@ -197,8 +197,8 @@ $arrayfields = array(
|
||||
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116),
|
||||
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)),
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
|
||||
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
|
||||
@@ -308,7 +308,7 @@ if (empty($reshook)) {
|
||||
$permissiontoread = $user->hasRight("commande", "lire");
|
||||
$permissiontoadd = $user->hasRight("commande", "creer");
|
||||
$permissiontodelete = $user->hasRight("commande", "supprimer");
|
||||
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
||||
if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
|
||||
$permissiontovalidate = $user->hasRight("commande", "order_advance", "validate");
|
||||
$permissiontoclose = $user->hasRight("commande", "order_advance", "close");
|
||||
$permissiontocancel = $user->hasRight("commande", "order_advance", "annuler");
|
||||
@@ -420,7 +420,7 @@ if (empty($reshook)) {
|
||||
$desc = dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day'));
|
||||
}
|
||||
|
||||
if ($lines[$i]->subprice < 0 && empty($conf->global->INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN)) {
|
||||
if ($lines[$i]->subprice < 0 && !getDolGlobalString('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) {
|
||||
// Negative line, we create a discount line
|
||||
$discount = new DiscountAbsolute($db);
|
||||
$discount->fk_soc = $objecttmp->socid;
|
||||
@@ -1137,7 +1137,7 @@ $num = $db->num_rows($resql);
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
|
||||
if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $sall) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$id = $obj->rowid;
|
||||
header("Location: ".DOL_URL_ROOT.'/commande/card.php?id='.$id);
|
||||
@@ -1391,14 +1391,14 @@ if ($massaction == 'createbills') {
|
||||
print $langs->trans('ValidateInvoices');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) {
|
||||
if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_BILL')) {
|
||||
print $form->selectyesno('validate_invoices', 0, 1, 1);
|
||||
$langs->load("errors");
|
||||
print ' ('.$langs->trans("WarningAutoValNotPossibleWhenStockIsDecreasedOnInvoiceVal").')';
|
||||
} else {
|
||||
print $form->selectyesno('validate_invoices', 0, 1);
|
||||
}
|
||||
if (!empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) {
|
||||
if (!empty($conf->workflow->enabled) && getDolGlobalString('WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER')) {
|
||||
print ' <span class="opacitymedium">'.$langs->trans("IfValidateInvoiceIsNoOrderStayUnbilled").'</span>';
|
||||
} else {
|
||||
print ' <span class="opacitymedium">'.$langs->trans("OptionToSetOrderBilledNotEnabled").'</span>';
|
||||
@@ -1460,7 +1460,7 @@ if (isModEnabled('categorie') && $user->hasRight("categorie", "lire")) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If Stock is enabled
|
||||
if (isModEnabled('stock') && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
||||
if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
@@ -1574,7 +1574,7 @@ if (!empty($arrayfields['country.code_iso']['checked'])) {
|
||||
// Company type
|
||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (!getDolGlobalString('SOCIETE_SORT_ON_TYPEENT') ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Date order
|
||||
@@ -1740,7 +1740,7 @@ if (!empty($arrayfields['c.note_private']['checked'])) {
|
||||
if (!empty($arrayfields['shippable']['checked'])) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
//print $form->selectyesno('search_shippable', $search_shippable, 1, 0, 1, 1);
|
||||
if (!empty($conf->global->ORDER_SHIPABLE_STATUS_DISABLED_BY_DEFAULT)) {
|
||||
if (getDolGlobalString('ORDER_SHIPABLE_STATUS_DISABLED_BY_DEFAULT')) {
|
||||
print '<input type="checkbox" name="show_shippable_command" value="1"'.($show_shippable_command ? ' checked' : '').'>';
|
||||
print $langs->trans('ShowShippableStatus');
|
||||
} else {
|
||||
@@ -2169,7 +2169,7 @@ while ($i < $imaxinloop) {
|
||||
}
|
||||
|
||||
// If module invoices enabled and user with invoice creation permissions
|
||||
if (isModEnabled('facture') && !empty($conf->global->ORDER_BILLING_ALL_CUSTOMER)) {
|
||||
if (isModEnabled('facture') && getDolGlobalString('ORDER_BILLING_ALL_CUSTOMER')) {
|
||||
if ($user->hasRight('facture', 'creer')) {
|
||||
if (($obj->fk_statut > 0 && $obj->fk_statut < 3) || ($obj->fk_statut == 3 && $obj->billed == 0)) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$companystatic->id.'&search_billed=0&autoselectall=1">';
|
||||
@@ -2628,7 +2628,7 @@ while ($i < $imaxinloop) {
|
||||
if ($reliquat > $generic_product->stock_reel) {
|
||||
$notshippable++;
|
||||
}
|
||||
if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { // Default code. Default should be this case.
|
||||
if (!getDolGlobalString('SHIPPABLE_ORDER_ICON_IN_LIST')) { // Default code. Default should be this case.
|
||||
$text_info .= $reliquat.' x '.$generic_commande->lines[$lig]->product_ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 20);
|
||||
$text_info .= ' - '.$langs->trans("Stock").': <span class="'.($generic_product->stock_reel > 0 ? 'ok' : 'error').'">'.$generic_product->stock_reel.'</span>';
|
||||
$text_info .= ' - '.$langs->trans("VirtualStock").': <span class="'.($generic_product->stock_theorique > 0 ? 'ok' : 'error').'">'.$generic_product->stock_theorique.'</span>';
|
||||
@@ -2641,7 +2641,7 @@ while ($i < $imaxinloop) {
|
||||
// stock order and stock order_supplier
|
||||
$stock_order = 0;
|
||||
$stock_order_supplier = 0;
|
||||
if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { // What about other options ?
|
||||
if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT') || getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) { // What about other options ?
|
||||
if (isModEnabled('commande')) {
|
||||
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) {
|
||||
$generic_product->load_stats_commande(0, '1,2');
|
||||
|
||||
Reference in New Issue
Block a user