diff --git a/include/form_input.php b/include/form_input.php index 2eaf2386a..a7f3c6669 100644 --- a/include/form_input.php +++ b/include/form_input.php @@ -18,6 +18,8 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /* $Revision$ */ +include_once("preference.php"); + /* function InputType * Purpose : Create the tag * @@ -76,29 +78,52 @@ function InputType($p_label,$p_type,$p_name,$p_value,$p_viewonly=false,$p_list=n * parm : * - p_array which can be empty * - the "journal" + * - $p_user = $g_user * - view_only if we cannot change it (no right or centralized op) * gen : * - * return: string with the form */ -function FormVente($p_cn,$p_jrn,$p_array=null,$view_only=true) -{ +function FormVente($p_cn,$p_jrn,$p_user,$p_array=null,$view_only=true) +{ + $userPref=GetUserPeriode($p_cn,$p_user); + + // The date + list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref); + + $op_date="01".substr($l_date_start,2,8); + echo_debug("form_input.php.FormVentep_op_date is $op_date"); $r=""; if ( $view_only == false) { $r="
"; return $r; diff --git a/include/user_action_ven.php b/include/user_action_ven.php index b1fecb34c..21ca9f54b 100644 --- a/include/user_action_ven.php +++ b/include/user_action_ven.php @@ -32,7 +32,7 @@ if ( $action == 'insert_vente' ) { } // Show an empyt form of invoice include_once("form_input.php"); - $form=FormVente($cn,$g_jrn,'deb'); + $form=FormVente($cn,$g_jrn,$g_user,'deb'); echo '