diff --git a/include/bank.inc.php b/include/bank.inc.php index 76a491887..a0de094d2 100644 --- a/include/bank.inc.php +++ b/include/bank.inc.php @@ -23,6 +23,7 @@ require_once('user_form_fin.php'); require_once('jrn.php'); require_once("class_document.php"); require_once("class_fiche.php"); +require_once("class_parm_code.php"); /*!\file * \brief the purpose off this file encode expense and to record them * @@ -51,6 +52,52 @@ if ( isset ($_REQUEST['url'])) } $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; +//---------------------------------------------------------------------- +// ask the saldo of the bank +if ( $sub_action == "solde" ) +{ + echo '
'; + require_once("poste.php"); + // find the bank account + // NOTE : those values are in a table because + // they are _national_ parameters + $banque=new parm_code($cn,'BANQUE'); + $caisse=new parm_code($cn,'CAISSE'); + $vir_interne=new parm_code($cn,'VIREMENT_INTERNE'); + $accountSql="select distinct pcm_val::text,pcm_lib from + tmp_pcmn + where pcm_val like '".$banque->p_value."%' or pcm_val like '".$vir_interne->p_value."%' + or pcm_val like '".$caisse->p_value."%' + order by pcm_val::text"; + $ResAccount=ExecSql($cn,$accountSql); + echo '| ". + $l['pcm_val']. + " | ". + "". + $l['pcm_lib']. + " | "."". + $m. + " | "."