From: <tim...@us...> - 2010-03-16 09:35:58
|
Revision: 3389 http://web-erp.svn.sourceforge.net/web-erp/?rev=3389&view=rev Author: tim_schofield Date: 2010-03-16 09:35:52 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Anand: DateFunctions.inc - When getting the period number compare the same date formats Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/DateFunctions.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-16 09:17:37 UTC (rev 3388) +++ trunk/doc/Change.log.html 2010-03-16 09:35:52 UTC (rev 3389) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/03/10 Anand: DateFunctions.inc - When getting the period number compare the same date formats</p> <p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Correctly position link to create a new order</p> <p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Change option from Printed to Print in case where order is not yet printed</p> <p>15/03/10 Tim: Layout changes to make SelectCustomer.php SelectProduct.php and SelectSupplier.php have a similar look and feel to them</p> Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2010-03-16 09:17:37 UTC (rev 3388) +++ trunk/includes/DateFunctions.inc 2010-03-16 09:35:52 UTC (rev 3389) @@ -426,7 +426,7 @@ function FormatDateWithTimeForSQL ($datetime) { // Split the time off, fix date and add the time to returned value. $dt = explode(' ', $datetime); - + return FormatDateForSQL( $dt[0] ) . ' ' . $dt[1]; } @@ -844,7 +844,7 @@ $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); $GetPrdSQL = "SELECT periodno FROM periods WHERE lastdate_in_period < '" . - Date('Y/m/d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y/m/d', $TransDate) . "'"; + Date('Y-m-d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y-m-d', $TransDate) . "'"; $ErrMsg = _('An error occurred in retrieving the period number'); $GetPrdResult = DB_query($GetPrdSQL,$db,$ErrMsg); @@ -853,5 +853,4 @@ return $myrow[0]; } - ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |