/* * This file is part of PhpCompta. * * PhpCompta is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * PhpCompta is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once('class_jrn.php'); 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"); require_once("check_priv.php"); /*!\file * \brief the purpose off this file encode expense and to record them * */ // First we show the menu // If nothing is asked the propose a blank form // to enter a new invoice if ( ! isset ($_REQUEST['p_jrn'])) { // no journal are selected so we select the first one $p_jrn=GetFirstJrnIdForJrnType($_SESSION['g_dossier'],'FIN'); } else { $p_jrn=$_REQUEST['p_jrn']; } if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) < 1 ) { NoAccess(); exit -1; } // for the back button $retour=""; $h_url=""; if ( isset ($_REQUEST['url'])) { $retour=sprintf('',urldecode($_REQUEST['url'])); $h_url=sprintf('',urldecode($_REQUEST['url'])); } $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; //---------------------------------------------------------------------- // ask the saldo of the bank if ( $sub_action == "solde" ) { // Check privilege if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) < 1 ) { NoAccess(); exit -1; } 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. " | "."