P0PST : query fails for lettered or unlettered

This commit is contained in:
sparkyx 2025-06-13 18:53:40 +02:00
parent 6e3d9c6ecf
commit cdf6942d23
2 changed files with 4 additions and 4 deletions

View file

@ -765,10 +765,10 @@ class Fiche
case 0:
break;
case 1:
$sql_let=' and j_id in (select j_id from letter_cred union select j_id from letter_deb)';
$sql_let=' and j1.j_id in (select j_id from letter_cred union select j_id from letter_deb)';
break;
case '2':
$sql_let=' and j_id not in (select j_id from letter_cred union select j_id from letter_deb) ';
$sql_let=' and j1.j_id not in (select j_id from letter_cred union select j_id from letter_deb) ';
break;
}
@ -816,7 +816,7 @@ class Fiche
$res_saldo = $this->cn->exec_sql("select sum(deb_montant),sum(cred_montant) from
(select case when j_debit='t' then j_montant else 0 end as deb_montant,
case when j_debit='f' then j_montant else 0 end as cred_montant
from jrnx
from jrnx j1
join jrn_def on (jrn_def_id=j_jrn_def )
join jrn on (jr_grpt_id=j_grpt)
join tmp_pcmn on (j_poste=pcm_val)

View file

@ -77,7 +77,7 @@ class HttpInput
/**
* \brief Check the type of the value
* @param $p_name name of the variable
* @param $p_type type of the variable (number,string,text,date,array)
* @param $p_type (string) type of the variable (number,string,text,date,array,raw)
* @throws Exception if the variable doesn't exist or type incorrect
* @todo Add regex:pattern
*/