Small bug : search stock card insentive case, ANC_PRINT pa_id var

This commit is contained in:
sparkyx 2025-06-19 18:57:01 +02:00
parent f4bf55bff7
commit 6c908aae61
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ class Anc_Print
var $from_poste; /*!< $from_poste from poste */
var $to_poste; /*!< $to_poste to the poste */
var $has_data; /*!< array of data */
protected $pa_id; /*!< axis for analytic : plan */
var $pa_id; /*!< axis for analytic : plan */
function __construct($p_cn)
{

View file

@ -150,7 +150,7 @@ class Stock_Goods extends Stock_Goods_Sql
/*
* check if code stock does exist
*/
$count=$cn->get_value('select count(*) from fiche_detail where ad_id=$1 and ad_value=$2',
$count=$cn->get_value('select count(*) from fiche_detail where ad_id=$1 and upper(ad_value)=upper($2)',
array(ATTR_DEF_STOCK,$stock));
if ( $count==0) {
throw new Exception(_("Code stock inutilisé").h($stock));