mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 08:02:22 +01:00
Qual: Fix spelling/update .pre-commit configuration (versions) (#30546)
* Qual: Update pre-commit configuration * Qual: Update spelling * Ignore use of deprecated constant
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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 = '<script>';
|
||||
$html.='$("select[name=\"'.$parent_field_id.'\"]").change(function(){
|
||||
$html .= '$("select[name=\"'.$parent_field_id.'\"]").change(function(){
|
||||
$.ajax( "'.dol_buildpath('/core/ajax/ziptown.php', 2).'", { data:{ selected: $("select[name=\"'.$htmlname.'\"]").val(), country_codeid: $(this).val(), htmlname:"'.$htmlname.'", morecss:"'.$morecss.'" } } )
|
||||
.done(function(msg) {
|
||||
$("span#target_'.$htmlname.'").html(msg);
|
||||
@@ -399,10 +400,11 @@ class FormCompany extends Form
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Retourne la liste deroulante des regions actives don't le pays est actif
|
||||
* La cle de la liste est le code (il peut y avoir plusieurs entree pour
|
||||
* Provides the dropdown of the active regions including the actif country.
|
||||
* The key of the list is the code (there may be more than one entry for a
|
||||
* code but in that case the fields country and language are different).
|
||||
* un code donnee mais dans ce cas, le champ pays et lang differe).
|
||||
* Ainsi les liens avec les regions se font sur une region independemment de son name.
|
||||
* This way the links with the regions are made independent of its name.
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select field
|
||||
|
||||
@@ -1360,7 +1360,7 @@ class Utils
|
||||
if ($filesize > $sizelimit) {
|
||||
$message .= '<br>'.$langs->trans("BackupIsTooLargeSend");
|
||||
$documenturl = $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]);
|
||||
$message .= '<br><a href='.$documenturl.'>Lien de téléchargement</a>';
|
||||
$message .= '<br><a href='.$documenturl.'>Download link</a>';
|
||||
$filepath = '';
|
||||
$mimetype = '';
|
||||
$filename = '';
|
||||
@@ -1390,7 +1390,7 @@ class Utils
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$this->error = "Error sending backp file ".((string) $error);
|
||||
$this->error = "Error sending backup file ".((string) $error);
|
||||
$this->output = $output;
|
||||
|
||||
if ($result) {
|
||||
|
||||
Reference in New Issue
Block a user