diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 773cb6a1a97..735b1c676b9 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -286,7 +286,7 @@ function convertSecondToTime($iSecond, $format = 'all', $lengthOfDay = 86400, $l if ($sDay > 1) { $dayTranslate = $langs->trans("Days"); } - $sTime .= $sDay.' '.strtolower(dol_substr($dayTranslate, 0, 1)).'. '; + $sTime .= $sDay.' '.$langs->trans("d").' '; } if ($format == 'all') { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index dcbcb133729..1c93f32a4d6 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -2135,9 +2135,10 @@ class pdf_crabe extends ModelePDFFactures if (!empty($idaddressshipping)) { $contactshipping = $object->fetch_Contact($idaddressshipping[0]); - $object->fetch_thirdparty($object->contact->fk_soc); + $companystatic = new Societe($this->db); + $companystatic->fetch($object->contact->fk_soc); $carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs); - $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object); + $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $companystatic, $object->contact, $usecontact, 'target', $object); } else { $carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs); $carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object); @@ -2148,7 +2149,7 @@ class pdf_crabe extends ModelePDFFactures // Show shipping frame $pdf->SetXY($posx + 2, $posy - 5); $pdf->SetFont('', '', $default_font_size - 2); - $pdf->MultiCell($widthrecbox, '', $langs->trans('ShippingTo'), 0, 'L', 0); + $pdf->MultiCell($widthrecbox, '', $outputlangs->transnoentities('ShippingTo'), 0, 'L', 0); $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); // Show shipping name diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index d2c6f4f87f0..4ae1df8dae6 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2385,9 +2385,10 @@ class pdf_sponge extends ModelePDFFactures if (!empty($idaddressshipping)) { $contactshipping = $object->fetch_Contact($idaddressshipping[0]); - $object->fetch_thirdparty($object->contact->fk_soc); + $companystatic = new Societe($this->db); + $companystatic->fetch($object->contact->fk_soc); $carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs); - $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object); + $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $companystatic, $object->contact, $usecontact, 'target', $object); } else { $carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs); $carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object); @@ -2398,7 +2399,7 @@ class pdf_sponge extends ModelePDFFactures // Show shipping frame $pdf->SetXY($posx + 2, $posy - 5); $pdf->SetFont('', '', $default_font_size - 2); - $pdf->MultiCell($widthrecbox, '', $langs->trans('ShippingTo'), 0, 'L', 0); + $pdf->MultiCell($widthrecbox, '', $outputlangs->transnoentities('ShippingTo'), 0, 'L', 0); $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); // Show shipping name diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 39aa7216e84..3bbbe328080 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -1,6 +1,7 @@ * Copyright (C) 2021 Florian Henry + * Copyright (C) 2023 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -531,7 +532,7 @@ $sqlfields = $sql; // $sql fields to remove for count total $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.id = ef.fk_object)"; } $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'"; // Add table from hooks diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 705dac46e50..2f704384305 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -66,7 +66,7 @@ $search_desc = GETPOST('search_desc', 'alpha'); $search_projet_ref = GETPOST('search_projet_ref', 'alpha'); $search_contrat_ref = GETPOST('search_contrat_ref', 'alpha'); $search_status = GETPOST('search_status', 'alpha'); -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); +$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $optioncss = GETPOST('optioncss', 'alpha'); $socid = GETPOST('socid', 'int'); @@ -311,8 +311,8 @@ if (empty($user->rights->societe->client->voir) && empty($socid)) { if ($socid) { $sql .= " AND s.rowid = ".((int) $socid); } -if ($sall) { - $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -321,7 +321,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Add GroupBy from hooks -$parameters = array('search_all' => $sall, 'fieldstosearchall' => $fieldstosearchall); +$parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall); $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; @@ -396,8 +396,8 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } -if ($sall) { - $param .= "&sall=".urlencode($sall); +if ($search_all) { + $param .= "&search_all=".urlencode($search_all); } if ($socid) { $param .= "&socid=".urlencode($socid); @@ -474,11 +474,11 @@ $objecttmp = new Fichinter($db); $trackid = 'int'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) { +if ($search_all) { foreach ($fieldstosearchall as $key => $val) { $fieldstosearchall[$key] = $langs->trans($val); } - print '
'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
'; + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; } $moreforfilter = ''; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 4245afe62b5..f31d6a38e7e 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -667,13 +667,14 @@ class ProductFournisseur extends Product /** * List all supplier prices of a product * - * @param int $prodid Id of product - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit - * @param int $offset Offset - * @param int $socid Filter on a third party id + * @param int $prodid Id of product + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit + * @param int $offset Offset + * @param int $socid Filter on a third party id * @return array|int Array of ProductFournisseur with new properties to define supplier price + * @see find_min_price_product_fournisseur() */ public function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0, $socid = 0) { @@ -784,6 +785,7 @@ class ProductFournisseur extends Product * @param int $qty Minimum quantity * @param int $socid get min price for specific supplier * @return int <0 if KO, 0=Not found of no product id provided, >0 if OK + * @see list_product_fournisseur_price() */ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0) { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 48e74d223e6..fc392a69254 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1695,15 +1695,14 @@ if ($action == 'create') { } else { print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', '(s.fournisseur=1 AND s.status=1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations - if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) { - print ''; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 099843308d4..a8d9f38ac12 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2177,7 +2177,7 @@ if ($action == 'create') { } else { print img_picto('', 'company').$form->select_company(empty($societe->id) ? 0 : $societe->id, 'socid', '(s.fournisseur = 1 AND s.status = 1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 widthcentpercentminusxx maxwidth500'); // reload page to retrieve supplier informations - if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) { + if (empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE_DISABLED)) { print '