/* * 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 */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ /* function GetPosteLibelle * Purpose : Return the label of a poste * * parm : * - p_dossier * - p_id tmp_pcmn (pcm_val) * - is_cn conneciton * gen : * - none * return: * - string * */ function GetPosteLibelle($p_dossier,$p_id,$is_cn=0) { include_once("postgres.php"); if ( ! isset($is_cn) ) $is_cn=0; if ( $is_cn == 0) { $cn=DbConnect($p_dossier); } else { $cn=$p_dossier; } $Res=ExecSql($cn,"select pcm_lib from tmp_pcmn where pcm_val=$p_id"); if ( pg_NumRows($Res) == 0) { return "non existing poste";} $l_poste=pg_fetch_row($Res,0); return $l_poste[0]; } /* function GetNumberLine * Purpose : Max of ligne definie dans le journal * * parm : * - p_dossier * - p_jrn * gen : * - none * return: * - * */ function GetNumberLine($p_dossier,$p_jrn) { $cn=DbConnect($p_dossier); $Res=ExecSql($cn,"select jrn_deb_max_line,jrn_cred_max_line from jrn_def where jrn_def_id=$p_jrn"); if ( pg_NumRows($Res) == 0 ) { echo "