[TEP-COMMIT] [CVS admin] Add new low stock report
mevans-OfajU3CKLf1/[email protected] 31 Oct 2004 10:01:40 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>admin/admin/includes</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>languages/english/modules/statistics/<a href="#file1"><span id="added">low_stock.php</span></a></tt></td><td align="right" id="added">+17</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr class="alt"><td><tt>languages/espanol/modules/statistics/<a href="#file2"><span id="added">low_stock.php</span></a></tt></td><td align="right" id="added">+17</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td><tt>languages/german/modules/statistics/<a href="#file3"><span id="added">low_stock.php</span></a></tt></td><td align="right" id="added">+17</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr class="alt"><td><tt>modules/statistics/<a href="#file4"><span id="added">low_stock.php</span></a></tt></td><td align="right" id="added">+68</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td></td><td align="right" id="added">+119</td><td></td><td></td></tr>
</table>
<small id="info">4 added files</small><br />
<pre class="comment">
Add new low stock report
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english">english</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/modules/statistics">statistics</a><br /></span>
<div class="fileheader" id="added"><big><b>low_stock.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N low_stock.php
--- /dev/null Sun Oct 31 11:01:22 2004
+++ /tmp/cvsAAATtaasZ Sun Oct 31 11:01:33 2004
@@ -0,0 +1,17 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+define('MODULE_STATISTICS_LOW_STOCK_TITLE', 'Low Stock');
+
+define('MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_PRODUCTS', 'Products');
+define('MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_LEVEL', 'Stock Level');
+?>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol">espanol</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/modules/statistics">statistics</a><br /></span>
<div class="fileheader" id="added"><big><b>low_stock.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N low_stock.php
--- /dev/null Sun Oct 31 11:01:22 2004
+++ /tmp/cvsAAABIaatZ Sun Oct 31 11:01:34 2004
@@ -0,0 +1,17 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+define('MODULE_STATISTICS_LOW_STOCK_TITLE', 'Low Stock');
+
+define('MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_PRODUCTS', 'Products');
+define('MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_LEVEL', 'Stock Level');
+?>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german">german</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/modules/statistics">statistics</a><br /></span>
<div class="fileheader" id="added"><big><b>low_stock.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N low_stock.php
--- /dev/null Sun Oct 31 11:01:22 2004
+++ /tmp/cvsAAA80aGtZ Sun Oct 31 11:01:35 2004
@@ -0,0 +1,17 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+define('MODULE_STATISTICS_LOW_STOCK_TITLE', 'Low Stock');
+
+define('MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_PRODUCTS', 'Products');
+define('MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_LEVEL', 'Stock Level');
+?>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/modules/statistics">statistics</a><br /></span>
<div class="fileheader" id="added"><big><b>low_stock.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/modules/statistics/low_stock.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N low_stock.php
--- /dev/null Sun Oct 31 11:01:22 2004
+++ /tmp/cvsAAAjraavZ Sun Oct 31 11:01:37 2004
@@ -0,0 +1,68 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ if (!class_exists('osC_Statistics')) {
+ include('includes/classes/statistics.php');
+ }
+
+ class osC_Statistics_Low_Stock extends osC_Statistics {
+
+// Class constructor
+
+ function osC_Statistics_Low_Stock() {
+ global $osC_Session;
+
+ include('includes/languages/' . $osC_Session->value('language') . '/modules/statistics/low_stock.php');
+
+ $this->_setIcon();
+ $this->_setTitle();
+ }
+
+// Private methods
+
+ function _setIcon() {
+ $this->_icon = tep_icon('products.png', ICON_PRODUCTS, '16', '16');
+ }
+
+ function _setTitle() {
+ $this->_title = MODULE_STATISTICS_LOW_STOCK_TITLE;
+ }
+
+ function _setHeader() {
+ $this->_header = array(MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_PRODUCTS,
+ MODULE_STATISTICS_LOW_STOCK_TABLE_HEADING_LEVEL);
+ }
+
+ function _setData() {
+ if (PHP_VERSION < 4.1) {
+ global $_GET;
+ }
+
+ global $osC_Database, $osC_Session;
+
+ $this->_data = array();
+
+ $this->_resultset = $osC_Database->query('select p.products_id, pd.products_name, products_quantity from :table_products p, :table_products_description pd where p.products_id = pd.products_id and pd.language_id = :language_id and p.products_quantity <= :stock_reorder_level order by p.products_quantity desc');
+ $this->_resultset->bindTable(':table_products', TABLE_PRODUCTS);
+ $this->_resultset->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
+ $this->_resultset->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $this->_resultset->bindInt(':stock_reorder_level', STOCK_REORDER_LEVEL);
+ $this->_resultset->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
+ $this->_resultset->execute();
+
+ while ($this->_resultset->next()) {
+ $this->_data[] = array('<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $this->_resultset->valueInt('products_id')) . '">' . $this->_icon . '&nbsp;' . $this->_resultset->value('products_name') . '</a>',
+ $this->_resultset->valueInt('products_quantity'));
+ }
+ }
+ }
+?>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click