From d6948077b223d7c57e49f67bc5250c5ef254a48c Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 7 Aug 2024 01:20:43 +0200 Subject: [PATCH] Qual: Fix spelling/update .pre-commit configuration (versions) (#30546) * Qual: Update pre-commit configuration * Qual: Update spelling * Ignore use of deprecated constant --- .pre-commit-config.yaml | 10 +- ChangeLog | 14 +- .../codespell/codespell-lines-ignore.txt | 169 +----------------- dev/tools/dolibarr-mysql2pgsql.pl | 2 +- dev/tools/dolibarr-postgres2mysql.php | 9 +- .../accountancy/bookkeeping/listbyaccount.php | 4 +- .../class/accountingaccount.class.php | 2 +- htdocs/adherents/class/adherent.class.php | 4 +- .../adherents/class/adherent_type.class.php | 9 +- htdocs/adherents/class/subscription.class.php | 4 +- htdocs/bom/class/bom.class.php | 2 +- .../action/class/api_agendaevents.class.php | 3 +- htdocs/comm/card.php | 9 +- htdocs/comm/propal/class/propal.class.php | 4 +- htdocs/commande/class/commande.class.php | 8 +- htdocs/compta/bank/class/account.class.php | 8 +- .../bank/class/paymentvarious.class.php | 4 +- .../cashcontrol/class/cashcontrol.class.php | 4 +- .../deplacement/class/deplacement.class.php | 5 +- .../facture/class/facture-rec.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 6 +- .../compta/localtax/class/localtax.class.php | 6 +- htdocs/compta/localtax/quadri_detail.php | 2 +- .../cheque/class/remisecheque.class.php | 6 +- .../compta/paiement/class/paiement.class.php | 6 +- .../class/bonprelevement.class.php | 4 +- .../sociales/class/chargesociales.class.php | 2 +- .../class/paymentsocialcontribution.class.php | 4 +- htdocs/compta/stats/index.php | 5 +- htdocs/compta/tva/class/tva.class.php | 4 +- htdocs/contrat/class/contrat.class.php | 6 +- htdocs/core/ajax/objectonoff.php | 3 +- htdocs/core/class/commoninvoice.class.php | 4 +- htdocs/core/class/commonorder.class.php | 15 +- htdocs/core/class/extrafields.class.php | 4 +- htdocs/core/class/fiscalyear.class.php | 2 +- htdocs/core/class/html.formcompany.class.php | 10 +- htdocs/core/class/utils.class.php | 4 +- htdocs/core/db/Database.interface.php | 2 +- htdocs/core/db/DoliDB.class.php | 2 +- htdocs/core/db/pgsql.class.php | 2 +- htdocs/core/db/sqlite3.class.php | 2 +- htdocs/core/get_menudiv.php | 13 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/price.lib.php | 2 +- htdocs/core/menus/standard/auguria_menu.php | 4 +- htdocs/core/menus/standard/eldy_menu.php | 4 +- .../modules/mailings/contacts1.modules.php | 5 +- .../core/modules/mailings/fraise.modules.php | 7 +- .../core/modules/mailings/pomme.modules.php | 5 +- .../modules/mailings/xinputfile.modules.php | 5 +- .../modules/mailings/xinputuser.modules.php | 5 +- .../class/DataCollector/DolPhpCollector.php | 2 +- htdocs/debugbar/class/TraceableDB.php | 2 +- htdocs/delivery/class/delivery.class.php | 2 +- htdocs/don/class/don.class.php | 4 +- htdocs/don/class/paymentdonation.class.php | 5 +- htdocs/ecm/class/ecmdirectory.class.php | 5 +- htdocs/expedition/class/expedition.class.php | 4 +- .../class/expensereport.class.php | 2 +- .../class/paymentexpensereport.class.php | 4 +- htdocs/fichinter/class/fichinter.class.php | 4 +- htdocs/fichinter/class/fichinterrec.class.php | 4 +- htdocs/fourn/card.php | 9 +- .../class/fournisseur.commande.class.php | 4 +- .../class/fournisseur.facture-rec.class.php | 2 +- .../fourn/class/fournisseur.facture.class.php | 4 +- htdocs/fourn/class/paiementfourn.class.php | 4 +- htdocs/holiday/class/holiday.class.php | 4 +- htdocs/hrm/class/evaluation.class.php | 2 +- htdocs/hrm/class/job.class.php | 2 +- htdocs/hrm/class/position.class.php | 2 +- htdocs/hrm/class/skill.class.php | 2 +- htdocs/install/upgrade2.php | 16 +- .../class/knowledgerecord.class.php | 2 +- htdocs/loan/class/loan.class.php | 5 +- htdocs/loan/class/paymentloan.class.php | 2 +- .../mailing_mymodule_selector1.modules.php | 5 +- htdocs/mrp/class/mo.class.php | 2 +- htdocs/product/class/product.class.php | 2 +- htdocs/product/popuprop.php | 2 +- htdocs/product/stock/class/entrepot.class.php | 2 +- htdocs/projet/class/project.class.php | 2 +- htdocs/projet/class/task.class.php | 4 +- htdocs/reception/class/reception.class.php | 4 +- .../class/recruitmentcandidature.class.php | 2 +- .../class/recruitmentjobposition.class.php | 2 +- htdocs/salaries/class/paymentsalary.class.php | 8 +- htdocs/salaries/class/salary.class.php | 4 +- htdocs/societe/class/societe.class.php | 2 +- htdocs/stripe/ajax/ajax.php | 9 +- .../class/supplier_proposal.class.php | 4 +- htdocs/theme/eldy/global.inc.php | 4 +- htdocs/theme/md/style.css.php | 136 +++++++------- htdocs/ticket/class/ticket.class.php | 4 +- htdocs/user/class/user.class.php | 2 +- htdocs/user/class/usergroup.class.php | 2 +- .../class/html.formwebportal.class.php | 4 +- .../class/webportalinvoice.class.php | 4 +- .../webportal/class/webportalmember.class.php | 2 +- .../webportal/class/webportalorder.class.php | 4 +- scripts/bank/export-bank-receipts.php | 3 +- .../email_expire_services_to_customers.php | 3 +- ...ail_expire_services_to_representatives.php | 3 +- .../email_unpaid_invoices_to_customers.php | 3 +- ...ail_unpaid_invoices_to_representatives.php | 3 +- 106 files changed, 318 insertions(+), 440 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 328005d7a4d..45eb0d85dc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.[^/]*/.*))$ repos: # Several miscellaneous checks and fix (on yaml files, end of files fix) - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: # This hook tests the name of the branch and return an error if the name is # 'develop' or an official version 'x.y' @@ -177,7 +177,7 @@ repos: # Check format of yaml files - repo: https://github.com/adrienverge/yamllint.git - rev: v1.33.0 + rev: v1.35.1 hooks: - id: yamllint args: @@ -187,7 +187,7 @@ repos: # Execute codespell to fix typo errors (setup of codespell into dev/tools/codespell/) - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell # Due to a current limitation of configuration files, @@ -230,14 +230,14 @@ repos: # Check some shell scripts - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.6 + rev: v0.10.0.1 hooks: - id: shellcheck args: [-W, "100"] # Check sql file syntax - repo: https://github.com/sqlfluff/sqlfluff - rev: 3.0.4 + rev: 3.1.0 hooks: - id: sqlfluff-lint stages: [pre-commit, manual] # manual needed for ci diff --git a/ChangeLog b/ChangeLog index 5c321be8fb1..76ec155ed50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1643,7 +1643,7 @@ NEW: Add link to create an element from the category page NEW: add margin infos to takepos invoice lines NEW: Add max size send for "backup and link to mail" option NEW: Add method httponly_accessforbidden() -NEW: Add more advices into the Setup security page +NEW: Add more advice into the Setup security page NEW: Add new global variable for keeping the previous signature information on proposal (case of reopening a proposal) NEW: Add objectLink on shipment NEW: Add option --force on CLI cron_run_jobs.php @@ -3061,8 +3061,8 @@ NEW: add option in Workflow module to set a shipment as closed for Admins -NEW: Add a security center page with all information and advices related to the security of your instance -NEW: Add a performance center page with all information and advices related to the performance of your instance +NEW: Add a security center page with all information and advice related to the security of your instance +NEW: Add a performance center page with all information and advice related to the performance of your instance Modules NEW: Module Recruitment is now stable @@ -7080,7 +7080,7 @@ NEW: Add index and constraints keys on supplier proposal detail table NEW: Add phpunit to check the engine is defined into sql create files. NEW: Add project and Hook to Loan NEW: Add REST API to push a file. -NEW: Allow extrafields list select to be dependands on other standard list and not only other extrafields list +NEW: Allow extrafields list select to be dependent on other standard list and not only other extrafields list NEW: Architecture to manage search criteria persistence (using save_lastsearch_values=1 on exit links and restore_lastsearch_values=1 in entry links) NEW: data files are now also parsed by phpunit for sql syntax NEW: Hook to allow inserting custom product head #6001 @@ -8104,7 +8104,7 @@ NEW: The clicktodial module is now able to provide link "tel:" on phone numbers. NEW: The conditional IF into ODT templates works also on not defined var so we can show data only if defined. Close #3819 NEW: The free text in PDF footers can now be a HTML content. So the WYSIWYG editor is on by default to edit it into module setup. NEW: The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new "top banner", saving space and using a same way to show address, status and navigation arrows. -NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb) +NEW: Thumbs for statistics on main page are fully clickable (not only link inside the thumb) NEW: Translate extrafield's labels. NEW: Use new select2 component for juridical status, country and state selection. NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. @@ -8703,7 +8703,7 @@ NEW: [ task #851 ] Add a new field: Commercial name NEW: [ task #977 ] New option to manage product unit Migrated code from GPCSolutions/dolibarr:3.2-units branch and adapted for 3.8 with some improvements NEW: The line where mouse is over can be highlight with option THEME_ELDY_USE_HOVER (on by default) NEW: The notification module accept keyword __SUPERVISOR__ to send notification to supervisor of user. -NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb) +NEW: Thumbs for statistics on main page are fully clickable (not only link inside the thumb) NEW: Title of page project contains project ref and label NEW: update skeleton and class builder NEW: Use new select2 component for juridical status, country and state selection. @@ -9854,7 +9854,7 @@ For users: prices, radio). - New: [ task #798 ] Add range limit date on product/services as it is done on order and invoice. -- New: [ task #814 ] Add extrafield feature for projects ands tasks. +- New: [ task #814 ] Add extrafield feature for projects and tasks. - New: [ task #770 ] Add ODT document generation for Projects module. - New: [ task #741 ] Add intervention box. - New: [ task #826 ] Optional increase stock when deleting an invoice already validated. diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index c04c6d0446d..e2acab0de53 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -1,12 +1,6 @@ - || !empty($dates) && empty($datee) && $loanSchedule->datep >= $dates && $loanSchedule->datep <= dol_now() - || empty($dates) && !empty($datee) && $loanSchedule->datep <= $datee $objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility - if (($loanSchedule->datep >= $dates && $loanSchedule->datep <= $datee) // dates filter is defined - $datee = $langs->trans("Unknown"); - $datee = dol_print_date($objectligne->date_end, 'day', false, $outputlangs, true); - $txt .= $outputlangs->transnoentities("DateStartPlannedShort")." : ".$datei." - ".$outputlangs->transnoentities("DateEndPlanned")." : ".$datee.''; if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { - print 'id.'">'; + print 'id.'&token='.newToken().'">'; $object->date_ech = $object->periode; $object->periode = $object->date_ech; $reponsesadd = str_split($obj->reponses); @@ -16,182 +10,97 @@ // $object->periode = dol_get_last_day(year of $object->date_ech - 1m, month or $object->date_ech -1m) //$pice = ''; //$typea = ($objp->typea == 'birth') ? $picb : $pice; - print ''; - $date = $overview[0]->udate; + print ''; $dateemail = dol_stringtotime((string) $overview[0]->udate, 'gmt'); - $dateb = $this->db->jdate($data[$j]->datea); - $link->datea = $this->db->jdate($obj->datea); $object->periode = $newdateperiod; - $out .= dol_print_date($file->datea, 'dayhour'); $pice = ''; - $taskstatic->date_end = $this->db->jdate($objp->datee); - $tmp = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee); - $tmpprojtime = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee); // $element is a task. $elementuser may be empty $typea = ($data[$j]->typea == 'birth') ? $picb : $pice; - //var_dump("$key, $tablename, $datefieldname, $dates, $datee"); GETPOSTINT("mouvement"), dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." from=".$overview[0]->from." to=".$overview[0]->to." subject=".$overview[0]->subject); - if ((empty($dates) && empty($datee)) || (intval($dates) <= $element->datestart && intval($datee) >= $element->dateend)) { jQuery("#mouvement option").removeAttr("selected").change(); jQuery("#mouvement option[value=0]").attr("selected","selected").trigger("change"); jQuery("#mouvement option[value=1]").attr("selected","selected").trigger("change"); jQuery("#mouvement").trigger("change"); - print ''; - $TFirstDay = getFirstDayOfEachWeek($TWeek, date('Y', $firstdaytoshow)); - $TFirstDay[reset($TWeek)] = 1; $action = 'transfert'; - $addform .= ''; $date_liv = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $newfiletmp = preg_replace('/\.od(s|t)/i', '', $newfile); $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); $object->period = dol_time_plus_duree($object->periode, 1, 'm'); $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); - $project_static->date_end = $this->db->jdate($obj->datee); - $projectstatic->date_end = $db->jdate($objp->datee); - $ret = projectLinesPerMonth($inc, $firstdaytoshow, $fuser, $lines[$i]->id, ($parent == 0 ? $lineswithoutlevel0 : $lines), $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $isavailable, $oldprojectforbreak, $TWeek); - $taskstatic->datee = $lines[$i]->date_end; // deprecated $this->category->childs[] = $this->_cleanObjectDatas($cat); - $this->date_approbation = $this->db->jdate($obj->datea); - $this->date_approval = $this->db->jdate($obj->datea); - $this->date_approve = $this->db->jdate($obj->datea); - $this->datea = $this->db->jdate($obj->datea); - $this->datee = $this->db->jdate($obj->datee); $this->periode = $this->db->jdate($obj->period); $tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses); $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, 1); // Disable hook for the moment //si les reponses ne concerne pas la colonne effacée, on concatenate GETPOST("mouvement", 'alpha'), GETPOSTINT("mouvement"), - foreach ($TWeek as $weekIndex => $weekNb) { - if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) { if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr("disabled"); - print ''.$langs->trans("TransferStock").''; - print ''.dol_print_date($link->datea, "dayhour", "tzuser").''; + print ''.$langs->trans("TransferStock").''; $action = 'transfert'; $date_com = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); $date_next_execution = (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); $date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear); - $datee = dol_get_last_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 12); $datesubscription = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); $ensemblereponses = $obj->reponses; $field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit); // the name of the field $newcrit = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '', $tmpcrit); - $object->datee = $datee; $object->periode = $dateperiod; $return .= '
'.$langs->trans("Payement").' : '.$this->type_payment.''; - $sortfield = "datea"; - $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; $sql .= " '".$db->escape($conf->currency)."' as currency, 0 as fk_soc, t.date_ech as date, t.periode as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; - $sql .= " , datee = ".(!empty($obj->datee) ? "'".$this->db->escape($obj->datee)."'" : "null"); - $sql .= " AND (".$datefieldname." <= '".$this->db->idate($datee)."' OR ".$datefieldname." IS NULL)"; - $sql .= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter, 1, false)).")"; - $sql .= " AND date_creation BETWEEN '".$db->idate($dates)."' AND '".$db->idate($datee)."'"; - $sql .= " AND er.datee >= '".$this->db->idate($date)."'"; - $sql .= " ORDER BY pt.datee ASC, pt.dateo ASC"; - $sql .= " t.datec, t.dateo, t.datee, t.tms,"; - $sql .= " t.dateo, t.datee, t.planned_workload, t.rang,"; - $sql .= ", datee = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null'); - $sql .= "SELECT u.rowid, u.firstname, u.lastname, u.dateemployment as datea, date_format(u.dateemployment, '%d') as daya, 'employment' as typea, u.email, u.statut as status"; - $sql = "SELECT pt.rowid, pt.ref, pt.fk_projet, pt.fk_task_parent, pt.datec, pt.dateo, pt.datee, pt.datev, pt.label, pt.description, pt.duration_effective, pt.planned_workload, pt.progress"; - $sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth as datea, date_format(u.birth, '%d') as daya, 'birth' as typea, u.email, u.statut as status"; $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, date_creation)'; $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, ip, date_creation)'; $sql = 'SELECT s.reponses'; $sql2 .= " SET reponses = '".$db->escape($newcar)."'"; - $taskstatic->datee = $db->jdate($obj->date_end); $this->category->childs = array(); - $this->datea = dol_now(); $tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit); // the condition after the name of the field - 'datee' => $date_end, // mise a jour des reponses utilisateurs dans la base - if (!empty($arrayfields['t.datee']['checked'])) { if ($user->hasRight('stock', 'mouvement', 'lire')) { if (empty($reyear) || empty($remonth) || empty($reday)) { jQuery("#mouvement").change(function() { preg_match('/:([!<>=\s]+|in|notin|like|notlike):/', $tmpcrit, $reg); print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); - print ''.$langs->trans("TransferStock").''; + print ''.$langs->trans("TransferStock").''; print ''.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).''; print ''.dol_print_date($db->jdate($obj->periode), 'day').''; print ''.$langs->trans("AddIn").''; print dol_print_date($object->periode, "day"); - $TWeek[$week_number] = $week_number; + "sme", $action = 'transfert'; $cle_rib = strtolower(checkES($rib, $CCC)); $date_com = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); + $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOSTINT('remonth') ? dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')) : -1); $datefrom = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); $datesubscription = dol_mktime(0, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); - $datetouse = ($this->date_end > 0) ? $this->date_end : ((isset($this->datee) && $this->datee > 0) ? $this->datee : 0); - $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field) ? $project_field : 'fk_projet'); $ensemblereponses = $obj->reponses; $head[$h][1] = $langs->trans("Referers"); $head[$tab][1] = $langs->trans("Referers"); $out .= "".$langs->trans("Referer").": ".(isset($_SERVER["HTTP_REFERER"]) ? dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT) : '')."
\n"; $reday = GETPOSTINT('reday'); - $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_modification, p.budget_amount"; - $sql = 'SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_modification, p.budget_amount'; $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; - $sql .= " VALUES (".$conf->entity.", '".$this->db->idate($this->datea)."'"; - $sql .= " datee=".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null').","; - $sql .= " f.date_approval as datea,"; - $sql .= " f.date_approve as datea,"; - $sql .= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,"; - $sql .= " t.datee as date_end,"; - $sql .= " t.dateo as date_start, t.datee as date_end"; - $sql .= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang,"; - $sql .= " tms, dateo as date_start, datee as date_end, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,"; $sql .= ", '".$this->db->idate($this->periode)."'"; $sql .= ", cs.libelle as label, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode as period, cs.import_key"; - $sql .= ", datea = '".$this->db->idate(dol_now())."'"; - $sql .= ", datee"; $sql .= ", periode='".$this->db->idate($this->periode)."'"; - $sql = "INSERT INTO ".$this->db->prefix()."links (entity, datea, url, label, objecttype, objectid)"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, fk_account, fk_mode_reglement, libelle, date_ech, periode, amount, fk_projet, entity, fk_user_author, fk_user, date_creation)"; - $sql = "SELECT SUM(duree) as total_duration, min(date) as dateo, max(date) as datee "; $sql = "SELECT id_users, nom as name, id_sondage, reponses"; $sql = "SELECT id_users, nom as name, reponses"; - $sql = "SELECT p.rowid, p.fk_statut as status, p.fk_opp_status, p.datee as datee"; - $sql = "SELECT rowid, entity, datea, url, label, objecttype, objectid FROM ".$this->db->prefix()."links"; - $sql = 'SELECT c.rowid, date_creation as datec, tms as datem, date_valid as date_validation, date_approve as datea, date_approve2 as datea2,'; $test = ""; // Same $test = '/javas:cript/google.com'; $this->periode = $this->date_creation + 3600 * 24 * 30; $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Referers'); $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Referers'); $title = $langs->transnoentities("Balance")." - ".$langs->transnoentities("AllTime"); - 'datee' => $datee - 'datee' =>array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>1, 'visible'=>1, 'position'=>35), - 'datee' =>array('type'=>'date', 'label'=>'Datee', 'enabled'=>1, 'visible'=>-1, 'position'=>90), - ,'datee'=>array('type'=>'date') // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire - echo dol_print_date($rule->datee, 'day'); - foreach ($TWeek as $weekNb) { if (!empty($arrayfields['cs.periode']['checked'])) { - if (!empty($arrayfields['p.datee']['checked'])) { - if ($datee > 0) { if ($newamount == 0 || empty($this->date_ech) || (empty($this->period) && empty($this->periode))) { if ($user->hasRight('stock', 'mouvement', 'creer')) { if (GETPOSTISSET("reday") && GETPOSTISSET("remonth") && GETPOSTISSET("reyear")) { - if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) { - if (empty($datee)) { if (empty($reyear) || empty($remonth) || empty($reday)) { - if (empty($this->datea)) { - if (in_array('01', $TWeek) && in_array('52', $TWeek) && $weekNb == '01') { - print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0); - print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', 0, 0, 0, '', 1, 0); - print $object->datee ? dol_print_date($object->datee, 'daytext') : ' '; print ''; print ''.$langs->trans("AddIn").''; - print ''.$langs->trans("Datee").''; - print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "t.datee", '', $param, '', $sortfield, $sortorder, 'center '); - * @param string $datee End date (ex 23:59:59) * @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing. - $TWeek = array(); $date = $obj->periode; - $datee = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); - $datee = dol_stringtotime($dateerfc); $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $datepaid = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); @@ -201,55 +110,31 @@ $head[$h][1] = $langs->trans('Referers'); $inj += preg_match('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', $tmpval); $inj += preg_match('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', $val); - $morewherefilterarray[] = " t.datee <= '".$db->idate($search_date_end_end)."'"; - $morewherefilterarray[] = " t.datee >= '".$db->idate($search_date_end_start)."'"; $opensurveysondage->mail_admin = $_SESSION['adresse']; $pdf->SetXY($savx, $savy); - $projectstatic->datee = $db->jdate($obj->projectdatee); $reday = GETPOST('reday'); $savy = $pdf->getY(); $somethingshown = $formactions->showactions($object, 'mouvement', 0, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for product $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= " AND cs.periode <= '".$db->idate($search_date_limit_end)."'"; $sql .= " AND cs.periode >= '".$db->idate($search_date_limit_start)."'"; - $sql .= " AND p.datee <= '".$db->idate($search_date_end_end)."'"; - $sql .= " AND p.datee >= '".$db->idate($search_date_end_start)."'"; - $sql .= " AND t.datee <= '".$db->idate($search_datelimit_end)."'"; - $sql .= " AND t.datee >= '".$db->idate($search_datelimit_start)."'"; - $sql .= " GROUP BY p.ref, p.title, p.rowid, p.fk_statut, p.fk_opp_status, p.public, p.dateo, p.datee, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee"; - $sql .= " GROUP BY p.rowid, p.ref, p.title, p.fk_statut, p.datee, p.fk_opp_status, p.public, p.fk_user_creat,"; $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; - $sql .= " ORDER BY t.dateo DESC, t.rowid DESC, t.datee DESC"; $sql .= " SET reponses = '".$db->escape($nouveauchoix)."'"; $sql .= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode as period, cs.date_ech, cs.amount as total,"; - $sql .= " t.datec, t.dateo, t.datee, t.tms,"; - $sql .= " t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo as date_start, t.datee as date_end, SUM(tasktime.element_duration) as timespent"; - $sql = "SELECT p.ref, p.title, p.rowid as projectid, p.fk_statut as status, p.fk_opp_status as opp_status, p.public, p.dateo as projdate_start, p.datee as projdate_end,"; $sql.= " ".MAIN_DB_PREFIX."notify_def as nd,"; $sql.= " AND nd.fk_action = ad.rowid"; $sql.= " WHERE u.rowid = nd.fk_user"; $sql.= " nd.rowid, ad.code, ad.label"; - $sql2 .= " p.dateo, p.datee,"; - $sql2 .= " s.logo, s.email, s.entity, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_percent, p.opp_amount, p.dateo, p.datee"; $title = $langs->trans('Batch')." ".$shortlabel." - ".$langs->trans('Referers'); - $totalforvisibletasks = projectLinesPerMonth($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable, 0, $TWeek); $value = preg_replace('/([a-z\.]+)\s*([!<>=]+|in|notin|like|notlike)\s*/', '\1:\2:', $value); // Clean string 'x < 10' into 'x:<:10' so we can then explode on space to get all AND tests to do 'cs.periode' => array('label' => "PeriodEndDate", 'checked' => 1, 'position' => 50), - 't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>101), - 't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>5), // Ligne de la periode d'analyse du rapport // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire - //$datee=$now - //$dates=dol_time_plus_duree($datee, -1, 'y'); TaskItem(pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt)

- foreach ($TWeek as $weekNb) { - foreach ($TWeek as $week_number) { - if (!empty($arrayfields['t.datee']['checked'])) { if ($action == "transfert") { if ($object->id > 0 && $action == 'addin') { if (GETPOST('reday')) { if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) { - print $form->selectDate($datee, 'datee', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print ''; print ''."\n"; print ''.$langs->trans("NbOfMembers").' ('.$langs->trans("AllTime").')'; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.periode", "", $param, '', $sortfield, $sortorder, 'center '); select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth, - print ''; - print ''.$langs->trans("TransferStock").''; - print ''.$langs->trans("TransferStock").''; - print 'id.'&token='.newToken().'">'; - print ''.$langs->trans("TransferStock").''; diff --git a/dev/tools/dolibarr-mysql2pgsql.pl b/dev/tools/dolibarr-mysql2pgsql.pl index 17dda3cb48b..5e7d87d1234 100755 --- a/dev/tools/dolibarr-mysql2pgsql.pl +++ b/dev/tools/dolibarr-mysql2pgsql.pl @@ -157,7 +157,7 @@ foreach my $file (keys %filelist) { print OUT "\\c ". $1; next; } - if ($create_sql ne "") { # we are inside create table statement so lets process datatypes + if ($create_sql ne "") { # we are inside create table statement so let's process datatypes if (/\);/i) { # end of create table sequence $create_sql =~ s/,$//g; # strip last , inside create table diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php index 9b7bed014f7..85beb64f0ed 100644 --- a/dev/tools/dolibarr-postgres2mysql.php +++ b/dev/tools/dolibarr-postgres2mysql.php @@ -3,6 +3,7 @@ /* * Copyright (C) 2005-2011 James Grant Lightbox Technologies Inc. * Copyright (C) 2020 Laurent Destailleur + * Copyright (C) 2024 MDW * * 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 @@ -419,7 +420,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) // in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string'), but could also be (number, E'string'); so we can't search for the previous ' // ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character - // at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data + // at a time, and that's just stupid, so let's just hope this doesn't appear anywhere in the actual data $after = str_replace(" (E'", " ('", $after); $after = str_replace(", E'", ", '", $after); @@ -439,7 +440,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) // in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string') // ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character - // at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data + // at a time, and that's just stupid, so let's just hope this doesn't appear anywhere in the actual data $after = str_replace(" (E'", " ('", $after); $after = str_replace(", E'", ", '", $after); @@ -457,7 +458,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) // in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string') // ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character - // at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data + // at a time, and that's just stupid, so let's just hope this doesn't appear anywhere in the actual data // after the first line, we only need to check for it in the middle, not at the beginning of an insert (because the beginning will be on the first line) // $after=str_replace(" (E'","' ('",$after); @@ -497,7 +498,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $reg2 = array(); if (preg_match('/ALTER TABLE ([^\s]+)/', $pkey, $reg2)) { if (empty($arrayofprimaryalreadyintabledef[$reg2[1]])) { - // looks like we have a single line PRIMARY KEY definition, lets go ahead and add it + // looks like we have a single line PRIMARY KEY definition, let's go ahead and add it $output .= str_replace("\n", "", $pkey); // the postgres and mysql syntax for this is (at least, in the example im looking at) // identical, so we can just add it as is. diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 7f9d5a12b52..1fff4a6a802 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -1032,7 +1032,7 @@ $sous_total_credit = 0; $totalarray['val'] = array(); $totalarray['val']['totaldebit'] = 0; $totalarray['val']['totalcredit'] = 0; -$totalarray['val']['totalbalance']=0; +$totalarray['val']['totalbalance'] = 0; while ($i < min($num, $limit)) { $line = $object->lines[$i]; @@ -1283,7 +1283,7 @@ while ($i < min($num, $limit)) { // Label operation if (!empty($arrayfields['t.label_operation']['checked'])) { - // Affiche un lien vers la facture client/fournisseur + // Show a link to the customer/supplier invoice $doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref); if (strlen(length_accounta($line->subledger_account)) == 0) { print ''.dol_escape_htmltag($line->label_operation).''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 25e9b0ca80d..329b2986fe6 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -466,7 +466,7 @@ class AccountingAccount extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $withlabel 0=No label, 1=Include label of account diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 7eb943244d4..05ffa3c1311 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2291,7 +2291,7 @@ class Adherent extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpictoimg 0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small, -4=???) * @param int $maxlen length max label @@ -3251,7 +3251,7 @@ class Adherent extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 605c9b248e6..3909b4a5e03 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -6,6 +6,7 @@ * Copyright (C) 2018-2019 Thibault Foucart * Copyright (C) 2021 Waël Almoman * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -699,9 +700,9 @@ class AdherentType extends CommonObject if (isset($this->duration)) { $datas['duration'] = '
'.$langs->trans("Duration").': '.$this->duration_value; if ($this->duration_value > 1) { - $dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); + $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years")); } elseif ($this->duration_value > 0) { - $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); + $dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year")); } $datas['duration'] .= " " . (!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) : ''); } @@ -710,7 +711,7 @@ class AdherentType extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen length max label @@ -970,7 +971,7 @@ class AdherentType extends CommonObject /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 2012f7c839d..676c82818ef 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -420,7 +420,7 @@ class Subscription extends CommonObject /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $notooltip 1=Disable tooltip @@ -536,7 +536,7 @@ class Subscription extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index b7eaba74209..fd65e1300f3 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1622,7 +1622,7 @@ class BOM extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 68283a0f3a3..53ae0710667 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2024 MDW * * 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 @@ -350,7 +351,7 @@ class AgendaEvents extends DolibarrApi // phpcs:enable $object = parent::_cleanObjectDatas($object); - unset($object->note); // alreaydy into note_private + unset($object->note); // already in note_private or note_public unset($object->usermod); unset($object->libelle); unset($object->context); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 7d3d2fce514..15f6b6204ce 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -11,6 +11,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2020 Open-Dsi * Copyright (C) 2022 Anthony Berton + * Copyright (C) 2024 MDW * * 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 @@ -618,7 +619,7 @@ if ($object->id > 0) { } // Other attributes - $parameters = array('socid'=>$object->id); + $parameters = array('socid' => $object->id); include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Sales representative @@ -697,7 +698,7 @@ if ($object->id > 0) { // Nbre max d'elements des petites listes $MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT'); - // Lien recap + // Link summary/status board $boxstat .= '
'; $boxstat .= ''; $boxstat .= '\n"; print '\n"; //print '\n"; print '\n"; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b424f61832e..eda779bcd5b 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3723,7 +3723,7 @@ class Propal extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param int $withpicto Add picto into link * @param string $option Where point the link ('expedition', 'document', ...) @@ -3938,7 +3938,7 @@ class Propal extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 937ecbb5582..011827440fb 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -390,17 +390,17 @@ class Commande extends CommonOrder /* * Signed by sender */ - CONST STATUS_SIGNED_SENDER = 1; + const STATUS_SIGNED_SENDER = 1; /* * Signed by receiver */ - CONST STATUS_SIGNED_RECEIVER = 2; + const STATUS_SIGNED_RECEIVER = 2; /* * Signed by all */ - CONST STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) + const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) /** @@ -3815,7 +3815,7 @@ class Commande extends CommonOrder } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param int $withpicto Add picto into link * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index b25dcf6001b..16139ea4ea1 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -557,12 +557,12 @@ class Account extends CommonObject $num = $this->db->num_rows($result); while ($i < $num) { $obj = $this->db->fetch_object($result); - // Anciens liens (pour compatibilite) + // Old links (for compatibility) $lines[$i][0] = $obj->url; $lines[$i][1] = $obj->url_id; $lines[$i][2] = $obj->label; $lines[$i][3] = $obj->type; - // Nouveaux liens + // New links $lines[$i]['url'] = $obj->url; $lines[$i]['url_id'] = $obj->url_id; $lines[$i]['label'] = $obj->label; @@ -1515,7 +1515,7 @@ class Account extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto Include picto into link * @param string $mode ''=Link to card, 'transactions'=Link to transactions card @@ -1950,7 +1950,7 @@ class Account extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 177b64dcccd..e7606bee7bf 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -680,7 +680,7 @@ class PaymentVarious extends CommonObject /** - * Send name clicable (with possibly the picto) + * Send name clickable (with possibly the picto) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param string $option link option @@ -819,7 +819,7 @@ class PaymentVarious extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 9621224c0c4..13697229c7f 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -370,7 +370,7 @@ class CashControl extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param int $withpicto Add picto into link * @param string $option On what the link point to ('nolink', ...) @@ -448,7 +448,7 @@ class CashControl extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 2195f0b5a3e..8501dcc1322 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -362,14 +363,14 @@ class Deplacement extends CommonObject $this->labelStatusShort[self::STATUS_REFUNDED] = $langs->transnoentitiesnoconv('Refunded'); } - $status_logo = array(0 => 'status0', 1=>'status4', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5'); + $status_logo = array(0 => 'status0', 1 => 'status4', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5'); $statusType = $status_logo[$status]; return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @return string Chaine avec URL diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5f7273fd6ef..e624bb2d52c 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1432,7 +1432,7 @@ class FactureRec extends CommonInvoice } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto Add picto into link * @param string $option Where point the link diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 2985c0f75bb..176e74c49d1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1968,7 +1968,7 @@ class Facture extends CommonInvoice } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param int $withpicto Add picto into link * @param string $option Where point the link @@ -2861,7 +2861,7 @@ class Facture extends CommonInvoice // Delete invoice line $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facturedet WHERE fk_facture = '.((int) $rowid); - if ($this->db->query($sqlef) && $this->db->query($sql) && $this->delete_linked_contact() >= 0 ) { + if ($this->db->query($sqlef) && $this->db->query($sql) && $this->delete_linked_contact() >= 0) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture WHERE rowid = '.((int) $rowid); $resql = $this->db->query($sql); @@ -5985,7 +5985,7 @@ class Facture extends CommonInvoice } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index e49c317a53e..41a9ff30011 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -545,7 +545,7 @@ class Localtax extends CommonObject $ok = 0; } - // Mise a jour liens + // Update the links $result = $acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/localtax/card.php?id=', "(VATPayment)", "payment_vat"); if ($result < 0) { $this->error = $acc->error; @@ -598,7 +598,7 @@ class Localtax extends CommonObject * Returns clickable name * * @param int $withpicto 0=Link, 1=Picto into link, 2=Picto - * @param string $option Sur quoi pointe le lien + * @param string $option What the link points to * @return string Chaine avec URL */ public function getNomUrl($withpicto = 0, $option = '') @@ -653,7 +653,7 @@ class Localtax extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 6644378a926..7e65f5a61c6 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -505,7 +505,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) { print ''; } - if (count($x_coll) == 0) { // Show a total ine if nothing shown + if (count($x_coll) == 0) { // Show a total line if nothing shown print ''; print ''; print ''; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 70274fd13c3..837358ee7e1 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -896,10 +896,10 @@ class RemiseCheque extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Sur quoi pointe le lien + * @param string $option Indicate where the link points to * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more css on link * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking @@ -996,7 +996,7 @@ class RemiseCheque extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 5b60317e5db..3ecb65e120a 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -891,7 +891,7 @@ class Paiement extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Mise a jour du lien entre le paiement et la ligne generee dans llx_bank + * Update the link between the Payment and the line generated in llx_bank * * @param int $id_bank Id compte bancaire * @return int Return integer <0 if KO, >0 if OK @@ -1282,10 +1282,10 @@ class Paiement extends CommonObject /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Sur quoi pointe le lien + * @param string $option What the link points to * @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more CSS diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index e8770f12f0e..f44546192ec 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -2213,7 +2213,7 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .= ' ' . $CrLf; $XML_DEBITOR .= ' ' . $CrLf; $XML_DEBITOR .= ' ' . $CrLf; - if (getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC')==0) { + if (getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC') == 0) { $XML_DEBITOR .= ' ' . $row_bic . '' . $CrLf; } $XML_DEBITOR .= ' ' . $CrLf; @@ -2771,7 +2771,7 @@ class BonPrelevement extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 1a5cbbd740d..410e19fd950 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -755,7 +755,7 @@ class ChargeSociales extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 9d0f05c69ea..8e5e8fc3da8 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -674,7 +674,7 @@ class PaymentSocialContribution extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank generee + * Update the link between the Payment and the line generated in llx_bank * * @param int $id_bank Id if bank * @return int >0 if OK, <=0 if KO @@ -759,7 +759,7 @@ class PaymentSocialContribution extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen Longueur max libelle diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index ff93f20f336..86ef3612af1 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -5,6 +5,7 @@ * Copyright (C) 2017 Olivier Geffroy * Copyright (C) 2018-2020 Frédéric France * Copyright (C) 2024 Benjamin B. + * Copyright (C) 2024 MDW * * 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 @@ -677,8 +678,8 @@ print ''; print '
'; @@ -926,7 +927,7 @@ if ($object->id > 0) { * Latest orders */ if (isModEnabled('order') && $user->hasRight('commande', 'lire')) { - $param =""; + $param = ""; $sql = "SELECT s.nom, s.rowid"; $sql .= ", c.rowid as cid, c.entity, c.fk_projet, c.total_ht"; @@ -1237,7 +1238,7 @@ if ($object->id > 0) { print $late; print "'; - print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12); + print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12); print "'.dol_print_date($db->jdate($objp->dc), 'day')."'.dol_print_date($db->jdate($objp->dcon), 'day')."
 '.$langs->trans("Total").':
'; - // Factures non reglees - // Y a bug ici. Il faut prendre le reste a payer et non le total des factures non reglees ! + // Unpaid invoices + // There is a bug here. We need to use the remaining to pay and not the total of unpaid invoices! $sql = "SELECT f.ref, f.rowid, s.nom, s.rowid as socid, f.total_ttc, sum(pf.amount) as am"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f left join ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 113f3970e76..dc5fa89221f 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -723,7 +723,7 @@ class Tva extends CommonObject } /** - * Send name clicable (with possibly the picto) + * Send name clickable (with possibly the picto) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param string $option link option @@ -915,7 +915,7 @@ class Tva extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index f779a866aae..0704774bae0 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2060,7 +2060,7 @@ class Contrat extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlength Max length of ref @@ -2889,7 +2889,7 @@ class Contrat extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data @@ -3233,7 +3233,7 @@ class ContratLigne extends CommonObjectLine } /** - * Return clicable name (with picto eventually) for ContratLigne + * Return clickable name (with picto eventually) for ContratLigne * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlength Max length diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index b1a4d7c824a..f4b328cfa72 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 MDW * * 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 @@ -77,7 +78,7 @@ if (!empty($user->socid)) { // We check permission. // Check is done on $user->rights->element->create or $user->rights->element->subelement->create (because $action = 'set') -if (preg_match('/statu[st]$/', $field) || ($field == 'evenunsubscribe' && $object->table_element == 'mailing')) { +if (preg_match('/stat[u][st]$/', $field) || ($field == 'evenunsubscribe' && $object->table_element == 'mailing')) { restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission); } elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid'); diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 430c477e89a..9db27df35a1 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -177,7 +177,7 @@ abstract class CommonInvoice extends CommonObject /** * Proforma invoice. - * @deprectad Remove this. A "proforma invoice" is an order with a look of invoice, not an invoice ! + * @deprecated Remove this. A "proforma invoice" is an order with a look of invoice, not an invoice ! */ const TYPE_PROFORMA = 4; @@ -676,7 +676,7 @@ abstract class CommonInvoice extends CommonObject } elseif ($this->type == CommonInvoice::TYPE_DEPOSIT) { $labellong = "InvoiceDeposit"; $labelshort = "Deposit"; - } elseif ($this->type == CommonInvoice::TYPE_PROFORMA) { + } elseif ($this->type == CommonInvoice::TYPE_PROFORMA) { // @phan-suppress-current-line PhanDeprecatedClassConstant $labellong = "InvoiceProForma"; // Not used. $labelshort = "ProForma"; } elseif ($this->type == CommonInvoice::TYPE_SITUATION) { diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index 110a67c5e1c..c8dbda9c9bf 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -35,7 +36,7 @@ abstract class CommonOrder extends CommonObject /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @param array $arraydata Array of data @@ -72,7 +73,7 @@ abstract class CommonOrder extends CommonObject return $return; } - /** return nb of fines of order where products or services that can be buyed + /** return nb of fines of order where products or services that can be bought * * @param boolean $ignoreFree Ignore free lines * @return int number of products or services on buy in a command @@ -84,10 +85,12 @@ abstract class CommonOrder extends CommonObject $return = 0; foreach ($this->lines as $line) { if (empty($line->fk_product) && !$ignoreFree) { - $return ++; + $return++; } elseif ((int) $line->fk_product > 0) { if ($product->fetch($line->fk_product) > 0) { - if ($product->status_buy) $return ++; + if ($product->status_buy) { + $return++; + } } } } @@ -143,13 +146,13 @@ abstract class CommonOrderLine extends CommonObjectLine * Boolean that indicates whether the product is available for sale '1' or not '0' * @var int */ - public $product_tosell=0; + public $product_tosell = 0; /** * Boolean that indicates whether the product is available for purchase '1' or not '0' * @var int */ - public $product_tobuy=0; + public $product_tobuy = 0; /** * Product description diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 2ae7c0bf351..bc19b00d074 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1914,7 +1914,7 @@ class ExtraFields $resql = $this->db->query($sql); if ($resql) { if ($filter_categorie === false) { - $value = ''; // value was used, so now we reste it to use it to build final output + $value = ''; // value was used, so now we reset it to use it to build final output $obj = $this->db->fetch_object($resql); @@ -2024,7 +2024,7 @@ class ExtraFields $resql = $this->db->query($sql); if ($resql) { if ($filter_categorie === false) { - $value = ''; // value was used, so now we reste it to use it to build final output + $value = ''; // value was used, so now we reset it to use it to build final output $toprint = array(); while ($obj = $this->db->fetch_object($resql)) { // Several field into label (eq table:code|label:rowid) diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 947ea1874a9..267abf6a798 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -301,7 +301,7 @@ class Fiscalyear extends CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return clickable link of object (with eventually picto) * * @param int $withpicto Add picto into link * @param int $notooltip 1=Disable tooltip diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index b6a506e4e80..e1da5b7a5a4 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2017 Rui Strecht * Copyright (C) 2020 Open-Dsi * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -388,7 +389,7 @@ class FormCompany extends Form public function select_state_ajax($parent_field_id = 'country_id', $selected = 0, $country_codeid = 0, $htmlname = 'state_id', $morecss = 'maxwidth200onsmartphone minwidth300') { $html = '