108 |
* parm : |
* parm : |
109 |
* - connection |
* - connection |
110 |
* - account |
* - account |
111 |
|
* - cond |
112 |
* gen : |
* gen : |
113 |
* - none |
* - none |
114 |
* return: |
* return: |
115 |
* - balance of the account |
* - balance of the account |
116 |
* |
* |
117 |
*/ |
*/ |
118 |
function GetSolde($p_cn,$p_account) { |
function GetSolde($p_cn,$p_account,$p_cond="") { |
119 |
$Res=ExecSql($p_cn,"select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from |
$Res=ExecSql($p_cn,"select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from |
120 |
( select j_poste, |
( select j_poste, |
121 |
case when j_debit='t' then j_montant else 0 end as deb, |
case when j_debit='t' then j_montant else 0 end as deb, |