From: <te...@us...> - 2012-12-22 15:05:00
|
Revision: 5770 http://sourceforge.net/p/web-erp/reponame/5770 Author: tehonu Date: 2012-12-22 15:04:56 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Pak Ricard: Added script showing list of current items without a picture in webERP Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.09-4.10.sql Added Paths: ----------- trunk/ItemsWithoutPicture.php Added: trunk/ItemsWithoutPicture.php =================================================================== --- trunk/ItemsWithoutPicture.php (rev 0) +++ trunk/ItemsWithoutPicture.php 2012-12-22 15:04:56 UTC (rev 5770) @@ -0,0 +1,66 @@ +<?php + +/* Session started in session.inc for password checking and authorisation level check +config.php is in turn included in session.inc*/ +include ('includes/session.inc'); +$title = _('List of Items without picture'); +include ('includes/header.inc'); + +$SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockcategory.categorydescription + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid = stockcategory.categoryid + AND stockmaster.discontinued = 0 + AND stockcategory.stocktype != 'D' + ORDER BY stockcategory.categorydescription, stockmaster.stockid"; +$result = DB_query($SQL, $db); +$PrintHeader = TRUE; + +if (DB_num_rows($result) != 0){ + echo '<p class="page_title_text" align="center"><strong>' . _('Current Items without picture in webERP') . '</strong></p>'; + echo '<div>'; + echo '<table class="selection">'; + $k = 0; //row colour counter + $i = 1; + while ($myrow = DB_fetch_array($result)) { + if(!file_exists($_SESSION['part_pics_dir'] . '/' .$myrow['stockid'].'.jpg') ) { + if($PrintHeader){ + $TableHeader = '<tr> + <th>' . '#' . '</th> + <th>' . _('Category') . '</th> + <th>' . _('Item Code') . '</th> + <th>' . _('Description') . '</th> + </tr>'; + echo $TableHeader; + $PrintHeader = FALSE; + } + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + $CodeLink = '<a href="' . $rootpath . '/SelectProduct.php?StockID=' . $myrow['stockid'] . '">' . $myrow['stockid'] . '</a>'; + printf('<td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + $i, + $myrow['categorydescription'], + $CodeLink, + $myrow['description'] + ); + $i++; + } + } + echo '</table> + </div> + </form>'; +} + +include ('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-12-22 13:37:17 UTC (rev 5769) +++ trunk/includes/MainMenuLinksArray.php 2012-12-22 15:04:56 UTC (rev 5770) @@ -562,11 +562,13 @@ $MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance')); + _('Show General Transactions That Do Not Balance'), + _('List of items without picture')); $MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php'); + '/Z_CheckGLTransBalance.php', + '/ItemsWithoutPicture.php'); $MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), _('Make New Company'), Modified: trunk/sql/mysql/upgrade4.09-4.10.sql =================================================================== --- trunk/sql/mysql/upgrade4.09-4.10.sql 2012-12-22 13:37:17 UTC (rev 5769) +++ trunk/sql/mysql/upgrade4.09-4.10.sql 2012-12-22 15:04:56 UTC (rev 5770) @@ -11,4 +11,5 @@ ALTER TABLE `gltrans` ADD INDEX ( `tag` ); INSERT INTO scripts VALUES ('CustomerPurchases.php','5','Shows the purchases a customer has made.'); INSERT INTO scripts VALUES ('GoodsReceivedButNotInvoiced.php','15','Shows the list of Goods Received Not Yet Invoiced, both in supplier currency and home currency. Total in home curency should match the GL Account for Goods received not invoiced. Any discrepancy is due to multicurrency errors.'); +INSERT INTO scripts VALUES ('ItemsWithoutPicture.php','15','Shows the list of curent items without picture in webERP'); UPDATE config SET confvalue='4.10.0' WHERE confname='VersionNumber'; |