From: <ex...@us...> - 2014-11-03 02:30:27
|
Revision: 6957 http://sourceforge.net/p/web-erp/reponame/6957 Author: exsonqu Date: 2014-11-03 02:30:16 +0000 (Mon, 03 Nov 2014) Log Message: ----------- 3/11/14 Exson: Make Dashboard.php workable in php which version is lower than 5.3. Report by Craig Craven. Modified Paths: -------------- trunk/Dashboard.php Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2014-11-02 01:56:43 UTC (rev 6956) +++ trunk/Dashboard.php 2014-11-03 02:30:16 UTC (rev 6957) @@ -273,15 +273,29 @@ if ($DetailTrans['daysbeforedue'] > 0) { $AddDays=$DetailTrans['daysbeforedue'] . ' days'; - $DisplayDueDate = date_add(date_create($DetailTrans['trandate']), date_interval_create_from_date_string($AddDays)); + if (function_exists(date_add)) { + $DisplayDueDate = date_add(date_create($DetailTrans['trandate']), date_interval_create_from_date_string($AddDays)); + } else { + $DisplayDueDate = strtotime($AddDays,strtotime($DetailTrans['trandate'])); + } + } else { $AddDays=(intval($DetailTrans['dayinfollowingmonth']) - 1) . ' days'; - $DisplayDueDate= date_create($DetailTrans['trandate']); - $DisplayDueDate->modify('first day of next month'); - $DisplayDueDate=date_add($DisplayDueDate, date_interval_create_from_date_string($AddDays)); + if (function_exists(date_add)){ + $DisplayDueDate = date_create($DetailTrans['trandate']); + $DisplayDueDate->modify('first day of next month'); + $DisplayDueDate = date_add($DisplayDueDate, date_interval_create_from_date_string($AddDays)); + } else { + $DisplayDueDate = strtotime('first day of next month',strtotime($DetailTrans['trandate'])); + $DisplayDueDate = strtotime($DisplayDueDate,strtotime($AddDays)); + } } - $DisplayDueDate=date_format($DisplayDueDate,$_SESSION['DefaultDateFormat']); + if (function_exists(date_add)) { + $DisplayDueDate=date_format($DisplayDueDate,$_SESSION['DefaultDateFormat']); + } else { + $DisplayDueDate = Date($_SESSION['DefaultDateFormat'],$DisplayDueDate); + } if ($k==1){ echo '<tr class="EvenTableRows">'; $k=0; @@ -735,4 +749,4 @@ } //rows > 0 } //OrderSecurity include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <aga...@us...> - 2015-04-21 14:27:00
|
Revision: 7270 http://sourceforge.net/p/web-erp/reponame/7270 Author: agaluski Date: 2015-04-21 14:26:58 +0000 (Tue, 21 Apr 2015) Log Message: ----------- Moved total initialization so that Grand Total is not total for last supplier Modified Paths: -------------- trunk/Dashboard.php Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2015-04-20 12:44:02 UTC (rev 7269) +++ trunk/Dashboard.php 2015-04-21 14:26:58 UTC (rev 7270) @@ -398,7 +398,8 @@ $SupplierID =''; $TotalPayments = 0; $TotalAccumDiffOnExch = 0; - + $AccumBalance =0; + while ($SuppliersToPay = DB_fetch_array($SuppliersResult)){ $CurrDecimalPlaces = $SuppliersToPay['currdecimalplaces']; @@ -445,7 +446,6 @@ unset($Allocs); $Allocs = array(); $AllocCounter =0; - $AccumBalance =0; $k=0; //row colour counter while ($DetailTrans = DB_fetch_array($TransResult)){ |
From: <dai...@us...> - 2016-11-08 07:59:10
|
Revision: 7664 http://sourceforge.net/p/web-erp/reponame/7664 Author: daintree Date: 2016-11-08 07:59:07 +0000 (Tue, 08 Nov 2016) Log Message: ----------- Harald spotted translated variable which should not be! Modified Paths: -------------- trunk/Dashboard.php Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2016-11-07 03:25:49 UTC (rev 7663) +++ trunk/Dashboard.php 2016-11-08 07:59:07 UTC (rev 7664) @@ -439,7 +439,7 @@ } $DislayTranDate = ConvertSQLDate($DetailTrans['trandate']); $AccumBalance += $DetailTrans['balance']; - if(_($DetailTrans['type']) == 20) {// If Purchase Invoice: + if($DetailTrans['type'] == 20) {// If Purchase Invoice: echo '<td style="text-align:center">', _($DetailTrans['typename']), '</td> <td class="centre">', $DislayTranDate, '</td> <td class="text"><a href="', $RootPath, '/Payments.php?&SupplierID=', $SupplierID, '&Amount=', $DetailTrans['balance'], '&BankTransRef=', $DetailTrans['suppreference'], '">', $DetailTrans['suppreference'], '</a></td> |
From: <ex...@us...> - 2016-12-08 13:39:56
|
Revision: 7700 http://sourceforge.net/p/web-erp/reponame/7700 Author: exsonqu Date: 2016-12-08 13:39:54 +0000 (Thu, 08 Dec 2016) Log Message: ----------- 08/12/16 Exson: Fixed noise of undefined variable and string required for function_exists in Dashboard.php. Reported by Shane. Modified Paths: -------------- trunk/Dashboard.php Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2016-12-06 19:42:15 UTC (rev 7699) +++ trunk/Dashboard.php 2016-12-08 13:39:54 UTC (rev 7700) @@ -73,7 +73,6 @@ $TotDue = 0; $TotOD1 = 0; $TotOD2 = 0; - $ListCount = DB_num_rows($CustomerResult); $CurrDecimalPlaces = 2;//By default. if(!isset($_POST['Salesman'])) { @@ -261,7 +260,7 @@ if($DetailTrans['daysbeforedue'] > 0) { $AddDays=$DetailTrans['daysbeforedue'] . ' days'; - if(function_exists(date_add)) { + if(function_exists('date_add')) { $DisplayDueDate = date_add(date_create($DetailTrans['trandate']), date_interval_create_from_date_string($AddDays)); } else { $DisplayDueDate = strtotime($AddDays,strtotime($DetailTrans['trandate'])); @@ -269,7 +268,7 @@ } else { $AddDays=(intval($DetailTrans['dayinfollowingmonth']) - 1) . ' days'; - if(function_exists(date_add)) { + if(function_exists('date_add')) { $DisplayDueDate = date_create($DetailTrans['trandate']); $DisplayDueDate->modify('first day of next month'); $DisplayDueDate = date_add($DisplayDueDate, date_interval_create_from_date_string($AddDays)); @@ -279,7 +278,7 @@ } } - if(function_exists(date_add)) { + if(function_exists('date_add')) { $DisplayDueDate=date_format($DisplayDueDate,$_SESSION['DefaultDateFormat']); } else { $DisplayDueDate = Date($_SESSION['DefaultDateFormat'],$DisplayDueDate); @@ -691,4 +690,4 @@ } //rows > 0 } //OrderSecurity include('includes/footer.inc'); -?> \ No newline at end of file +?> |