[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/11: Bug 1600 : alphanumeric accounting mus
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/11: Bug 1600 : alphanumeric accounting must be case insensitive |
Date: |
Fri, 1 Jun 2018 17:02:48 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 4f9be5373f14ff8672d49502705278f0df053fdb
Author: Dany De Bontridder <address@hidden>
Date: Tue May 8 22:40:31 2018 +0200
Bug 1600 : alphanumeric accounting must be case insensitive
---
include/class/acc_account.class.php | 3 ++-
include/class/fiche.class.php | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/class/acc_account.class.php
b/include/class/acc_account.class.php
index 68cb964..4a41f69 100644
--- a/include/class/acc_account.class.php
+++ b/include/class/acc_account.class.php
@@ -53,6 +53,7 @@ class Acc_Account
$this->db=$p_cn;
$id=-1;
if ( trim($pcm_val) != "" ) {
+ $pcm_val=mb_strtoupper($pcm_val);
$pcm_val=$this->db->get_value("select format_account($1)",
array($pcm_val));
$id=$p_cn->get_value("select id from tmp_pcmn where
pcm_val=$1",[$pcm_val]);
@@ -128,7 +129,7 @@ class Acc_Account
function verify() {
// check for Duplicate key, parent ... see Acc_Plan_MTable
$count=$this->data_sql->count(" where pcm_val =$1 and id <> $2",
- [$this->data_sql->pcm_val,$this->data_sql->id]);
+
[mb_strtoupper($this->data_sql->pcm_val),$this->data_sql->id]);
if ( $count > 0)
throw new Exception (_("Poste en double"),EXC_DUPLICATE);
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index c67ac0f..a69db88 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -805,7 +805,7 @@ class Fiche
// account
if ($id==ATTR_DEF_ACCOUNT)
{
- $v=sql_string($value);
+ $v=mb_strtoupper(sql_string($value));
try
{
@@ -973,7 +973,7 @@ class Fiche
// account
if ($id==ATTR_DEF_ACCOUNT)
{
- $v=sql_string($value);
+ $v=mb_strtoupper(sql_string($value));
if (trim($v)!='')
{
if (strpos($v, ',')!=0)
- [Noalyss-commit] [noalyss] branch master updated (490aeb1 -> ecc3b53), Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 01/11: Missing class : missing class for acc_ledger, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 05/11: Display the balance difference, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 08/11: Add upgrade128.sql, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 04/11: Action_Code : add validate, cancel and modify icon, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 02/11: Bug 1600 : alphanumeric accounting must be case insensitive,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/11: html_page_start : protect query, improve code, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 06/11: Bug in QUANT_PURCHASE , dp_dep_priv is not saved, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 07/11: integrate fix for bug in insert_quant_purchase which cannot save private fee Conflicts: include/sql/patch/upgrade128.sql, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 10/11: Security : direct injection, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 09/11: Upgrade 128.sql, Dany De Bontridder, 2018/06/01
- [Noalyss-commit] [noalyss] 11/11: Fix : security fixes see rapport exakat (Damien Seguy), Dany De Bontridder, 2018/06/01