Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-02-29 15:46:14 +01:00
commit cbc951b543
7 changed files with 15 additions and 13 deletions

View File

@ -9,6 +9,7 @@ aploha->alpha
aplohanothtml->alphanohtml
aplphanothtml->alphanohtml
choosed->chosen
dokument->document
dolibar->dolibarr
dollibar->dolibarr
dollibarr->dolibarr

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
*
* 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
@ -97,7 +97,7 @@ if ($action == 'validate' && $user->hasRight('deplacement', 'creer')) {
$error = 0;
$object->date = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
$object->km = (float) price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
$object->type = GETPOST('type', 'alpha');
$object->socid = GETPOSTINT('socid');
$object->fk_user = GETPOSTINT('fk_user');
@ -140,9 +140,9 @@ if ($action == 'validate' && $user->hasRight('deplacement', 'creer')) {
if (!GETPOST('cancel', 'alpha')) {
$result = $object->fetch($id);
$object->date = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
$object->type = GETPOST('type', 'alpha');
$object->date = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
$object->km = (float) price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
$object->type = GETPOST('type', 'alpha');
$object->socid = GETPOSTINT('socid');
$object->fk_user = GETPOSTINT('fk_user');
$object->note_private = GETPOST('note_private', 'alpha');

View File

@ -3,7 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
*
* 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
@ -215,7 +215,7 @@ class Deplacement extends CommonObject
public function update($user)
{
// Clean parameters
$this->km = price2num($this->km);
$this->km = (float) price2num($this->km);
// Check parameters
if (!is_numeric($this->km)) {

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2022-2024 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022-2024 Frédéric France <frederic.france@free.fr>
*
* 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
@ -46,7 +46,7 @@
* @param int $usergroupid Id of group to filter on users
* @param string $excludetype A type to exclude ('systemauto', 'system', '')
* @param int $resourceid Preselected value of resource for filter on resource
* @param array $search_categ_cus Tag id
* @param int $search_categ_cus Tag id
* @return void
*/
function print_actions_filter(

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2004-2010 Folke Ashberg: Some lines of code were inspired from work
* of Folke Ashberg into PHP-Barcode 0.3pl2, available as GPL
* source code at http://www.ashberg.de/bar.
@ -407,7 +408,7 @@ function barcode_encode_genbarcode($code, $encoding)
* @param array $space default: $space[top] = 2 * $scale; $space[bottom]= 2 * $scale; $space[left] = 2 * $scale; $space[right] = 2 * $scale;
* @return string|void
*/
function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, $space = '')
function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, $space = [])
{
global $bar_color, $bg_color, $text_color;
global $font_loc, $filebarcode;

View File

@ -7,7 +7,7 @@
* Copyright (C) 2013-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Christophe Battarel <contact@altairis.fr>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
@ -596,7 +596,7 @@ function getCountry($searchkey, $withcode = '', $dbtouse = 0, $outputlangs = '',
* Return state translated from an id. Return value is always utf8 encoded and without entities.
*
* @param int $id id of state (province/departement)
* @param int $withcode '0'=Return label,
* @param string $withcode '0'=Return label,
* '1'=Return string code + label,
* '2'=Return code,
* 'all'=return array('id'=>,'code'=>,'label'=>)

View File

@ -494,7 +494,7 @@ class Project extends CommonObject
$sql .= ", ".($this->email_msgid ? "'".$this->db->escape($this->email_msgid)."'" : 'null');
$sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : 'null');
$sql .= ", ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : 'null');
$sql .= ", ".((int) $conf->entity);
$sql .= ", ".setEntity($this);
$sql .= ", ".(!isset($this->ip) ? 'NULL' : "'".$this->db->escape($this->ip)."'");
$sql .= ")";