From: <tu...@us...> - 2018-02-03 00:57:16
|
Revision: 7932 http://sourceforge.net/p/web-erp/reponame/7932 Author: turbopt Date: 2018-02-03 00:57:14 +0000 (Sat, 03 Feb 2018) Log Message: ----------- Dashboard.php: Replace due date handling with existing function. Modified Paths: -------------- trunk/Dashboard.php trunk/doc/Change.log Modified: trunk/Dashboard.php =================================================================== --- trunk/Dashboard.php 2018-02-03 00:27:41 UTC (rev 7931) +++ trunk/Dashboard.php 2018-02-03 00:57:14 UTC (rev 7932) @@ -260,31 +260,8 @@ $DisplayOverdue1 = locale_number_format($DetailTrans['overdue1']-$DetailTrans['overdue2'], $CurrDecimalPlaces); $DisplayOverdue2 = locale_number_format($DetailTrans['overdue2'], $CurrDecimalPlaces); - if($DetailTrans['daysbeforedue'] > 0) { - $AddDays=$DetailTrans['daysbeforedue'] . ' days'; - 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'])); - } + $DisplayDueDate = CalcDueDate($DisplayTranDate, $DetailTrans['dayinfollowingmonth'], $DetailTrans['daysbeforedue']); - } else { - $AddDays=(intval($DetailTrans['dayinfollowingmonth']) - 1) . ' days'; - 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)); - } - - } - 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; @@ -292,7 +269,7 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo '<td style="text-align:center">', _($DetailTrans['typename']), '</td>',// Should it be left (text field) ? + echo '<td class="centre">', _($DetailTrans['typename']), '</td>',// Should it be left (text field) ? '<td class="number">', $DetailTrans['transno'], '</td> <td class="centre">', $DisplayTranDate, '</td> <td class="centre">', $DisplayDueDate, '</td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-02-03 00:27:41 UTC (rev 7931) +++ trunk/doc/Change.log 2018-02-03 00:57:14 UTC (rev 7932) @@ -1,5 +1,6 @@ webERP Change Log +2/2/18 PaulT: Dashboard.php: Replace due date handling with existing function. 2/2/18 PaulT: PrintCustTrans.php, PDFTransPageHeader.inc, PrintCustTransPortrait.php, PDFTransPageHeaderPortrait.inc: Add missing stock lot/serial info to landscape output to be consistent with portrait output (reported by HDeriauFF), add Due Date info to invoices (reported by Paul Becker), and (PaulT) add security checks to portrait file, layout improvements, change PDF initialization handling, and more. (A summary of all changes in this commit can be viewed here: http://www.weberp.org/forum/showthread.php?tid=8065&pid=14115#pid14115) 31/1/18 PaulT: Add a 'warning' case to getMsg(), as there is mixed use of 'warn' and 'warning' usage with prnMsg() calls. The 'warning' (before this change) defaults to an 'info' style message. 27/1/18 PaulT: Remove unused $db parameter from DB_query(), DB_error_no(), DB_error_msg() and other DB-related function calls. |