[Weberp-svn] SF.net SVN: weberp:[9387] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-07-07 10:34:10
|
Revision: 9387 http://weberp.svn.sourceforge.net/weberp/?rev=9387&view=rev Author: tim_schofield Date: 2012-07-07 10:34:04 +0000 (Sat, 07 Jul 2012) Log Message: ----------- Phil: Added new Z_DeleteOldPrices.php script to purge prices which are past their end date Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php Added Paths: ----------- trunk/Z_DeleteOldPrices.php trunk/sql/mysql/updates/139.php Added: trunk/Z_DeleteOldPrices.php =================================================================== --- trunk/Z_DeleteOldPrices.php (rev 0) +++ trunk/Z_DeleteOldPrices.php 2012-07-07 10:34:04 UTC (rev 9387) @@ -0,0 +1,24 @@ +<?php +/* $Id: Z_DeleteOldPrices.php 5296 2012-04-29 15:28:19Z vvs2012 $*/ + +include ('includes/session.inc'); +$title = _('UTILITY PAGE To Delete All Old Prices'); +include('includes/header.inc'); + +if (isset($_POST['DeleteOldPrices'])){ + $result=DB_query("DELETE FROM prices WHERE enddate<'" . Date('Y-m-d') . "' AND enddate <>'0000-00-00'",$db); + prnMsg(_('All old prices have been deleted'),'success'); +} + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div class="centre">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<br /> + <input type="submit" name="DeleteOldPrices" value="' . _('Purge Old Prices') . '" onclick="return confirm(\'' . _('Are You Sure you wish to delete all old prices?') . '\');" />'; + +echo '</div> + </form>'; + +include('includes/footer.inc'); +?> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-07-07 10:24:38 UTC (rev 9386) +++ trunk/includes/MainMenuLinksArray.php 2012-07-07 10:34:04 UTC (rev 9387) @@ -598,6 +598,7 @@ _('Change A Location Code'), _('Update costs for all BOM items, from the bottom up'), _('Re-apply costs to Sales Analysis'), + _('Purge all old prices'), _('Delete sales transactions'), _('Reverse all supplier payments on a specified date')); @@ -608,6 +609,7 @@ 'Z_ChangeLocationCode.php', 'Z_BottomUpCosts.php', 'Z_ReApplyCostToSA.php', + 'Z_DeleteOldPrices.php', 'Z_DeleteSalesTransActions.php', 'Z_ReverseSuppPaymentRun.php'); Added: trunk/sql/mysql/updates/139.php =================================================================== --- trunk/sql/mysql/updates/139.php (rev 0) +++ trunk/sql/mysql/updates/139.php 2012-07-07 10:34:04 UTC (rev 9387) @@ -0,0 +1,10 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +InsertRecord('pagesecurity', array('script', 'security'), array('Z_DeleteOldPrices.php',15), array('script', 'security'), array('Z_DeleteOldPrices.php',15), $db); + +UpdateDBNo(basename(__FILE__, '.php'), $db); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |