/* * 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: 1.1 $ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once("constant.php"); require_once("class_widget.php"); require_once("preference.php"); require_once("fiche_inc.php"); require_once("user_common.php"); /* function FormODS($p_cn,$p_jrn,$p_user,$p_array=null,$pview_only=true,$p_article=1) * Purpose : Display the miscellaneous operation * Used to show detail, encode a new oper * or update one * * parm : * - p_array which can be empty * - the "journal" * - $p_user = $g_user * - $p_submit contains the submit string * - view_only if we cannot change it (no right or centralized op) * - $p_article number of article * gen : * - * return: string with the form */ function FormODS($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=true,$p_article=6,$p_saved=false) { include_once("poste.php"); if ( $p_array != null ) { // array contains old value foreach ( $p_array as $a=>$v) { ${"$a"}=$v; } } // The date list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode); $flag=(isset($e_date))?1:0; $e_date=( ! isset($e_date) ) ? substr($l_date_start,2,8):$e_date; // Verify if valid date if ( $flag==1 and VerifyOperationDate($p_cn,$p_periode,$e_date) == null) { if ( $pview_only == true) return null; else $e_date=substr($l_date_start,2,8); } $e_comm=(isset($e_comm))?$e_comm:""; // Save old value and set a new one $r=""; if ( $pview_only == false) { $r.=JS_SEARCH_POSTE; } $r.="