phpcompta-contrib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpcompta-contrib] True periods


From: Dany DeBontridder
Subject: Re: [Phpcompta-contrib] True periods
Date: Wed, 14 Apr 2010 18:42:48 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]