From: <tim...@us...> - 2010-01-23 12:29:34
|
Revision: 3315 http://web-erp.svn.sourceforge.net/web-erp/?rev=3315&view=rev Author: tim_schofield Date: 2010-01-23 12:24:57 +0000 (Sat, 23 Jan 2010) Log Message: ----------- Correction to DateAdd() function for the d.m.Y date format Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/DateFunctions.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-01-23 11:30:58 UTC (rev 3314) +++ trunk/doc/Change.log.html 2010-01-23 12:24:57 UTC (rev 3315) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/01/10 Tim: DateFunctions.inc - Correction to DateAdd() function for the d.m.Y date format</p> <p>21/01/10 Harald: Correct path in ReportCreator.php</p> <p>20/01/10 Tim: Remove redundant javascript calls</p> <p>19/01/10 Tim: MRP.php - Missing gettext function for string</p> Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2010-01-23 11:30:58 UTC (rev 3314) +++ trunk/includes/DateFunctions.inc 2010-01-23 12:24:57 UTC (rev 3315) @@ -399,7 +399,7 @@ if ($_SESSION['DefaultDateFormat']=='Y/m/d') { return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2]; } - + //to modify assumption in 2030 if (strlen($Date_Array[0])==2) { if ((int)$Date_Array[2] <60) { @@ -555,7 +555,7 @@ $Date_Array = explode('/',$DateToAddTo); } elseif (strpos ($DateToAddTo,'-')) { $Date_Array = explode('-',$DateToAddTo); - } elseif (strpos ($TranDate,'.')) { + } elseif (strpos ($DateToAddTo,'.')) { $Date_Array = explode('.',$DateToAddTo); } @@ -759,9 +759,9 @@ if (strlen($_SESSION['ProhibitPostingsBefore'])>=8 and $UseProhibit){ //then the ProhibitPostingsBefore configuration is set $Date_Array = explode('-', $_SESSION['ProhibitPostingsBefore']); - + $ProhibitPostingsBefore = mktime(0,0,0,$Date_Array[1],$Date_Array[2],$Date_Array[0]); - + /* If transaction date is in a closed period use the month end of that period */ if ($TransDate < $ProhibitPostingsBefore) { $TransDate = $ProhibitPostingsBefore; @@ -788,7 +788,7 @@ $Date_Array = explode('-', $myrow[0]); $FirstPeriodEnd = mktime(0,0,0,$Date_Array[1],0,(int)$Date_Array[0]); $FirstPeriod = $myrow[1]; - + /* If the period number doesn't exist */ if (!PeriodExists($TransDate, $db)) { /* if the transaction is after the last period */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |