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

Diff of /phpcompta/include/ac_common.php

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

revision 1.31 by sparkyx, Wed Jun 22 20:28:07 2005 UTC revision 1.32 by sparkyx, Mon Jul 4 18:34:01 2005 UTC
# Line 348  function getPeriodeName($p_cn,$p_id,$pos Line 348  function getPeriodeName($p_cn,$p_id,$pos
348    $a=pg_fetch_array($ret,0);    $a=pg_fetch_array($ret,0);
349    return $a['t'];    return $a['t'];
350  }  }
351    /* function getPeriodeFromDate
352     **************************************************
353     * Purpose : Return the period corresponding to the
354     *           date
355     *        
356     * parm :
357     *      - p_cn database connection
358     *      - the date 'MM.YYYY'
359     * gen :
360     *      - none
361     *
362     * return:
363     *       parm_periode.p_id
364     */
365    function getPeriodeFromDate($p_cn,$p_date) {
366      $R=ExecSql($p_cn,"select p_id from parm_periode where
367                  to_char(p_start,'DD.MM.YYYY') = '01.$p_date'");
368      if ( pg_NumRows($R) == 0 )
369        return -1;
370      $a=pg_fetch_array($R,0);
371    
372      return $a['p_id'];
373    }
374    
375  ?>  ?>

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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