/[phpcompta]/phpcompta/include/user_common.php
ViewVC logotype

Diff of /phpcompta/include/user_common.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.46 by sparkyx, Sat Oct 22 10:59:48 2005 UTC revision 1.47 by sparkyx, Sun Oct 23 18:56:16 2005 UTC
# Line 490  function withStock($p_cn,$p_f_id) Line 490  function withStock($p_cn,$p_f_id)
490    return false;    return false;
491    
492  }  }
493  /* function  VerifyDate ($p_cn,$p_user,$p_date)  /* function  VerifyOperationDate ($p_cn,$p_user,$p_date)
494   **************************************************   **************************************************
495   * Purpose : Verify if   * Purpose : Verify if
496   *    the date is a valid date   *    the date is a valid date
# Line 506  function withStock($p_cn,$p_f_id) Line 506  function withStock($p_cn,$p_f_id)
506   * return:   * return:
507   *     - null if error or date if ok   *     - null if error or date if ok
508   */   */
509  function VerifyOperationDate($p_cn,$p_user,$p_date) {  function VerifyOperationDate($p_cn,$p_periode,$p_date) {
510    
511    // Verify the date    // Verify the date
512    if ( isDate($p_date) == null ) {    if ( isDate($p_date) == null ) {
# Line 516  function VerifyOperationDate($p_cn,$p_us Line 516  function VerifyOperationDate($p_cn,$p_us
516            return null;            return null;
517                  }                  }
518  // userPref contient la periode par default  // userPref contient la periode par default
519      $userPref=GetUserPeriode($p_cn,$p_user);      list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$p_periode);
     list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref);  
520    
521      // Date dans la periode active      // Date dans la periode active
522      echo_debug ("date start periode $l_date_start date fin periode $l_date_end date demandée $p_date");      echo_debug ("date start periode $l_date_start date fin periode $l_date_end date demandée $p_date");
# Line 530  function VerifyOperationDate($p_cn,$p_us Line 529  function VerifyOperationDate($p_cn,$p_us
529                          return null;                          return null;
530        }        }
531      // Periode fermée      // Periode fermée
532      if ( PeriodeClosed ($p_cn,$userPref)=='t' )      if ( PeriodeClosed ($p_cn,$p_periode)=='t' )
533        {        {
534                  $msg="This periode is closed please change your preference";                  $msg="This periode is closed please change your preference";
535                  echo_error($msg); echo_error($msg);                      echo_error($msg); echo_error($msg);    

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26