From: <tim...@us...> - 2010-07-01 17:09:51
|
Revision: 3537 http://web-erp.svn.sourceforge.net/web-erp/?rev=3537&view=rev Author: tim_schofield Date: 2010-07-01 17:09:45 +0000 (Thu, 01 Jul 2010) Log Message: ----------- Correction to GetPeriod() for case when future period didnt exist. Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/DateFunctions.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-07-01 17:09:26 UTC (rev 3536) +++ trunk/doc/Change.log.html 2010-07-01 17:09:45 UTC (rev 3537) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>30/06/10 Phil: Resolution of GL posting problem - removed INSERTs of new chartdetails from DateFunctions.inc CreatePeriod function and GLAccounts.php when adding a new GL account. Now all chartdetails are created from includes/GLPostings.inc and correct bfwd balances updated as they should be - I hope this solves this long outstanding previously unsquashable bug!! +<p>01/07/10 Tim: DateFunctions.inc - Correction to GetPeriod() for case when future period didn't exist.</p> +<p>30/06/10 Phil: Resolution of GL posting problem - removed INSERTs of new chartdetails from DateFunctions.inc CreatePeriod function and GLAccounts.php when adding a new GL account. Now all chartdetails are created from includes/GLPostings.inc and correct bfwd balances updated as they should be - I hope this solves this long outstanding previously unsquashable bug!!</p> <p>25/06/10 Tim: PDFPriceList.php - Layout improvements.</p> <p>25/06/10 Tim: SelectCompletedOrders.php - Layout improvements.</p> <p>25/06/10 Tim: FormDesigner.php - Add A5 to the paper sizes.</p> Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2010-07-01 17:09:26 UTC (rev 3536) +++ trunk/includes/DateFunctions.inc 2010-07-01 17:09:45 UTC (rev 3537) @@ -457,7 +457,7 @@ * 2 characters and the other >2 then then make them both 4 characters long. Assume * a date >50 to be 1900's and less than to be 2000's */ - + if (strlen($Year1)>2 AND strlen($Year2)==2){ if ($Year2>50) { $Year2=1900+$Year2; @@ -731,7 +731,7 @@ $GetPrdResult = DB_query($GetPrdSQL, $db, $ErrMsg); /*I don't think this is necessary since GLPostings.inc handles this - * + * $sql = 'INSERT INTO chartdetails (accountcode, period) SELECT chartmaster.accountcode, periods.periodno FROM chartmaster @@ -739,7 +739,7 @@ WHERE ( chartmaster.accountcode, periods.periodno ) NOT IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )'; -//dont trap errors - chart details records created only as required - duplicate messages ignored +//dont trap errors - chart details records created only as required - duplicate messages ignored $InsNewChartDetails = DB_query($sql,$db,'','','',false); */ @@ -803,7 +803,7 @@ $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); } else { $Date_Array = explode('-', $myrow[0]); - $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); $LastPeriod = $myrow[1]; } /* Find the unix timestamp of the first period end date in periods table */ @@ -817,7 +817,7 @@ /* If the period number doesn't exist */ if (!PeriodExists($TransDate, $db)) { /* if the transaction is after the last period */ - echo ($TransDate > $LastPeriodEnd); + echo (date('d/m/Y',$TransDate) .' '. date('d/m/Y',$LastPeriodEnd)); if ($TransDate > $LastPeriodEnd) { $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); $Period = $LastPeriod + 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |