From: <rc...@us...> - 2016-12-20 14:51:41
|
Revision: 7707 http://sourceforge.net/p/web-erp/reponame/7707 Author: rchacon Date: 2016-12-20 14:51:38 +0000 (Tue, 20 Dec 2016) Log Message: ----------- Add a report of purchases to suppliers for the range of selected dates. Modified Paths: -------------- trunk/GLCashFlowsIndirect.php trunk/doc/Manual/ManualPurchaseOrdering.html trunk/includes/MainMenuLinksArray.php Added Paths: ----------- trunk/PurchasesReport.php trunk/sql/mysql/upgrade4.13.1-4.14.sql Modified: trunk/GLCashFlowsIndirect.php =================================================================== --- trunk/GLCashFlowsIndirect.php 2016-12-16 21:22:07 UTC (rev 7706) +++ trunk/GLCashFlowsIndirect.php 2016-12-20 14:51:38 UTC (rev 7707) @@ -70,7 +70,7 @@ } // Main code: -if(isset($_POST['PeriodFrom']) AND isset($_POST['PeriodTo']) AND !isset($_POST['SelectADifferentPeriod'])) {// If all parameters are set and valid, generates the report: +if(isset($_POST['PeriodFrom']) AND isset($_POST['PeriodTo']) AND $_POST['Action']!='New') {// If all parameters are set and valid, generates the report: echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/reports.png" title="', // Icon image. $Title, '" /> ', // Icon title. @@ -105,7 +105,7 @@ // Gets the retained earnings GL account: if(!isset($_SESSION['RetainedEarningsAccount'])) { $_SESSION['RetainedEarningsAccount'] = ''; -/* $MyRow = DB_fetch_array(DB_query("SELECT confvalue FROM `config` WHERE confname ='RetainedEarningsAccount'"));*/ +/* $MyRow = DB_fetch_array(DB_query("SELECT confvalue FROM `config` WHERE confname ='RetainedEarningsAccount'"));// RChacon: Standardise to config table? */ $MyRow = DB_fetch_array(DB_query("SELECT retainedearnings FROM companies WHERE coycode = 1")); if($MyRow) { $_SESSION['RetainedEarningsAccount'] = $MyRow['confvalue']; @@ -727,16 +727,16 @@ '<input name="ShowDetail" type="hidden" value="', $_POST['ShowDetail'], '" />', '<input name="ShowZeroBalance" type="hidden" value="', $_POST['ShowZeroBalance'], '" />', '<input name="ShowBudget" type="hidden" value="', $_POST['ShowBudget'], '" />', - '<input name="ShowCash" type="hidden" value="', $_POST['ShowCash'], '" />', // Form buttons: - '<div class="centre noprint">'; + '<input name="ShowCash" type="hidden" value="', $_POST['ShowCash'], '" />', + '<div class="centre noprint">'; // Form buttons: if($NeedSetup) { echo '<button onclick="javascript:window.location=\'GLCashFlowsSetup.php\'" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/maintenance.png" /> ', _('Run Setup'), '</button>'; // "Run Setup" button. } echo '<button onclick="javascript:window.print()" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/printer.png" /> ', _('Print This'), '</button>', // "Print This" button. - '<button name="SelectADifferentPeriod" type="submit" value="', _('Select A Different Period'), '"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/gl.png" /> ', _('Select A Different Period'), '</button>', // "Select A Different Period" button. + '/images/printer.png" /> ', _('Print'), '</button>', // "Print" button. + '<button name="Action" type="submit" value="New"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/reports.png" /> ', _('New Report'), '</button>', // "New Report" button. '<button onclick="javascript:window.location=\'index.php?Application=GL\'" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/return.svg" /> ', _('Return'), '</button>', // "Return" button. '</div>'; @@ -779,7 +779,7 @@ // Content of the body of the input table: // Select period from: '<tr>', - '<td><label for="PeriodFrom">', _('Select period from'), ':</label></td> + '<td><label for="PeriodFrom">', _('Select period from'), '</label></td> <td><select id="PeriodFrom" name="PeriodFrom" required="required">'; $Periods = DB_query('SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno ASC'); if(!isset($_POST['PeriodFrom'])) { @@ -800,7 +800,7 @@ </tr>', // Select period to: '<tr>', - '<td><label for="PeriodTo">', _('Select period to'), ':</label></td> + '<td><label for="PeriodTo">', _('Select period to'), '</label></td> <td><select id="PeriodTo" name="PeriodTo" required="required">'; if(!isset($_POST['PeriodTo'])) { $_POST['PeriodTo'] = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); @@ -837,4 +837,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Added: trunk/PurchasesReport.php =================================================================== --- trunk/PurchasesReport.php (rev 0) +++ trunk/PurchasesReport.php 2016-12-20 14:51:38 UTC (rev 7707) @@ -0,0 +1,290 @@ +<?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. */ +/* 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. */ + +// Notes: +// Coding Conventions/Style: http://www.weberp.org/CodingConventions.html + +// BEGIN: Functions division --------------------------------------------------- +// END: Functions division ----------------------------------------------------- + +// BEGIN: Procedure division --------------------------------------------------- +include('includes/session.inc'); +$Title = _('Purchases to Suppliers'); +$ViewTopic = 'PurchaseOrdering'; +$BookMark = 'PurchasesReport'; +include('includes/header.inc'); + +echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/reports.png" title="', // Icon image. + $Title, '" /> ', // Icon title. + $Title, '</p>';// Page title. + +// Merges gets into posts: +if(isset($_GET['PeriodFrom'])) {// Select period from. + $_POST['PeriodFrom'] = $_GET['PeriodFrom']; +} +if(isset($_GET['PeriodTo'])) {// Select period to. + $_POST['PeriodTo'] = $_GET['PeriodTo']; +} +if(isset($_GET['ShowDetails'])) {// Show the budget for the period. + $_POST['ShowDetails'] = $_GET['ShowDetails']; +} + +// 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'); +} + +// Main code: +if(isset($_POST['PeriodFrom']) AND isset($_POST['PeriodTo']) AND $_POST['Action']!='New') {// If all parameters are set and valid, generates the report: + echo '<table class="selection"> + <thead> + <tr>'; + $TableFoot = + '</tr> + </thead><tfoot> + <tr> + <td colspan="9"><br /><b>' . + _('Notes') . '</b><br />' . + _('Original amounts in the supplier\'s currency. GL amounts in the functional currency.') . + '</td> + </tr> + </tfoot><tbody>';// Common table code. + $TotalGlAmount = 0; + $TotalGlTax = 0; + $k = 1;// Row colour counter. + $PeriodFrom = ConvertSQLDate($_POST['PeriodFrom']); + $PeriodTo = ConvertSQLDate($_POST['PeriodTo']); + if($_POST['ShowDetails']) {// Parameters: PeriodFrom, PeriodTo, ShowDetails=on. + echo '<th>', _('Date'), '</th> + <th>', _('Purchase Invoice'), '</th> + <th>', _('Reference'), '</th> + <th>', _('Original Overall Amount'), '</th> + <th>', _('Original Overall Taxes'), '</th> + <th>', _('Original Overall Total'), '</th> + <th>', _('GL Overall Amount'), '</th> + <th>', _('GL Overall Taxes'), '</th> + <th>', _('GL Overall Total'), '</th>', $TableFoot; + $SupplierId = ''; + $SupplierOvAmount = 0; + $SupplierOvTax = 0; + $SupplierGlAmount = 0; + $SupplierGlTax = 0; + $Sql = "SELECT + supptrans.supplierno, + suppliers.suppname, + suppliers.currcode, + supptrans.trandate, + supptrans.suppreference, + supptrans.transno, + supptrans.ovamount, + supptrans.ovgst, + supptrans.rate + FROM supptrans + INNER JOIN suppliers ON supptrans.supplierno=suppliers.supplierid + WHERE supptrans.trandate>='" . $PeriodFrom . "' + AND supptrans.trandate<='" . $PeriodTo . "' + AND supptrans.`type`=20 + ORDER BY supptrans.supplierno, supptrans.trandate"; + $Result = DB_query($Sql); + include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. + foreach($Result as $MyRow) { + if($MyRow['supplierno'] != $SupplierId) {// If different, prints supplier totals: + if($SupplierId != '') {// If NOT the first line. + echo '<tr>', + '<td colspan="3"> </td>', + '<td class="number">', locale_number_format($SupplierOvAmount, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierOvTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierOvAmount+$SupplierOvTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierGlAmount, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierGlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierGlAmount+$SupplierGlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '</tr>'; + } + echo '<tr><td colspan="9"> </td></tr>'; + echo '<tr><td class="text" colspan="9">', $MyRow['supplierno'], ' - ', $MyRow['suppname'], ' - ', $MyRow['currcode'], ' ', $CurrencyName[$MyRow['currcode']], '</td></tr>'; + $TotalGlAmount += $SupplierGlAmount; + $TotalGlTax += $SupplierGlTax; + $SupplierId = $MyRow['supplierno']; + $SupplierOvAmount = 0; + $SupplierOvTax = 0; + $SupplierGlAmount = 0; + $SupplierGlTax = 0; + } + if($k == 1) { + echo '<tr class="OddTableRows">'; + $k = 0; + } else { + echo '<tr class="EvenTableRows">'; + $k = 1; + } + $GlAmount = $MyRow['ovamount']/$MyRow['rate']; + $GlTax = $MyRow['ovgst']/$MyRow['rate']; + echo '<td class="centre">', $MyRow['trandate'], '</td>', + '<td class="number">', $MyRow['transno'], '</td>', + '<td class="text">', $MyRow['suppreference'], '</td>', + '<td class="number">', locale_number_format($MyRow['ovamount'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($MyRow['ovgst'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number"><a href="', $RootPath, '/SuppWhereAlloc.php?TransType=20&TransNo=', $MyRow['transno'], '&ScriptFrom=PurchasesReport" target="_blank" title="', _('Click to view where allocated'), '">', locale_number_format($MyRow['ovamount']+$MyRow['ovgst'], $_SESSION['CompanyRecord']['decimalplaces']), '</a></td>', + '<td class="number">', locale_number_format($GlAmount, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($GlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number"><a href="', $RootPath, '/GLTransInquiry.php?TypeID=20&TransNo=', $MyRow['transno'], '&ScriptFrom=PurchasesReport" target="_blank" title="', _('Click to view the GL entries'), '">', locale_number_format($GlAmount+$GlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</a></td>', // RChacon: Should be "Click to view the General Ledger transaction" instead? + '</tr>'; + $SupplierOvAmount += $MyRow['ovamount']; + $SupplierOvTax += $MyRow['ovgst']; + $SupplierGlAmount += $GlAmount; + $SupplierGlTax += $GlTax; + } + + // Prints last supplier total: + echo '<tr>', + '<td colspan="3"> </td>', + '<td class="number">', locale_number_format($SupplierOvAmount, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierOvTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierOvAmount+$SupplierOvTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierGlAmount, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierGlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($SupplierGlAmount+$SupplierGlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '</tr>', + '<tr><td colspan="9"> </td></tr>'; + + $TotalGlAmount += $SupplierGlAmount; + $TotalGlTax += $SupplierGlTax; + + } else {// Parameters: PeriodFrom, PeriodTo, ShowDetails=off. + // RChacon: Needs to update the table_sort function to use in this table. + echo '<th>', _('Supplier Code'), '</th> + <th>', _('Supplier Name'), '</th> + <th>', _('Supplier\'s Currency'), '</th> + <th>', _('Original Overall Amount'), '</th> + <th>', _('Original Overall Taxes'), '</th> + <th>', _('Original Overall Total'), '</th> + <th>', _('GL Overall Amount'), '</th> + <th>', _('GL Overall Taxes'), '</th> + <th>', _('GL Overall Total'), '</th>', $TableFoot; + $Sql = "SELECT + supptrans.supplierno, + suppliers.suppname, + suppliers.currcode, + SUM(supptrans.ovamount) AS SupplierOvAmount, + SUM(supptrans.ovgst) AS SupplierOvTax, + SUM(supptrans.ovamount/supptrans.rate) AS SupplierGlAmount, + SUM(supptrans.ovgst/supptrans.rate) AS SupplierGlTax + FROM supptrans + INNER JOIN suppliers ON supptrans.supplierno=suppliers.supplierid + WHERE supptrans.trandate>='" . $PeriodFrom . "' + AND supptrans.trandate<='" . $PeriodTo . "' + AND supptrans.`type`=20 + GROUP BY + supptrans.supplierno + ORDER BY supptrans.supplierno, supptrans.trandate"; + $Result = DB_query($Sql); + foreach($Result as $MyRow) { + if($k == 1) { + echo '<tr class="OddTableRows">'; + $k = 0; + } else { + echo '<tr class="EvenTableRows">'; + $k = 1; + } + echo '<td class="text"><a href="', $RootPath, '/SupplierInquiry.php?SupplierID=', $MyRow['supplierno'], '">', $MyRow['supplierno'], '</a></td>', + '<td class="text">', $MyRow['suppname'], '</td>', + '<td class="text">', $MyRow['currcode'], '</td>', + '<td class="number">', locale_number_format($MyRow['SupplierOvAmount'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($MyRow['SupplierOvTax'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($MyRow['SupplierOvAmount']+$MyRow['SupplierOvTax'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($MyRow['SupplierGlAmount'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($MyRow['SupplierGlTax'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '<td class="number">', locale_number_format($MyRow['SupplierGlAmount']+$MyRow['SupplierGlTax'], $_SESSION['CompanyRecord']['decimalplaces']), '</td>', + '</tr>'; + $TotalGlAmount += $MyRow['SupplierGlAmount']; + $TotalGlTax += $MyRow['SupplierGlTax']; + } + } + echo '<tr> + <td class="text" colspan="6"> </td> + <td class="number">', locale_number_format($TotalGlAmount, $_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format($TotalGlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td> + <td class="number">', locale_number_format($TotalGlAmount+$TotalGlTax, $_SESSION['CompanyRecord']['decimalplaces']), '</td> + </tr>',// Prints all suppliers total. + '</tbody></table> + <br /> + <form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post"> + <input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" /> + <input name="PeriodFrom" type="hidden" value="', $_POST['PeriodFrom'], '" /> + <input name="PeriodTo" type="hidden" value="', $_POST['PeriodTo'], '" /> + <input name="ShowDetails" type="hidden" value="', $_POST['ShowDetails'], '" /> + <div class="centre noprint">', // Form buttons: + '<button onclick="javascript:window.print()" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/printer.png" /> ', _('Print'), '</button>', // "Print" button. + '<button name="Action" type="submit" value="New"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/reports.png" /> ', _('New Report'), '</button>', // "New Report" button. + '<button onclick="window.location=\'index.php?Application=PO\'" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/return.svg" /> ', _('Return'), '</button>', // "Return" button. + '</div>'; + +} else { + // Shows a form to allow input of criteria for the report to generate: + echo '<br />', + '<form action="', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + // Input table: + '<table class="selection">', + // Content of the header and footer of the input table: + '<thead> + <tr> + <th colspan="2">', _('Report Parameters'), '</th> + </tr> + </thead><tfoot> + <tr> + <td colspan="2">', + '<div class="centre">', + '<button name="Action" type="submit" value="', _('Submit'), '"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/tick.svg" /> ', _('Submit'), '</button>', // "Submit" button. + '<button onclick="window.location=\'index.php?Application=PO\'" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/return.svg" /> ', _('Return'), '</button>', // "Return" button. + '</div>', + '</td> + </tr> + </tfoot><tbody>', + // Content of the body of the input table: + // Select period from: + '<tr>', + '<td><label for="PeriodFrom">', _('Select period from'), '</label></td>'; + if(!isset($_POST['PeriodFrom'])) { + $_POST['PeriodFrom'] = date($_SESSION['DefaultDateFormat'], strtotime("-1 year", time()));// One year before current date. + } + echo '<td><input alt="', $_SESSION['DefaultDateFormat'], '" class="date" id="PeriodFrom" maxlength="10" minlength="0" name="PeriodFrom" required="required" size="12" type="text" value="', $_POST['PeriodFrom'], '" />', + (!isset($field_help) || $field_help ? _('Select the beginning of the reporting period') : ''), // If it is not set the $field_help parameter OR it is TRUE, shows the page help text. + '</td> + </tr>', + // Select period to: + '<tr>', + '<td><label for="PeriodTo">', _('Select period to'), '</label></td>'; + if(!isset($_POST['PeriodTo'])) { + $_POST['PeriodTo'] = date($_SESSION['DefaultDateFormat']); + } + echo '<td><input alt="', $_SESSION['DefaultDateFormat'], '" class="date" id="PeriodTo" maxlength="10" minlength="0" name="PeriodTo" required="required" size="12" type="text" value="', $_POST['PeriodTo'], '" />', + (!isset($field_help) || $field_help ? _('Select the end of the reporting period') : ''), // If it is not set the $field_help parameter OR it is TRUE, shows the page help text. + '</td> + </tr>', + // Show the budget for the period: + '<tr>', + '<td><label for="ShowDetails">', _('Show details'), '</label></td> + <td><input',($_POST['ShowDetails'] ? ' checked="checked"' : ''), ' id="ShowDetails" name="ShowDetails" type="checkbox">', // "Checked" if ShowDetails is set AND it is TRUE. + (!isset($field_help) || $field_help ? _('Check this box to show purchase invoices') : ''), // If it is not set the $field_help parameter OR it is TRUE, shows the page help text. + '</td> + </tr>', + '</tbody></table>'; + +} +echo '</form>'; +include('includes/footer.inc'); +// END: Procedure division ----------------------------------------------------- +?> Modified: trunk/doc/Manual/ManualPurchaseOrdering.html =================================================================== --- trunk/doc/Manual/ManualPurchaseOrdering.html 2016-12-16 21:22:07 UTC (rev 7706) +++ trunk/doc/Manual/ManualPurchaseOrdering.html 2016-12-20 14:51:38 UTC (rev 7707) @@ -175,9 +175,22 @@ <p>The goods received note should signed off by the person who received the goods - optionally a copy to the supplier's driver. </p> <p>An alternative short-cut method is also provided for auto-receiving purchase orders at the prices defined in the purchase order, for authorised purchase orders. After having entered a purchase order or modified a purchase order a link to automatically receive the entire order and create the supplier invoice will show if the order is authorised. This will happen automatically if the configuration option to auto authorise purchase orders is set and the user creating or modifying the order is authorised to do so. Clicking this link will receive all the items on the purchase order to the extent there is any quantity yet to be received. However, this program cannot handle controlled items. If there is even one line of controlled/serialised stock on the purchase order then this facility cannot be used.</p> -<div class="floatright"> - <a class="minitext" href="#top">⬆ Top</a> -</div> + +<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> +<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> + <li><b>Select period to.</b> Select the end of the reporting period. Default: current date.</li> + <li><b>Show details.</b> Check this box to show purchase invoices. With <i>show details <b>on</b></i>, the report as links to view where allocated and to view the General Ledger transaction. With <i>show details <b>off</b></i>, the report as links to view the supplier account inquiry. Default: off.</li> +</ul> +<p><b>Note</b>. The conversion between the supplier's currency and the functional currency is done with the exchange rate used in the respective transaction.</p> + + +<div class="floatright"><a class="minitext" href="#top">⬆ Top</a></div> <h2>Maintenance</h2> <h3><a id="SupplierPriceList">Maintain Supplier Price Lists</a></h3> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2016-12-16 21:22:07 UTC (rev 7706) +++ trunk/includes/MainMenuLinksArray.php 2016-12-20 14:51:38 UTC (rev 7707) @@ -188,11 +188,13 @@ $MenuItems['PO']['Reports']['Caption'] = array( _('Purchase Order Inquiry'), _('Purchase Order Detail Or Summary Inquiries'), - _('Supplier Price List')); + _('Supplier Price List'), + _('Purchases to Suppliers')); $MenuItems['PO']['Reports']['URL'] = array( '/PO_SelectPurchOrder.php', '/POReport.php', - '/SuppPriceList.php'); + '/SuppPriceList.php', + '/PurchasesReport.php'); $MenuItems['PO']['Maintenance']['Caption'] = array(_('Maintain Supplier Price Lists')); Added: trunk/sql/mysql/upgrade4.13.1-4.14.sql =================================================================== --- trunk/sql/mysql/upgrade4.13.1-4.14.sql (rev 0) +++ trunk/sql/mysql/upgrade4.13.1-4.14.sql 2016-12-20 14:51:38 UTC (rev 7707) @@ -0,0 +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'); + +-- Update version number: +UPDATE config SET confvalue='4.14' WHERE confname='VersionNumber'; |