|
From: <rc...@us...> - 2016-12-21 23:44:28
|
Revision: 7712
http://sourceforge.net/p/web-erp/reponame/7712
Author: rchacon
Date: 2016-12-21 23:44:26 +0000 (Wed, 21 Dec 2016)
Log Message:
-----------
Fix date comparison and title. Thanks Tim.
Modified Paths:
--------------
trunk/GLAccounts.php
trunk/PurchasesReport.php
trunk/doc/Change.log
trunk/doc/Manual/ManualPurchaseOrdering.html
trunk/includes/MainMenuLinksArray.php
trunk/sql/mysql/upgrade4.13.1-4.14.sql
Modified: trunk/GLAccounts.php
===================================================================
--- trunk/GLAccounts.php 2016-12-20 23:48:35 UTC (rev 7711)
+++ trunk/GLAccounts.php 2016-12-21 23:44:26 UTC (rev 7712)
@@ -245,11 +245,11 @@
echo '<table class="selection">
<tr>
<td>', _('Account Code'), ':</td>
- <td><input ', (isset($_POST['AccountCode']) ? 'disabled="disabled" ' : 'autofocus="autofocus" '), 'data-type="no-illegal-chars" maxlength="20" name="AccountCode" required="required" size="20" title="', _('Enter up to 20 alpha-numeric characters for the general ledger account code'), '" type="text" value="', $_POST['AccountCode'], '" /></td>
+ <td><input ', (empty($_POST['AccountCode']) ? 'autofocus="autofocus" ' : 'disabled="disabled" '), 'data-type="no-illegal-chars" maxlength="20" name="AccountCode" required="required" size="20" title="', _('Enter up to 20 alpha-numeric characters for the general ledger account code'), '" type="text" value="', $_POST['AccountCode'], '" /></td>
</tr>
<tr>
<td>' . _('Account Name') . ':</td>
- <td><input ', (isset($_POST['AccountCode']) ? 'autofocus="autofocus" ' : ''), 'maxlength="50" name="AccountName" required="required" size="51" title="' . _('Enter up to 50 alpha-numeric characters for the general ledger account name') . '" type="text" value="', $_POST['AccountName'], '" /></td></tr>';
+ <td><input ', (empty($_POST['AccountCode']) ? '' : 'autofocus="autofocus" '), 'maxlength="50" name="AccountName" required="required" size="51" title="' . _('Enter up to 50 alpha-numeric characters for the general ledger account name') . '" type="text" value="', $_POST['AccountName'], '" /></td></tr>';
$Sql = "SELECT groupname FROM accountgroups ORDER BY sequenceintb";
$Result = DB_query($Sql);
Modified: trunk/PurchasesReport.php
===================================================================
--- trunk/PurchasesReport.php 2016-12-20 23:48:35 UTC (rev 7711)
+++ trunk/PurchasesReport.php 2016-12-21 23:44:26 UTC (rev 7712)
@@ -1,6 +1,6 @@
<?php
/* $Id: PurchasesReport.php 7672 2016-11-27 10:42:50Z rchacon $ */
-/* Shows a report of purchases to suppliers for the range of selected dates. */
+/* Shows a report of purchases from suppliers for the range of selected dates. */
/* This program is under the GNU General Public License, last version. Rafael E. Chacón, 2016-12-18. */
/* This creative work is under the CC BY-NC-SA, later version. Rafael E. Chacón, 2016-12-18. */
@@ -8,11 +8,12 @@
// Coding Conventions/Style: http://www.weberp.org/CodingConventions.html
// BEGIN: Functions division ---------------------------------------------------
+// RChacon: load DateFunctions.inc ? **********************************************************************************Date1GreaterThanDate2()
// END: Functions division -----------------------------------------------------
// BEGIN: Procedure division ---------------------------------------------------
include('includes/session.inc');
-$Title = _('Purchases to Suppliers');
+$Title = _('Purchases from Suppliers');
$ViewTopic = 'PurchaseOrdering';
$BookMark = 'PurchasesReport';
include('includes/header.inc');
@@ -34,11 +35,13 @@
}
// Validates the data submitted in the form:
-if($_POST['PeriodFrom'] > $_POST['PeriodTo']) {// RChacon: Is it the correct way to do this? **********************************************************************************
- // The beginning is after the end.
- unset($_POST['PeriodFrom']);
- unset($_POST['PeriodTo']);
- prnMsg(_('The beginning of the period should be before or equal to the end of the period. Please reselect the reporting period.'), 'error');
+if(isset($_POST['PeriodFrom']) AND isset($_POST['PeriodTo'])) {
+ if(Date1GreaterThanDate2($_POST['PeriodFrom'], $_POST['PeriodTo'])) {
+ // The beginning is after the end.
+ unset($_POST['PeriodFrom']);
+ unset($_POST['PeriodTo']);
+ prnMsg(_('The beginning of the period should be before or equal to the end of the period. Please reselect the reporting period.'), 'error');
+ }
}
// Main code:
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-12-20 23:48:35 UTC (rev 7711)
+++ trunk/doc/Change.log 2016-12-21 23:44:26 UTC (rev 7712)
@@ -1,5 +1,6 @@
webERP Change Log
+21/12/16 RChacon: In PurchasesReport.php, fix date comparison and title. Thanks Tim.
20/12/16 RChacon: Standardise to "Print" button.
20/12/16 RChacon: Add a report of purchases to suppliers for the range of selected dates.
11/12/16 PaulT: Dashboard.php: Correct table closure. When there are no outstanding orders, causes footer artifact.
Modified: trunk/doc/Manual/ManualPurchaseOrdering.html
===================================================================
--- trunk/doc/Manual/ManualPurchaseOrdering.html 2016-12-20 23:48:35 UTC (rev 7711)
+++ trunk/doc/Manual/ManualPurchaseOrdering.html 2016-12-21 23:44:26 UTC (rev 7712)
@@ -179,8 +179,8 @@
<div class="floatright"><a class="minitext" href="#top">⬆ Top</a></div>
<h2>Inquiries and Reports</h2>
-<h3><a id="PurchasesReport">Purchases to Suppliers</a></h3>
-<p>This report shows purchases to suppliers over a period of time. It shows the overall amount, taxes and total in the supplier's currency and in the functional currency.</p>
+<h3><a id="PurchasesReport">Purchases from Suppliers</a></h3>
+<p>This report shows purchases from suppliers over a period of time. It shows the overall amount, taxes and total in the supplier's currency and in the functional currency.</p>
<p>Report parameters:</p>
<ul>
<li><b>Select period from.</b> Select the beginning of the reporting period. Default: one year before current date.</li>
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2016-12-20 23:48:35 UTC (rev 7711)
+++ trunk/includes/MainMenuLinksArray.php 2016-12-21 23:44:26 UTC (rev 7712)
@@ -189,7 +189,7 @@
$MenuItems['PO']['Reports']['Caption'] = array( _('Purchase Order Inquiry'),
_('Purchase Order Detail Or Summary Inquiries'),
_('Supplier Price List'),
- _('Purchases to Suppliers'));
+ _('Purchases from Suppliers'));
$MenuItems['PO']['Reports']['URL'] = array( '/PO_SelectPurchOrder.php',
'/POReport.php',
Modified: trunk/sql/mysql/upgrade4.13.1-4.14.sql
===================================================================
--- trunk/sql/mysql/upgrade4.13.1-4.14.sql 2016-12-20 23:48:35 UTC (rev 7711)
+++ trunk/sql/mysql/upgrade4.13.1-4.14.sql 2016-12-21 23:44:26 UTC (rev 7712)
@@ -1,5 +1,5 @@
-- Add new script:
-INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('PurchasesReport.php', '2', 'Shows a report of purchases to suppliers for the range of selected dates');
+INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('PurchasesReport.php', '2', 'Shows a report of purchases from suppliers for the range of selected dates');
-- Update version number:
UPDATE config SET confvalue='4.14' WHERE confname='VersionNumber';
|