On Wed, 14 Apr 2010 18:42:48 +0200
Dany DeBontridder <
address@hidden> wrote:
> Yes you use
>
> Periode::get_limit($p_exercice)
>
>
http://www.phpcompta.be/doc/classPeriode.html#ec87d060d342925c34ec5c14850f55dc
>
> example
>
> $cn=new Database(dossier::id());
> $periode=new Periode($cn);
> $a=$periode->get_limit(2009);
> // $a is an array
> $first_day=$a[0]->first_day();
> $last_periode=$a[1]->get_date_limit();
>
> //Date
> echo "first day of the exercice is ".$first_periode;
> echo "last day of the exercice is ".$last_periode['p_end']
>
>
> regards,
>
> D..
>
> On Wed, Apr 14, 2010 at 5:00 PM, Skipper <
address@hidden> wrote:
>
> > Hi Dany,
> >
> > is there a way to get the real first and last period of an excercise? There
> > is some code that reads (simplified)
> > <snip>
> > $year=$User->get_exercice();
> > $date_from->value="01.01.".$year;
> > </snip>
> >
> > But this is obviously wrong for excerises that do not correspond with
> > calendar years.
> >
> > Any hint?
> >
> > Thanks,
> > Skipper
> >
> >
> > _______________________________________________
> > Phpcompta-contrib mailing list
> >
address@hidden
> >
http://lists.nongnu.org/mailman/listinfo/phpcompta-contrib
> >
> >
_______________________________________________
Phpcompta-contrib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/phpcompta-contrib