Thread: [Weberp-svn] SF.net SVN: weberp:[9257] trunk (Page 13)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-06-29 19:55:41
|
Revision: 9257 http://weberp.svn.sourceforge.net/weberp/?rev=9257&view=rev Author: tim_schofield Date: 2012-06-29 19:55:35 +0000 (Fri, 29 Jun 2012) Log Message: ----------- Add in possibility to print quotations in landscape or portrait Modified Paths: -------------- trunk/DeliveryDetails.php trunk/SelectSalesOrder.php Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-06-29 19:55:24 UTC (rev 9256) +++ trunk/DeliveryDetails.php 2012-06-29 19:55:35 UTC (rev 9257) @@ -806,16 +806,50 @@ } /* updated line items into sales order details */ $Result=DB_Txn_Commit($db); - + $Quotation = $_SESSION['Items'.$identifier]->Quotation; unset($_SESSION['Items'.$identifier]->LineItems); unset($_SESSION['Items'.$identifier]); - prnMsg(_('Order Number') .' ' . $_SESSION['ExistingOrder'.$identifier] . ' ' . _('has been updated'),'success'); + if($Quotation){ //handle Quotations and Orders print after modification + prnMsg(_('Quotation Number') .' ' . $_SESSION['ExistingOrder'.$identifier] . ' ' . _('has been updated'),'success'); - echo '<br /><table class="selection"><tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td><td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td><td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td></tr>'; - echo '<tr><td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td><td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td></tr></table>'; + /*link to print the quotation */ + echo '<br /><table class="selection"> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print Quotation (Landscape)') .'</a></td> + </tr> + </table>'; + echo '<br /><table class="selection"> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print Quotation (Portrait)') .'</a></td> + </tr> + </table>'; + }else{ + + prnMsg(_('Order Number') .' ' . $_SESSION['ExistingOrder'.$identifier] . ' ' . _('has been updated'),'success'); + + echo '<br /> + <table class="selection"> + <tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> + <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> + <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> + <td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td> + </tr>'; + echo '<tr> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> + <td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td> + </tr> + </table>'; + }//end of print orders include('includes/footer.inc'); exit; } Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-06-29 19:55:24 UTC (rev 9256) +++ trunk/SelectSalesOrder.php 2012-06-29 19:55:35 UTC (rev 9257) @@ -875,6 +875,7 @@ $PrintDispatchNote = $rootpath . '/PrintCustOrder.php?TransNo=' . $myrow['orderno']; } $PrintQuotation = $rootpath . '/PDFQuotation.php?QuotationNo=' . $myrow['orderno']; + $PrintQuotationPortrait = $rootpath . '/PDFQuotationPortrait.php?QuotationNo=' . $myrow['orderno']; $FormatedDelDate = ConvertSQLDate($myrow['deliverydate']); $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = locale_money_format($myrow['ordervalue'],$_SESSION['CompanyRecord']['currencydefault']); @@ -942,25 +943,26 @@ } else { //must be quotes only printf('<td><a href="%s">%s</a></td> - <td> <a href="%s" >' . $PrintText . '</a> </td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - </tr>', - $ModifyPage, - $myrow['orderno'], - $PrintQuotation, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue); + <td><a target="_blank" href="%s">' . _('Landscape') . '</a> <a target="_blank" href="%s">' . _('Portrait') . '</a></td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + </tr>', + $ModifyPage, + $myrow['orderno'], + $PrintQuotation, + $PrintQuotationPortrait, + $myrow['name'], + $myrow['brname'], + $myrow['customerref'], + $FormatedOrderDate, + $FormatedDelDate, + html_entity_decode($myrow['deliverto'],ENT_QUOTES,'UTF-8'), + $FormatedOrderValue); } $i++; $j++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-02 21:48:53
|
Revision: 9365 http://weberp.svn.sourceforge.net/weberp/?rev=9365&view=rev Author: tim_schofield Date: 2012-07-02 21:48:47 +0000 (Mon, 02 Jul 2012) Log Message: ----------- New dashboard page Modified Paths: -------------- trunk/includes/main_header.inc Added Paths: ----------- trunk/new_index.php Modified: trunk/includes/main_header.inc =================================================================== --- trunk/includes/main_header.inc 2012-07-02 21:48:33 UTC (rev 9364) +++ trunk/includes/main_header.inc 2012-07-02 21:48:47 UTC (rev 9365) @@ -29,56 +29,16 @@ } else { echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />'; } -echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />'; +echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/sub.css" rel="stylesheet" type="text/css" />'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; +echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/FormFunctions.js"></script>'; +echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/GraphFunctions.js"></script>'; echo '</head>'; -echo '<body>'; -echo '<table class="selection" cellpadding="0" cellspacing="0" style="margin-top:3px; width:99%;">'; -echo '<tr>'; -echo '<td colspan="2" rowspan="2">'; +echo '<body onload="startTime()">'; -if (isset($title)) { - echo '<table cellpadding="0" cellspacing="0" border="0" id="quick_menu" class="quick_menu">'; - echo '<tr>'; - echo '<td align="left" style="width:100%;" class="quick_menu_left">'; -// Use icons for company and user data, saves screen realestate, use alt tag in case theme icon not avail. - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/company.png" title="' . _('Company') . '" alt="' . _('Company') . '" style="width: 24px" />'; - echo ' ' . stripslashes($_SESSION['CompanyRecord']['coyname']) . ' <a href="' . $rootpath . '/UserSettings.php"><img src="'.$rootpath.'/css/'.$theme.'/images/user.png" title="User" alt="' . _('User') . '" style="width: 16px" />' . stripslashes($_SESSION['UsersRealName']) . '</a>'; -// Make the title text a class, can be set to display:none is some themes - echo '<br />' . $title . '</td>'; - echo '<td class="quick_menu_tabs">'; - echo '<table cellpadding="0" cellspacing="0" class="quick_menu_tabs"><tr>'; - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/index.php"><span style="text-decoration:underline;">1</span> ' . _('Main Menu') . '</a></td>'; +echo '<div class="main_title_bar">' . $ProjectName . ' + <span id="clock" style="float: right; margin-right: 5px;"></span> + </div>'; - if (count($_SESSION['AllowedPageSecurityTokens'])>1){ - - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectCustomer.php"><span style="text-decoration:underline;">2</span> ' . _('Customers') . '</a></td>'; - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectProduct.php"><span style="text-decoration:underline;">3</span> ' . _('Items') . '</a></td>'; - - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/SelectSupplier.php"><span style="text-decoration:underline;">4</span> ' . _('Suppliers') . '</a></td>'; - - $DefaultManualLink = '<td class="quick_menu_tab" align="center"><a rel="external" accesskey="8" href="' . $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; - - if (mb_substr($_SESSION['Language'],0,2) !='en'){ - if (file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ - echo '<td class="quick_menu_tab" align="center"><a target="_blank" href="' . $rootpath . '/locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'.$ViewTopic . $BookMark.'"><span style="text-decoration:underline;">8</span> ' . _('Manual') . '</a></td>'; - } else { - echo $DefaultManualLink; - } - } else { - echo $DefaultManualLink; - } - } - echo '<td class="quick_menu_tab" align="center"><a href="' . $rootpath . '/Logout.php" onclick="return confirm(\'' . _('Are you sure you wish to logout?') . '\');"><span style="text-decoration:underline;">0</span> ' . _('Logout') . '</a></td>'; - - echo '</tr></table>'; - echo '</td></tr></table>'; - -} - -echo '</td>'; -echo '</tr>'; -echo '</table>'; - ?> \ No newline at end of file Added: trunk/new_index.php =================================================================== --- trunk/new_index.php (rev 0) +++ trunk/new_index.php 2012-07-02 21:48:47 UTC (rev 9365) @@ -0,0 +1,16 @@ +<?php + +$PageSecurity = 1; +include('includes/session.inc'); + +$title = $ProjectName . ' - ' . _('Main Dashboard'); +include('includes/main_header.inc'); +echo '<div id="Mask"></div>'; +echo '<div id="SubWindow"></div>'; + +include('dashboard/CompanyInfo.php'); +include('dashboard/UserInfo.php'); +include('dashboard/SalesGraph.php'); +include('dashboard/StockBelowReorderLevel.php'); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-02 21:49:27
|
Revision: 9368 http://weberp.svn.sourceforge.net/weberp/?rev=9368&view=rev Author: tim_schofield Date: 2012-07-02 21:49:21 +0000 (Mon, 02 Jul 2012) Log Message: ----------- New dashboard functions Added Paths: ----------- trunk/dashboard/ trunk/dashboard/CompanyInfo.php trunk/dashboard/SalesGraph.php trunk/dashboard/StockBelowReorderLevel.php trunk/dashboard/UserInfo.php Added: trunk/dashboard/CompanyInfo.php =================================================================== --- trunk/dashboard/CompanyInfo.php (rev 0) +++ trunk/dashboard/CompanyInfo.php 2012-07-02 21:49:21 UTC (rev 9368) @@ -0,0 +1,68 @@ +<?php + +require_once('includes/session.inc'); + +$AppWidthPercent = 20; +$AppTitle = _('Company Information'); +$AppMaxRecords = 10; +$FontSize = 10; +$FontWeight = 'normal'; +$Background = '#BDC0E6'; + +$sql = "SELECT coyname, + regoffice1, + regoffice2, + regoffice3, + regoffice4, + regoffice5, + regoffice6, + telephone, + fax, + email, + gstno, + companynumber, + currencies.currency + FROM companies + LEFT JOIN currencies + ON companies.currencydefault=currencies.currabrev"; +$result = DB_query($sql, $db); + +echo '<table width="' . $AppWidthPercent . '%" class="AppWindow" style="background:'.$Background.'"> + <tr> + <th colspan="4" class="AppHeader">' . $AppTitle . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['coyname'] . '</td></tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice1'] . '</td>'; + echo '<td>Tel - ' . $myrow['telephone'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice2'] . '</td>'; + echo '<td> Fax - ' . $myrow['fax'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice3'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice4'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice5'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice6'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['regoffice6'] . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . $myrow['currency'] . '</td> + </tr>'; +} + +echo '</table>'; + +?> \ No newline at end of file Added: trunk/dashboard/SalesGraph.php =================================================================== --- trunk/dashboard/SalesGraph.php (rev 0) +++ trunk/dashboard/SalesGraph.php 2012-07-02 21:49:21 UTC (rev 9368) @@ -0,0 +1,43 @@ +<?php + +require_once('includes/session.inc'); + +$AppWidthPercent = 40; +$AppTitle = _('Sales By Value This Year'); +$AppMaxRecords = 10; +$FontSize = 10; +$FontWeight = 'normal'; +$Background = '#D4F1C0'; + +$sql = ""; + +echo '<table width="' . $AppWidthPercent . '%" class="AppWindow" style="background:'.$Background.';"> + <tr> + <th colspan="4" class="AppHeader">' . $AppTitle . '</th> + </tr>'; + +echo '<tr> + <td><canvas id="graph" width="300px" height="150px"></canvas></td> + </tr>'; + +echo '</table>'; +echo '<script> +var graphCanvas = document.getElementById(\'graph\'); +// Ensure that the element is available within the DOM +if (graphCanvas && graphCanvas.getContext) { + // Open a 2D context within the canvas + var context = graphCanvas.getContext(\'2d\'); + + // Bar chart data + var data = new Array(5); + data[0] = "apples,400"; + data[1] = "oranges,120"; + data[2] = "bananas,80"; + data[3] = "kiwis,230"; + data[4] = "tangarines,340"; + + // Draw the bar chart + drawBarChart(context, data, 50, 50, (graphCanvas.height - 20), 30); +} +</script>'; +?> \ No newline at end of file Added: trunk/dashboard/StockBelowReorderLevel.php =================================================================== --- trunk/dashboard/StockBelowReorderLevel.php (rev 0) +++ trunk/dashboard/StockBelowReorderLevel.php 2012-07-02 21:49:21 UTC (rev 9368) @@ -0,0 +1,45 @@ +<?php + +require_once('includes/session.inc'); + +$AppWidthPercent = 20; +$AppTitle = _('Items below Re-order Level'); +$AppMaxRecords = 10; +$FontSize = 10; +$FontWeight = 'normal'; +$Background = '#FFFE84'; + +$sql = "SELECT locations.locationname, + locstock.stockid, + stockmaster.description, + stockmaster.longdescription, + stockmaster.decimalplaces, + locstock.quantity, + locstock.reorderlevel + FROM locstock + LEFT JOIN stockmaster + ON locstock.stockid=stockmaster.stockid + LEFT JOIN locations + ON locstock.loccode=locations.loccode + WHERE locstock.quantity < locstock.reorderlevel + ORDER BY (locstock.quantity-locstock.reorderlevel) ASC + LIMIT " . $AppMaxRecords; +$result = DB_query($sql, $db); + +echo '<table width="' . $AppWidthPercent . '%" class="AppWindow" style="background:'.$Background.'"> + <tr> + <th colspan="4" class="AppHeader">' . $AppTitle . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';" title="' . $myrow['longdescription'] . '"> + <td>' . $myrow['locationname'] . '</td> + <td>' . InternalLink('', 'SelectProduct.php?StockID=' . $myrow['stockid'], $myrow['description'], 'AppLink') . '</td> + <td class="number">' . locale_number_format($myrow['quantity'], $myrow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($myrow['reorderlevel'], $myrow['decimalplaces']) . '</td> + </tr>'; +} + +echo '</table>'; + +?> \ No newline at end of file Added: trunk/dashboard/UserInfo.php =================================================================== --- trunk/dashboard/UserInfo.php (rev 0) +++ trunk/dashboard/UserInfo.php 2012-07-02 21:49:21 UTC (rev 9368) @@ -0,0 +1,55 @@ +<?php + +require_once('includes/session.inc'); + +$AppWidthPercent = 20; +$AppTitle = _('User Information'); +$AppMaxRecords = 10; +$FontSize = 10; +$FontWeight = 'normal'; +$Background = '#DEE1FF'; + +$sql = "SELECT userid, + realname, + phone, + email, + theme, + language + FROM www_users"; +$result = DB_query($sql, $db); + +echo '<table width="' . $AppWidthPercent . '%" class="AppWindow" style="background:'.$Background.'"> + <tr> + <th colspan="4" class="AppHeader">' . $AppTitle . '</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . _('User ID') . ':</td> + <td>' . InternalLink('', 'UserSettings.php', $myrow['userid'], 'AppLink') . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . _('Name') . ':</td> + <td>' . InternalLink('', 'UserSettings.php', $myrow['realname'], 'AppLink') . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . _('Telephone') . ':</td> + <td>' . InternalLink('', 'UserSettings.php', $myrow['phone'], 'AppLink') . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . _('Email') . ':</td> + <td>' . InternalLink('', 'UserSettings.php', $myrow['email'], 'AppLink') . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . _('Theme') . ':</td> + <td>' . InternalLink('', 'UserSettings.php', $myrow['theme'], 'AppLink') . '</td> + </tr>'; + echo '<tr style="font-size:' . $FontSize . 'px; font-weight:' . $FontWeight . ';"> + <td>' . _('Language') . ':</td> + <td>' . InternalLink('', 'UserSettings.php', $myrow['language'], 'AppLink') . '</td> + </tr>'; +} + +echo '</table>'; + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-02 21:49:48
|
Revision: 9370 http://weberp.svn.sourceforge.net/weberp/?rev=9370&view=rev Author: tim_schofield Date: 2012-07-02 21:49:42 +0000 (Mon, 02 Jul 2012) Log Message: ----------- New interface improvements Modified Paths: -------------- trunk/includes/ItemSearch.php trunk/includes/header.inc trunk/index.php Modified: trunk/includes/ItemSearch.php =================================================================== --- trunk/includes/ItemSearch.php 2012-07-02 21:49:30 UTC (rev 9369) +++ trunk/includes/ItemSearch.php 2012-07-02 21:49:42 UTC (rev 9370) @@ -5,7 +5,7 @@ function ShowItemSearchFields($rootpath, $theme, $db, $identifier, $MBFlags, $StockTypes, $SearchOrSelect) { $PathPrefix=$_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF']) . '/'; - echo '<table width="98%"> + echo '<table width="98%" style="background: transparent; z-index: 3"> <tr> <td width="33%" valign="top">'; Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-07-02 21:49:30 UTC (rev 9369) +++ trunk/includes/header.inc 2012-07-02 21:49:42 UTC (rev 9370) @@ -30,7 +30,7 @@ echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8; content="no-cache" />'; } echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; -echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/sorttable.js"></script>'; + echo '</head>'; echo '<body>'; Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-07-02 21:49:30 UTC (rev 9369) +++ trunk/index.php 2012-07-02 21:49:42 UTC (rev 9370) @@ -12,6 +12,7 @@ echo '<div id="Mask"></div>'; echo '<div id="SubWindow"></div>'; echo '<div id="HelpWindow"></div>'; + if ($_SESSION['UserSupplierID']!=''){ echo '<table class="table_index"> <tr> @@ -110,7 +111,7 @@ if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { echo '<tr> <td class="menu_group_item"> - <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p> + <p>• <a onclick="return OpenSubWindow(\'' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'\')" href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p> </td> </tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-04 11:35:47
|
Revision: 9374 http://weberp.svn.sourceforge.net/weberp/?rev=9374&view=rev Author: tim_schofield Date: 2012-07-04 11:35:37 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Change file name for compatability with Phils branch Added Paths: ----------- trunk/MainMenuLinksArray.php Removed Paths: ------------- trunk/includes/IndexArray.php Copied: trunk/MainMenuLinksArray.php (from rev 9372, trunk/includes/IndexArray.php) =================================================================== --- trunk/MainMenuLinksArray.php (rev 0) +++ trunk/MainMenuLinksArray.php 2012-07-04 11:35:37 UTC (rev 9374) @@ -0,0 +1,585 @@ +<?php +$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); +$ReportList = array('orders'=>'ord', + 'AR'=>'ar', + 'AP'=>'ap', + 'PO'=>'prch', + 'stock'=>'inv', + 'manuf'=>'man', + 'GL'=>'gl', + 'FA'=>'fa', + 'PC'=>'pc', + 'system'=>'sys', + 'Utilities'=>'utils' + ); + +/*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ +$ModuleList = array(_('Sales'), + _('Receivables'), + _('Payables'), + _('Purchases'), + _('Inventory'), + _('Manufacturing'), + _('General Ledger'), + _('Asset Manager'), + _('Petty Cash'), + _('Setup'), + _('Utilities')); + +$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), + _('Enter Counter Sales'), + _('Print Picking Lists'), + _('Outstanding Sales Orders/Quotations'), + _('Special Order'), + _('Recurring Order Template'), + _('Process Recurring Orders') + ); +$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', + '/CounterSales.php', + '/PDFPickingList.php', + '/SelectSalesOrder.php', + '/SpecialOrder.php', + '/SelectRecurringSalesOrder.php', + '/RecurringSalesOrdersProcess.php' + ); + +$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), + _('Print Price Lists'), + _('Order Status Report'), + _('Orders Invoiced Reports'), + _('Daily Sales Inquiry'), + _('Sales By Sales Type Inquiry'), + _('Sales By Category Inquiry'), + _('Top Sellers Inquiry'), + _('Order Delivery Differences Report'), + _('Delivery In Full On Time (DIFOT) Report'), + _('Sales Order Detail Or Summary Inquiries'), + _('Low Sales Items Report'), + _('Top Sales Items Report'), + _('Sales With Low Gross Profit Report') + ); + +$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', + '/PDFPriceList.php', + '/PDFOrderStatus.php', + '/PDFOrdersInvoiced.php', + '/DailySalesInquiry.php', + '/SalesByTypePeriodInquiry.php', + '/SalesCategoryPeriodInquiry.php', + '/SalesTopItemsInquiry.php', + '/PDFDeliveryDifferences.php', + '/PDFDIFOT.php', + '/SalesInquiry.php', + '/NoSalesItems.php', + '/TopItems.php', + '/PDFLowGP.php' + ); + +$MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), + _('Create Contract') + ); + +$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', + '/Contracts.php' + ); + +$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), + _('Create A Credit Note'), + _('Enter Receipts'), + _('Allocate Receipts or Credit Notes') + ); +$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', + '/SelectCreditItems.php?NewCredit=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', + '/CustomerAllocations.php' + ); + +$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), + _('Print Invoices or Credit Notes'), + _('Print Statements'), + _('Sales Analysis Reports'), + _('Aged Customer Balances/Overdues Report'), + _('Re-Print A Deposit Listing'), + _('Debtor Balances At A Prior Month End'), + _('Customer Listing By Area/Salesperson'), + _('Sales Graphs'), + _('List Daily Transactions'), + _('Customer Transaction Inquiries') + ); + +$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', + '/PrintCustTrans.php', + '/PrintCustStatements.php', + '/SalesAnalRepts.php', + '/AgedDebtors.php', + '/PDFBankingSummary.php', + '/DebtorsAtPeriodEnd.php', + '/PDFCustomerList.php', + '/SalesGraph.php', + '/PDFCustTransListing.php', + '/CustomerTransInquiry.php' + ); + +$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), + _('Customers') + ); +$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', + '/SelectCustomer.php' + ); + +$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), + _('Supplier Allocations') + ); +$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', + '/SupplierAllocations.php' + ); + +$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), + _('Payment Run Report'), + _('Remittance Advices'), + _('Outstanding GRNs Report'), + _('Supplier Balances At A Prior Month End'), + _('List Daily Transactions'), + _('Supplier Transaction Inquiries') + ); + +$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', + '/SuppPaymentRun.php', + '/PDFRemittanceAdvice.php', + '/OutstandingGRNs.php', + '/SupplierBalsAtPeriodEnd.php', + '/PDFSuppTransListing.php', + '/SupplierTransInquiry.php' + ); + +$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), + _('Maintain Factor Companies') + ); +$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', + '/Factors.php' + ); + +$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), + _('Add Purchase Order'), + _('Create a New Tender'), + _('Edit Existing Tenders'), + _('Process Tenders and Offers'), + _('Orders to Authorise'), + _('Shipment Entry'), + _('Select A Shipment') + ); +$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/PO_Header.php?NewOrder=Yes', + '/SupplierTenderCreate.php?New=Yes', + '/SupplierTenderCreate.php?Edit=Yes', + '/OffersReceived.php', + '/PO_AuthoriseMyOrders.php', + '/SelectSupplier.php', + '/Shipt_Select.php' + ); + +$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), + _('Purchase Order Detail Or Summary Inquiries'), + _('Supplier Price List') + ); + +$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', + '/POReport.php', + '/SuppPriceList.php' + ); + +$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') + ); +$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' + ); +$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), + _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), + _('Bulk Inventory Transfer') . ' - ' . _('Receive'), + _('Inventory Location Transfers'), + _('Inventory Adjustments'), + _('Reverse Goods Received'), + _('Enter Stock Counts'), + _('Create a New Internal Stock Request'), + _('Authorise Internal Stock Requests'), + _('Fulfill Internal Stock Requests') + ); +$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/StockLocTransfer.php', + '/StockLocTransferReceive.php', + '/StockTransfers.php?New=Yes', + '/StockAdjustments.php?NewAdjustment=Yes', + '/ReverseGRN.php', + '/StockCounts.php', + '/InternalStockRequest.php?New=Yes', + '/InternalStockRequestAuthorisation.php', + '/InternalStockRequestFulfill.php' + ); + +$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), + _('Print Price Labels'), + _('Reprint GRN'), + _('Reprint A Stock Transfer Note'), + _('Inventory Item Movements'), + _('Inventory Item Status'), + _('Inventory Item Usage'), + _('Inventory Quantities'), + _('Reorder Level'), + _('Stock Dispatch'), + _('Inventory Valuation Report'), + _('Inventory Planning Report'), + _('Inventory Planning Based On Preferred Supplier Data'), + _('Inventory Stock Check Sheets'), + _('Make Inventory Quantities CSV'), + _('Compare Counts Vs Stock Check Data'), + _('All Inventory Movements By Location/Date'), + _('List Inventory Status By Location/Category'), + _('Historical Stock Quantity By Location/Category'), + _('List Negative Stocks'), + _('Period Stock Transaction Listing'), + _('Stock Transfer Note') + ); + +$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', + '/PDFPrintLabel.php', + '/ReprintGRN.php', + '/PDFStockLocTransfer.php', + '/StockMovements.php', + '/StockStatus.php', + '/StockUsage.php', + '/InventoryQuantities.php', + '/ReorderLevel.php', + '/StockDispatch.php', + '/InventoryValuation.php', + '/InventoryPlanning.php', + '/InventoryPlanningPrefSupplier.php', + '/StockCheck.php', + '/StockQties_csv.php', + '/PDFStockCheckComparison.php', + '/StockLocMovements.php', + '/StockLocStatus.php', + '/StockQuantityByDate.php', + '/PDFStockNegatives.php', + '/PDFPeriodStockTransListing.php', + '/PDFStockTransfer.php' + ); + +$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), + _('Select An Item'), + _('Sales Category Maintenance'), + _('Add or Update Prices Based On Costs'), + _('View or Update Prices Based On Costs'), + _('Reorder Level By Category/Location'), + _('Item Manufacturers') + ); +$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', + '/SelectProduct.php', + '/SalesCategories.php', + '/PricesBasedOnMarkUp.php', + '/PricesByCost.php', + '/ReorderLevelLocation.php', + '/Manufacturers.php' + ); + +$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), + _('Select A Work Order') + ); +$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', + '/SelectWorkOrder.php' + ); + +$MenuItems['manuf']['Reports']['Caption'] = array ( _('Costed Bill Of Material Inquiry'), + _('Where Used Inquiry'), + _('Bill Of Material Listing'), + _('Indented Bill Of Material Listing'), + _('List Components Required'), + _('Indented Where Used Listing'), + _('MRP'), + _('MRP Shortages'), + _('MRP Suggested Purchase Orders'), + _('MRP Suggested Work Orders'), + _('MRP Reschedules Required') + ); + +$MenuItems['manuf']['Reports']['URL'] = array ( '/BOMInquiry.php', + '/WhereUsedInquiry.php', + '/BOMListing.php', + '/BOMIndented.php', + '/BOMExtendedQty.php', + '/BOMIndentedReverse.php', + '/MRPReport.php', + '/MRPShortages.php', + '/MRPPlannedPurchaseOrders.php', + '/MRPPlannedWorkOrders.php', + '/MRPReschedules.php' + ); + +$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), + _('Bills Of Material'), + _('Copy BOM To New Item'), + _('Master Schedule'), + _('Auto Create Master Schedule'), + _('MRP Calculation') + ); + +$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', + '/BOMs.php', + '/CopyBOM.php', + '/MRPDemands.php', + '/MRPCreateDemands.php', + '/MRP.php' + ); + +$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), + _('Bank Account Receipts Entry'), + _('Journal Entry'), + _('Bank Account Payments Matching'), + _('Bank Account Receipts Matching') + ); + +$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', + '/GLJournal.php?NewJournal=Yes', + '/BankMatching.php?Type=Payments', + '/BankMatching.php?Type=Receipts' + ); + +$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), + _('Account Inquiry'), + _('Account Listing'), + _('Account Listing to CSV File'), + _('General Ledger Journal Inquiry'), + _('Bank Account Reconciliation Statement'), + _('Cheque Payments Listing'), + _('Daily Bank Transactions'), + _('Profit and Loss Statement'), + _('Balance Sheet'), + _('Tag Reports'), + _('Tax Reports') + ); + +$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', + '/SelectGLAccount.php', + '/GLAccountReport.php', + '/GLAccountCSV.php', + '/GLJournalInquiry.php', + '/BankReconciliation.php', + '/PDFChequeListing.php', + '/DailyBankTransactions.php', + '/GLProfit_Loss.php', + '/GLBalanceSheet.php', + '/GLTagProfit_Loss.php', + '/Tax.php' + ); + +$MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), + _('GL Budgets'), + _('Account Groups'), + _('Account Sections'), + _('GL Tags') + ); + +$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', + '/GLBudgets.php', + '/AccountGroups.php', + '/AccountSections.php', + '/GLTags.php' + ); + +$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), + _('Select an Asset'), + _('Change Asset Location'), + _('Depreciation Journal') + ); + +$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', + '/SelectAsset.php', + '/FixedAssetTransfer.php', + '/FixedAssetDepreciation.php' + ); + +$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), + ); + +$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', + ); + +$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), + _('Add or Maintain Asset Locations') + ); + +$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', + '/FixedAssetLocations.php' + ); + +$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), + _('Claim Expenses From PC Tab'), + _('Expenses Authorisation') + ); + +$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', + '/PcClaimExpensesFromTab.php', + '/PcAuthorizeExpenses.php' + ); + +$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), + ); + +$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', + ); + +$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), + _('PC Tabs'), + _('PC Expenses'), + _('Expenses for Type of PC Tab') + ); + +$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', + '/PcTabs.php', + '/PcExpenses.php', + '/PcExpensesTypeTab.php' + ); + +$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), + _('Configuration Settings'), + _('User Maintenance'), + _('Maintain Security Tokens'), + _('Access permissions maintenance'), + _('Page Security Settings'), + _('Bank Accounts'), + _('Currency Maintenance'), + _('Tax Authorities and Rates Maintenance'), + _('Tax Group Maintenance'), + _('Dispatch Tax Province Maintenance'), + _('Tax Category Maintenance'), + _('List Periods Defined'), + _('Report Builder Tool'), + _('View Audit Trail'), + _('Geocode Setup'), + _('Form Layout Editor'), + _('Label Templates Maintenance'), + _('SMTP Server Details') + ); + +$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', + '/SystemParameters.php', + '/WWW_Users.php', + '/SecurityTokens.php', + '/WWW_Access.php', + '/PageSecurity.php', + '/BankAccounts.php', + '/Currencies.php', + '/TaxAuthorities.php', + '/TaxGroups.php', + '/TaxProvinces.php', + '/TaxCategories.php', + '/PeriodsInquiry.php', + '/reportwriter/admin/ReportCreator.php', + '/AuditTrail.php', + '/GeocodeSetup.php', + '/FormDesigner.php', + '/Labels.php', + '/SMTPServer.php' + ); + +$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), + _('Customer Types'), + _('Supplier Types'), + _('Credit Status'), + _('Payment Terms'), + _('Set Purchase Order Authorisation levels'), + _('Payment Methods'), + _('Sales People'), + _('Sales Areas'), + _('Shippers'), + _('Sales GL Interface Postings'), + _('COGS GL Interface Postings'), + _('Freight Costs Maintenance'), + _('Discount Matrix') + ); + +$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', + '/CustomerTypes.php', + '/SupplierTypes.php', + '/CreditStatus.php', + '/PaymentTerms.php', + '/PO_AuthorisationLevels.php', + '/PaymentMethods.php', + '/SalesPeople.php', + '/Areas.php', + '/Shippers.php', + '/SalesGLPostings.php', + '/COGSGLPostings.php', + '/FreightCosts.php', + '/DiscountMatrix.php' + ); + +$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), + _('Inventory Locations Maintenance'), + _('Discount Category Maintenance'), + _('Units of Measure'), + _('MRP Available Production Days'), + _('MRP Demand Types'), + _('Create and Manage Database Backups'), + _('Maintain Internal Departments') + ); + +$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', + '/Locations.php', + '/DiscountCategories.php', + '/UnitsOfMeasure.php', + '/MRPCalendar.php', + '/MRPDemandTypes.php', + '/BackupDatabase.php', + '/Departments.php' + ); + +$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier Code'), + _('Change A Location Code'), + _('Update costs for all BOM items, from the bottom up'), + _('Re-apply costs to Sales Analysis'), + _('Delete sales transactions'), + _('Reverse all supplier payments on a specified date')); + +$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', + '/Z_ChangeBranchCode.php', + '/Z_ChangeStockCode.php', + '/Z_ChangeSupplierCode.php', + '/Z_ChangeLocationCode.php', + '/Z_BottomUpCosts.php', + '/Z_ReApplyCostToSA.php', + '/Z_DeleteSalesTransActions.php', + '/Z_ReverseSuppPaymentRun.php'); + +$MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), + _('Show Local Currency Total Suppliers Balances'), + _('Show General Transactions That Do Not Balance'), + _('Sales Integrity Check')); + +$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.php', + '/Z_SalesIntegrityCheck.php'); + +$MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), + _('Make New Company'), + _('Data Export Options'), + _('Import Stock Items from .csv'), + _('Import Fixed Assets from .csv file'), + _('Create new company template SQL file and submit to webERP'), + _('Re-calculate brought forward amounts in GL'), + _('Re-Post all GL transactions from a specified period') + ); + +$MenuItems['Utilities']['Maintenance']['URL'] = array ('/Z_poAdmin.php', + '/Z_MakeNewCompany.php', + '/Z_DataExport.php', + '/Z_ImportStocks.php', + '/Z_ImportFixedAssets.php', + '/Z_CreateCompanyTemplateFile.php', + '/Z_UpdateChartDetailsBFwd.php', + '/Z_RePostGLFromPeriod.php' + ); +?> \ No newline at end of file Deleted: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-07-04 10:42:16 UTC (rev 9373) +++ trunk/includes/IndexArray.php 2012-07-04 11:35:37 UTC (rev 9374) @@ -1,585 +0,0 @@ -<?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); -$ReportList = array('orders'=>'ord', - 'AR'=>'ar', - 'AP'=>'ap', - 'PO'=>'prch', - 'stock'=>'inv', - 'manuf'=>'man', - 'GL'=>'gl', - 'FA'=>'fa', - 'PC'=>'pc', - 'system'=>'sys', - 'Utilities'=>'utils' - ); - -/*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ -$ModuleList = array(_('Sales'), - _('Receivables'), - _('Payables'), - _('Purchases'), - _('Inventory'), - _('Manufacturing'), - _('General Ledger'), - _('Asset Manager'), - _('Petty Cash'), - _('Setup'), - _('Utilities')); - -$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), - _('Enter Counter Sales'), - _('Print Picking Lists'), - _('Outstanding Sales Orders/Quotations'), - _('Special Order'), - _('Recurring Order Template'), - _('Process Recurring Orders') - ); -$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', - '/CounterSales.php', - '/PDFPickingList.php', - '/SelectSalesOrder.php', - '/SpecialOrder.php', - '/SelectRecurringSalesOrder.php', - '/RecurringSalesOrdersProcess.php' - ); - -$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), - _('Print Price Lists'), - _('Order Status Report'), - _('Orders Invoiced Reports'), - _('Daily Sales Inquiry'), - _('Sales By Sales Type Inquiry'), - _('Sales By Category Inquiry'), - _('Top Sellers Inquiry'), - _('Order Delivery Differences Report'), - _('Delivery In Full On Time (DIFOT) Report'), - _('Sales Order Detail Or Summary Inquiries'), - _('Low Sales Items Report'), - _('Top Sales Items Report'), - _('Sales With Low Gross Profit Report') - ); - -$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', - '/PDFPriceList.php', - '/PDFOrderStatus.php', - '/PDFOrdersInvoiced.php', - '/DailySalesInquiry.php', - '/SalesByTypePeriodInquiry.php', - '/SalesCategoryPeriodInquiry.php', - '/SalesTopItemsInquiry.php', - '/PDFDeliveryDifferences.php', - '/PDFDIFOT.php', - '/SalesInquiry.php', - '/NoSalesItems.php', - '/TopItems.php', - '/PDFLowGP.php' - ); - -$MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), - _('Create Contract') - ); - -$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', - '/Contracts.php' - ); - -$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), - _('Create A Credit Note'), - _('Enter Receipts'), - _('Allocate Receipts or Credit Notes') - ); -$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', - '/SelectCreditItems.php?NewCredit=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', - '/CustomerAllocations.php' - ); - -$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), - _('Print Invoices or Credit Notes'), - _('Print Statements'), - _('Sales Analysis Reports'), - _('Aged Customer Balances/Overdues Report'), - _('Re-Print A Deposit Listing'), - _('Debtor Balances At A Prior Month End'), - _('Customer Listing By Area/Salesperson'), - _('Sales Graphs'), - _('List Daily Transactions'), - _('Customer Transaction Inquiries') - ); - -$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', - '/PrintCustTrans.php', - '/PrintCustStatements.php', - '/SalesAnalRepts.php', - '/AgedDebtors.php', - '/PDFBankingSummary.php', - '/DebtorsAtPeriodEnd.php', - '/PDFCustomerList.php', - '/SalesGraph.php', - '/PDFCustTransListing.php', - '/CustomerTransInquiry.php' - ); - -$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), - _('Customers') - ); -$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', - '/SelectCustomer.php' - ); - -$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), - _('Supplier Allocations') - ); -$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', - '/SupplierAllocations.php' - ); - -$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), - _('Payment Run Report'), - _('Remittance Advices'), - _('Outstanding GRNs Report'), - _('Supplier Balances At A Prior Month End'), - _('List Daily Transactions'), - _('Supplier Transaction Inquiries') - ); - -$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', - '/SuppPaymentRun.php', - '/PDFRemittanceAdvice.php', - '/OutstandingGRNs.php', - '/SupplierBalsAtPeriodEnd.php', - '/PDFSuppTransListing.php', - '/SupplierTransInquiry.php' - ); - -$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), - _('Maintain Factor Companies') - ); -$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', - '/Factors.php' - ); - -$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), - _('Add Purchase Order'), - _('Create a New Tender'), - _('Edit Existing Tenders'), - _('Process Tenders and Offers'), - _('Orders to Authorise'), - _('Shipment Entry'), - _('Select A Shipment') - ); -$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/PO_Header.php?NewOrder=Yes', - '/SupplierTenderCreate.php?New=Yes', - '/SupplierTenderCreate.php?Edit=Yes', - '/OffersReceived.php', - '/PO_AuthoriseMyOrders.php', - '/SelectSupplier.php', - '/Shipt_Select.php' - ); - -$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), - _('Purchase Order Detail Or Summary Inquiries'), - _('Supplier Price List') - ); - -$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', - '/POReport.php', - '/SuppPriceList.php' - ); - -$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') - ); -$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' - ); -$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), - _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), - _('Bulk Inventory Transfer') . ' - ' . _('Receive'), - _('Inventory Location Transfers'), - _('Inventory Adjustments'), - _('Reverse Goods Received'), - _('Enter Stock Counts'), - _('Create a New Internal Stock Request'), - _('Authorise Internal Stock Requests'), - _('Fulfill Internal Stock Requests') - ); -$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/StockLocTransfer.php', - '/StockLocTransferReceive.php', - '/StockTransfers.php?New=Yes', - '/StockAdjustments.php?NewAdjustment=Yes', - '/ReverseGRN.php', - '/StockCounts.php', - '/InternalStockRequest.php?New=Yes', - '/InternalStockRequestAuthorisation.php', - '/InternalStockRequestFulfill.php' - ); - -$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), - _('Print Price Labels'), - _('Reprint GRN'), - _('Reprint A Stock Transfer Note'), - _('Inventory Item Movements'), - _('Inventory Item Status'), - _('Inventory Item Usage'), - _('Inventory Quantities'), - _('Reorder Level'), - _('Stock Dispatch'), - _('Inventory Valuation Report'), - _('Inventory Planning Report'), - _('Inventory Planning Based On Preferred Supplier Data'), - _('Inventory Stock Check Sheets'), - _('Make Inventory Quantities CSV'), - _('Compare Counts Vs Stock Check Data'), - _('All Inventory Movements By Location/Date'), - _('List Inventory Status By Location/Category'), - _('Historical Stock Quantity By Location/Category'), - _('List Negative Stocks'), - _('Period Stock Transaction Listing'), - _('Stock Transfer Note') - ); - -$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', - '/PDFPrintLabel.php', - '/ReprintGRN.php', - '/PDFStockLocTransfer.php', - '/StockMovements.php', - '/StockStatus.php', - '/StockUsage.php', - '/InventoryQuantities.php', - '/ReorderLevel.php', - '/StockDispatch.php', - '/InventoryValuation.php', - '/InventoryPlanning.php', - '/InventoryPlanningPrefSupplier.php', - '/StockCheck.php', - '/StockQties_csv.php', - '/PDFStockCheckComparison.php', - '/StockLocMovements.php', - '/StockLocStatus.php', - '/StockQuantityByDate.php', - '/PDFStockNegatives.php', - '/PDFPeriodStockTransListing.php', - '/PDFStockTransfer.php' - ); - -$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), - _('Select An Item'), - _('Sales Category Maintenance'), - _('Add or Update Prices Based On Costs'), - _('View or Update Prices Based On Costs'), - _('Reorder Level By Category/Location'), - _('Item Manufacturers') - ); -$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', - '/SelectProduct.php', - '/SalesCategories.php', - '/PricesBasedOnMarkUp.php', - '/PricesByCost.php', - '/ReorderLevelLocation.php', - '/Manufacturers.php' - ); - -$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), - _('Select A Work Order') - ); -$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', - '/SelectWorkOrder.php' - ); - -$MenuItems['manuf']['Reports']['Caption'] = array ( _('Costed Bill Of Material Inquiry'), - _('Where Used Inquiry'), - _('Bill Of Material Listing'), - _('Indented Bill Of Material Listing'), - _('List Components Required'), - _('Indented Where Used Listing'), - _('MRP'), - _('MRP Shortages'), - _('MRP Suggested Purchase Orders'), - _('MRP Suggested Work Orders'), - _('MRP Reschedules Required') - ); - -$MenuItems['manuf']['Reports']['URL'] = array ( '/BOMInquiry.php', - '/WhereUsedInquiry.php', - '/BOMListing.php', - '/BOMIndented.php', - '/BOMExtendedQty.php', - '/BOMIndentedReverse.php', - '/MRPReport.php', - '/MRPShortages.php', - '/MRPPlannedPurchaseOrders.php', - '/MRPPlannedWorkOrders.php', - '/MRPReschedules.php' - ); - -$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), - _('Bills Of Material'), - _('Copy BOM To New Item'), - _('Master Schedule'), - _('Auto Create Master Schedule'), - _('MRP Calculation') - ); - -$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', - '/BOMs.php', - '/CopyBOM.php', - '/MRPDemands.php', - '/MRPCreateDemands.php', - '/MRP.php' - ); - -$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), - _('Bank Account Receipts Entry'), - _('Journal Entry'), - _('Bank Account Payments Matching'), - _('Bank Account Receipts Matching') - ); - -$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', - '/GLJournal.php?NewJournal=Yes', - '/BankMatching.php?Type=Payments', - '/BankMatching.php?Type=Receipts' - ); - -$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), - _('Account Inquiry'), - _('Account Listing'), - _('Account Listing to CSV File'), - _('General Ledger Journal Inquiry'), - _('Bank Account Reconciliation Statement'), - _('Cheque Payments Listing'), - _('Daily Bank Transactions'), - _('Profit and Loss Statement'), - _('Balance Sheet'), - _('Tag Reports'), - _('Tax Reports') - ); - -$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', - '/SelectGLAccount.php', - '/GLAccountReport.php', - '/GLAccountCSV.php', - '/GLJournalInquiry.php', - '/BankReconciliation.php', - '/PDFChequeListing.php', - '/DailyBankTransactions.php', - '/GLProfit_Loss.php', - '/GLBalanceSheet.php', - '/GLTagProfit_Loss.php', - '/Tax.php' - ); - -$MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), - _('GL Budgets'), - _('Account Groups'), - _('Account Sections'), - _('GL Tags') - ); - -$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', - '/GLBudgets.php', - '/AccountGroups.php', - '/AccountSections.php', - '/GLTags.php' - ); - -$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), - _('Select an Asset'), - _('Change Asset Location'), - _('Depreciation Journal') - ); - -$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', - '/SelectAsset.php', - '/FixedAssetTransfer.php', - '/FixedAssetDepreciation.php' - ); - -$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), - ); - -$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', - ); - -$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), - _('Add or Maintain Asset Locations') - ); - -$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', - '/FixedAssetLocations.php' - ); - -$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), - _('Claim Expenses From PC Tab'), - _('Expenses Authorisation') - ); - -$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', - '/PcClaimExpensesFromTab.php', - '/PcAuthorizeExpenses.php' - ); - -$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), - ); - -$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', - ); - -$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), - _('PC Tabs'), - _('PC Expenses'), - _('Expenses for Type of PC Tab') - ); - -$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', - '/PcTabs.php', - '/PcExpenses.php', - '/PcExpensesTypeTab.php' - ); - -$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), - _('Configuration Settings'), - _('User Maintenance'), - _('Maintain Security Tokens'), - _('Access permissions maintenance'), - _('Page Security Settings'), - _('Bank Accounts'), - _('Currency Maintenance'), - _('Tax Authorities and Rates Maintenance'), - _('Tax Group Maintenance'), - _('Dispatch Tax Province Maintenance'), - _('Tax Category Maintenance'), - _('List Periods Defined'), - _('Report Builder Tool'), - _('View Audit Trail'), - _('Geocode Setup'), - _('Form Layout Editor'), - _('Label Templates Maintenance'), - _('SMTP Server Details') - ); - -$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', - '/SystemParameters.php', - '/WWW_Users.php', - '/SecurityTokens.php', - '/WWW_Access.php', - '/PageSecurity.php', - '/BankAccounts.php', - '/Currencies.php', - '/TaxAuthorities.php', - '/TaxGroups.php', - '/TaxProvinces.php', - '/TaxCategories.php', - '/PeriodsInquiry.php', - '/reportwriter/admin/ReportCreator.php', - '/AuditTrail.php', - '/GeocodeSetup.php', - '/FormDesigner.php', - '/Labels.php', - '/SMTPServer.php' - ); - -$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), - _('Customer Types'), - _('Supplier Types'), - _('Credit Status'), - _('Payment Terms'), - _('Set Purchase Order Authorisation levels'), - _('Payment Methods'), - _('Sales People'), - _('Sales Areas'), - _('Shippers'), - _('Sales GL Interface Postings'), - _('COGS GL Interface Postings'), - _('Freight Costs Maintenance'), - _('Discount Matrix') - ); - -$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', - '/CustomerTypes.php', - '/SupplierTypes.php', - '/CreditStatus.php', - '/PaymentTerms.php', - '/PO_AuthorisationLevels.php', - '/PaymentMethods.php', - '/SalesPeople.php', - '/Areas.php', - '/Shippers.php', - '/SalesGLPostings.php', - '/COGSGLPostings.php', - '/FreightCosts.php', - '/DiscountMatrix.php' - ); - -$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), - _('Inventory Locations Maintenance'), - _('Discount Category Maintenance'), - _('Units of Measure'), - _('MRP Available Production Days'), - _('MRP Demand Types'), - _('Create and Manage Database Backups'), - _('Maintain Internal Departments') - ); - -$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', - '/Locations.php', - '/DiscountCategories.php', - '/UnitsOfMeasure.php', - '/MRPCalendar.php', - '/MRPDemandTypes.php', - '/BackupDatabase.php', - '/Departments.php' - ); - -$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), - _('Change A Customer Branch Code'), - _('Change An Inventory Item Code'), - _('Change A Supplier Code'), - _('Change A Location Code'), - _('Update costs for all BOM items, from the bottom up'), - _('Re-apply costs to Sales Analysis'), - _('Delete sales transactions'), - _('Reverse all supplier payments on a specified date')); - -$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', - '/Z_ChangeBranchCode.php', - '/Z_ChangeStockCode.php', - '/Z_ChangeSupplierCode.php', - '/Z_ChangeLocationCode.php', - '/Z_BottomUpCosts.php', - '/Z_ReApplyCostToSA.php', - '/Z_DeleteSalesTransActions.php', - '/Z_ReverseSuppPaymentRun.php'); - -$MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), - _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance'), - _('Sales Integrity Check')); - -$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', - '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php', - '/Z_SalesIntegrityCheck.php'); - -$MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), - _('Make New Company'), - _('Data Export Options'), - _('Import Stock Items from .csv'), - _('Import Fixed Assets from .csv file'), - _('Create new company template SQL file and submit to webERP'), - _('Re-calculate brought forward amounts in GL'), - _('Re-Post all GL transactions from a specified period') - ); - -$MenuItems['Utilities']['Maintenance']['URL'] = array ('/Z_poAdmin.php', - '/Z_MakeNewCompany.php', - '/Z_DataExport.php', - '/Z_ImportStocks.php', - '/Z_ImportFixedAssets.php', - '/Z_CreateCompanyTemplateFile.php', - '/Z_UpdateChartDetailsBFwd.php', - '/Z_RePostGLFromPeriod.php' - ); -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-04 11:36:06
|
Revision: 9375 http://weberp.svn.sourceforge.net/weberp/?rev=9375&view=rev Author: tim_schofield Date: 2012-07-04 11:35:55 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Change file name for compatability with Phils branch Added Paths: ----------- trunk/includes/MainMenuLinksArray.php Removed Paths: ------------- trunk/MainMenuLinksArray.php Deleted: trunk/MainMenuLinksArray.php =================================================================== --- trunk/MainMenuLinksArray.php 2012-07-04 11:35:37 UTC (rev 9374) +++ trunk/MainMenuLinksArray.php 2012-07-04 11:35:55 UTC (rev 9375) @@ -1,585 +0,0 @@ -<?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); -$ReportList = array('orders'=>'ord', - 'AR'=>'ar', - 'AP'=>'ap', - 'PO'=>'prch', - 'stock'=>'inv', - 'manuf'=>'man', - 'GL'=>'gl', - 'FA'=>'fa', - 'PC'=>'pc', - 'system'=>'sys', - 'Utilities'=>'utils' - ); - -/*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ -$ModuleList = array(_('Sales'), - _('Receivables'), - _('Payables'), - _('Purchases'), - _('Inventory'), - _('Manufacturing'), - _('General Ledger'), - _('Asset Manager'), - _('Petty Cash'), - _('Setup'), - _('Utilities')); - -$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), - _('Enter Counter Sales'), - _('Print Picking Lists'), - _('Outstanding Sales Orders/Quotations'), - _('Special Order'), - _('Recurring Order Template'), - _('Process Recurring Orders') - ); -$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', - '/CounterSales.php', - '/PDFPickingList.php', - '/SelectSalesOrder.php', - '/SpecialOrder.php', - '/SelectRecurringSalesOrder.php', - '/RecurringSalesOrdersProcess.php' - ); - -$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), - _('Print Price Lists'), - _('Order Status Report'), - _('Orders Invoiced Reports'), - _('Daily Sales Inquiry'), - _('Sales By Sales Type Inquiry'), - _('Sales By Category Inquiry'), - _('Top Sellers Inquiry'), - _('Order Delivery Differences Report'), - _('Delivery In Full On Time (DIFOT) Report'), - _('Sales Order Detail Or Summary Inquiries'), - _('Low Sales Items Report'), - _('Top Sales Items Report'), - _('Sales With Low Gross Profit Report') - ); - -$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', - '/PDFPriceList.php', - '/PDFOrderStatus.php', - '/PDFOrdersInvoiced.php', - '/DailySalesInquiry.php', - '/SalesByTypePeriodInquiry.php', - '/SalesCategoryPeriodInquiry.php', - '/SalesTopItemsInquiry.php', - '/PDFDeliveryDifferences.php', - '/PDFDIFOT.php', - '/SalesInquiry.php', - '/NoSalesItems.php', - '/TopItems.php', - '/PDFLowGP.php' - ); - -$MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), - _('Create Contract') - ); - -$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', - '/Contracts.php' - ); - -$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), - _('Create A Credit Note'), - _('Enter Receipts'), - _('Allocate Receipts or Credit Notes') - ); -$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', - '/SelectCreditItems.php?NewCredit=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', - '/CustomerAllocations.php' - ); - -$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), - _('Print Invoices or Credit Notes'), - _('Print Statements'), - _('Sales Analysis Reports'), - _('Aged Customer Balances/Overdues Report'), - _('Re-Print A Deposit Listing'), - _('Debtor Balances At A Prior Month End'), - _('Customer Listing By Area/Salesperson'), - _('Sales Graphs'), - _('List Daily Transactions'), - _('Customer Transaction Inquiries') - ); - -$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', - '/PrintCustTrans.php', - '/PrintCustStatements.php', - '/SalesAnalRepts.php', - '/AgedDebtors.php', - '/PDFBankingSummary.php', - '/DebtorsAtPeriodEnd.php', - '/PDFCustomerList.php', - '/SalesGraph.php', - '/PDFCustTransListing.php', - '/CustomerTransInquiry.php' - ); - -$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), - _('Customers') - ); -$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', - '/SelectCustomer.php' - ); - -$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), - _('Supplier Allocations') - ); -$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', - '/SupplierAllocations.php' - ); - -$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), - _('Payment Run Report'), - _('Remittance Advices'), - _('Outstanding GRNs Report'), - _('Supplier Balances At A Prior Month End'), - _('List Daily Transactions'), - _('Supplier Transaction Inquiries') - ); - -$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', - '/SuppPaymentRun.php', - '/PDFRemittanceAdvice.php', - '/OutstandingGRNs.php', - '/SupplierBalsAtPeriodEnd.php', - '/PDFSuppTransListing.php', - '/SupplierTransInquiry.php' - ); - -$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), - _('Maintain Factor Companies') - ); -$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', - '/Factors.php' - ); - -$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), - _('Add Purchase Order'), - _('Create a New Tender'), - _('Edit Existing Tenders'), - _('Process Tenders and Offers'), - _('Orders to Authorise'), - _('Shipment Entry'), - _('Select A Shipment') - ); -$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/PO_Header.php?NewOrder=Yes', - '/SupplierTenderCreate.php?New=Yes', - '/SupplierTenderCreate.php?Edit=Yes', - '/OffersReceived.php', - '/PO_AuthoriseMyOrders.php', - '/SelectSupplier.php', - '/Shipt_Select.php' - ); - -$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), - _('Purchase Order Detail Or Summary Inquiries'), - _('Supplier Price List') - ); - -$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', - '/POReport.php', - '/SuppPriceList.php' - ); - -$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') - ); -$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' - ); -$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), - _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), - _('Bulk Inventory Transfer') . ' - ' . _('Receive'), - _('Inventory Location Transfers'), - _('Inventory Adjustments'), - _('Reverse Goods Received'), - _('Enter Stock Counts'), - _('Create a New Internal Stock Request'), - _('Authorise Internal Stock Requests'), - _('Fulfill Internal Stock Requests') - ); -$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/StockLocTransfer.php', - '/StockLocTransferReceive.php', - '/StockTransfers.php?New=Yes', - '/StockAdjustments.php?NewAdjustment=Yes', - '/ReverseGRN.php', - '/StockCounts.php', - '/InternalStockRequest.php?New=Yes', - '/InternalStockRequestAuthorisation.php', - '/InternalStockRequestFulfill.php' - ); - -$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), - _('Print Price Labels'), - _('Reprint GRN'), - _('Reprint A Stock Transfer Note'), - _('Inventory Item Movements'), - _('Inventory Item Status'), - _('Inventory Item Usage'), - _('Inventory Quantities'), - _('Reorder Level'), - _('Stock Dispatch'), - _('Inventory Valuation Report'), - _('Inventory Planning Report'), - _('Inventory Planning Based On Preferred Supplier Data'), - _('Inventory Stock Check Sheets'), - _('Make Inventory Quantities CSV'), - _('Compare Counts Vs Stock Check Data'), - _('All Inventory Movements By Location/Date'), - _('List Inventory Status By Location/Category'), - _('Historical Stock Quantity By Location/Category'), - _('List Negative Stocks'), - _('Period Stock Transaction Listing'), - _('Stock Transfer Note') - ); - -$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', - '/PDFPrintLabel.php', - '/ReprintGRN.php', - '/PDFStockLocTransfer.php', - '/StockMovements.php', - '/StockStatus.php', - '/StockUsage.php', - '/InventoryQuantities.php', - '/ReorderLevel.php', - '/StockDispatch.php', - '/InventoryValuation.php', - '/InventoryPlanning.php', - '/InventoryPlanningPrefSupplier.php', - '/StockCheck.php', - '/StockQties_csv.php', - '/PDFStockCheckComparison.php', - '/StockLocMovements.php', - '/StockLocStatus.php', - '/StockQuantityByDate.php', - '/PDFStockNegatives.php', - '/PDFPeriodStockTransListing.php', - '/PDFStockTransfer.php' - ); - -$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), - _('Select An Item'), - _('Sales Category Maintenance'), - _('Add or Update Prices Based On Costs'), - _('View or Update Prices Based On Costs'), - _('Reorder Level By Category/Location'), - _('Item Manufacturers') - ); -$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', - '/SelectProduct.php', - '/SalesCategories.php', - '/PricesBasedOnMarkUp.php', - '/PricesByCost.php', - '/ReorderLevelLocation.php', - '/Manufacturers.php' - ); - -$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), - _('Select A Work Order') - ); -$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', - '/SelectWorkOrder.php' - ); - -$MenuItems['manuf']['Reports']['Caption'] = array ( _('Costed Bill Of Material Inquiry'), - _('Where Used Inquiry'), - _('Bill Of Material Listing'), - _('Indented Bill Of Material Listing'), - _('List Components Required'), - _('Indented Where Used Listing'), - _('MRP'), - _('MRP Shortages'), - _('MRP Suggested Purchase Orders'), - _('MRP Suggested Work Orders'), - _('MRP Reschedules Required') - ); - -$MenuItems['manuf']['Reports']['URL'] = array ( '/BOMInquiry.php', - '/WhereUsedInquiry.php', - '/BOMListing.php', - '/BOMIndented.php', - '/BOMExtendedQty.php', - '/BOMIndentedReverse.php', - '/MRPReport.php', - '/MRPShortages.php', - '/MRPPlannedPurchaseOrders.php', - '/MRPPlannedWorkOrders.php', - '/MRPReschedules.php' - ); - -$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), - _('Bills Of Material'), - _('Copy BOM To New Item'), - _('Master Schedule'), - _('Auto Create Master Schedule'), - _('MRP Calculation') - ); - -$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', - '/BOMs.php', - '/CopyBOM.php', - '/MRPDemands.php', - '/MRPCreateDemands.php', - '/MRP.php' - ); - -$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), - _('Bank Account Receipts Entry'), - _('Journal Entry'), - _('Bank Account Payments Matching'), - _('Bank Account Receipts Matching') - ); - -$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', - '/GLJournal.php?NewJournal=Yes', - '/BankMatching.php?Type=Payments', - '/BankMatching.php?Type=Receipts' - ); - -$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), - _('Account Inquiry'), - _('Account Listing'), - _('Account Listing to CSV File'), - _('General Ledger Journal Inquiry'), - _('Bank Account Reconciliation Statement'), - _('Cheque Payments Listing'), - _('Daily Bank Transactions'), - _('Profit and Loss Statement'), - _('Balance Sheet'), - _('Tag Reports'), - _('Tax Reports') - ); - -$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', - '/SelectGLAccount.php', - '/GLAccountReport.php', - '/GLAccountCSV.php', - '/GLJournalInquiry.php', - '/BankReconciliation.php', - '/PDFChequeListing.php', - '/DailyBankTransactions.php', - '/GLProfit_Loss.php', - '/GLBalanceSheet.php', - '/GLTagProfit_Loss.php', - '/Tax.php' - ); - -$MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), - _('GL Budgets'), - _('Account Groups'), - _('Account Sections'), - _('GL Tags') - ); - -$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', - '/GLBudgets.php', - '/AccountGroups.php', - '/AccountSections.php', - '/GLTags.php' - ); - -$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), - _('Select an Asset'), - _('Change Asset Location'), - _('Depreciation Journal') - ); - -$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', - '/SelectAsset.php', - '/FixedAssetTransfer.php', - '/FixedAssetDepreciation.php' - ); - -$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), - ); - -$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', - ); - -$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), - _('Add or Maintain Asset Locations') - ); - -$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', - '/FixedAssetLocations.php' - ); - -$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), - _('Claim Expenses From PC Tab'), - _('Expenses Authorisation') - ); - -$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', - '/PcClaimExpensesFromTab.php', - '/PcAuthorizeExpenses.php' - ); - -$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), - ); - -$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', - ); - -$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), - _('PC Tabs'), - _('PC Expenses'), - _('Expenses for Type of PC Tab') - ); - -$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', - '/PcTabs.php', - '/PcExpenses.php', - '/PcExpensesTypeTab.php' - ); - -$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), - _('Configuration Settings'), - _('User Maintenance'), - _('Maintain Security Tokens'), - _('Access permissions maintenance'), - _('Page Security Settings'), - _('Bank Accounts'), - _('Currency Maintenance'), - _('Tax Authorities and Rates Maintenance'), - _('Tax Group Maintenance'), - _('Dispatch Tax Province Maintenance'), - _('Tax Category Maintenance'), - _('List Periods Defined'), - _('Report Builder Tool'), - _('View Audit Trail'), - _('Geocode Setup'), - _('Form Layout Editor'), - _('Label Templates Maintenance'), - _('SMTP Server Details') - ); - -$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', - '/SystemParameters.php', - '/WWW_Users.php', - '/SecurityTokens.php', - '/WWW_Access.php', - '/PageSecurity.php', - '/BankAccounts.php', - '/Currencies.php', - '/TaxAuthorities.php', - '/TaxGroups.php', - '/TaxProvinces.php', - '/TaxCategories.php', - '/PeriodsInquiry.php', - '/reportwriter/admin/ReportCreator.php', - '/AuditTrail.php', - '/GeocodeSetup.php', - '/FormDesigner.php', - '/Labels.php', - '/SMTPServer.php' - ); - -$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), - _('Customer Types'), - _('Supplier Types'), - _('Credit Status'), - _('Payment Terms'), - _('Set Purchase Order Authorisation levels'), - _('Payment Methods'), - _('Sales People'), - _('Sales Areas'), - _('Shippers'), - _('Sales GL Interface Postings'), - _('COGS GL Interface Postings'), - _('Freight Costs Maintenance'), - _('Discount Matrix') - ); - -$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', - '/CustomerTypes.php', - '/SupplierTypes.php', - '/CreditStatus.php', - '/PaymentTerms.php', - '/PO_AuthorisationLevels.php', - '/PaymentMethods.php', - '/SalesPeople.php', - '/Areas.php', - '/Shippers.php', - '/SalesGLPostings.php', - '/COGSGLPostings.php', - '/FreightCosts.php', - '/DiscountMatrix.php' - ); - -$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), - _('Inventory Locations Maintenance'), - _('Discount Category Maintenance'), - _('Units of Measure'), - _('MRP Available Production Days'), - _('MRP Demand Types'), - _('Create and Manage Database Backups'), - _('Maintain Internal Departments') - ); - -$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', - '/Locations.php', - '/DiscountCategories.php', - '/UnitsOfMeasure.php', - '/MRPCalendar.php', - '/MRPDemandTypes.php', - '/BackupDatabase.php', - '/Departments.php' - ); - -$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), - _('Change A Customer Branch Code'), - _('Change An Inventory Item Code'), - _('Change A Supplier Code'), - _('Change A Location Code'), - _('Update costs for all BOM items, from the bottom up'), - _('Re-apply costs to Sales Analysis'), - _('Delete sales transactions'), - _('Reverse all supplier payments on a specified date')); - -$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', - '/Z_ChangeBranchCode.php', - '/Z_ChangeStockCode.php', - '/Z_ChangeSupplierCode.php', - '/Z_ChangeLocationCode.php', - '/Z_BottomUpCosts.php', - '/Z_ReApplyCostToSA.php', - '/Z_DeleteSalesTransActions.php', - '/Z_ReverseSuppPaymentRun.php'); - -$MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), - _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance'), - _('Sales Integrity Check')); - -$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', - '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php', - '/Z_SalesIntegrityCheck.php'); - -$MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), - _('Make New Company'), - _('Data Export Options'), - _('Import Stock Items from .csv'), - _('Import Fixed Assets from .csv file'), - _('Create new company template SQL file and submit to webERP'), - _('Re-calculate brought forward amounts in GL'), - _('Re-Post all GL transactions from a specified period') - ); - -$MenuItems['Utilities']['Maintenance']['URL'] = array ('/Z_poAdmin.php', - '/Z_MakeNewCompany.php', - '/Z_DataExport.php', - '/Z_ImportStocks.php', - '/Z_ImportFixedAssets.php', - '/Z_CreateCompanyTemplateFile.php', - '/Z_UpdateChartDetailsBFwd.php', - '/Z_RePostGLFromPeriod.php' - ); -?> \ No newline at end of file Copied: trunk/includes/MainMenuLinksArray.php (from rev 9374, trunk/MainMenuLinksArray.php) =================================================================== --- trunk/includes/MainMenuLinksArray.php (rev 0) +++ trunk/includes/MainMenuLinksArray.php 2012-07-04 11:35:55 UTC (rev 9375) @@ -0,0 +1,585 @@ +<?php +$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); +$ReportList = array('orders'=>'ord', + 'AR'=>'ar', + 'AP'=>'ap', + 'PO'=>'prch', + 'stock'=>'inv', + 'manuf'=>'man', + 'GL'=>'gl', + 'FA'=>'fa', + 'PC'=>'pc', + 'system'=>'sys', + 'Utilities'=>'utils' + ); + +/*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ +$ModuleList = array(_('Sales'), + _('Receivables'), + _('Payables'), + _('Purchases'), + _('Inventory'), + _('Manufacturing'), + _('General Ledger'), + _('Asset Manager'), + _('Petty Cash'), + _('Setup'), + _('Utilities')); + +$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), + _('Enter Counter Sales'), + _('Print Picking Lists'), + _('Outstanding Sales Orders/Quotations'), + _('Special Order'), + _('Recurring Order Template'), + _('Process Recurring Orders') + ); +$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', + '/CounterSales.php', + '/PDFPickingList.php', + '/SelectSalesOrder.php', + '/SpecialOrder.php', + '/SelectRecurringSalesOrder.php', + '/RecurringSalesOrdersProcess.php' + ); + +$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), + _('Print Price Lists'), + _('Order Status Report'), + _('Orders Invoiced Reports'), + _('Daily Sales Inquiry'), + _('Sales By Sales Type Inquiry'), + _('Sales By Category Inquiry'), + _('Top Sellers Inquiry'), + _('Order Delivery Differences Report'), + _('Delivery In Full On Time (DIFOT) Report'), + _('Sales Order Detail Or Summary Inquiries'), + _('Low Sales Items Report'), + _('Top Sales Items Report'), + _('Sales With Low Gross Profit Report') + ); + +$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', + '/PDFPriceList.php', + '/PDFOrderStatus.php', + '/PDFOrdersInvoiced.php', + '/DailySalesInquiry.php', + '/SalesByTypePeriodInquiry.php', + '/SalesCategoryPeriodInquiry.php', + '/SalesTopItemsInquiry.php', + '/PDFDeliveryDifferences.php', + '/PDFDIFOT.php', + '/SalesInquiry.php', + '/NoSalesItems.php', + '/TopItems.php', + '/PDFLowGP.php' + ); + +$MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), + _('Create Contract') + ); + +$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', + '/Contracts.php' + ); + +$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), + _('Create A Credit Note'), + _('Enter Receipts'), + _('Allocate Receipts or Credit Notes') + ); +$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', + '/SelectCreditItems.php?NewCredit=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', + '/CustomerAllocations.php' + ); + +$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), + _('Print Invoices or Credit Notes'), + _('Print Statements'), + _('Sales Analysis Reports'), + _('Aged Customer Balances/Overdues Report'), + _('Re-Print A Deposit Listing'), + _('Debtor Balances At A Prior Month End'), + _('Customer Listing By Area/Salesperson'), + _('Sales Graphs'), + _('List Daily Transactions'), + _('Customer Transaction Inquiries') + ); + +$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', + '/PrintCustTrans.php', + '/PrintCustStatements.php', + '/SalesAnalRepts.php', + '/AgedDebtors.php', + '/PDFBankingSummary.php', + '/DebtorsAtPeriodEnd.php', + '/PDFCustomerList.php', + '/SalesGraph.php', + '/PDFCustTransListing.php', + '/CustomerTransInquiry.php' + ); + +$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), + _('Customers') + ); +$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', + '/SelectCustomer.php' + ); + +$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), + _('Supplier Allocations') + ); +$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', + '/SupplierAllocations.php' + ); + +$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), + _('Payment Run Report'), + _('Remittance Advices'), + _('Outstanding GRNs Report'), + _('Supplier Balances At A Prior Month End'), + _('List Daily Transactions'), + _('Supplier Transaction Inquiries') + ); + +$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', + '/SuppPaymentRun.php', + '/PDFRemittanceAdvice.php', + '/OutstandingGRNs.php', + '/SupplierBalsAtPeriodEnd.php', + '/PDFSuppTransListing.php', + '/SupplierTransInquiry.php' + ); + +$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), + _('Maintain Factor Companies') + ); +$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', + '/Factors.php' + ); + +$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), + _('Add Purchase Order'), + _('Create a New Tender'), + _('Edit Existing Tenders'), + _('Process Tenders and Offers'), + _('Orders to Authorise'), + _('Shipment Entry'), + _('Select A Shipment') + ); +$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/PO_Header.php?NewOrder=Yes', + '/SupplierTenderCreate.php?New=Yes', + '/SupplierTenderCreate.php?Edit=Yes', + '/OffersReceived.php', + '/PO_AuthoriseMyOrders.php', + '/SelectSupplier.php', + '/Shipt_Select.php' + ); + +$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), + _('Purchase Order Detail Or Summary Inquiries'), + _('Supplier Price List') + ); + +$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', + '/POReport.php', + '/SuppPriceList.php' + ); + +$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') + ); +$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' + ); +$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), + _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), + _('Bulk Inventory Transfer') . ' - ' . _('Receive'), + _('Inventory Location Transfers'), + _('Inventory Adjustments'), + _('Reverse Goods Received'), + _('Enter Stock Counts'), + _('Create a New Internal Stock Request'), + _('Authorise Internal Stock Requests'), + _('Fulfill Internal Stock Requests') + ); +$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/StockLocTransfer.php', + '/StockLocTransferReceive.php', + '/StockTransfers.php?New=Yes', + '/StockAdjustments.php?NewAdjustment=Yes', + '/ReverseGRN.php', + '/StockCounts.php', + '/InternalStockRequest.php?New=Yes', + '/InternalStockRequestAuthorisation.php', + '/InternalStockRequestFulfill.php' + ); + +$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), + _('Print Price Labels'), + _('Reprint GRN'), + _('Reprint A Stock Transfer Note'), + _('Inventory Item Movements'), + _('Inventory Item Status'), + _('Inventory Item Usage'), + _('Inventory Quantities'), + _('Reorder Level'), + _('Stock Dispatch'), + _('Inventory Valuation Report'), + _('Inventory Planning Report'), + _('Inventory Planning Based On Preferred Supplier Data'), + _('Inventory Stock Check Sheets'), + _('Make Inventory Quantities CSV'), + _('Compare Counts Vs Stock Check Data'), + _('All Inventory Movements By Location/Date'), + _('List Inventory Status By Location/Category'), + _('Historical Stock Quantity By Location/Category'), + _('List Negative Stocks'), + _('Period Stock Transaction Listing'), + _('Stock Transfer Note') + ); + +$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', + '/PDFPrintLabel.php', + '/ReprintGRN.php', + '/PDFStockLocTransfer.php', + '/StockMovements.php', + '/StockStatus.php', + '/StockUsage.php', + '/InventoryQuantities.php', + '/ReorderLevel.php', + '/StockDispatch.php', + '/InventoryValuation.php', + '/InventoryPlanning.php', + '/InventoryPlanningPrefSupplier.php', + '/StockCheck.php', + '/StockQties_csv.php', + '/PDFStockCheckComparison.php', + '/StockLocMovements.php', + '/StockLocStatus.php', + '/StockQuantityByDate.php', + '/PDFStockNegatives.php', + '/PDFPeriodStockTransListing.php', + '/PDFStockTransfer.php' + ); + +$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), + _('Select An Item'), + _('Sales Category Maintenance'), + _('Add or Update Prices Based On Costs'), + _('View or Update Prices Based On Costs'), + _('Reorder Level By Category/Location'), + _('Item Manufacturers') + ); +$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', + '/SelectProduct.php', + '/SalesCategories.php', + '/PricesBasedOnMarkUp.php', + '/PricesByCost.php', + '/ReorderLevelLocation.php', + '/Manufacturers.php' + ); + +$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), + _('Select A Work Order') + ); +$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', + '/SelectWorkOrder.php' + ); + +$MenuItems['manuf']['Reports']['Caption'] = array ( _('Costed Bill Of Material Inquiry'), + _('Where Used Inquiry'), + _('Bill Of Material Listing'), + _('Indented Bill Of Material Listing'), + _('List Components Required'), + _('Indented Where Used Listing'), + _('MRP'), + _('MRP Shortages'), + _('MRP Suggested Purchase Orders'), + _('MRP Suggested Work Orders'), + _('MRP Reschedules Required') + ); + +$MenuItems['manuf']['Reports']['URL'] = array ( '/BOMInquiry.php', + '/WhereUsedInquiry.php', + '/BOMListing.php', + '/BOMIndented.php', + '/BOMExtendedQty.php', + '/BOMIndentedReverse.php', + '/MRPReport.php', + '/MRPShortages.php', + '/MRPPlannedPurchaseOrders.php', + '/MRPPlannedWorkOrders.php', + '/MRPReschedules.php' + ); + +$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), + _('Bills Of Material'), + _('Copy BOM To New Item'), + _('Master Schedule'), + _('Auto Create Master Schedule'), + _('MRP Calculation') + ); + +$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', + '/BOMs.php', + '/CopyBOM.php', + '/MRPDemands.php', + '/MRPCreateDemands.php', + '/MRP.php' + ); + +$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), + _('Bank Account Receipts Entry'), + _('Journal Entry'), + _('Bank Account Payments Matching'), + _('Bank Account Receipts Matching') + ); + +$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', + '/GLJournal.php?NewJournal=Yes', + '/BankMatching.php?Type=Payments', + '/BankMatching.php?Type=Receipts' + ); + +$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), + _('Account Inquiry'), + _('Account Listing'), + _('Account Listing to CSV File'), + _('General Ledger Journal Inquiry'), + _('Bank Account Reconciliation Statement'), + _('Cheque Payments Listing'), + _('Daily Bank Transactions'), + _('Profit and Loss Statement'), + _('Balance Sheet'), + _('Tag Reports'), + _('Tax Reports') + ); + +$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', + '/SelectGLAccount.php', + '/GLAccountReport.php', + '/GLAccountCSV.php', + '/GLJournalInquiry.php', + '/BankReconciliation.php', + '/PDFChequeListing.php', + '/DailyBankTransactions.php', + '/GLProfit_Loss.php', + '/GLBalanceSheet.php', + '/GLTagProfit_Loss.php', + '/Tax.php' + ); + +$MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), + _('GL Budgets'), + _('Account Groups'), + _('Account Sections'), + _('GL Tags') + ); + +$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', + '/GLBudgets.php', + '/AccountGroups.php', + '/AccountSections.php', + '/GLTags.php' + ); + +$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), + _('Select an Asset'), + _('Change Asset Location'), + _('Depreciation Journal') + ); + +$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', + '/SelectAsset.php', + '/FixedAssetTransfer.php', + '/FixedAssetDepreciation.php' + ); + +$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), + ); + +$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', + ); + +$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), + _('Add or Maintain Asset Locations') + ); + +$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', + '/FixedAssetLocations.php' + ); + +$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), + _('Claim Expenses From PC Tab'), + _('Expenses Authorisation') + ); + +$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', + '/PcClaimExpensesFromTab.php', + '/PcAuthorizeExpenses.php' + ); + +$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), + ); + +$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', + ); + +$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), + _('PC Tabs'), + _('PC Expenses'), + _('Expenses for Type of PC Tab') + ); + +$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', + '/PcTabs.php', + '/PcExpenses.php', + '/PcExpensesTypeTab.php' + ); + +$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), + _('Configuration Settings'), + _('User Maintenance'), + _('Maintain Security Tokens'), + _('Access permissions maintenance'), + _('Page Security Settings'), + _('Bank Accounts'), + _('Currency Maintenance'), + _('Tax Authorities and Rates Maintenance'), + _('Tax Group Maintenance'), + _('Dispatch Tax Province Maintenance'), + _('Tax Category Maintenance'), + _('List Periods Defined'), + _('Report Builder Tool'), + _('View Audit Trail'), + _('Geocode Setup'), + _('Form Layout Editor'), + _('Label Templates Maintenance'), + _('SMTP Server Details') + ); + +$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', + '/SystemParameters.php', + '/WWW_Users.php', + '/SecurityTokens.php', + '/WWW_Access.php', + '/PageSecurity.php', + '/BankAccounts.php', + '/Currencies.php', + '/TaxAuthorities.php', + '/TaxGroups.php', + '/TaxProvinces.php', + '/TaxCategories.php', + '/PeriodsInquiry.php', + '/reportwriter/admin/ReportCreator.php', + '/AuditTrail.php', + '/GeocodeSetup.php', + '/FormDesigner.php', + '/Labels.php', + '/SMTPServer.php' + ); + +$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), + _('Customer Types'), + _('Supplier Types'), + _('Credit Status'), + _('Payment Terms'), + _('Set Purchase Order Authorisation levels'), + _('Payment Methods'), + _('Sales People'), + _('Sales Areas'), + _('Shippers'), + _('Sales GL Interface Postings'), + _('COGS GL Interface Postings'), + _('Freight Costs Maintenance'), + _('Discount Matrix') + ); + +$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', + '/CustomerTypes.php', + '/SupplierTypes.php', + '/CreditStatus.php', + '/PaymentTerms.php', + '/PO_AuthorisationLevels.php', + '/PaymentMethods.php', + '/SalesPeople.php', + '/Areas.php', + '/Shippers.php', + '/SalesGLPostings.php', + '/COGSGLPostings.php', + '/FreightCosts.php', + '/DiscountMatrix.php' + ); + +$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), + _('Inventory Locations Maintenance'), + _('Discount Category Maintenance'), + _('Units of Measure'), + _('MRP Available Production Days'), + _('MRP Demand Types'), + _('Create and Manage Database Backups'), + _('Maintain Internal Departments') + ); + +$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', + '/Locations.php', + '/DiscountCategories.php', + '/UnitsOfMeasure.php', + '/MRPCalendar.php', + '/MRPDemandTypes.php', + '/BackupDatabase.php', + '/Departments.php' + ); + +$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier Code'), + _('Change A Location Code'), + _('Update costs for all BOM items, from the bottom up'), + _('Re-apply costs to Sales Analysis'), + _('Delete sales transactions'), + _('Reverse all supplier payments on a specified date')); + +$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', + '/Z_ChangeBranchCode.php', + '/Z_ChangeStockCode.php', + '/Z_ChangeSupplierCode.php', + '/Z_ChangeLocationCode.php', + '/Z_BottomUpCosts.php', + '/Z_ReApplyCostToSA.php', + '/Z_DeleteSalesTransActions.php', + '/Z_ReverseSuppPaymentRun.php'); + +$MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), + _('Show Local Currency Total Suppliers Balances'), + _('Show General Transactions That Do Not Balance'), + _('Sales Integrity Check')); + +$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.php', + '/Z_SalesIntegrityCheck.php'); + +$MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), + _('Make New Company'), + _('Data Export Options'), + _('Import Stock Items from .csv'), + _('Import Fixed Assets from .csv file'), + _('Create new company template SQL file and submit to webERP'), + _('Re-calculate brought forward amounts in GL'), + _('Re-Post all GL transactions from a specified period') + ); + +$MenuItems['Utilities']['Maintenance']['URL'] = array ('/Z_poAdmin.php', + '/Z_MakeNewCompany.php', + '/Z_DataExport.php', + '/Z_ImportStocks.php', + '/Z_ImportFixedAssets.php', + '/Z_CreateCompanyTemplateFile.php', + '/Z_UpdateChartDetailsBFwd.php', + '/Z_RePostGLFromPeriod.php' + ); +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-05 09:22:21
|
Revision: 9376 http://weberp.svn.sourceforge.net/weberp/?rev=9376&view=rev Author: tim_schofield Date: 2012-07-05 09:22:12 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Improvements to queries to run faster on big data sets Modified Paths: -------------- trunk/InventoryPlanning.php trunk/Z_UpgradeDatabase.php Added Paths: ----------- trunk/sql/mysql/updates/138.php Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-07-04 11:35:55 UTC (rev 9375) +++ trunk/InventoryPlanning.php 2012-07-05 09:22:12 UTC (rev 9376) @@ -128,6 +128,86 @@ $Period_4 = $CurrentPeriod -4; $Period_5 = $CurrentPeriod -5; + $sql="CREATE TEMPORARY TABLE stockmovesumm( + `stockid` varchar(20) NOT NULL DEFAULT '', + `loccode` varchar(5) NOT NULL DEFAULT '', + `prd0` double NOT NULL DEFAULT '1.0', + `prd1` double NOT NULL DEFAULT '1.0', + `prd2` double NOT NULL DEFAULT '1.0', + `prd3` double NOT NULL DEFAULT '1.0', + `prd4` double NOT NULL DEFAULT '1.0', + `prd5` double NOT NULL DEFAULT '1.0' + ) ENGINE=MEMORY"; + $result=DB_query($sql, $db); + + $sql = "INSERT INTO stockmovesumm (stockid, + loccode, + prd0, + prd1, + prd2, + prd3, + prd4, + prd5) + SELECT stockid, + loccode, + SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, + SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, + SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, + SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, + SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, + SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 + FROM stockmoves + WHERE (type=10 OR type=11) + AND stockmoves.hidemovt=0"; + $result=DB_query($sql, $db); + + $sql="CREATE TEMPORARY TABLE salesordersumm( + `stkcode` varchar(20) NOT NULL DEFAULT '', + `fromstkloc` varchar(5) NOT NULL DEFAULT '', + `qtydemand` double NOT NULL DEFAULT '0' + ) ENGINE=MEMORY"; + $result=DB_query($sql, $db); + + $sql = "INSERT INTO salesordersumm (stkcode, + fromstkloc, + qtydemand) + SELECT salesorderdetails.stkcode, + salesorders.fromstkloc, + SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand + FROM salesorderdetails + INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorderdetails.completed = 0 + AND salesorders.quotation=0"; + $result=DB_query($sql, $db); + + $sql="CREATE TEMPORARY TABLE assemblysalesordersumm( + `component` varchar(20) NOT NULL DEFAULT '', + `fromstkloc` varchar(5) NOT NULL DEFAULT '', + `dem` double NOT NULL DEFAULT '0' + ) ENGINE=MEMORY"; + $result=DB_query($sql, $db); + + $sql = "INSERT INTO assemblysalesordersumm (component, + fromstkloc, + dem) + SELECT bom.component, + salesorders.fromstkloc, + SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem + FROM salesorderdetails + INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + AND stockmaster.mbflag='A' + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; + $result=DB_query($sql, $db); + while ($InventoryPlan = DB_fetch_array($InventoryResult,$db)){ if ($Category!=$InventoryPlan['categoryid']){ @@ -135,7 +215,7 @@ if ($Category!=''){ /*Then it's NOT the first time round */ /*draw a line under the CATEGORY TOTAL*/ $YPos -=$line_height; - $pdf->line($Left_Margin, $YPos,$Page_Width-$Right_Margin, $YPos); + $pdf->line($Left_Margin, $YPos,$Page_Width-$Right_Margin, $YPos); $YPos -=(2*$line_height); } @@ -146,64 +226,53 @@ $YPos -=$line_height; - if ($_POST['Location']=='All'){ - $SQL = "SELECT SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, - SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, - SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, - SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, - SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, - SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 - FROM stockmoves - WHERE stockid='" . $InventoryPlan['stockid'] . "' - AND (type=10 OR type=11) - AND stockmoves.hidemovt=0"; + $SQL = "SELECT prd0, + prd1, + prd2, + prd3, + prd4, + prd5 + FROM stockmovesumm + WHERE stockid='" . $InventoryPlan['stockid'] . "'"; } else { - $SQL = "SELECT SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, - SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, - SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, - SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, - SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, - SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 - FROM stockmoves - WHERE stockid='" . $InventoryPlan['stockid'] . "' - AND stockmoves.loccode ='" . $_POST['Location'] . "' - AND (stockmoves.type=10 OR stockmoves.type=11) - AND stockmoves.hidemovt=0"; + $SQL = "SELECT prd0, + prd1, + prd2, + prd3, + prd4, + prd5 + FROM stockmovesumm + WHERE stockid='" . $InventoryPlan['stockid'] . "' + AND stockmovesumm.loccode ='" . $_POST['Location'] . "'"; } $SalesResult = DB_query($SQL,$db,'','', false, false); if (DB_error_no($db) !=0) { - $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; - include('includes/header.inc'); - prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; - if ($debug==1){ - echo '<br />' . $SQL; - } + $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; + include('includes/header.inc'); + prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; + if ($debug==1){ + echo '<br />' . $SQL; + } - include('includes/footer.inc'); - exit; + include('includes/footer.inc'); + exit; } $SalesRow = DB_fetch_array($SalesResult); if ($_POST['Location']=='All'){ - $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails INNER JOIN salesorders - ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0 - AND salesorders.quotation=0"; + $SQL = "SELECT qtydemand + FROM salesordersumm + WHERE stkcode = '" . $InventoryPlan['stockid'] . "'"; } else { - $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails INNER JOIN salesorders - ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' - AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0 - AND salesorders.quotation=0"; + $SQL = "SELECT qtydemand + FROM salesordersumm + WHERE fromstkloc ='" . $_POST['Location'] . "' + AND stkcode = '" . $InventoryPlan['stockid'] . "'"; } $DemandResult = DB_query($SQL, $db, '', '', false , false); @@ -224,35 +293,14 @@ // Also need to add in the demand as a component of an assembly items if this items has any assembly parents. if ($_POST['Location']=='All'){ - $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails INNER JOIN bom - ON salesorderdetails.stkcode=bom.parent - INNER JOIN stockmaster - ON stockmaster.stockid=bom.parent - INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 - AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0 - AND salesorders.quotation=0"; + $SQL = "SELECT dem + FROM assemblysalesordersumm + WHERE component='" . $InventoryPlan['stockid'] . "'"; } else { - $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails INNER JOIN bom - ON salesorderdetails.stkcode=bom.parent - INNER JOIN stockmaster - ON stockmaster.stockid=bom.parent - INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 - AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' - AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0 - AND salesorders.quotation=0"; + $SQL = "SELECT dem + FROM assemblysalesordersumm + WHERE component='" . $InventoryPlan['stockid'] . "' + AND fromstkloc ='" . $_POST['Location'] . "'"; } $BOMDemandResult = DB_query($SQL,$db,'','',false,false); @@ -381,7 +429,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr> Modified: trunk/Z_UpgradeDatabase.php =================================================================== --- trunk/Z_UpgradeDatabase.php 2012-07-04 11:35:55 UTC (rev 9375) +++ trunk/Z_UpgradeDatabase.php 2012-07-05 09:22:12 UTC (rev 9376) @@ -44,6 +44,7 @@ echo '<div class="page_help_text">' . _('You have database updates that are required.').'<br />'. _('Please ensure that you have taken a backup of your current database before continuing.'). '</div><br />'; + echo '<div class="centre"><button type="submit" name="continue">'. _('Continue With Updates').'</button></div>'; echo '</form>'; } else { $StartingUpdate=$_SESSION['DBUpdateNumber']+1; Added: trunk/sql/mysql/updates/138.php =================================================================== --- trunk/sql/mysql/updates/138.php (rev 0) +++ trunk/sql/mysql/updates/138.php 2012-07-05 09:22:12 UTC (rev 9376) @@ -0,0 +1,10 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +AddIndex(array('categoryid', 'stockid', 'mbflag'), 'stockmaster', 'stockmaster_ibfk_3', $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. |
From: <tim...@us...> - 2012-07-05 09:22:48
|
Revision: 9377 http://weberp.svn.sourceforge.net/weberp/?rev=9377&view=rev Author: tim_schofield Date: 2012-07-05 09:22:36 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Add menu to the new index.php script Modified Paths: -------------- trunk/css/silverwolf/sub.css trunk/includes/MainMenuLinksArray.php trunk/includes/main_header.inc trunk/javascripts/FormFunctions.js Added Paths: ----------- trunk/index.php trunk/javascripts/script.js Removed Paths: ------------- trunk/index.php trunk/new_index.php Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-07-05 09:22:12 UTC (rev 9376) +++ trunk/css/silverwolf/sub.css 2012-07-05 09:22:36 UTC (rev 9377) @@ -26,10 +26,10 @@ border-radius: 17px; position: absolute; display: inline; - top: 10px; - right: 10px; - bottom: 20px; - left: 20px; + top: 1%; + right: 1%; + bottom: 1%; + left: 1%; background: #000000; color: #FFFFFF; opacity: 0.85; @@ -96,10 +96,96 @@ margin-top: 2px; margin-left: 4px; margin-right: 4px; - font-size: 200%; padding-left: 10px; } +div.menu_bar { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; + margin-top: 2px; + margin-left: 4px; + margin-right: 4px; + padding-left: 10px; + width: 98%; +} + +ul.menu { + list-style:none; + margin:0; + padding:0; + opacity:0.9; +} + +ul.menu * { + margin:0; + padding:0; +} + +ul.menu a { + display:block; + color:#000; + text-decoration:none; +} + +ul.menu li { + position:relative; + float:left; + margin-right:2px; +} + +ul.menu ul { + position:absolute; + top:26px; + left:0; + background:#d1d1d1; + display:none; + opacity:0.9; + list-style:none; +} + +ul.menu ul li { + position:relative; + border:1px solid #aaa; + border-top:none; + width:148px; + margin:0; +} + +ul.menu ul li a { + display:block; + padding:3px 7px 5px; + background-color:#d1d1d1; +} + +ul.menu ul li a:hover { + background-color:#c5c5c5; +} + +ul.menu ul ul { + left:148px; + top:-1px; +} + +ul.menu .menulink { + border:1px solid #aaa; + padding:5px 7px 7px; + font-weight:bold; + background:#d1d1d1; + width:134px; +} + +ul.menu .menulink:hover, ul.menu .menuhover { + background:#d1d1d1; +} + +ul.menu .sub { + background:#d1d1d1 136px 8px no-repeat; +} + +ul.menu .topline { + border-top:1px solid #aaa; +} + div.manual_title_bar { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; font-size: 24px; Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-07-05 09:22:12 UTC (rev 9376) +++ trunk/includes/MainMenuLinksArray.php 2012-07-05 09:22:36 UTC (rev 9377) @@ -34,13 +34,13 @@ _('Recurring Order Template'), _('Process Recurring Orders') ); -$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', - '/CounterSales.php', - '/PDFPickingList.php', - '/SelectSalesOrder.php', - '/SpecialOrder.php', - '/SelectRecurringSalesOrder.php', - '/RecurringSalesOrdersProcess.php' +$MenuItems['orders']['Transactions']['URL'] = array( 'SelectOrderItems.php?NewOrder=Yes', + 'CounterSales.php', + 'PDFPickingList.php', + 'SelectSalesOrder.php', + 'SpecialOrder.php', + 'SelectRecurringSalesOrder.php', + 'RecurringSalesOrdersProcess.php' ); $MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), @@ -59,28 +59,28 @@ _('Sales With Low Gross Profit Report') ); -$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', - '/PDFPriceList.php', - '/PDFOrderStatus.php', - '/PDFOrdersInvoiced.php', - '/DailySalesInquiry.php', - '/SalesByTypePeriodInquiry.php', - '/SalesCategoryPeriodInquiry.php', - '/SalesTopItemsInquiry.php', - '/PDFDeliveryDifferences.php', - '/PDFDIFOT.php', - '/SalesInquiry.php', - '/NoSalesItems.php', - '/TopItems.php', - '/PDFLowGP.php' +$MenuItems['orders']['Reports']['URL'] = array( 'SelectCompletedOrder.php', + 'PDFPriceList.php', + 'PDFOrderStatus.php', + 'PDFOrdersInvoiced.php', + 'DailySalesInquiry.php', + 'SalesByTypePeriodInquiry.php', + 'SalesCategoryPeriodInquiry.php', + 'SalesTopItemsInquiry.php', + 'PDFDeliveryDifferences.php', + 'PDFDIFOT.php', + 'SalesInquiry.php', + 'NoSalesItems.php', + 'TopItems.php', + 'PDFLowGP.php' ); $MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), _('Create Contract') ); -$MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', - '/Contracts.php' +$MenuItems['orders']['Maintenance']['URL'] = array( 'SelectContract.php', + 'Contracts.php' ); $MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), @@ -88,10 +88,10 @@ _('Enter Receipts'), _('Allocate Receipts or Credit Notes') ); -$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', - '/SelectCreditItems.php?NewCredit=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', - '/CustomerAllocations.php' +$MenuItems['AR']['Transactions']['URL'] = array ('SelectSalesOrder.php', + 'SelectCreditItems.php?NewCredit=Yes', + 'CustomerReceipt.php?NewReceipt=Yes&Type=Customer', + 'CustomerAllocations.php' ); $MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), @@ -107,31 +107,31 @@ _('Customer Transaction Inquiries') ); -$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', - '/PrintCustTrans.php', - '/PrintCustStatements.php', - '/SalesAnalRepts.php', - '/AgedDebtors.php', - '/PDFBankingSummary.php', - '/DebtorsAtPeriodEnd.php', - '/PDFCustomerList.php', - '/SalesGraph.php', - '/PDFCustTransListing.php', - '/CustomerTransInquiry.php' +$MenuItems['AR']['Reports']['URL'] = array ('CustWhereAlloc.php', + 'PrintCustTrans.php', + 'PrintCustStatements.php', + 'SalesAnalRepts.php', + 'AgedDebtors.php', + 'PDFBankingSummary.php', + 'DebtorsAtPeriodEnd.php', + 'PDFCustomerList.php', + 'SalesGraph.php', + 'PDFCustTransListing.php', + 'CustomerTransInquiry.php' ); $MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), _('Customers') ); -$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', - '/SelectCustomer.php' +$MenuItems['AR']['Maintenance']['URL'] = array ('Customers.php', + 'SelectCustomer.php' ); $MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), _('Supplier Allocations') ); -$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', - '/SupplierAllocations.php' +$MenuItems['AP']['Transactions']['URL'] = array ('SelectSupplier.php', + 'SupplierAllocations.php' ); $MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), @@ -143,20 +143,20 @@ _('Supplier Transaction Inquiries') ); -$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', - '/SuppPaymentRun.php', - '/PDFRemittanceAdvice.php', - '/OutstandingGRNs.php', - '/SupplierBalsAtPeriodEnd.php', - '/PDFSuppTransListing.php', - '/SupplierTransInquiry.php' +$MenuItems['AP']['Reports']['URL'] = array ('AgedSuppliers.php', + 'SuppPaymentRun.php', + 'PDFRemittanceAdvice.php', + 'OutstandingGRNs.php', + 'SupplierBalsAtPeriodEnd.php', + 'PDFSuppTransListing.php', + 'SupplierTransInquiry.php' ); $MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), _('Maintain Factor Companies') ); -$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', - '/Factors.php' +$MenuItems['AP']['Maintenance']['URL'] = array ('Suppliers.php', + 'Factors.php' ); $MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), @@ -168,14 +168,14 @@ _('Shipment Entry'), _('Select A Shipment') ); -$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/PO_Header.php?NewOrder=Yes', - '/SupplierTenderCreate.php?New=Yes', - '/SupplierTenderCreate.php?Edit=Yes', - '/OffersReceived.php', - '/PO_AuthoriseMyOrders.php', - '/SelectSupplier.php', - '/Shipt_Select.php' +$MenuItems['PO']['Transactions']['URL'] = array ('PO_SelectOSPurchOrder.php', + 'PO_Header.php?NewOrder=Yes', + 'SupplierTenderCreate.php?New=Yes', + 'SupplierTenderCreate.php?Edit=Yes', + 'OffersReceived.php', + 'PO_AuthoriseMyOrders.php', + 'SelectSupplier.php', + 'Shipt_Select.php' ); $MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), @@ -183,14 +183,14 @@ _('Supplier Price List') ); -$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', - '/POReport.php', - '/SuppPriceList.php' +$MenuItems['PO']['Reports']['URL'] = array ('PO_SelectPurchOrder.php', + 'POReport.php', + 'SuppPriceList.php' ); $MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') ); -$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php' +$MenuItems['PO']['Maintenance']['URL'] = array ('SupplierPriceList.php' ); $MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), @@ -203,16 +203,16 @@ _('Authorise Internal Stock Requests'), _('Fulfill Internal Stock Requests') ); -$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/StockLocTransfer.php', - '/StockLocTransferReceive.php', - '/StockTransfers.php?New=Yes', - '/StockAdjustments.php?NewAdjustment=Yes', - '/ReverseGRN.php', - '/StockCounts.php', - '/InternalStockRequest.php?New=Yes', - '/InternalStockRequestAuthorisation.php', - '/InternalStockRequestFulfill.php' +$MenuItems['stock']['Transactions']['URL'] = array ('PO_SelectOSPurchOrder.php', + 'StockLocTransfer.php', + 'StockLocTransferReceive.php', + 'StockTransfers.php?New=Yes', + 'StockAdjustments.php?NewAdjustment=Yes', + 'ReverseGRN.php', + 'StockCounts.php', + 'InternalStockRequest.php?New=Yes', + 'InternalStockRequestAuthorisation.php', + 'InternalStockRequestFulfill.php' ); $MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), @@ -239,28 +239,28 @@ _('Stock Transfer Note') ); -$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', - '/PDFPrintLabel.php', - '/ReprintGRN.php', - '/PDFStockLocTransfer.php', - '/StockMovements.php', - '/StockStatus.php', - '/StockUsage.php', - '/InventoryQuantities.php', - '/ReorderLevel.php', - '/StockDispatch.php', - '/InventoryValuation.php', - '/InventoryPlanning.php', - '/InventoryPlanningPrefSupplier.php', - '/StockCheck.php', - '/StockQties_csv.php', - '/PDFStockCheckComparison.php', - '/StockLocMovements.php', - '/StockLocStatus.php', - '/StockQuantityByDate.php', - '/PDFStockNegatives.php', - '/PDFPeriodStockTransListing.php', - '/PDFStockTransfer.php' +$MenuItems['stock']['Reports']['URL'] = array ('StockSerialItemResearch.php', + 'PDFPrintLabel.php', + 'ReprintGRN.php', + 'PDFStockLocTransfer.php', + 'StockMovements.php', + 'StockStatus.php', + 'StockUsage.php', + 'InventoryQuantities.php', + 'ReorderLevel.php', + 'StockDispatch.php', + 'InventoryValuation.php', + 'InventoryPlanning.php', + 'InventoryPlanningPrefSupplier.php', + 'StockCheck.php', + 'StockQties_csv.php', + 'PDFStockCheckComparison.php', + 'StockLocMovements.php', + 'StockLocStatus.php', + 'StockQuantityByDate.php', + 'PDFStockNegatives.php', + 'PDFPeriodStockTransListing.php', + 'PDFStockTransfer.php' ); $MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), @@ -271,20 +271,20 @@ _('Reorder Level By Category/Location'), _('Item Manufacturers') ); -$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', - '/SelectProduct.php', - '/SalesCategories.php', - '/PricesBasedOnMarkUp.php', - '/PricesByCost.php', - '/ReorderLevelLocation.php', - '/Manufacturers.php' +$MenuItems['stock']['Maintenance']['URL'] = array ('Stocks.php', + 'SelectProduct.php', + 'SalesCategories.php', + 'PricesBasedOnMarkUp.php', + 'PricesByCost.php', + 'ReorderLevelLocation.php', + 'Manufacturers.php' ); $MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), _('Select A Work Order') ); -$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', - '/SelectWorkOrder.php' +$MenuItems['manuf']['Transactions']['URL'] = array ('WorkOrderEntry.php', + 'SelectWorkOrder.php' ); $MenuItems['manuf']['Reports']['Caption'] = array ( _('Costed Bill Of Material Inquiry'), @@ -300,17 +300,17 @@ _('MRP Reschedules Required') ); -$MenuItems['manuf']['Reports']['URL'] = array ( '/BOMInquiry.php', - '/WhereUsedInquiry.php', - '/BOMListing.php', - '/BOMIndented.php', - '/BOMExtendedQty.php', - '/BOMIndentedReverse.php', - '/MRPReport.php', - '/MRPShortages.php', - '/MRPPlannedPurchaseOrders.php', - '/MRPPlannedWorkOrders.php', - '/MRPReschedules.php' +$MenuItems['manuf']['Reports']['URL'] = array ( 'BOMInquiry.php', + 'WhereUsedInquiry.php', + 'BOMListing.php', + 'BOMIndented.php', + 'BOMExtendedQty.php', + 'BOMIndentedReverse.php', + 'MRPReport.php', + 'MRPShortages.php', + 'MRPPlannedPurchaseOrders.php', + 'MRPPlannedWorkOrders.php', + 'MRPReschedules.php' ); $MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), @@ -321,13 +321,13 @@ _('MRP Calculation') ); -$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', - '/BOMs.php', - '/CopyBOM.php', - '/MRPDemands.php', - '/MRPCreateDemands.php', - '/MRP.php' - ); +$MenuItems['manuf']['Maintenance']['URL']=array('WorkCentres.php', + 'BOMs.php', + 'CopyBOM.php', + 'MRPDemands.php', + 'MRPCreateDemands.php', + 'MRP.php' + ); $MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), _('Bank Account Receipts Entry'), @@ -336,12 +336,12 @@ _('Bank Account Receipts Matching') ); -$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', - '/GLJournal.php?NewJournal=Yes', - '/BankMatching.php?Type=Payments', - '/BankMatching.php?Type=Receipts' - ); +$MenuItems['GL']['Transactions']['URL'] = array('Payments.php?NewPayment=Yes', + 'CustomerReceipt.php?NewReceipt=Yes&Type=GL', + 'GLJournal.php?NewJournal=Yes', + 'BankMatching.php?Type=Payments', + 'BankMatching.php?Type=Receipts' + ); $MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), _('Account Inquiry'), @@ -357,18 +357,18 @@ _('Tax Reports') ); -$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', - '/SelectGLAccount.php', - '/GLAccountReport.php', - '/GLAccountCSV.php', - '/GLJournalInquiry.php', - '/BankReconciliation.php', - '/PDFChequeListing.php', - '/DailyBankTransactions.php', - '/GLProfit_Loss.php', - '/GLBalanceSheet.php', - '/GLTagProfit_Loss.php', - '/Tax.php' +$MenuItems['GL']['Reports']['URL'] = array ('GLTrialBalance.php', + 'SelectGLAccount.php', + 'GLAccountReport.php', + 'GLAccountCSV.php', + 'GLJournalInquiry.php', + 'BankReconciliation.php', + 'PDFChequeListing.php', + 'DailyBankTransactions.php', + 'GLProfit_Loss.php', + 'GLBalanceSheet.php', + 'GLTagProfit_Loss.php', + 'Tax.php' ); $MenuItems['GL']['Maintenance']['Caption'] = array (_('GL Account'), @@ -378,11 +378,11 @@ _('GL Tags') ); -$MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', - '/GLBudgets.php', - '/AccountGroups.php', - '/AccountSections.php', - '/GLTags.php' +$MenuItems['GL']['Maintenance']['URL'] = array ('GLAccounts.php', + 'GLBudgets.php', + 'AccountGroups.php', + 'AccountSections.php', + 'GLTags.php' ); $MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), @@ -391,24 +391,24 @@ _('Depreciation Journal') ); -$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', - '/SelectAsset.php', - '/FixedAssetTransfer.php', - '/FixedAssetDepreciation.php' +$MenuItems['FA']['Transactions']['URL'] = array('FixedAssetItems.php', + 'SelectAsset.php', + 'FixedAssetTransfer.php', + 'FixedAssetDepreciation.php' ); $MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), ); -$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', +$MenuItems['FA']['Reports']['URL'] = array ('FixedAssetRegister.php', ); $MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), _('Add or Maintain Asset Locations') ); -$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', - '/FixedAssetLocations.php' +$MenuItems['FA']['Maintenance']['URL'] = array ('FixedAssetCategories.php', + 'FixedAssetLocations.php' ); $MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), @@ -416,15 +416,15 @@ _('Expenses Authorisation') ); -$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', - '/PcClaimExpensesFromTab.php', - '/PcAuthorizeExpenses.php' +$MenuItems['PC']['Transactions']['URL'] = array('PcAssignCashToTab.php', + 'PcClaimExpensesFromTab.php', + 'PcAuthorizeExpenses.php' ); $MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), ); -$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', +$MenuItems['PC']['Reports']['URL'] = array ('PcReportTab.php', ); $MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), @@ -433,13 +433,13 @@ _('Expenses for Type of PC Tab') ); -$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', - '/PcTabs.php', - '/PcExpenses.php', - '/PcExpensesTypeTab.php' +$MenuItems['PC']['Maintenance']['URL'] = array ('PcTypeTabs.php', + 'PcTabs.php', + 'PcExpenses.php', + 'PcExpensesTypeTab.php' ); -$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), +$MenuItems['system']['General Setup Options']['Caption'] = array (_('Company Preferences'), _('Configuration Settings'), _('User Maintenance'), _('Maintain Security Tokens'), @@ -460,28 +460,28 @@ _('SMTP Server Details') ); -$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', - '/SystemParameters.php', - '/WWW_Users.php', - '/SecurityTokens.php', - '/WWW_Access.php', - '/PageSecurity.php', - '/BankAccounts.php', - '/Currencies.php', - '/TaxAuthorities.php', - '/TaxGroups.php', - '/TaxProvinces.php', - '/TaxCategories.php', - '/PeriodsInquiry.php', - '/reportwriter/admin/ReportCreator.php', - '/AuditTrail.php', - '/GeocodeSetup.php', - '/FormDesigner.php', - '/Labels.php', - '/SMTPServer.php' - ); +$MenuItems['system']['General Setup Options']['URL'] =array('CompanyPreferences.php', + 'SystemParameters.php', + 'WWW_Users.php', + 'SecurityTokens.php', + 'WWW_Access.php', + 'PageSecurity.php', + 'BankAccounts.php', + 'Currencies.php', + 'TaxAuthorities.php', + 'TaxGroups.php', + 'TaxProvinces.php', + 'TaxCategories.php', + 'PeriodsInquiry.php', + 'reportwriter/admin/ReportCreator.php', + 'AuditTrail.php', + 'GeocodeSetup.php', + 'FormDesigner.php', + 'Labels.php', + 'SMTPServer.php' + ); -$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), +$MenuItems['system']['Receivables/Payables Setup']['Caption'] = array (_('Sales Types'), _('Customer Types'), _('Supplier Types'), _('Credit Status'), @@ -497,23 +497,23 @@ _('Discount Matrix') ); -$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', - '/CustomerTypes.php', - '/SupplierTypes.php', - '/CreditStatus.php', - '/PaymentTerms.php', - '/PO_AuthorisationLevels.php', - '/PaymentMethods.php', - '/SalesPeople.php', - '/Areas.php', - '/Shippers.php', - '/SalesGLPostings.php', - '/COGSGLPostings.php', - '/FreightCosts.php', - '/DiscountMatrix.php' +$MenuItems['system']['Receivables/Payables Setup']['URL'] = array ('SalesTypes.php', + 'CustomerTypes.php', + 'SupplierTypes.php', + 'CreditStatus.php', + 'PaymentTerms.php', + 'PO_AuthorisationLevels.php', + 'PaymentMethods.php', + 'SalesPeople.php', + 'Areas.php', + 'Shippers.php', + 'SalesGLPostings.php', + 'COGSGLPostings.php', + 'FreightCosts.php', + 'DiscountMatrix.php' ); -$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), +$MenuItems['system']['Inventory Setup']['Caption'] = array (_('Inventory Categories Maintenance'), _('Inventory Locations Maintenance'), _('Discount Category Maintenance'), _('Units of Measure'), @@ -523,45 +523,45 @@ _('Maintain Internal Departments') ); -$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', - '/Locations.php', - '/DiscountCategories.php', - '/UnitsOfMeasure.php', - '/MRPCalendar.php', - '/MRPDemandTypes.php', - '/BackupDatabase.php', - '/Departments.php' +$MenuItems['system']['Inventory Setup']['URL'] = array ('StockCategories.php', + 'Locations.php', + 'DiscountCategories.php', + 'UnitsOfMeasure.php', + 'MRPCalendar.php', + 'MRPDemandTypes.php', + 'BackupDatabase.php', + 'Departments.php' ); $MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), - _('Change A Customer Branch Code'), - _('Change An Inventory Item Code'), - _('Change A Supplier Code'), - _('Change A Location Code'), - _('Update costs for all BOM items, from the bottom up'), - _('Re-apply costs to Sales Analysis'), - _('Delete sales transactions'), - _('Reverse all supplier payments on a specified date')); + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier Code'), + _('Change A Location Code'), + _('Update costs for all BOM items, from the bottom up'), + _('Re-apply costs to Sales Analysis'), + _('Delete sales transactions'), + _('Reverse all supplier payments on a specified date')); -$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', - '/Z_ChangeBranchCode.php', - '/Z_ChangeStockCode.php', - '/Z_ChangeSupplierCode.php', - '/Z_ChangeLocationCode.php', - '/Z_BottomUpCosts.php', - '/Z_ReApplyCostToSA.php', - '/Z_DeleteSalesTransActions.php', - '/Z_ReverseSuppPaymentRun.php'); +$MenuItems['Utilities']['Transactions']['URL'] = array ('Z_ChangeCustomerCode.php', + 'Z_ChangeBranchCode.php', + 'Z_ChangeStockCode.php', + 'Z_ChangeSupplierCode.php', + 'Z_ChangeLocationCode.php', + 'Z_BottomUpCosts.php', + 'Z_ReApplyCostToSA.php', + 'Z_DeleteSalesTransActions.php', + 'Z_ReverseSuppPaymentRun.php'); $MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), _('Show Local Currency Total Suppliers Balances'), _('Show General Transactions That Do Not Balance'), _('Sales Integrity Check')); -$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', - '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php', - '/Z_SalesIntegrityCheck.php'); +$MenuItems['Utilities']['Reports']['URL']=array('Z_CurrencyDebtorsBalances.php', + 'Z_CurrencySuppliersBalances.php', + 'Z_CheckGLTransBalance.php', + 'Z_SalesIntegrityCheck.php'); $MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), _('Make New Company'), @@ -573,13 +573,13 @@ _('Re-Post all GL transactions from a specified period') ); -$MenuItems['Utilities']['Maintenance']['URL'] = array ('/Z_poAdmin.php', - '/Z_MakeNewCompany.php', - '/Z_DataExport.php', - '/Z_ImportStocks.php', - '/Z_ImportFixedAssets.php', - '/Z_CreateCompanyTemplateFile.php', - '/Z_UpdateChartDetailsBFwd.php', - '/Z_RePostGLFromPeriod.php' +$MenuItems['Utilities']['Maintenance']['URL']=array('Z_poAdmin.php', + 'Z_MakeNewCompany.php', + 'Z_DataExport.php', + 'Z_ImportStocks.php', + 'Z_ImportFixedAssets.php', + 'Z_CreateCompanyTemplateFile.php', + 'Z_UpdateChartDetailsBFwd.php', + 'Z_RePostGLFromPeriod.php' ); ?> \ No newline at end of file Modified: trunk/includes/main_header.inc =================================================================== --- trunk/includes/main_header.inc 2012-07-05 09:22:12 UTC (rev 9376) +++ trunk/includes/main_header.inc 2012-07-05 09:22:36 UTC (rev 9377) @@ -30,9 +30,11 @@ echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />'; } echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/sub.css" rel="stylesheet" type="text/css" />'; +echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/style.css" rel="stylesheet" type="text/css" />'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/MiscFunctions.js"></script>'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/FormFunctions.js"></script>'; echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/GraphFunctions.js"></script>'; +echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/script.js"></script>'; echo '</head>'; echo '<body onload="startTime()">'; @@ -41,4 +43,36 @@ <span id="clock" style="float: right; margin-right: 5px;"></span> </div>'; +include('includes/MainMenuLinksArray.php'); + +echo '<div class="menu_bar">'; + +echo '<ul class="menu" id="menu"> + <li><a href="#" class="menulink">Menu</a> + <ul>'; + for ($i=0; $i<sizeOf($ModuleList); $i++) { + echo '<li><a href="#" class="sub">' . $ModuleList[$i] . '</a>'; + echo '<ul>'; + foreach ($MenuItems[$ModuleLink[$i]] as $name=>$value) { + echo '<li class="sub" class="sub"><a href="#">'.$name.'</a>'; + echo '<ul>'; + $j=0; + foreach ($value['Caption'] as $MenuItem) { + echo '<li class="topline">'.InternalLink('',$value['URL'][$j],$MenuItem).'</li>'; + $j++; + } + echo '</li></ul>'; + } + echo '</ul></li>'; + } + +echo '</ul></li>'; +echo '</ul>'; + +echo '<script type="text/javascript"> + var menu=new menu.dd("menu"); + menu.init("menu","menuhover"); +</script>'; +echo '</div>'; + ?> \ No newline at end of file Deleted: trunk/index.php =================================================================== --- trunk/index.php 2012-07-05 09:22:12 UTC (rev 9376) +++ trunk/index.php 2012-07-05 09:22:36 UTC (rev 9377) @@ -1,251 +0,0 @@ -<?php -$PageSecurity=0; - -include('includes/session.inc'); -$title=_('Main Menu'); -include('includes/main_header.inc'); -echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/FormFunctions.js"></script>'; - -/*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */ -include('includes/IndexArray.php'); -echo '<link href="' . $rootpath . '/css/'. $_SESSION['Theme'] .'/sub.css" rel="stylesheet" type="text/css" />'; -echo '<div id="Mask"></div>'; -echo '<div id="SubWindow"></div>'; -echo '<div id="HelpWindow"></div>'; - -if ($_SESSION['UserSupplierID']!=''){ - echo '<table class="table_index"> - <tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=1">' . _('View or Amend outstanding offers') . '</a></p> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=2">' . _('Create a new offer') . '</a></p> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . '/SupplierTenders.php?TenderType=3">' . _('View any open tenders without an offer') . '</a></p> - </td> - </tr> - </table>'; - include('includes/main_footer.inc'); - exit; -} elseif ($_SESSION['UserCustomerID']!=''){ - echo '<table class="table_index"> - <tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Account Status') . '</a></p> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Place An Order') . '</a></p> - </td> - </tr> - <tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Status') . '</a></p> - </td> - </tr> - </table>'; - include('includes/main_footer.inc'); - exit; -} - -if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */ - $_SESSION['Module'] = $_GET['Application']; -} - -echo '<table width="99%"> - <tr> - <td style="width:10%" valign="top">'; -echo '<table class="main_menu" width="100%" cellspacing="0" cellpadding="0" border="0">'; - - $i=0; - -while ($i < count($ModuleLink)){ - - // This determines if the user has display access to the module see config.php and header.inc - // for the authorisation and security code - if ($_SESSION['ModulesEnabled'][$i]==1) { - // If this is the first time the application is loaded then it is possible that - // SESSION['Module'] is not set if so set it to the first module that is enabled for the user - if (!isset($_SESSION['Module'])OR $_SESSION['Module']==''){ - $_SESSION['Module']=$ModuleLink[$i]; - } - if ($ModuleLink[$i] == $_SESSION['Module']){ - echo '<tr><td class="main_menu_selected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; - } else { - echo '<tr><td class="main_menu_unselected"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Application='. $ModuleLink[$i] . '">' . $ModuleList[$i] . '</a></td></tr>'; - } - } - $i++; -} - -echo '</table>'; - -echo '</td>'; -echo '<td style="width:30%" valign="top">'; -if ($_SESSION['Module']=='system') { - $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/company.png" title="' . _('General Setup Options') . '" alt="' . _('General Setup Options') . '" /><b>' . _('General Setup Options') . '</b>'; -} else { - $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Transactions') . '" alt="' . _('Transactions') . '" /><b>'. _('Transactions') . '</b>'; -} -echo ' <table width="100%" class="selection"> - <tr> - <td class="menu_group_headers"> - <div class="centre"> - ' . $Header . ' - </div> - </td> - </tr>'; - -$i=0; -foreach ($MenuItems[$_SESSION['Module']]['Transactions']['Caption'] as $Caption) { -/* Transactions Menu Item */ - $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i],1)); - $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; - if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - echo '<tr> - <td class="menu_group_item"> - <p>• <a onclick="return OpenSubWindow(\'' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'\')" href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Transactions']['URL'][$i] .'">' . $Caption . '</a></p> - </td> - </tr>'; - } - $i++; -} -echo '</table>'; -echo '</td>'; - - -echo '<td style="width:30%" valign="top">'; -if ($_SESSION['Module']=='system') { - $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/ar.png" title="' . _('Receivables/Payables Setup') . '" alt="' . _('Receivables/Payables Setup') . '" /><b>' . _('Receivables/Payables Setup') . '</b>'; -} else { - $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/reports.png" title="' . _('Inquiries and Reports') . '" alt="' . _('Inquiries and Reports') . '" /><b>'. _('Inquiries and Reports') . '</b>'; -} -echo ' <table width="100%" class="selection"> - <tr> - <td class="menu_group_headers"> - <div class="centre"> - ' . $Header . ' - </div> - </td> - </tr>'; -$i=0; -foreach ($MenuItems[$_SESSION['Module']]['Reports']['Caption'] as $Caption) { -/* Transactions Menu Item */ - $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Reports']['URL'][$i],1)); - $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; - if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - echo '<tr> - <td class="menu_group_item"> - <p>• <a href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Reports']['URL'][$i] .'">' . $Caption . '</a></p> - </td> - </tr>'; - } - $i++; -} -echo GetRptLinks($_SESSION['Module']); -echo '</table>'; -echo '</td>'; - - -echo '<td style="width:30%" valign="top">'; -if ($_SESSION['Module']=='system') { - $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory Setup') . '" alt="' . _('Inventory Setup') . '" /><b>' . _('Inventory Setup') . '</b>'; -} else { - $Header='<img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Maintenance') . '" alt="' . _('Maintenance') . '" /><b>'. _('Maintenance') . '</b>'; -} -echo ' <table width="100%" class="selection"> - <tr> - <td class="menu_group_headers"> - <div class="centre"> - ' . $Header . ' - </div> - </td> - </tr>'; -$i=0; -foreach ($MenuItems[$_SESSION['Module']]['Maintenance']['Caption'] as $Caption) { -/* Transactions Menu Item */ - $ScriptNameArray = explode('?', substr($MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i],1)); - $PageSecurity = $_SESSION['PageSecurityArray'][$ScriptNameArray[0]]; - if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - echo '<tr> - <td class="menu_group_item"> - <p>• <a onclick="return OpenSubWindow(\'' . $rootpath . $MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i] .'\')" href="' . $rootpath . $MenuItems[$_SESSION['Module']]['Maintenance']['URL'][$i] .'">' . $Caption . '</a></p> - </td> - </tr>'; - } - $i++; -} -echo '</table>'; -echo '</td>'; - -echo '</tr> - </table>'; - -include('includes/main_footer.inc'); - -function GetRptLinks($GroupID) { -/* -This function retrieves the reports given a certain group id as defined in /reports/admin/defaults.php -in the acssociative array $ReportGroups[]. It will fetch the reports belonging solely to the group -specified to create a list of links for insertion into a table to choose a report. Two table sections will -be generated, one for standard reports and the other for custom reports. -*/ - global $db, $rootpath, $ReportList; - require_once('reportwriter/languages/en_US/reports.php'); - require_once('reportwriter/admin/defaults.php'); - $GroupID=$ReportList[$GroupID]; - $Title= array(_('Custom Reports'), _('Standard Reports and Forms')); - - $sql= "SELECT id, - reporttype, - defaultreport, - groupname, - reportname - FROM reports - ORDER BY groupname, - reportname"; - $Result=DB_query($sql,$db,'','',false,true); - $ReportList = ''; - while ($Temp = DB_fetch_array($Result)) $ReportList[] = $Temp; - - $RptLinks = ''; - for ($Def=1; $Def>=0; $Def--) { - $RptLinks .= '<tr><td class="menu_group_headers"><div style="text-align:center">'.$Title[$Def].'</div></td></tr>'; - $NoEntries = true; - if ($ReportList) { // then there are reports to show, show by grouping - foreach ($ReportList as $Report) { - if ($Report['groupname']==$GroupID AND $Report['defaultreport']==$Def) { - $RptLinks .= '<tr><td class="menu_group_item">'; - $RptLinks .= '<p>• <a href="' . $rootpath . '/reportwriter/ReportMaker.php?action=go&reportid=' . $Report['id'] . '">' . _($Report['reportname']) . '</a></p>'; - $RptLinks .= '</td></tr>'; - $NoEntries = false; - } - } - // now fetch the form groups that are a part of this group (List after reports) - $NoForms = true; - foreach ($ReportList as $Report) { - $Group=explode(':',$Report['groupname']); // break into main group and form group array - if ($NoForms AND $Group[0]==$GroupID AND $Report['reporttype']=='frm' AND $Report['defaultreport']==$Def) { - $RptLinks .= '<tr><td class="menu_group_item">'; - $RptLinks .= '<img src="' . $rootpath . '/css/' . $_SESSION['Theme'] . '/images/folders.gif" width="16" height="13" alt="" /> '; - $RptLinks .= '<p>• <a href="' . $rootpath . '/reportwriter/FormMaker.php?id=' . $Report['groupname'] . '"></p>'; - $RptLinks .= $FormGroups[$Report['groupname']] . '</a>'; - $RptLinks .= '</td></tr>'; - $NoForms = false; - $NoEntries = false; - } - } - } - if ($NoEntries) $RptLinks .= '<tr><td class="menu_group_item">' . _('There are no reports to show!') . '</td></tr>'; - } - return $RptLinks; -} - -?> \ No newline at end of file Copied: trunk/index.php (from rev 9376, trunk/new_index.php) =================================================================== --- trunk/index.php (rev 0) +++ trunk/index.php 2012-07-05 09:22:36 UTC (rev 9377) @@ -0,0 +1,16 @@ +<?php + +$PageSecurity = 1; +include('includes/session.inc'); + +$title = $ProjectName . ' - ' . _('Main Dashboard'); +include('includes/main_header.inc'); +echo '<div id="Mask"></div>'; +echo '<div id="SubWindow"></div>'; + +include('dashboard/CompanyInfo.php'); +include('dashboard/UserInfo.php'); +include('dashboard/SalesGraph.php'); +include('dashboard/StockBelowReorderLevel.php'); + +?> \ No newline at end of file Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-05 09:22:12 UTC (rev 9376) +++ trunk/javascripts/FormFunctions.js 2012-07-05 09:22:36 UTC (rev 9377) @@ -77,6 +77,12 @@ return false; } +function sleep(ms) { + var dt = new Date(); + dt.setTime(dt.getTime() + ms); + while (new Date().getTime() < dt.getTime()); +} + function OpenSubWindow(TargetURL) { document.getElementById("Mask").setAttribute("class", "mask"); document.getElementById("SubWindow").setAttribute("class", "inputbox"); Added: trunk/javascripts/script.js =================================================================== --- trunk/javascripts/script.js (rev 0) +++ trunk/javascripts/script.js 2012-07-05 09:22:36 UTC (rev 9377) @@ -0,0 +1,33 @@ +var menu=function(){ + var t=15,z=50,s=6,a; + function dd(n){this.n=n; this.h=[]; this.c=[]} + dd.prototype.init=function(p,c){ + a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0; + for(i;i<l;i++){ + var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i]; + h.onmouseover=new Function(this.n+'.st('+i+',true)'); + h.onmouseout=new Function(this.n+'.st('+i+')'); + } + } + dd.prototype.st=function(x,f){ + var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0]; + clearInterval(c.t); c.style.overflow='hidden'; + if(f){ + p.className+=' '+a; + if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0} + if(c.mh==c.offsetHeight){c.style.overflow='visible'} + else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)} + }else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)} + } + function sl(c,f){ + var h=c.offsetHeight; + if((h<=0&&f!=1)||(h>=c.mh&&f==1)){ + if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'} + clearInterval(c.t); return + } + var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh; + c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')'; + c.style.height=h+(d*f)+'px' + } + return{dd:dd} +}(); \ No newline at end of file Deleted: trunk/new_index.php =================================================================== --- trunk/new_index.php 2012-07-05 09:22:12 UTC (rev 9376) +++ trunk/new_index.php 2012-07-05 09:22:36 UTC (rev 9377) @@ -1,16 +0,0 @@ -<?php - -$PageSecurity = 1; -include('includes/session.inc'); - -$title = $ProjectName . ' - ' . _('Main Dashboard'); -include('includes/main_header.inc'); -echo '<div id="Mask"></div>'; -echo '<div id="SubWindow"></div>'; - -include('dashboard/CompanyInfo.php'); -include('dashboard/UserInfo.php'); -include('dashboard/SalesGraph.php'); -include('dashboard/StockBelowReorderLevel.php'); - -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-05 13:59:01
|
Revision: 9380 http://weberp.svn.sourceforge.net/weberp/?rev=9380&view=rev Author: tim_schofield Date: 2012-07-05 13:58:50 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Add in Exit button to logoff Modified Paths: -------------- trunk/css/silverwolf/sub.css trunk/includes/main_header.inc Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-07-05 13:58:29 UTC (rev 9379) +++ trunk/css/silverwolf/sub.css 2012-07-05 13:58:50 UTC (rev 9380) @@ -106,6 +106,7 @@ margin-left: 4px; margin-right: 4px; padding-left: 10px; + border:1px solid #aaa; width: 98%; } @@ -224,6 +225,7 @@ padding-top:0px; padding-right:10px; height: 100%; + color: #ffffff; cursor: pointer; } @@ -240,7 +242,7 @@ border: solid 1px; border-radius: 4px; float: left; - margin: 5px; + margin-right: 1%; } table.selection { @@ -425,6 +427,15 @@ color:#B8FFAE; } +a.exit { + float: right; + padding-top:0px; + padding-right:10px; + height: 100%; + color: #000000; + cursor: pointer; +} + img.ButtonIcon { width: 14px; } \ No newline at end of file Modified: trunk/includes/main_header.inc =================================================================== --- trunk/includes/main_header.inc 2012-07-05 13:58:29 UTC (rev 9379) +++ trunk/includes/main_header.inc 2012-07-05 13:58:50 UTC (rev 9380) @@ -40,13 +40,13 @@ echo '<body onload="startTime()">'; echo '<div class="main_title_bar">' . $ProjectName . ' - <span id="clock" style="float: right; margin-right: 5px;"></span> + <div class="exit"><a href="Logout.php" class="exit">' . _('Exit') . '</a></div> + + <span id="clock" style="float: center; margin-right: 5px;"></span> </div>'; include('includes/MainMenuLinksArray.php'); -echo '<div class="menu_bar">'; - echo '<ul class="menu" id="menu"> <li><a href="#" class="menulink">Menu</a> <ul>'; @@ -73,6 +73,5 @@ var menu=new menu.dd("menu"); menu.init("menu","menuhover"); </script>'; -echo '</div>'; ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-06 14:26:17
|
Revision: 9383 http://weberp.svn.sourceforge.net/weberp/?rev=9383&view=rev Author: tim_schofield Date: 2012-07-06 14:26:08 +0000 (Fri, 06 Jul 2012) Log Message: ----------- Improvements to layout Modified Paths: -------------- trunk/css/silverwolf/sub.css trunk/includes/main_header.inc trunk/index.php Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-07-06 14:25:55 UTC (rev 9382) +++ trunk/css/silverwolf/sub.css 2012-07-06 14:26:08 UTC (rev 9383) @@ -113,7 +113,7 @@ ul.menu { list-style:none; margin:0; - padding:0; + padding-top:10px; opacity:0.9; } @@ -148,7 +148,7 @@ position:relative; border:1px solid #aaa; border-top:none; - width:148px; + width:248px; margin:0; } @@ -163,7 +163,7 @@ } ul.menu ul ul { - left:148px; + left:248px; top:-1px; } @@ -172,7 +172,7 @@ padding:5px 7px 7px; font-weight:bold; background:#d1d1d1; - width:134px; + width:234px; } ul.menu .menulink:hover, ul.menu .menuhover { @@ -180,7 +180,7 @@ } ul.menu .sub { - background:#d1d1d1 136px 8px no-repeat; + background:#d1d1d1 236px 8px no-repeat; } ul.menu .topline { Modified: trunk/includes/main_header.inc =================================================================== --- trunk/includes/main_header.inc 2012-07-06 14:25:55 UTC (rev 9382) +++ trunk/includes/main_header.inc 2012-07-06 14:26:08 UTC (rev 9383) @@ -40,7 +40,7 @@ echo '<body onload="startTime()">'; echo '<div class="main_title_bar">' . $ProjectName . ' - <div class="exit"><a href="Logout.php" class="exit">' . _('Exit') . '</a></div> + <div class="exit"><a href="Logout.php" class="exit" title="' . _('Exit From') . ' ' . $ProjectName . '">' . _('Exit') . '</a></div> <span id="clock" style="float: center; margin-right: 5px;"></span> </div>'; @@ -48,7 +48,7 @@ include('includes/MainMenuLinksArray.php'); echo '<ul class="menu" id="menu"> - <li><a href="#" class="menulink">Menu</a> + <li><a href="#" class="menulink">' . $ProjectName . ' - ' . _('Menu') . '</a> <ul>'; for ($i=0; $i<sizeOf($ModuleList); $i++) { echo '<li><a href="#" class="sub">' . $ModuleList[$i] . '</a>'; Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-07-06 14:25:55 UTC (rev 9382) +++ trunk/index.php 2012-07-06 14:26:08 UTC (rev 9383) @@ -8,9 +8,14 @@ echo '<div id="Mask"></div>'; echo '<div id="SubWindow"></div>'; +echo '<table width="100%"><tr><td>'; include('dashboard/CompanyInfo.php'); +echo '</td><td>'; include('dashboard/UserInfo.php'); +echo '</td><td>'; include('dashboard/SalesGraph.php'); +echo '</td><td>'; include('dashboard/StockBelowReorderLevel.php'); +echo '</td></tr></table>'; ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <tim...@us...> - 2012-07-08 19:38:37
|
Revision: 9389 http://weberp.svn.sourceforge.net/weberp/?rev=9389&view=rev Author: tim_schofield Date: 2012-07-08 19:38:29 +0000 (Sun, 08 Jul 2012) Log Message: ----------- New customer search facility Modified Paths: -------------- trunk/SelectCustomer.php trunk/css/silverwolf/images/cross.png trunk/css/silverwolf/sub.css trunk/includes/CustomerSearch.php trunk/javascripts/FormFunctions.js Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-07-08 19:38:12 UTC (rev 9388) +++ trunk/SelectCustomer.php 2012-07-08 19:38:29 UTC (rev 9389) @@ -5,10 +5,11 @@ $title = _('Search Customers'); include ('includes/header.inc'); include ('includes/SQL_CommonFunctions.inc'); -include ('includes/CustomerSearch.php'); -if (isset($_GET['Select'])) { - $_SESSION['CustomerID'] = $_GET['Select']; + +if (isset($_POST['ChooseCustomer'])) { + $_SESSION['CustomerID'] = $_POST['ChooseCustomer']; } + if (!isset($_SESSION['CustomerID'])) { //initialise if not already done $_SESSION['CustomerID'] = ''; } @@ -21,7 +22,6 @@ $_POST['CustAdd']=''; $_POST['CustType']=''; } -echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customers') . '</p>'; if (!isset($_SESSION['CustomerType'])) { //initialise if not already done $_SESSION['CustomerType'] = ""; } @@ -80,73 +80,58 @@ } unset($result); $msg = ''; -$result=CustomerSearchSQL($db); -if (!isset($_POST['Search']) and !isset($_POST['Next']) and !isset($_POST['Previous']) and !isset($_POST['Go1']) and !isset($_POST['Go2']) and isset($_POST['JustSelectedACustomer']) and empty($_SESSION['CustomerID'])){ - /*Need to figure out the number of the form variable that the user clicked on */ - for ($i=0; $i< count($_POST); $i++){ //loop through the returned customers - if(isset($_POST['SubmitCustomerSelection'.$i])){ - break; - } - } - if ($i==count($_POST)){ - prnMsg(_('Unable to identify the selected customer'),'error'); - } else { - $_SESSION['CustomerID'] = $_POST['SelectedCustomer'.$i]; - $_SESSION['BranchID'] = $_POST['SelectedBranch'.$i]; - unset($_POST['Search']); - } -} if ($_SESSION['CustomerID'] != '' AND !isset($_POST['Search'])) { $SQL = "SELECT debtorsmaster.name, - debtorsmaster.currcode, - custbranch.phoneno - FROM debtorsmaster INNER JOIN custbranch - ON debtorsmaster.debtorno=custbranch.debtorno - WHERE custbranch.debtorno='" . $_SESSION['CustomerID'] . "' - AND custbranch.branchcode='" . $_SESSION['BranchID'] . "'"; + debtorsmaster.currcode + FROM debtorsmaster + WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; $ErrMsg = _('The customer name requested cannot be retrieved because'); $result = DB_query($SQL, $db, $ErrMsg); if ($myrow = DB_fetch_array($result)) { $CustomerName = $myrow['name']; - $PhoneNo = $myrow['phoneno']; $Currency = $myrow['currcode']; } unset($result); // Adding customer encoding. Not needed for general use. This is not a recommended upgrade submission. Gilles Deacur - echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . - _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . ' - ' . $PhoneNo . _(' has been selected') . '</p>'; - echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br />'; $_POST['Select'] = NULL; - echo '<table cellpadding="4" width="90%" class="selection"><tr><th width="33%">' . _('Customer Inquiries') . '</th> - <th width="33%">' . _('Customer Transactions') . '</th> - <th width="33%">' . _('Customer Maintenance') . '</th></tr>'; + echo '<br /> + <table cellpadding="4" width="90%" class="selection"> + <tr> + <th colspan="3">' . _('Customer') . ' - ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . '</th> + </tr> + <tr> + <th width="33%">' . _('Customer Inquiries') . '</th> + <th width="33%">' . _('Customer Transactions') . '</th> + <th width="33%">' . _('Customer Maintenance') . '</th></tr>'; echo '<tr><td valign=top class="select">'; /* Customer Inquiry Options */ - echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br />'; - echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />'; - echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />'; - echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br />'; + echo InternalLink($rootpath, 'CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'], _('Customer Transaction Inquiries')) . '<br />'; + echo Internallink($rootpath, 'Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No', _('View Customer Details')) . '<br />'; + echo InternalLink($rootpath, 'PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes', _('Print Customer Statement')) . '<br />'; + echo InternalLink($rootpath, 'SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '', _('Order Inquiries')) . '<br />'; wikiLink('Customer', $_SESSION['CustomerID']); echo '</td><td valign=top class="select">'; - echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br />'; - echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br />'; - echo '<a href="' . $rootpath . '/CounterSales.php?DebtorNo=' . $_SESSION['CustomerID'] . '&BranchNo=' . $_SESSION['BranchID'] . '">' . _('Create a Counter Sale for this Customer') . '</a><br />'; + echo InternalLink($rootpath, 'SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'], _('Modify Outstanding Sales Orders')) . '<br />'; + echo InternalLink($rootpath, 'CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'], _('Allocate Receipts or Credit Notes')) . '<br />'; echo '</td><td valign=top class="select">'; - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />'; - echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br />'; - echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br />'; - echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br />'; - echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br />'; - echo '<a href="' . $rootpath . '/CustLoginSetup.php">' . _('Customer Login Configuration') . '</a>'; + echo InternalLink($rootpath, 'Customers.php?"', _('Add a New Customer')) . '<br />'; + echo InternalLink($rootpath, 'Customers.php?DebtorNo=' . $_SESSION['CustomerID'], _('Modify Customer Details')) . '<br />'; + echo InternalLink($rootpath, 'CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'], _('Add/Modify/Delete Customer Branches')) . '<br />'; + echo InternalLink($rootpath, 'SelectProduct.php', _('Special Customer Prices')) . '<br />'; + echo InternalLink($rootpath, 'CustEDISetup.php', _('Customer EDI Configuration')) . '<br />'; + echo InternalLink($rootpath, 'CustLoginSetup.php', _('Customer Login Configuration')); echo '</td>'; echo '</tr></table><br />'; } else { - echo '<table width="90%" class="selection"><tr><th width="33%">' . _('Customer Inquiries') . '</th> - <th width=33%>' . _('Customer Transactions') . '</th> - <th width=33%>' . _('Customer Maintenance') . '</th></tr>'; + echo '<br /><table width="90%" class="selection"> + <tr> + <th width="33%">' . _('Customer Inquiries') . '</th> + <th width="33%">' . _('Customer Transactions') . '</th> + <th width="33%">' . _('Customer Maintenance') . '</th> + </tr>'; echo '<tr><td class="select">'; echo '</td><td class="select">'; echo '</td><td class="select">'; @@ -156,12 +141,20 @@ echo '</td></tr></table>'; } if (strlen($msg)>1){ - prnMsg($msg, 'info'); + prnMsg($msg, 'info'); } -ShowCustomerSearchFields($rootpath, $theme, $db); -if (isset($result)) { - ShowReturnedCustomers($result); -} + +echo '<br /> + <div class="centre"> + <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/CustomerSearch.php\', \'' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '\')"> + <img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Click To Search For Customers') . '" alt="" /> + ' . _('Search For Customers') . ' + </button> + </div>'; + +echo '<div id="SearchMask"></div>'; +echo '<div id="SearchWindow">'; +echo '</div>'; // Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID'] != '') { if ($_SESSION['geocode_integration'] == 1) { Modified: trunk/css/silverwolf/images/cross.png =================================================================== --- trunk/css/silverwolf/images/cross.png 2012-07-08 19:38:12 UTC (rev 9388) +++ trunk/css/silverwolf/images/cross.png 2012-07-08 19:38:29 UTC (rev 9389) @@ -1,419 +1,403 @@ \x89PNG |
From: <tim...@us...> - 2012-07-09 10:18:41
|
Revision: 9390 http://weberp.svn.sourceforge.net/weberp/?rev=9390&view=rev Author: tim_schofield Date: 2012-07-09 10:18:32 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Improvements to customer search code Modified Paths: -------------- trunk/SelectCustomer.php trunk/includes/CustomerSearch.php trunk/javascripts/FormFunctions.js Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-07-08 19:38:29 UTC (rev 9389) +++ trunk/SelectCustomer.php 2012-07-09 10:18:32 UTC (rev 9390) @@ -144,9 +144,10 @@ prnMsg($msg, 'info'); } +$URLArray=explode('/', $_SERVER['PHP_SELF']); echo '<br /> <div class="centre"> - <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/CustomerSearch.php\', \'' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '\')"> + <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/CustomerSearch.php\', \'' . htmlspecialchars(array_pop($URLArray), ENT_QUOTES, 'UTF-8') . '\')"> <img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Click To Search For Customers') . '" alt="" /> ' . _('Search For Customers') . ' </button> Modified: trunk/includes/CustomerSearch.php =================================================================== --- trunk/includes/CustomerSearch.php 2012-07-08 19:38:29 UTC (rev 9389) +++ trunk/includes/CustomerSearch.php 2012-07-09 10:18:32 UTC (rev 9390) @@ -15,7 +15,7 @@ $_POST['PartialName']=''; $_POST['PartialAddress']=''; $_POST['PartialTelephone']=''; - echo '<form onkeyup="return SubmitSearchForm(this);" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<form onkeyup="return SubmitSearchForm(this,\'includes/CustomerSearch.php?CallingURL='.$_GET['CallingURL'].'\');" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="manual_title_bar">' . _('Search Customers') . '</div>'; @@ -84,7 +84,7 @@ } echo '<tr> <th class="dialog_header" style="background:transparent" colspan="5"> - <button class="dialog_button" type="submit" name="ChooseCustomer" id="ChooseCustomer" value="submit" onclick="return SubmitForm(SearchForm, \'SelectCustomer.php\')"> + <button class="dialog_button" type="submit" name="ChooseCustomer" id="ChooseCustomer" value="submit" onclick="return SubmitForm(SearchForm,\''.$_GET['CallingURL'].'\')"> <img src="css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" /> ' . _('Select') . ' </button> <button class="dialog_button" type="cancel" id="CancelSearch" value="submit" onclick="CloseSearchWindow()"> Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-08 19:38:29 UTC (rev 9389) +++ trunk/javascripts/FormFunctions.js 2012-07-09 10:18:32 UTC (rev 9390) @@ -80,8 +80,10 @@ return false; } -function SubmitSearchForm(FormName) { - var Target=FormName.action; +function SubmitSearchForm(FormName,Target='') { + if (Target=='') { + var Target=FormName.action; + } var PostData=''; for(var i=0,fLen=FormName.length;i<fLen;i++){ PostData=PostData+FormName.elements[i].name+'='+FormName.elements[i].value+'&'; @@ -123,7 +125,6 @@ } function OpenSearchWindow(TargetURL, CallingURL) { - alert(CallingURL); document.getElementById("SearchMask").setAttribute("class", "mask"); document.getElementById("SearchWindow").setAttribute("class", "searchwindow"); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari @@ -136,7 +137,7 @@ document.getElementById("SearchWindow").innerHTML=xmlhttp.responseText; } } - xmlhttp.open("GET",TargetURL,true); + xmlhttp.open("GET",TargetURL+'?CallingURL='+CallingURL,true); xmlhttp.send(); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-11 08:31:34
|
Revision: 9408 http://weberp.svn.sourceforge.net/weberp/?rev=9408&view=rev Author: tim_schofield Date: 2012-07-11 08:31:28 +0000 (Wed, 11 Jul 2012) Log Message: ----------- Improvements to customer search code Modified Paths: -------------- trunk/includes/CustomerSearch.php trunk/includes/MiscFunctions.php trunk/javascripts/FormFunctions.js Modified: trunk/includes/CustomerSearch.php =================================================================== --- trunk/includes/CustomerSearch.php 2012-07-11 08:31:16 UTC (rev 9407) +++ trunk/includes/CustomerSearch.php 2012-07-11 08:31:28 UTC (rev 9408) @@ -64,7 +64,7 @@ echo '<td class="background_td" width="66%" id="SearchResults">'; } -echo '<form onkeyup="return SubmitForm(this);" name="SearchForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onkeyup="return SubmitSearchForm(this);" name="SearchForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table style="border: solid #000000 1px;width:100%;border-radius: 5px;"> Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-07-11 08:31:16 UTC (rev 9407) +++ trunk/includes/MiscFunctions.php 2012-07-11 08:31:28 UTC (rev 9408) @@ -326,12 +326,14 @@ return false; } -function InternalLink($rootpath, $Script, $Caption, $Class='') { +function InternalLink($rootpath, $Script, $Caption, $Class='', $Title='') { + if ($Title=='') { + $Title = $Caption; + } $PathArray = explode('?', $Script); -// $ScriptNameArray = explode('/', substr($PathArray[0],1)); $PageSecurity = $_SESSION['PageSecurityArray'][$PathArray[0]]; if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - return '<a class="' . $Class . '" onclick="return OpenSubWindow(\'' . $Script.'\')" href="" title="' . $Caption . '">' . $Caption . '</a>'; + return '<a class="' . $Class . '" onclick="return OpenSubWindow(\'' . $Script.'\')" href="" title="' . $Title . '">' . $Caption . '</a>'; } } Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-11 08:31:16 UTC (rev 9407) +++ trunk/javascripts/FormFunctions.js 2012-07-11 08:31:28 UTC (rev 9408) @@ -55,7 +55,7 @@ function SubmitForm(FormName, Target='') { if (Target=='') { - var Target=FormName.action; + Target=FormName.action; } var PostData=''; for(var i=0,fLen=FormName.length;i<fLen;i++){ @@ -76,7 +76,6 @@ xmlhttp.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate"); xmlhttp.setRequestHeader("Pragma","no-cache"); xmlhttp.send(PostData); - CloseSearchWindow(); return false; } @@ -100,9 +99,8 @@ } xmlhttp.open("POST",Target,true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); - xmlhttp.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate"); - xmlhttp.setRequestHeader("Pragma","no-cache"); xmlhttp.send(PostData); +// CloseSearchWindow(); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-13 08:27:34
|
Revision: 9415 http://weberp.svn.sourceforge.net/weberp/?rev=9415&view=rev Author: tim_schofield Date: 2012-07-13 08:27:23 +0000 (Fri, 13 Jul 2012) Log Message: ----------- Ricard: Restrict the internal use stock categories by user role as described in http://www.weberp.org/forum/showthread.php?tid=171 Modified Paths: -------------- trunk/InternalStockRequest.php trunk/includes/MainMenuLinksArray.php Added Paths: ----------- trunk/InternalStockCategoriesByRole.php trunk/sql/mysql/updates/141.php Added: trunk/InternalStockCategoriesByRole.php =================================================================== --- trunk/InternalStockCategoriesByRole.php (rev 0) +++ trunk/InternalStockCategoriesByRole.php 2012-07-13 08:27:23 UTC (rev 9415) @@ -0,0 +1,236 @@ +<?php + +/* $Id: InternalStockCategoriesByRole.php 5217 2012-04-03 21:57:50Z tehonu $ */ +/* Functionas as described in http://www.weberp.org/forum/showthread.php?tid=171 */ + +include('includes/session.inc'); +$title = _('Internal Stock Categories Requests By Security Role Maintenance '); + +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Payment Entry') + . '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_POST['SelectedType'])){ + $SelectedType = mb_strtoupper($_POST['SelectedType']); +} elseif (isset($_GET['SelectedType'])){ + $SelectedType = mb_strtoupper($_GET['SelectedType']); +} else { + $SelectedType=''; +} + +if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){ + $InputError = 1; + prnMsg(_('The contain any of the following characters " \' - & or a space'),'error'); +} +if (isset($_POST['SelectedRole'])){ + $SelectedRole = mb_strtoupper($_POST['SelectedRole']); +} elseif (isset($_GET['SelectedRole'])){ + $SelectedRole = mb_strtoupper($_GET['SelectedRole']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedRole); + unset($SelectedType); +} + +if (isset($_POST['Process'])) { + + if ($_POST['SelectedRole'] == '') { + echo prnMsg(_('You have not selected a security role to maintain the internal stock categories on'),'error'); + echo '<br />'; + unset($SelectedRole); + unset($_POST['SelectedRole']); + } +} + +if (isset($_POST['submit'])) { + + $InputError=0; + + if ($_POST['SelectedCategory']=='') { + $InputError=1; + echo prnMsg(_('You have not selected a stock category to be added as internal to this security role'),'error'); + echo '<br />'; + unset($SelectedRole); + } + + if ( $InputError !=1 ) { + + // First check the type is not being duplicated + + $checkSql = "SELECT count(*) + FROM internalstockcatrole + WHERE secroleid= '" . $_POST['SelectedRole'] . "' + AND categoryid = '" . $_POST['SelectedCategory'] . "'"; + + $checkresult = DB_query($checkSql,$db); + $checkrow = DB_fetch_row($checkresult); + + if ( $checkrow[0] >0) { + $InputError = 1; + prnMsg( _('The Stock Category') . ' ' . $_POST['categoryid'] . ' ' ._('already allowed as internal for this security role'),'error'); + } else { + // Add new record on submit + $sql = "INSERT INTO internalstockcatrole (secroleid, + categoryid) + VALUES ('" . $_POST['SelectedRole'] . "', + '" . $_POST['SelectedCategory'] . "')"; + + $msg = _('Stock Category:') . ' ' . $_POST['SelectedCategory'].' '._('has been allowed to user role') .' '. $_POST['SelectedRole'] . ' ' . _('as internal'); + $checkSql = "SELECT count(secroleid) + FROM securityroles"; + $result = DB_query($checkSql, $db); + $row = DB_fetch_row($result); + } + } + + if ( $InputError !=1) { + //run the SQL from either of the above possibilites + $result = DB_query($sql,$db); + prnMsg($msg,'success'); + unset($_POST['SelectedCategory']); + } + +} elseif ( isset($_GET['delete']) ) { + $sql="DELETE FROM internalstockcatrole + WHERE secroleid='".$SelectedRole."' + AND categoryid='".$SelectedType."'"; + + $ErrMsg = _('The Stock Category by Role record could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + prnMsg(_('Internal Stock Category').' '. $SelectedType .' '. _('for user role').' '. $SelectedRole .' '. _('has been deleted') ,'success'); + unset($_GET['delete']); +} + +if (!isset($SelectedRole)){ + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; //Main table + + echo '<tr><td>' . _('Select User Role') . ':</td><td><select name="SelectedRole">'; + + $SQL = "SELECT secroleid, + secrolename + FROM securityroles"; + + $result = DB_query($SQL,$db); + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($SelectedRole) and $myrow['secroleid']==$SelectedRole) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['secroleid'] . '">' . $myrow['secroleid'] . ' - ' . $myrow['secrolename'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + echo '</table>'; // close main table + DB_free_result($result); + + echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + + echo '</div> + </form>'; + +} + +//end of ifs and buts! +if (isset($_POST['process'])OR isset($SelectedRole)) { + + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Stock Categories available as internal for role') . ' ' .$SelectedRole. '</a></div>'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + echo '<input type="hidden" name="SelectedRole" value="' . $SelectedRole . '" />'; + + $sql = "SELECT internalstockcatrole.categoryid, + stockcategory.categorydescription + FROM internalstockcatrole INNER JOIN stockcategory + ON internalstockcatrole.categoryid=stockcategory.categoryid + WHERE internalstockcatrole.secroleid='".$SelectedRole."' + ORDER BY internalstockcatrole.categoryid ASC"; + + $result = DB_query($sql,$db); + + echo '<br /> + <table class="selection">'; + echo '<tr><th colspan="3"><h3>' . _('Internal Stock Categories Allowed to user role') . ' ' .$SelectedRole. '</h3></th></tr>'; + echo '<tr> + <th>' . _('Category Code') . '</th> + <th>' . _('Description') . '</th> + </tr>'; + +$k=0; //row colour counter + +while ($myrow = DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + printf('<td>%s</td> + <td>%s</td> + <td><a href="%s?SelectedType=%s&delete=yes&SelectedRole=' . $SelectedRole . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this internal stock category code?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow['categoryid'], + $myrow['categorydescription'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), + $myrow['categoryid'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), + $myrow['categoryid']); + } + //END WHILE LIST LOOP + echo '</table>'; + + if (! isset($_GET['delete'])) { + + + echo '<br /><table class="selection">'; //Main table + + echo '<tr><td>' . _('Select Stock Category Code') . ':</td><td><select name="SelectedCategory">'; + + $SQL = "SELECT categoryid, + categorydescription + FROM stockcategory"; + + $result = DB_query($SQL,$db); + if (!isset($_POST['SelectedCategory'])){ + echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + } + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['SelectedCategory']) AND $myrow['categoryid']==$_POST['SelectedCategory']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + echo '</table>'; // close main table + DB_free_result($result); + + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + + echo '</div> + </form>'; + + } // end if user wish to delete +} + +include('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-07-11 19:41:06 UTC (rev 9414) +++ trunk/InternalStockRequest.php 2012-07-13 08:27:23 UTC (rev 9415) @@ -263,10 +263,12 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>'; -$SQL = "SELECT categoryid, - categorydescription - FROM stockcategory - ORDER BY categorydescription"; +$SQL = "SELECT stockcategory.categoryid, + stockcategory.categorydescription + FROM stockcategory, internalstockcatrole + WHERE stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " + ORDER BY stockcategory.categorydescription"; $result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; @@ -280,9 +282,9 @@ $_POST['StockCat'] = ""; } if ($_POST['StockCat'] == 'All') { - echo '<option selected="True" value="All">' . _('All').'</option>'; + echo '<option selected="True" value="All">' . _('All Authorised').'</option>'; } else { - echo '<option value="All">' . _('All').'</option>'; + echo '<option value="All">' . _('All Authorised').'</option>'; } while ($myrow1 = DB_fetch_array($result1)) { if ($myrow1['categoryid'] == $_POST['StockCat']) { @@ -333,8 +335,11 @@ stockmaster.units as stockunits, stockmaster.decimalplaces FROM stockmaster, - stockcategory + stockcategory, + internalstockcatrole WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' AND stockmaster.description " . LIKE . " '$SearchString' @@ -346,8 +351,11 @@ stockmaster.units as stockunits, stockmaster.decimalplaces FROM stockmaster, - stockcategory + stockcategory, + internalstockcatrole WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 @@ -367,8 +375,11 @@ stockmaster.units as stockunits, stockmaster.decimalplaces FROM stockmaster, - stockcategory + stockcategory, + internalstockcatrole WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' AND stockmaster.mbflag <>'G' @@ -380,8 +391,11 @@ stockmaster.units as stockunits, stockmaster.decimalplaces FROM stockmaster, - stockcategory + stockcategory, + internalstockcatrole WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' AND stockmaster.mbflag <>'G' @@ -397,8 +411,11 @@ stockmaster.units as stockunits, stockmaster.decimalplaces FROM stockmaster, - stockcategory + stockcategory, + internalstockcatrole WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 @@ -409,8 +426,11 @@ stockmaster.units as stockunits, stockmaster.decimalplaces FROM stockmaster, - stockcategory + stockcategory, + internalstockcatrole WHERE stockmaster.categoryid=stockcategory.categoryid + AND stockcategory.categoryid = internalstockcatrole.categoryid + AND internalstockcatrole.secroleid= " . $_SESSION['AccessLevel'] . " AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-07-11 19:41:06 UTC (rev 9414) +++ trunk/includes/MainMenuLinksArray.php 2012-07-13 08:27:23 UTC (rev 9415) @@ -580,7 +580,8 @@ _('Discount Category Maintenance'), _('Units of Measure'), _('Label Templates Maintenance'), - _('Maintain Internal Departments') + _('Maintain Internal Departments'), + _('Maintain Internal Stock Categories to User Roles') ); $MenuItems['system']['Inventory Setup']['URL'] = array ('StockCategories.php', @@ -588,7 +589,8 @@ 'DiscountCategories.php', 'UnitsOfMeasure.php', 'Labels.php', - 'Departments.php' + 'Departments.php', + 'InternalStockCategoriesByRole.php' ); $MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), Added: trunk/sql/mysql/updates/141.php =================================================================== --- trunk/sql/mysql/updates/141.php (rev 0) +++ trunk/sql/mysql/updates/141.php 2012-07-13 08:27:23 UTC (rev 9415) @@ -0,0 +1,17 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +CreateTable('internalstockcatrole', "CREATE TABLE IF NOT EXISTS `internalstockcatrole` ( + `categoryid` varchar(6) NOT NULL, + `secroleid` int(11) NOT NULL, + KEY `internalstockcatrole_ibfk_1` (`categoryid`), + KEY `internalstockcatrole_ibfk_2` (`secroleid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8", $db); + +InsertRecord('pagesecurity', array('script', 'security'), array('InternalStockCategoriesByRole.php',15), array('script', 'security'), array('InternalStockCategoriesByRole.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. |
From: <tim...@us...> - 2012-07-13 09:42:40
|
Revision: 9416 http://weberp.svn.sourceforge.net/weberp/?rev=9416&view=rev Author: tim_schofield Date: 2012-07-13 09:42:28 +0000 (Fri, 13 Jul 2012) Log Message: ----------- Ricard: Flag on locations to allow (or deny) internal stock requests from that location. Modified Paths: -------------- trunk/InternalStockRequest.php trunk/Locations.php Added Paths: ----------- trunk/sql/mysql/updates/142.php Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-07-13 08:27:23 UTC (rev 9415) +++ trunk/InternalStockRequest.php 2012-07-13 09:42:28 UTC (rev 9416) @@ -186,6 +186,7 @@ $sql="SELECT loccode, locationname FROM locations + WHERE internalrequest = 1 ORDER BY locationname"; $result=DB_query($sql, $db); Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-07-13 08:27:23 UTC (rev 9415) +++ trunk/Locations.php 2012-07-13 09:42:28 UTC (rev 9416) @@ -52,7 +52,8 @@ email='" . $_POST['Email'] . "', contact='" . $_POST['Contact'] . "', taxprovinceid = '" . $_POST['TaxProvince'] . "', - managed = '" . $_POST['Managed'] . "' + managed = '" . $_POST['Managed'] . "', + internalrequest = '" . $_POST['InternalRequest'] . "' WHERE loccode = '" . $SelectedLocation . "'"; $ErrMsg = _('An error occurred updating the') . ' ' . $SelectedLocation . ' ' . _('location record because'); @@ -76,6 +77,7 @@ unset($_POST['Managed']); unset($SelectedLocation); unset($_POST['Contact']); + unset($_POST['InternalRequest']); } elseif ($InputError !=1) { @@ -87,6 +89,13 @@ $_POST['Managed'] = 0; } + /* Set the InternalRequest field to 1 if it is checked, otherwise 0 */ + if($_POST['InternalRequest'] == 'Yes') { + $_POST['InternalRequest'] = 1; + } else { + $_POST['InternalRequest'] = 0; + } + /*SelectedLocation is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Location form */ $sql = "INSERT INTO locations ( @@ -103,8 +112,8 @@ email, contact, taxprovinceid, - managed - ) + managed, + internalrequest) VALUES ( '" . $_POST['LocCode'] . "', '" . $_POST['LocationName'] . "', @@ -119,8 +128,8 @@ '" . $_POST['Email'] . "', '" . $_POST['Contact'] . "', '" . $_POST['TaxProvince'] . "', - '" . $_POST['Managed'] . "' - )"; + '" . $_POST['Managed'] . "', + '" . $_POST['InternalRequest'] . "')"; $ErrMsg = _('An error occurred inserting the new location record because'); $DbgMsg = _('The SQL used to insert the location record was'); @@ -162,6 +171,7 @@ unset($_POST['Managed']); unset($SelectedLocation); unset($_POST['Contact']); + unset($_POST['InternalRequest']); } @@ -399,7 +409,8 @@ email, taxprovinceid, cashsalecustomer, - managed + managed, + internalrequest FROM locations WHERE loccode='" . $SelectedLocation . "'"; @@ -421,6 +432,7 @@ $_POST['TaxProvince'] = $myrow['taxprovinceid']; $_POST['CashSaleCustomer'] = $myrow['cashsalecustomer']; $_POST['Managed'] = $myrow['managed']; + $_POST['InternalRequest'] = $myrow['internalrequest']; echo '<input type="hidden" name="SelectedLocation" value="' . $SelectedLocation . '" />'; @@ -511,6 +523,20 @@ } echo '</select></td></tr>'; + echo '<tr> + <td>' . _('Allow internal requests?') . ':</td> + <td><select name="InternalRequest">'; + if ($_POST['InternalRequest']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['InternalRequest']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + /* This functionality is not written yet ... <tr><td><?php echo _('Enable Warehouse Management') . ':'; ?></td> Added: trunk/sql/mysql/updates/142.php =================================================================== --- trunk/sql/mysql/updates/142.php (rev 0) +++ trunk/sql/mysql/updates/142.php 2012-07-13 09:42:28 UTC (rev 9416) @@ -0,0 +1,9 @@ +<?php + +// Add a field in stockmaster to record the last time the category was changed. + +AddColumn('internalrequest', 'locations', 'TINYINT( 4 )', 'NOT NULL', '1', 'managed', $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. |
From: <tim...@us...> - 2012-07-17 07:37:58
|
Revision: 9432 http://weberp.svn.sourceforge.net/weberp/?rev=9432&view=rev Author: tim_schofield Date: 2012-07-17 07:37:47 +0000 (Tue, 17 Jul 2012) Log Message: ----------- Ricard: Changed loctransfer shipdate and recdate to datetime. Modified Paths: -------------- trunk/StockDispatch.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/includes/DateFunctions.inc trunk/includes/PDFStockLocTransferHeader.inc Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2012-07-16 12:36:19 UTC (rev 9431) +++ trunk/StockDispatch.php 2012-07-17 07:37:47 UTC (rev 9432) @@ -223,7 +223,7 @@ VALUES ('" . $Trf_ID . "', '" . $myrow['stockid'] . "', '" . $ShipQty . "', - '" . Date('Y-m-d') . "', + '" . Date('Y-m-d H-i-s') . "', '" . $_POST['FromLocation'] ."', '" . $_POST['ToLocation'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for'). ' '.$myrow['stockid']; Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2012-07-16 12:36:19 UTC (rev 9431) +++ trunk/StockLocTransfer.php 2012-07-17 07:37:47 UTC (rev 9432) @@ -205,7 +205,7 @@ VALUES ('" . $_POST['Trf_ID'] . "', '" . $_POST['StockID' . $i] . "', '" . round(filter_number_input($_POST['StockQTY' . $i]), $DecimalRow['decimalplaces']) . "', - '" . Date('Y-m-d') . "', + '" . Date('Y-m-d H-i-s') . "', '" . $_POST['FromStockLocation'] ."', '" . $_POST['ToStockLocation'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for'). ' '.$_POST['StockID' . $i]; Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2012-07-16 12:36:19 UTC (rev 9431) +++ trunk/StockLocTransferReceive.php 2012-07-17 07:37:47 UTC (rev 9432) @@ -550,7 +550,7 @@ } echo '<td class="number">' . $myrow['reference'] . '</td> <td>' . $myrow['trffromloc'] . '</td> - <td>' . ConvertSQLDate($myrow['shipdate']) . '</td> + <td>' . ConvertSQLDateTime($myrow['shipdate']) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Trf_ID=' . $myrow['reference'] . '">'. _('Receive'). '</a></td></tr>'; } Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2012-07-16 12:36:19 UTC (rev 9431) +++ trunk/includes/DateFunctions.inc 2012-07-17 07:37:47 UTC (rev 9432) @@ -194,6 +194,50 @@ } // end function ConvertSQLDate +function ConvertSQLDateTime($DateEntry) { + +//for MySQL dates are in the format YYYY-mm-dd H:i:s + + if (mb_strpos($DateEntry,'/')) { + $Date_Array = explode('/',$DateEntry); + } elseif (mb_strpos ($DateEntry,'-')) { + $Date_Array = explode('-',$DateEntry); + } elseif (mb_strpos ($DateEntry,'.')) { + $Date_Array = explode('.',$DateEntry); + } else { + prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); + switch ($_SESSION['DefaultDateFormat']) { + case 'd/m/Y': + return '0/0/000'; + break; + case 'd.m.Y': + return '0.0.000'; + break; + case 'm/d/Y': + return '0/0/0000'; + break; + case 'Y/m/d': + return '0000/0/0'; + break; + } + } + + if (mb_strlen($Date_Array[2])>4) { + $Time = mb_substr($Date_Array[2],3,8); + $Date_Array[2]= mb_substr($Date_Array[2],0,2); + } + + if ($_SESSION['DefaultDateFormat']=='d/m/Y'){ + return $Date_Array[2].'/'.$Date_Array[1].'/'.$Date_Array[0] . ' ' . $Time; + } elseif ($_SESSION['DefaultDateFormat']=='d.m.Y'){ + return $Date_Array[2].'.'.$Date_Array[1].'.'.$Date_Array[0] . ' ' . $Time; + } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){ + return $Date_Array[1].'/'.$Date_Array[2].'/'.$Date_Array[0] . ' ' . $Time; + } elseif ($_SESSION['DefaultDateFormat']=='Y/m/d'){ + return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2] . ' ' . $Time; + } +} // end function ConvertSQLDate + function SQLDateToEDI($DateEntry) { //for MySQL dates are in the format YYYY-mm-dd Modified: trunk/includes/PDFStockLocTransferHeader.inc =================================================================== --- trunk/includes/PDFStockLocTransferHeader.inc 2012-07-16 12:36:19 UTC (rev 9431) +++ trunk/includes/PDFStockLocTransferHeader.inc 2012-07-17 07:37:47 UTC (rev 9432) @@ -19,7 +19,7 @@ $YPos -=15; $FontSize=12; $LeftOvers2 = $pdf->addTextWrap($Left_Margin,$YPos,550,$FontSize, -_('Shipped'). ' ' . ConvertSQLDate($TransferRow['shipdate'])); +_('Shipped'). ' ' . ConvertSQLDateTime($TransferRow['shipdate'])); $YPos -=15; $FontSize=12; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-17 21:30:44
|
Revision: 9434 http://weberp.svn.sourceforge.net/weberp/?rev=9434&view=rev Author: tim_schofield Date: 2012-07-17 21:30:37 +0000 (Tue, 17 Jul 2012) Log Message: ----------- Turn the menu into a pop up window Modified Paths: -------------- trunk/css/silverwolf/sub.css trunk/includes/MiscFunctions.php trunk/includes/footer.inc trunk/includes/header.inc trunk/includes/session.inc trunk/index.php trunk/javascripts/FormFunctions.js trunk/javascripts/script.js Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/css/silverwolf/sub.css 2012-07-17 21:30:37 UTC (rev 9434) @@ -11,13 +11,13 @@ left: 0px; background: black; opacity: 0.4; - z-index: 1; + z-index: 2; } div.unmask { position: absolute; display: none; - z-index: 1; + z-index: 2; } div.inputbox { @@ -33,10 +33,32 @@ background: #000000; color: #FFFFFF; opacity: 0.95; - z-index: 2; + z-index: 3; overflow:auto; } +div.menubox { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size:10px; + border-radius: 7px; + position: absolute; + display: none; + top: 10%; + right: 30%; + bottom: 40%; + left: 10%; + background: #E7E6FF; + border: solid #A49999 1px; + border-radius: 5px; + -moz-box-shadow: 5px 5px 5px #B1B1B1; + -webkit-box-shadow: 5px 5px 5px #B1B1B1; + box-shadow: 5px 5px 5px #B1B1B1; + color: #000000; + opacity: 0.95; + z-index: 1; + overflow:auto; +} + div.helpbox { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; font-size:12px; @@ -184,7 +206,7 @@ border-radius: 10px; width: 95%; text-align: center; - margin: 0 auto; + margin: 0 auto; } div.warn { @@ -194,7 +216,7 @@ border-radius: 10px; width: 95%; text-align: center; - margin: 0 auto; + margin: 0 auto; } div.success { @@ -204,7 +226,7 @@ border-radius: 10px; width: 95%; text-align: center; - margin: 0 auto; + margin: 0 auto; } div.info { @@ -213,86 +235,57 @@ border: 1px solid navy; width: 95%; text-align: center; - margin: 0 auto; + margin: 0 auto; } -ul.menu { - list-style:none; - margin:0; - padding-top:10px; - opacity:0.9; -} - -ul.menu * { - margin:0; - padding:0; -} - -ul.menu a { - display:block; - color:#000; - text-decoration:none; -} - -ul.menu li { - position:relative; +#vtab0 { + width:12%; float:left; - margin-right:2px; + padding-left:1px; + padding-top:1px; } -ul.menu ul { - position:absolute; - top:26px; - left:0; - background:#d1d1d1; - display:none; - opacity:0.9; +#vtab0 li { list-style:none; + border-left:1px solid #6D6D6D; + border-top:1px solid #6D6D6D; + border-bottom:1px solid #6D6D6D; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + padding: 3px; + margin-bottom: 1px; + font-weight:normal; + background: #B8B3B3; + cursor: pointer; } -ul.menu ul li { - position:relative; - border:1px solid #aaa; - border-top:none; - width:248px; - margin:0; +#vtab0 li:hover { + background-color:#A7A7A7; } -ul.menu ul li a { - display:block; - padding:3px 7px 5px; - background-color:#d1d1d1; +#tabContent { + border:1px solid #6D6D6D; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + height: 98%; + margin-top: 1px; + margin-right: 1px; + margin-left: 12%; + background: #EBFFE3; } -ul.menu ul li a:hover { - background-color:#c5c5c5; +div.vtInfo { + display:none; + height:98%; + overflow:auto; } -ul.menu ul ul { - left:248px; - top:-1px; +div.content { + border: #48f solid 3px; + clear: left; + padding: 1em; } -ul.menu .menulink { - border:1px solid #aaa; - padding:5px 7px 7px; - font-weight:bold; - background:#d1d1d1; - width:234px; -} - -ul.menu .menulink:hover, ul.menu .menuhover { - background:#d1d1d1; -} - -ul.menu .sub { - background:#d1d1d1 236px 8px no-repeat; -} - -ul.menu .topline { - border-top:1px solid #aaa; -} - table { margin: 0 auto; } @@ -354,7 +347,9 @@ th.header { font-weight: normal; background: #90979B; - text-shadow: 1px 1px #646464; + background: -moz-linear-gradient(left, #EEE7E7, #324D5D); + background: -webkit-linear-gradient(left, #EEE7E7, #324D5D); + text-shadow: 1px 1px #324D5D; border: solid #A49999 1px; border-radius: 5px; font-size: 16px; @@ -382,6 +377,38 @@ text-align: right; } +button.menuButton { + margin-top: 10px; + border: 1px solid #ffffff; + background: #000000; + padding: 10px 10px; + width: 10%; + -webkit-border-radius: 26px; + -moz-border-radius: 26px; + border-radius: 26px; + color: #ffffff; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; + font-size: 10px; + vertical-align: middle; + cursor: hand; +} + +button.menuButton:hover { + margin-top: 10px; + border: 1px solid #ffffff; + background: #0000B6; + padding: 10px 10px; + width: 10%; + -webkit-border-radius: 26px; + -moz-border-radius: 26px; + border-radius: 26px; + color: #ffffff; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; + font-size: 10px; + vertical-align: middle; + cursor: hand; +} + button { border: 1px solid #ffffff; background: transparent; @@ -556,4 +583,19 @@ img.ButtonIcon { width: 14px; -} \ No newline at end of file +} + +* {padding:0; margin:0} +#wrapper {width:750px; padding:25px; margin:0 auto} +#leftcolumn {float:left; width:25px; padding:10px;} +.dropdown {display:block; position:relative} +.dropdown dt {width:90px; border:2px solid #9ac1c9; padding:4px; font-weight:bold; cursor:pointer; background:url(images/header.gif)} +.dropdown .upperdd {border-bottom:none} +.dropdown .bottomdd {border-top:2px solid #9ac1c9;border-bottom:none;border-left:none;border-right:none} +.dropdown dt:hover {background:url(images/header_over.gif)} +.dropdown dd {position:absolute; top:0; overflow:hidden; width:310px; display:none; background:#fff; opacity:0} +.dropdown ul {width:306px; border:2px solid #9ac1c9; list-style:none} +.dropdown li {display:inline} +.dropdown a, .dropdown a:active, .dropdown a:visited {display:block; padding:2px; color:#333; text-decoration:none; background:#eaf0f2; width:302px} +.dropdown a:hover {background:#d9e1e4; color:#000} +.dropdown .underline {border-bottom:1px solid #b9d6dc;z-index:5} \ No newline at end of file Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/includes/MiscFunctions.php 2012-07-17 21:30:37 UTC (rev 9434) @@ -330,10 +330,15 @@ if ($Title=='') { $Title = $Caption; } + $Script=basename($Script); $PathArray = explode('?', $Script); $PageSecurity = $_SESSION['PageSecurityArray'][$PathArray[0]]; if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - return '<a class="' . $Class . '" onclick="return OpenSubWindow(\'' . $Script.'\')" href="" title="' . $Title . '">' . $Caption . '</a>'; + if ($Class=='') { + return '<a onclick="return OpenSubWindow(\'' . $Script.'\');" href="" title="' . $Title . '">' . $Caption . '</a>'; + } else { + return '<a class="' . $Class . '" onclick="return OpenSubWindow(\'' . $Script.'\');" href="" title="' . $Title . '">' . $Caption . '</a>'; + } } } Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/includes/footer.inc 2012-07-17 21:30:37 UTC (rev 9434) @@ -27,14 +27,23 @@ echo '<br /><div style="text-align: right"><button class="dialog_button" type="submit" onclick="CloseDialog()">' . _('OK') . '</button></div>'; echo '</div>'; } -$URLArray=explode('/', htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8')); -$GetData=''; + +if (isset($_SESSION['CurrentPage'])) { + array_push($_SESSION['History'], $_SESSION['CurrentPage']); +} + +if (isset($_GET['Back'])) { + $Discard=array_pop($_SESSION['History']); + unset($_GET['Back']); +} +unset($_SESSION['CurrentPage']); +$_SESSION['CurrentPage']=basename(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8')); if (sizeOf($_GET)>0) { foreach ($_GET as $name=>$value) { - $GetData.='&'.$name.'='.$value; + $_SESSION['CurrentPage'].='&'.$name.'='.$value; } } -array_push($_SESSION['History'], array_pop($URLArray).'?'.$GetData); +echo $_SESSION['CurrentPage']; echo '</body>'; echo '</html>'; ?> \ No newline at end of file Modified: trunk/includes/header.inc =================================================================== --- trunk/includes/header.inc 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/includes/header.inc 2012-07-17 21:30:37 UTC (rev 9434) @@ -37,7 +37,7 @@ $DefaultManualLink = $rootpath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark; -if (mb_substr($_SESSION['Language'],0,2) !='en'){ +if (mb_substr($_SESSION['Language'],0,2) !='en' and file_exists('locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php')){ $DeafaulManualLink='locale/' . $_SESSION['Language'] . '/Manual/ManualContents.php'; } @@ -45,9 +45,18 @@ echo $ProjectName . ' - ' . $title; echo '<div onClick="CloseSubWindow()" class="exit" title="Close this form">X</div>'; echo '<div onClick="OpenHelpWindow(\''.$DefaultManualLink.'\'); " class="exit" title="Show help for this function">?</div>'; -if (sizeOf($_SESSION['History'])>0) { - echo '<div class="exit">'.InternalLink('',$_SESSION['History'][sizeOf($_SESSION['History'])-1], html_entity_decode('<'), 'BackButton', _('Return to previous page')) . '</div>'; +if (isset($_SESSION['History']) and sizeOf($_SESSION['History'])>0) { + if (strstr($_SESSION['History'][sizeOf($_SESSION['History'])-1], '?')) { + echo '<div class="exit">'.InternalLink('',$_SESSION['History'][sizeOf($_SESSION['History'])-1].'&Back=True', html_entity_decode('<'), 'BackButton', _('Return to previous page')) . '</div>'; + } else { + echo '<div class="exit">'.InternalLink('',$_SESSION['History'][sizeOf($_SESSION['History'])-1].'?Back=True', html_entity_decode('<'), 'BackButton', _('Return to previous page')) . '</div>'; + } } +if (isset($_SESSION['Future']) and sizeOf($_SESSION['Future'])>0) { + echo '<div class="exit">'.InternalLink('',$_SESSION['History'][sizeOf($_SESSION['History'])-1], html_entity_decode('>'), 'BackButton', _('Return to previous page')) . '</div>'; +} echo '</div>'; - +print_r($_SESSION['History']); +echo '<br />'; +print_r($_SESSION['CurrentPage']); ?> \ No newline at end of file Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/includes/session.inc 2012-07-17 21:30:37 UTC (rev 9434) @@ -209,6 +209,7 @@ * cause name clashes) */ $_SESSION['History']=array(); + $_SESSION['Future']=array(); function findLogoFile($CompanyDir, $PathPrefix) { $dir = $PathPrefix.'companies/' . $CompanyDir . '/'; Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/index.php 2012-07-17 21:30:37 UTC (rev 9434) @@ -5,9 +5,53 @@ $title = $ProjectName . ' - ' . _('Main Dashboard'); include('includes/main_header.inc'); + +echo '<button onclick="showMenu(this)" class="menuButton">Show Menu</button>'; + echo '<div id="Mask"></div>'; -echo '<div id="SubWindow"></div>'; +echo '<div id="SubWindow"><div id="contents"></div></div>'; +include('includes/MainMenuLinksArray.php'); + +echo '<div id="MenuContent" class="menubox"> + <div id="vtab0">'; + +$i=1; +foreach ($ModuleList as $Module) { + echo '<li id="1vtab1" class="MenuTab" onclick="showTab(\'vtab'.$i.'\', this)">' . $Module . '</li>'; + $i++; +} +echo '</div>'; + +echo '<div id="tabContent">'; +$i=1; +foreach ($ModuleLink as $Module) { + echo '<div id="vtab'.$i.'" class="vtInfo">'; + echo '<div id="leftcolumn"> + <dl id="dropdown'.$i.'" class="dropdown">'; + $j=1; + foreach ($MenuItems[$Module] as $name=>$value) { + echo '<dt id="'.$Module.$j.'-ddheader" class="upperdd" onmouseover="ddMenu(\''.$Module.$j.'\',1)" onmouseout="ddMenu(\''.$Module.$j.'\',-1)">' . $name . '</dt> + <dd id="'.$Module.$j.'-ddcontent" onmouseover="cancelHide(\''.$Module.$j.'\')" onmouseout="ddMenu(\''.$Module.$j.'\',-1)"> + <ul>'; + $k=0; + foreach ($MenuItems[$Module][$name]['Caption'] as $Caption) { + echo '<li>' . InternalLink('', $MenuItems[$Module][$name]['URL'][$k], $Caption, 'underline') . '</li>'; + $k++; + } + echo '</ul> + </dd>'; + $j++; + } + echo '<dt class="bottomdd"></dt>'; + echo '</dl> + </div>'; + echo '</div>'; + $i++; +} + +echo '</div></div>'; + echo '<table width="100%"><tr><td>'; include('dashboard/CompanyInfo.php'); echo '</td><td>'; Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/javascripts/FormFunctions.js 2012-07-17 21:30:37 UTC (rev 9434) @@ -6,6 +6,16 @@ return false; } +function MakePageVisible(w) { + w.style.display='block'; + return false; +} + +function MakePageInVisible() { + document.getElementById("contents").style.display='none'; + return false; +} + function ChangeButtonText(button, text) { if (document.getElementById) { if (button) { @@ -53,7 +63,7 @@ return; } -function SubmitForm(FormName, Target='') { +function SubmitForm(FormName, Target) { if (Target=='') { Target=FormName.action; } @@ -79,7 +89,7 @@ return false; } -function SubmitSearchForm(FormName,Target='') { +function SubmitSearchForm(FormName,Target) { if (Target=='') { var Target=FormName.action; } @@ -107,6 +117,7 @@ function OpenSubWindow(TargetURL) { document.getElementById("Mask").setAttribute("class", "mask"); document.getElementById("SubWindow").setAttribute("class", "inputbox"); +// ExpandWindow(51, 51, 51, 51, 1, 1, 1, 1, document.getElementById("contents")); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 @@ -114,14 +125,34 @@ } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { - document.getElementById("SubWindow").innerHTML=xmlhttp.responseText; + document.getElementById("contents").innerHTML=xmlhttp.responseText; } +// MakePageInVisible(); } xmlhttp.open("GET",TargetURL,true); xmlhttp.send(); return false; } +function ExpandWindow(StartL, StartR, StartT, StartB, EndL, EndR, EndT, EndB, w) { + function Expand() { + StartL=StartL-5; + StartR=StartR-5; + StartT=StartT-5; + StartB=StartB-5; + document.getElementById("SubWindow").style.left = StartL+'%'; // pseudo-property code: Move right by 10px + document.getElementById("SubWindow").style.right = StartR+'%'; // pseudo-property code: Move right by 10px + document.getElementById("SubWindow").style.top = StartT+'%'; // pseudo-property code: Move right by 10px + document.getElementById("SubWindow").style.bottom = StartB+'%'; // pseudo-property code: Move right by 10px + if ((StartL>EndL) && (StartR>EndR) && (StartT>EndT) && (StartB>EndB)) { + setTimeout(Expand,1); // call doMove() in 20 msec + } else { + MakePageVisible(w); + } + } + Expand(); +} + function OpenSearchWindow(TargetURL, CallingURL) { document.getElementById("SearchMask").setAttribute("class", "mask"); document.getElementById("SearchWindow").setAttribute("class", "searchwindow"); @@ -166,7 +197,8 @@ function CloseSubWindow() { document.getElementById("Mask").setAttribute("class", "unmask"); - document.getElementById("SubWindow").innerHTML=""; + document.getElementById("contents").innerHTML=""; + document.getElementById("SubWindow").innerHTML="<div id=\"contents\"></div>"; document.getElementById("SubWindow").removeAttribute("class", "inputbox"); } @@ -186,4 +218,49 @@ document.getElementById("DialogMask").style.zIndex=-1; document.getElementById("messagebox").innerHTML=""; document.getElementById("messagebox").removeAttribute("class", "inputbox"); -} \ No newline at end of file +} + +function showTab(IDS, tab) { + var tabs = getElementsByClass('vtInfo',document.getElementById('tabContent'),'div'); + var alltabs = getElementsByClass('MenuTab',document.getElementById('vtab0'),'li'); + if (typeof tab !== 'object') { + tab = document.getElementById(tab); + } + for (var i=0; i<alltabs.length; i++) { + alltabs[i].style.backgroundColor = tab.style.backgroundColor; + } + for (var i=0; i<tabs.length; i++) { + tabs[i].style.display = 'none'; + } + tab.style.backgroundColor='#EBFFE3'; + document.getElementById(IDS).style.display = 'block'; +} + +function showMenu(b) { + if (b.innerHTML=='Hide Menu') { + document.getElementById("MenuContent").style.display = 'none'; + b.innerHTML = 'Show Menu'; + } else { + document.getElementById("MenuContent").style.display = 'block'; + b.innerHTML = 'Hide Menu'; + } +} + +// Following from: http://www.dustindiaz.com/getelementsbyclass/ +function getElementsByClass(searchClass,node,tag) { + var classElements = new Array(); + if ( node == null ) + node = document; + if ( tag == null ) + tag = '*'; + var els = node.getElementsByTagName(tag); + var elsLen = els.length; + var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); + for (i = 0, j = 0; i < elsLen; i++) { + if ( pattern.test(els[i].className) ) { + classElements[j] = els[i]; + j++; + } + } + return classElements; +} Modified: trunk/javascripts/script.js =================================================================== --- trunk/javascripts/script.js 2012-07-17 07:38:02 UTC (rev 9433) +++ trunk/javascripts/script.js 2012-07-17 21:30:37 UTC (rev 9434) @@ -1,33 +1,62 @@ -var menu=function(){ - var t=15,z=50,s=6,a; - function dd(n){this.n=n; this.h=[]; this.c=[]} - dd.prototype.init=function(p,c){ - a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0; - for(i;i<l;i++){ - var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i]; - h.onmouseover=new Function(this.n+'.st('+i+',true)'); - h.onmouseout=new Function(this.n+'.st('+i+')'); - } - } - dd.prototype.st=function(x,f){ - var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0]; - clearInterval(c.t); c.style.overflow='hidden'; - if(f){ - p.className+=' '+a; - if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0} - if(c.mh==c.offsetHeight){c.style.overflow='visible'} - else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)} - }else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)} - } - function sl(c,f){ - var h=c.offsetHeight; - if((h<=0&&f!=1)||(h>=c.mh&&f==1)){ - if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'} - clearInterval(c.t); return - } - var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh; - c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')'; - c.style.height=h+(d*f)+'px' - } - return{dd:dd} -}(); \ No newline at end of file +var DDSPEED = 10; +var DDTIMER = 15; +var OFFSET = -2; +var ZINT = 100; + +function ddMenu(id,d){ + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearInterval(c.timer); + if(d == 1){ + clearTimeout(h.timer); + c.style.display = 'block'; + if(c.maxh && c.maxh <= c.offsetHeight){return} + else if(!c.maxh){ + c.style.left = (h.offsetWidth + OFFSET) + 'px'; + c.style.height = 'auto'; + c.maxh = c.offsetHeight; + c.style.height = '0px'; + } + ZINT = ZINT + 1; + c.style.zIndex = ZINT; + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + }else{ + h.timer = setTimeout(function(){ddCollapse(c)},50); + } +} + +function ddCollapse(c){ + c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER); +} + +function cancelHide(id){ + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearTimeout(h.timer); + clearInterval(c.timer); + if(c.offsetHeight < c.maxh){ + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + } +} + +function ddSlide(c,d){ + var currh = c.offsetHeight; + var dist; + if(d == 1){ + dist = Math.round((c.maxh - currh) / DDSPEED); + }else{ + dist = Math.round(currh / DDSPEED); + } + if(dist <= 1 && d == 1){ + dist = 1; + } + c.style.height = currh + (dist * d) + 'px'; + c.style.opacity = currh / c.maxh; + c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')'; + if(currh > (c.maxh - 2) && d == 1){ + clearInterval(c.timer); + }else if(dist < 1 && d != 1){ + clearInterval(c.timer); + c.style.display = 'none'; + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-18 10:01:56
|
Revision: 9440 http://weberp.svn.sourceforge.net/weberp/?rev=9440&view=rev Author: tim_schofield Date: 2012-07-18 10:01:45 +0000 (Wed, 18 Jul 2012) Log Message: ----------- Partially fixes the delete scripts. Modified Paths: -------------- trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php Modified: trunk/Z_DeleteCreditNote.php =================================================================== --- trunk/Z_DeleteCreditNote.php 2012-07-18 08:44:22 UTC (rev 9439) +++ trunk/Z_DeleteCreditNote.php 2012-07-18 10:01:45 UTC (rev 9440) @@ -18,15 +18,20 @@ if (!isset($_GET['CreditNoteNo'])){ - prnMsg(_('This page must be called with the credit note number') . ' - ' . _('it is not intended for use by non-system administrators'),'info'); + prnMsg(_('This page must be called with the credit note number') . ' - ' . _('it is not intended for use by non-system administrators'),'info'); } /*get the order number that was credited */ -$SQL = "SELECT order_ FROM debtortrans WHERE transno='" . $_GET['CreditNoteNo'] . "' AND type='11'"; +$SQL = "SELECT order_, + id + FROM debtortrans + WHERE transno='" . $_GET['CreditNoteNo'] . "' + AND type='11'"; $Result = DB_query($SQL, $db); $myrow = DB_fetch_array($Result); $OrderNo = $myrow['order_']; +$IDDebtorTrans = $myrow['id']; /*Now get the stock movements that were credited into an array */ @@ -51,10 +56,32 @@ $Result = DB_Txn_Begin($db); /* commence a database transaction */ + +/*Now delete the custallocns */ + +$SQL = "DELETE custallocns FROM custallocns + WHERE transid_allocto ='" . $IDDebtorTrans . "'"; + +$DbgMsg = _('The SQL that failed was'); +$ErrMsg = _('The custallocns record could not be deleted') . ' - ' . _('the sql server returned the following error'); +$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + +prnMsg(_('The custallocns record has been deleted'),'info'); + +/*Now delete the debtortranstaxes */ + +$SQL = "DELETE debtortranstaxes FROM debtortranstaxes + WHERE debtortransid ='" . $IDDebtorTrans . "'"; +$DbgMsg = _('The SQL that failed was'); +$ErrMsg = _('The debtortranstaxes record could not be deleted') . ' - ' . _('the sql server returned the following error'); +$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + +prnMsg(_('The debtortranstaxes record has been deleted'),'info'); + /*Now delete the DebtorTrans */ $SQL = "DELETE FROM debtortrans - WHERE transno ='" . $_GET['CreditNoteNo'] . "' AND Type=11"; + WHERE transno ='" . $_GET['CreditNoteNo'] . "' AND Type=11"; $DbgMsg = _('The SQL that failed was'); $ErrMsg = _('A problem was encountered trying to delete the Debtor transaction record'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); @@ -64,8 +91,8 @@ foreach ($StockMovement as $CreditLine) { $SQL = "UPDATE salesorderdetails SET qtyinvoiced = qtyinvoiced - " . $CreditLine['qty'] . " - WHERE orderno = '" . $OrderNo . "' - AND stkcode = '" . $CreditLine['stockid'] . "'"; + WHERE orderno = '" . $OrderNo . "' + AND stkcode = '" . $CreditLine['stockid'] . "'"; $ErrMsg =_('A problem was encountered attempting to reverse the update the sales order detail record') . ' - ' . _('the SQL server returned the following error message'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg, true); @@ -80,13 +107,14 @@ $Result = DB_query($SQL, $db,$ErrMsg,$DbgMsg, true); -/*Delete Sales Analysis records */ +/*Delete Sales Analysis records + * This is unreliable as the salesanalysis record contains totals for the item cust custbranch periodno */ $SQL = "DELETE FROM salesanalysis - WHERE periodno = '" . $CreditLine['prd'] . "' - AND cust='" . $CreditLine['debtorno'] . "' - AND custbranch = '" . $CreditLine['branchcode'] . "' - AND qty = '" . $CreditLine['qty'] . "' - AND stockid = '" . $CreditLine['stockid'] . "'"; + WHERE periodno = '" . $CreditLine['prd'] . "' + AND cust='" . $CreditLine['debtorno'] . "' + AND custbranch = '" . $CreditLine['branchcode'] . "' + AND qty = '" . $CreditLine['qty'] . "' + AND stockid = '" . $CreditLine['stockid'] . "'"; $ErrMsg = _('The SQL to delete the sales analysis records with the message'); @@ -96,7 +124,7 @@ /* Delete the stock movements */ $SQL = "DELETE FROM stockmoves - WHERE type=11 AND transno = '" . $_GET['CreditNoteNo'] . "'"; + WHERE type=11 AND transno = '" . $_GET['CreditNoteNo'] . "'"; $ErrMsg = _('SQL to delete the stock movement record failed with the message'); $Result = DB_query($SQL, $db,$ErrMsg,$DbgMsg,true); Modified: trunk/Z_DeleteInvoice.php =================================================================== --- trunk/Z_DeleteInvoice.php 2012-07-18 08:44:22 UTC (rev 9439) +++ trunk/Z_DeleteInvoice.php 2012-07-18 10:01:45 UTC (rev 9440) @@ -5,7 +5,7 @@ /* Script to delete an invoice expects and invoice number to delete not included on any menu for obvious reasons * -* STRONGLY RECOMMEND NOT USING THIS -CREDIT THE INVOICE AND RE INVOICE +* STRONGLY RECOMMEND NOT USING THIS - CREDIT THE INVOICE AND RE INVOICE * * * This page must be called directly using path/Z_DeleteInvoice.php?InvoiceNo=????? !! */ @@ -16,13 +16,14 @@ include('includes/header.inc'); if (!isset($_GET['InvoiceNo'])){ - prnMsg(_('This page must be called with the InvoiceNo to delete Z_DeleteInvoice.php?InvoiceNo=XX') . '. ' . _('This page should not be run by non-system administrators'),'info'); - include('includes/footer.inc'); - exit; + prnMsg(_('This page must be called with the InvoiceNo to delete Z_DeleteInvoice.php?InvoiceNo=XX') . '. ' . _('This page should not be run by non-system administrators'),'info'); + include('includes/footer.inc'); + exit; } /*Get the order number that was invoiced */ -$SQL = "SELECT order_ +$SQL = "SELECT order_, + id FROM debtortrans WHERE debtortrans.type = 10 AND transno = '" . $_GET['InvoiceNo'] . "'"; @@ -31,6 +32,7 @@ $myrow = DB_fetch_array($Result); $ProcessingOrder = $myrow['order_']; +$IDDebtorTrans = $myrow['id']; /*Now get the stock movements that were invoiced into an array */ @@ -45,15 +47,15 @@ // We now use fully qualified column names $SQL = "SELECT stockmoves.stockid, - stockmoves.loccode, - stockmoves.debtorno, - stockmoves.branchcode, - stockmoves.prd, - stockmoves.qty, - stockmaster.mbflag - FROM stockmoves INNER JOIN stockmaster - ON stockmoves.stockid = stockmaster.stockid - WHERE transno ='" .$_GET['InvoiceNo'] . "' AND type=10"; + stockmoves.loccode, + stockmoves.debtorno, + stockmoves.branchcode, + stockmoves.prd, + stockmoves.qty, + stockmaster.mbflag + FROM stockmoves INNER JOIN stockmaster + ON stockmoves.stockid = stockmaster.stockid + WHERE transno ='" .$_GET['InvoiceNo'] . "' AND type=10"; $Result = DB_query($SQL,$db); @@ -72,18 +74,40 @@ /*Delete any log entries */ $SQL = "DELETE FROM orderdeliverydifferenceslog - WHERE orderno = '". $ProcessingOrder . "' - AND invoiceno = '" . $_GET['InvoiceNo'] . "'"; + WHERE orderno = '". $ProcessingOrder . "' + AND invoiceno = '" . $_GET['InvoiceNo'] . "'"; $ErrMsg = _('The SQL to delete the delivery differences records failed because'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); prnMsg(_('Any order delivery differences records have been deleted'),'info'); +/*Now delete the custallocns */ + +$SQL = "DELETE custallocns FROM custallocns + WHERE transid_allocto ='" . $IDDebtorTrans . "'"; + +$DbgMsg = _('The SQL that failed was'); +$ErrMsg = _('The custallocns record could not be deleted') . ' - ' . _('the sql server returned the following error'); +$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + +prnMsg(_('The custallocns record has been deleted'),'info'); + +/*Now delete the debtortranstaxes */ + +$SQL = "DELETE debtortranstaxes FROM debtortranstaxes + WHERE debtortransid ='" . $IDDebtorTrans . "'"; +$DbgMsg = _('The SQL that failed was'); +$ErrMsg = _('The debtortranstaxes record could not be deleted') . ' - ' . _('the sql server returned the following error'); +$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + +prnMsg(_('The debtortranstaxes record has been deleted'),'info'); + + /*Now delete the DebtorTrans */ $SQL = "DELETE FROM debtortrans - WHERE transno ='" . $_GET['InvoiceNo'] . "' - AND debtortrans.type=10"; + WHERE transno ='" . $_GET['InvoiceNo'] . "' + AND debtortrans.type=10"; $DbgMsg = _('The SQL that failed was'); $ErrMsg = _('The debtorTrans record could not be deleted') . ' - ' . _('the sql server returned the following error'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); @@ -96,30 +120,30 @@ foreach ($StockMovement as $OrderLine) { $SQL = "UPDATE salesorderdetails SET qtyinvoiced = qtyinvoiced - " . $OrderLine['qty'] . ", - completed = 0 - WHERE orderno = '" . $ProcessingOrder . "' - AND stkcode = '" . $OrderLine['stockid'] . "'"; + completed = 0 + WHERE orderno = '" . $ProcessingOrder . "' + AND stkcode = '" . $OrderLine['stockid'] . "'"; $ErrMsg = _('The SQL to reverse the update of the sales order detail records failed because'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - prnMsg(_('The sales order records have been updated as not invoiced'),'info'); + prnMsg(_('The sales order records have been updated as not invoiced'),'info'); /*reverse the update to LocStock */ - if ($OrderLine['mbflag']!='A' AND $OrderLine['mbflag']!='D'){ + if ($OrderLine['mbflag']!='A' AND $OrderLine['mbflag']!='D'){ - $ErrMsg = _('The SQL to reverse update to the location stock records failed because'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - prnMsg(_('Reversed the location stock quantities for items that decreased'),'info'); - } + $ErrMsg = _('The SQL to reverse update to the location stock records failed because'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + prnMsg(_('Reversed the location stock quantities for items that decreased'),'info'); + } /*This is a problem - should only update sales analysis what happens where there have been previous sales to the same customer/branch for the same item Delete Sales Analysis records */ $SQL = "DELETE FROM salesanalysis - WHERE periodno = '" . $OrderLine['prd'] . "' - AND cust='" . $OrderLine['debtorno'] . "' - AND custbranch = '" . $OrderLine['branchcode'] . "' - AND qty = '" . $OrderLine['qty'] . "' - AND stockid = '" . $OrderLine['stockid'] . "'"; + WHERE periodno = '" . $OrderLine['prd'] . "' + AND cust='" . $OrderLine['debtorno'] . "' + AND custbranch = '" . $OrderLine['branchcode'] . "' + AND qty = '" . $OrderLine['qty'] . "' + AND stockid = '" . $OrderLine['stockid'] . "'"; $ErrMsg = _('The SQL to delete the sales analysis records failed because'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-19 18:43:56
|
Revision: 9441 http://weberp.svn.sourceforge.net/weberp/?rev=9441&view=rev Author: tim_schofield Date: 2012-07-19 18:43:49 +0000 (Thu, 19 Jul 2012) Log Message: ----------- Finishing touches to the menu system Modified Paths: -------------- trunk/css/silverwolf/sub.css trunk/includes/MainMenuLinksArray.php trunk/includes/main_header.inc trunk/index.php trunk/javascripts/FormFunctions.js trunk/javascripts/script.js Modified: trunk/css/silverwolf/sub.css =================================================================== --- trunk/css/silverwolf/sub.css 2012-07-18 10:01:45 UTC (rev 9440) +++ trunk/css/silverwolf/sub.css 2012-07-19 18:43:49 UTC (rev 9441) @@ -44,15 +44,15 @@ position: absolute; display: none; top: 10%; - right: 30%; - bottom: 40%; + right: 25%; + bottom: 20%; left: 10%; background: #E7E6FF; - border: solid #A49999 1px; - border-radius: 5px; + border: solid #A49999 0px; + border-radius: 15px; -moz-box-shadow: 5px 5px 5px #B1B1B1; -webkit-box-shadow: 5px 5px 5px #B1B1B1; - box-shadow: 5px 5px 5px #B1B1B1; + box-shadow: 5px 5px 5px 3px #B1B1B1; color: #000000; opacity: 0.95; z-index: 1; @@ -152,6 +152,20 @@ width: 98%; } +div.ModuleSummary { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 100%; + font-style: italic; + color:#696969; + margin-top: 2px; + margin-left: 20%; + margin-right: 4px; + height: 98%; + padding-left: 20px; + border:0px solid #aaa; + border-radius: 7px; +} + div.manual_title_bar { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; font-size: 24px; @@ -242,7 +256,7 @@ width:12%; float:left; padding-left:1px; - padding-top:1px; + padding-top:5px; } #vtab0 li { @@ -250,8 +264,8 @@ border-left:1px solid #6D6D6D; border-top:1px solid #6D6D6D; border-bottom:1px solid #6D6D6D; - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; + border-top-left-radius: 15px; + border-bottom-left-radius: 15px; padding: 3px; margin-bottom: 1px; font-weight:normal; @@ -265,17 +279,18 @@ #tabContent { border:1px solid #6D6D6D; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - height: 98%; - margin-top: 1px; - margin-right: 1px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + height: 97%; + margin-top: 5px; + margin-bottom: 1px; + margin-right: 5px; margin-left: 12%; - background: #EBFFE3; + background: #F7F7F7; } div.vtInfo { - display:none; + display:block; height:98%; overflow:auto; } @@ -324,7 +339,7 @@ th.AppHeader { font-weight: bold; background-color: #615A65; - border: solid #ffffff 1px; + border: solid #ffffff 0px; border-radius: 5px; font-size: 14px; color: #ffffff; @@ -377,38 +392,6 @@ text-align: right; } -button.menuButton { - margin-top: 10px; - border: 1px solid #ffffff; - background: #000000; - padding: 10px 10px; - width: 10%; - -webkit-border-radius: 26px; - -moz-border-radius: 26px; - border-radius: 26px; - color: #ffffff; - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; - font-size: 10px; - vertical-align: middle; - cursor: hand; -} - -button.menuButton:hover { - margin-top: 10px; - border: 1px solid #ffffff; - background: #0000B6; - padding: 10px 10px; - width: 10%; - -webkit-border-radius: 26px; - -moz-border-radius: 26px; - border-radius: 26px; - color: #ffffff; - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; - font-size: 10px; - vertical-align: middle; - cursor: hand; -} - button { border: 1px solid #ffffff; background: transparent; @@ -472,6 +455,46 @@ border-radius: 3px; } +button.menuButton { + margin-top: 10px; + margin-left: 10px; + border: 0px solid #ffffff; + background: #000000; + padding: 10px 10px; + width: 10%; + -webkit-border-radius: 26px; + -moz-border-radius: 26px; + border-radius: 26px; + -moz-box-shadow: 3px 3px 3px #868686; + -webkit-box-shadow: 3px 3px 3px #868686; + box-shadow: 3px 3px 3px #868686; + color: #ffffff; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; + font-size: 10px; + font-weight: bold; + vertical-align: middle; + cursor: hand; +} + +button.menuButton:hover { + margin-top: 10px; + border: 0px solid #ffffff; + background: #527352; + padding: 10px 10px; + width: 10%; + -webkit-border-radius: 26px; + -moz-border-radius: 26px; + border-radius: 26px; + -moz-box-shadow: 3px 3px 3px #868686; + -webkit-box-shadow: 3px 3px 3px #868686; + box-shadow: 3px 3px 3px #868686; + color: #ffffff; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Geneva", "Verdana", "sans-serif"; + font-size: 10px; + vertical-align: middle; + cursor: hand; +} + input { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; font-size: 10px; @@ -588,8 +611,9 @@ * {padding:0; margin:0} #wrapper {width:750px; padding:25px; margin:0 auto} #leftcolumn {float:left; width:25px; padding:10px;} +#rightcolumn {float:left; width:525px} .dropdown {display:block; position:relative} -.dropdown dt {width:90px; border:2px solid #9ac1c9; padding:4px; font-weight:bold; cursor:pointer; background:url(images/header.gif)} +.dropdown dt {width:100px; border:2px solid #9ac1c9; padding:4px; font-weight:bold; cursor:pointer; background:url(images/header.gif)} .dropdown .upperdd {border-bottom:none} .dropdown .bottomdd {border-top:2px solid #9ac1c9;border-bottom:none;border-left:none;border-right:none} .dropdown dt:hover {background:url(images/header_over.gif)} @@ -598,4 +622,4 @@ .dropdown li {display:inline} .dropdown a, .dropdown a:active, .dropdown a:visited {display:block; padding:2px; color:#333; text-decoration:none; background:#eaf0f2; width:302px} .dropdown a:hover {background:#d9e1e4; color:#000} -.dropdown .underline {border-bottom:1px solid #b9d6dc;z-index:5} \ No newline at end of file +.dropdown .underline {border-bottom:1px solid #b9d6dc} \ No newline at end of file Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2012-07-18 10:01:45 UTC (rev 9440) +++ trunk/includes/MainMenuLinksArray.php 2012-07-19 18:43:49 UTC (rev 9441) @@ -644,4 +644,183 @@ 'Z_UpdateChartDetailsBFwd.php', 'Z_RePostGLFromPeriod.php' ); + +$ModuleDescriptions['orders']=' <li>Customer orders can be entered and maintained and referenced back to the customer\'s order number.</li> + + <li>The cumulative quantity on order for a stock item shows as a demand in stock status inquiries.</li> + + <li>The cumulative quantity on order for assembly items shows the demand against its components in the stock status inquiries.</li> + + <li>The quantity of the order left to invoice is maintained and updated for invoices and credit notes raised against the order.</li> + + <li>The orders entered can be invoiced directly with little or no additional input.</li> + + <li>Multiple dispatches are possible from a single order. Order retains references to each dispatch.</li> + + <li>Differences from the order are logged when dispatches are not the same as the ordered quantities for reporting delivery in full on time.</li> + + <li>Pricing automatically returned based on the customer sales type, branch and currency.</li> + + <li>Quantity break discounts across a range of products are automatically calculated based on the discount matrix.</li> + + <li>Packing slips printable on laser or pre-printed stationery.</li> + + <li>User selectable inventory location to pick from.</li> + + <li>Free form entry of delivery addresses - defaulting to the customer branch physical address.</li> + + <li>Recurring sales orders that recurr until any chosen finish date at a defined frequency per annum</li> + + <li>Invoices for cash sales can be entered directly without first entering an order</li> +'; + +$ModuleDescriptions['AR']='<p>A primary function of the system is to track the amounts owed to the business by customers in both local and foreign currency. +The system shows, invoice-by-invoice, the balance on the account and does not lose the detail of what makes the account up in a balance brought forward - +it is an "open item" system. When payments received from customers are entered and allocated to invoices, the differences on exchange are calculated and posted to the general ledger - +that is only if integration to the general ledger is enabled from the company preferences page under the setup tab.<br></p><ul> + <li>Overdues inquiry that takes into account delivery days to the customer\'s branch and the actual terms applicable to the customer, supported by detailed inquiry of actual invoices overdue.</li> + + <li>Full on-screen inquiry on a customer\'s account, complete with invoice details and narrative which appeared on the invoice. Inquiries on payments received will show how a payment was allocated to invoices and the difference on exchange attributable to each invoice.</li> + + <li>Full integration with stock records and general ledger -a full trail of journals for each transaction is maintained - a drill down to the general ledger transactions for each transaction on a customers account is available from the customer inquiry page.</li> + + <li>Open item - full analysis of the outstanding balance is maintained and printed on statements for maximum information to the customer.</li> + + <li>Flexible user definable sales analysis reports to pdf or spreadsheet (csv - comma separated values).</li> + + <li>Retrospective - de-allocation and re-allocation of receipts or credit notes against charges with re-calculation of differences on exchange and corresponding general ledger journals</li> + + <li>Any number of branch - delivery addresses can be added serviced by different sales people with different tax authorities and different areas for sales analysis purposes.</li> +</ul>'; + +$ModuleDescriptions['AP']='<p> +A primary function of the system is to track the amounts owed by the business to suppliers in both local and foreign currency. The system shows, invoice-by-invoice, the balance on the account and does not lose the detail of what makes the account up in a balance brought forward - it is an "open item" system. When payments made to suppliers are entered and allocated to invoices, the differences on exchange are calculated and posted to the general ledger - that is only if integration to the general ledger is enabled from the company preferences page under the setup tab. +</p> +<p>Note that in some countries the word "Vendor" is used instead of "Supplier" - please make allowances for this.</p> +<ul> + <li>Suppliers aging report that takes into account the actual terms applicable to the supplier, and is supported by detailed inquiry of actual invoices due.</li> + <li>Full on-screen inquiry on a supplier\'s account, complete with a general ledger breakdown of how each invoice and debit note (Supplier credit note) was posted. Inquiries on payments made will show how a payment was allocated to invoices and the difference on exchange attributable to each invoice.</li> + <li>Open item - full analysis of the outstanding balance is maintained</li> + <li>Retrospective - de-allocation and re-allocation of payments and/or debit notes with re-calculation of differences on exchange and corresponding general ledger journals</li> + <li>Any number of supplier contacts can be maintained against the supplier</li> + <li>Fully integrated to stock - whereby purchase order receipts of stock can be selected for entry against a supplier invoice.</li> + <li>Full standard costing price variances between standard cost of stock received against the invoiced actual cost at invoiced exchange rate is recorded and posted to the general ledger</li> + <li>Purchase invoices and debit notes can be entered directly to multiple general ledger accounts with charges divided up at invoice entry time</li> + <li>Purchase invoices and debit notes can be entered as shipment costs - to accumulate against the cost of a shipment for costing of the stock items on the shipment</li> + <li>Nominal purchase order items received can be selected for invoicing in the same way as stock items. Purchase price variance from the order cost are taken to the general ledger account that the order item was coded to</li> + <li>Supplier payment run will create system entries to record payments for all suppliers with due amounts. Facilities allow for holding disputed invoices from being included in the payment run, but still recording costs in the general ledger.</li> +</ul>'; + +$ModuleDescriptions['PO']='<p>Purchase orders are the contract initiated by an organisation with it\'s suppliers (vendors). Since, purchase orders commit the business to expenditure it is important to ensure that the committment is not made without the proper authority. webERP forces certain procedures to be followed to ensure proper authorisation. The sequence is:</p> + +<ul> + <li>An operator with access to the purchase order creation creates the purchase order.</li> + + <li>It is possible if this user has access to authorise the purchase order to have it authorised automatically. This requires a configuration setting to be enabled to allow this. Normally, another user with appropriate authorisation levels is required to authorise the order. Authorisation levels can be set by user and currency and by the amount of that currency. For example a user maybe able to approve purchase orders up to $1000 in USD. Orders cannot be printed and sent to a supplier until they are authorised.</li> + + <li>Users who are valid authorisers have a special screen to see which orders require authorisation - they can authorise the orders from there.</li> + + <li>A trail of who initiated the order, who changed an order and who authorised an order with dates is maintained in the status comments</li> + + <li>Once an order is authorised it must be printed - it is not possible to receive any stock against an order that has not been printed</li> + + <li>Once printed it is now possible to receive stock against the order</li> +</ul> +'; + +$ModuleDescriptions['stock']=' <p>In many cases due to the English background of the developer, Inventory is referred to as "stock", which can be confusing to some. The word "stock" is used interchangeably with "inventory" throughout.</p> + + <p>Inventories fall into clear categories particular to the business. For example a toy factory might have categories for lego, rideons, board games etc . These are referred to as stock categories and are expected to be defined by the business. The name of the category (but not its code) can be altered at any time.</p> + + <p>Note: Integration to the general ledger is at the stock category level. The posting to the general ledger is determined by reference to the stock category of the item together with the sales area and the sales type. Separate tables of general ledger codes for sales and cost of sales are maintained from the System Setup tab of the main menu.</p> + + <p>Inventory invoiced using the invoicing option will decrease the stock on hand from the stock location specified in the invoice. Inventory credited using the credit note creation option will increase the stock held at the location selected in the credit note. Inventory adjustments to the quantity held are also possible and transfers between stock locations.</p> + + <p>A record of each stock movement is maintained, stock movements originating from sales invoices, purchase orders received, stock adjustments, sales credit notes can all be viewed using the inquiry of stock movements. Summing the stock movements provides an easy mechanism to see the historical usage and an inquiry is also available to show usage by month.</p> + + <p>Inventories can be valued at either standard cost (manually maintained costs) or weighted average cost (automatically maintained). If general ledger stock integration is active, general ledger postings are created for stock adjustments, standard cost amendments, cost of sales and stock movements on invoicing and crediting. When stock journals are used, provided that the balance of the stock accounts agrees to the current valuation of the stock at the time when the flag is set in the company preferences page, then the value of stock held will be maintained in the general ledger, with a full trail of general ledger journals for each stock movement. This does make for a busy, but informative general ledger in a high use environment!</p> + + <p>Note: Inventory journals are optional. The sales ledger/accounts receivable interface is separate to the stock general ledger interface so it is possible to have sales posting to the general ledger but not the inventory and cost of sales aspect.</p> +'; + +$ModuleDescriptions['manuf']='<p>Manufacturing - simply the combination of items to make other items..</p> + +<p>It has been possible to build bills of material for manufactured items for some time but the functionality that allows the materials to be issued from stock and manufactured items received into stock was introduced with 3.06. This is the purpose of the work order.</p>Functionality to add labour items to work orders and post recovery amounts to a profit and loss account for issues of labour to a work order was added after 3.09 (Sept 2008). +<p>Functionality to set up a master production schedule and explode bills of materials into the components required to manufacture this demand and calculate the required orders to be placed/rescheduled (MRP) was added by Mark Yeager in March 2009. +<p> + +<p>Bills of material now allow components to be defined as "auto-issue". Components set up to auto-issue, automatically create the issue transactions against the work order based on the bill of material quantities on the entry of receipts of a finished item against the work order. This decreases the administration of work orders for those components with relatively low value and limited possibility for any usage variance. It is not recommended that this feature be used on components where the final requirement for it could vary with for example yield differences between work orders. Work orders take the value of components and materials issued and divide this total cost between the output items to arrive at a cost per unit for all output items. The process for performing this calculation is called "closing" the work order.</p> + +<p>Functionality to automatically create works orders for manufactured items at a default factory when a sales order is entered for which there is insufficient stock after all sales orders are delivered and outstanding works orders and purchase orders received. This functionality needs to be turned on as an option under configuration settings. The email address of the production manager who will receive an advice of the work order being created can also be defined in the configuration settings.</p> + +<p>In dealing with serial or batch controlled items there are two ways that the system can operate. Either the serial numbers or batches must be created at the time the work order is created or they are entered at the time they are completed. If they are created at the time the work order is set up there is an option enter remarks about each lot or serial number about the manufacture or quality check data. To have serial numbers (or batches) defined at the work order entry stage this needs to be set in the configuration settings.</p> + +<p>The sequence of events in manufacturing an item is as follows:</p> + +<ul> + <li>Enter a Work Order - selecting all the output items required to be included in the work order costing. To ensure accurate costing it is recommended that work orders be created for single items wherever possible. The quantity required of the item and the date the items are required to be completed by must also be specified. If the output item is a controlled item - either serialised or lot/batch controlled - then there is also an option to enter the next serial number or batch reference which will be retrieved when entering the manufactured items received. If the configuration is set to create serial numbers (or batches) up at the time of the work order entry then there is an option to create serial numbers automatically based on the next serial number for the item defined in the stock master - all that is required is the number of serial numbers to create.</li> + + <li>Receive Items against the work order. When manufactured items are completed they can be \'received\' against the work order. Auto-issue components are automatically issued. On the first receipt of manufactured items against a work order, the cost of the item is recalculated by rolling up the cost from the bill of material. A cost adjustment is performed if the cost changes. If serial numbers (or batches) have been defined at the time of the work order entry these will list for checking off the items being received as finished against the work order</li> + + <li>Issue components and raw materials to the work order</li> + + <li>Once all components and raw materials are issued to the work order and no more manufactured items can be received against the work order it can be closed. The closing process recalculates the cost of the items manufactured on the work order and if weighted average costing is used a cost update will be processed.</li> +</ul> +'; + +$ModuleDescriptions['GL']='<p>The general ledger is the accounting hub that is central to the "sub" ledgers for creditors (Accounts Payable), debtors (Accounts Receivable) and stock (inventory). All entries in the sub ledgers are also represented by entries in the general ledger. It is the integration set-up that determines how entries in the sub-ledgers are reflected in the general ledger. Most activity in the general ledger will be automatically created from the activity in the sub-ledgers with receivables, payables and stock administration.</p> +<p> + +<p>However, there are also facilities to:</p> + +<ul> + <li>Enter general ledger receipts against a pre-defined bank accounts.</li> + + <li>Enter general ledger payments against pre-defined bank accounts.</li> + + <li>Enter general ledger journals between any general ledger accounts - except bank accounts. These can also be made to reverse automatically in the following period. Further journals can be posted to any period future or previously - the period is determined by reference to the date entered.</li> + + <li>Inquire on general ledger account activity and from any entry in this inquiry drill down to the journals created to produce the entry.</li> + + <li>Inquire on the general ledger trial balance for any period end in history or currently.</li> +</ul> +'; + +$ModuleDescriptions['FA']='<p>The Fixed Assets module allows for recording a database of the individual assets with integration back to the webERP general ledger.</p> + +<ul> + <li>Assets are assigned a unique id number</li> + + <li>Any number of fixed asset categories can be defined eg. Plant, Equipment, Buildings etc.</li> + + <li>Assets can be depreciated using either striaght line or diminishing value depreciation methods</li> + + <li>Each asset can have it\'s own depreciation rate</li> + + <li>Any number of fixed asset locations can be defined. Assets can only belong to one location. Assets can be listed by category and location so they can be readily identified in a fixed asset audit.</li> + + <li>Depreciation calculation and posting run checks if previously run and defaults the run date to avoid duplicated depreciation runs.</li> + + <li>A transaction log of depreciation, additions and disposals is maintained</li> + + <li>Full fixed asset schedule of any date period range is possible</li> + + <li>Fixed asset general ledger posting is performed based on the gl accounts in any number user defined fixed asset categories</li> +</ul> +'; + +$ModuleDescriptions['PC']='<p>This for employees to submit expense claims directly in the system - that are then authorised by their immediate supervisor.</p> + +<p>Allows control petty cash expenses in a friendly way, so every employee (without any accounting knowlegde) can enter their expenses, get paid for them, etc</p> + +<p>It consists on a temporary GL table (pcashdetails), containing all info about payments and expenses done as petty cash. Once authorized by a supervisor (both cash assignments or expenses) are posted in gltrans table and flagged.</p> + +<p>Once any transacion in the petty cash system has been posted can not be modified, edited or deleted in any way. Once posted, that\'s it.</p> +'; + +$ModuleDescriptions['system']=''; + +$ModuleDescriptions['Utilities']='<p>Any of these programs should only be run by the individual in the business who is allocated the task of administering the system, who has a thorough understanding of the system. If in doubt seek advice. Many of these utilities perform major changes to the database and it is always advisable to have a backup before attempting to run one. All these utilities have a page security setting of 15 by default (see security schema).</p> +'; + ?> \ No newline at end of file Modified: trunk/includes/main_header.inc =================================================================== --- trunk/includes/main_header.inc 2012-07-18 10:01:45 UTC (rev 9440) +++ trunk/includes/main_header.inc 2012-07-19 18:43:49 UTC (rev 9441) @@ -37,41 +37,14 @@ echo '<script type="text/javascript" src = "'.$rootpath.'/javascripts/script.js"></script>'; echo '</head>'; -echo '<body onload="startTime()">'; +echo '<body onload="showTab(\'vtab1\', \'1vtab1\');startTime();">'; echo '<div class="main_title_bar">' . $ProjectName . ' <div class="exit"><a href="Logout.php" class="exit" title="' . _('Exit From') . ' ' . $ProjectName . '">' . _('Exit') . '</a></div> - <span id="clock" style="float: center; margin-right: 5px;"></span> + <span id="clock" style="float: right; margin-right: 5px;"></span> </div>'; include('includes/MainMenuLinksArray.php'); -echo '<ul class="menu" id="menu"> - <li><a href="#" class="menulink">' . $ProjectName . ' - ' . _('Menu') . '</a> - <ul>'; - for ($i=0; $i<sizeOf($ModuleList); $i++) { - echo '<li><a href="#" class="sub">' . $ModuleList[$i] . '</a>'; - echo '<ul>'; - foreach ($MenuItems[$ModuleLink[$i]] as $name=>$value) { - echo '<li class="sub" class="sub"><a href="#">'.$name.'</a>'; - echo '<ul>'; - $j=0; - foreach ($value['Caption'] as $MenuItem) { - echo '<li class="topline">'.InternalLink('',$value['URL'][$j],$MenuItem).'</li>'; - $j++; - } - echo '</li></ul>'; - } - echo '</ul></li>'; - } - -echo '</ul></li>'; -echo '</ul>'; - -echo '<script type="text/javascript"> - var menu=new menu.dd("menu"); - menu.init("menu","menuhover"); -</script>'; - ?> \ No newline at end of file Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-07-18 10:01:45 UTC (rev 9440) +++ trunk/index.php 2012-07-19 18:43:49 UTC (rev 9441) @@ -18,7 +18,7 @@ $i=1; foreach ($ModuleList as $Module) { - echo '<li id="1vtab1" class="MenuTab" onclick="showTab(\'vtab'.$i.'\', this)">' . $Module . '</li>'; + echo '<li id="1vtab'.$i.'" class="MenuTab" onclick="showTab(\'vtab'.$i.'\', this)">' . $Module . '</li>'; $i++; } echo '</div>'; @@ -28,15 +28,15 @@ foreach ($ModuleLink as $Module) { echo '<div id="vtab'.$i.'" class="vtInfo">'; echo '<div id="leftcolumn"> - <dl id="dropdown'.$i.'" class="dropdown">'; - $j=1; + <dl class="dropdown">'; + $j=0; foreach ($MenuItems[$Module] as $name=>$value) { - echo '<dt id="'.$Module.$j.'-ddheader" class="upperdd" onmouseover="ddMenu(\''.$Module.$j.'\',1)" onmouseout="ddMenu(\''.$Module.$j.'\',-1)">' . $name . '</dt> + echo '<dt id="'.$Module.$j.'-ddheader" class="upperdd" onmouseover="ddMenu(\''.$Module.$j.'\',1)" onmouseout="ddMenu(\''.$Module.$j.'\',-1)">' . $name . '<div style="float:right;">></div></dt> <dd id="'.$Module.$j.'-ddcontent" onmouseover="cancelHide(\''.$Module.$j.'\')" onmouseout="ddMenu(\''.$Module.$j.'\',-1)"> <ul>'; $k=0; foreach ($MenuItems[$Module][$name]['Caption'] as $Caption) { - echo '<li>' . InternalLink('', $MenuItems[$Module][$name]['URL'][$k], $Caption, 'underline') . '</li>'; + echo '<li>' . InternalLink('', $MenuItems[$Module][$name]['URL'][$k], $Caption, 'underline') . '</li>'; $k++; } echo '</ul> @@ -44,14 +44,16 @@ $j++; } echo '<dt class="bottomdd"></dt>'; + echo '</div><div class="ModuleSummary"><div class="manual_title_bar">' . $ModuleList[$i-1] . '</div>'.$ModuleDescriptions[$Module].'</div></div>'; echo '</dl> - </div>'; - echo '</div>'; + '; $i++; } -echo '</div></div>'; +echo '</div><div id="rightcolumn"> +</div></div>'; + echo '<table width="100%"><tr><td>'; include('dashboard/CompanyInfo.php'); echo '</td><td>'; Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-18 10:01:45 UTC (rev 9440) +++ trunk/javascripts/FormFunctions.js 2012-07-19 18:43:49 UTC (rev 9441) @@ -117,6 +117,7 @@ function OpenSubWindow(TargetURL) { document.getElementById("Mask").setAttribute("class", "mask"); document.getElementById("SubWindow").setAttribute("class", "inputbox"); +// alert(document.getElementById("contents").innerHTML); // ExpandWindow(51, 51, 51, 51, 1, 1, 1, 1, document.getElementById("contents")); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); @@ -232,7 +233,7 @@ for (var i=0; i<tabs.length; i++) { tabs[i].style.display = 'none'; } - tab.style.backgroundColor='#EBFFE3'; + tab.style.backgroundColor='#F7F7F7'; document.getElementById(IDS).style.display = 'block'; } Modified: trunk/javascripts/script.js =================================================================== --- trunk/javascripts/script.js 2012-07-18 10:01:45 UTC (rev 9440) +++ trunk/javascripts/script.js 2012-07-19 18:43:49 UTC (rev 9441) @@ -1,62 +1,64 @@ -var DDSPEED = 10; -var DDTIMER = 15; +var DDSPEED = 5; +var DDTIMER = 5; var OFFSET = -2; -var ZINT = 100; +var ZINT = 10; function ddMenu(id,d){ - var h = document.getElementById(id + '-ddheader'); - var c = document.getElementById(id + '-ddcontent'); - clearInterval(c.timer); - if(d == 1){ - clearTimeout(h.timer); - c.style.display = 'block'; - if(c.maxh && c.maxh <= c.offsetHeight){return} - else if(!c.maxh){ - c.style.left = (h.offsetWidth + OFFSET) + 'px'; - c.style.height = 'auto'; - c.maxh = c.offsetHeight; - c.style.height = '0px'; - } - ZINT = ZINT + 1; - c.style.zIndex = ZINT; - c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); - }else{ - h.timer = setTimeout(function(){ddCollapse(c)},50); - } + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + p=id.charAt( id.length-1 ); + c.style.top=(24*p)+'px'; + clearInterval(c.timer); + if(d == 1){ + clearTimeout(h.timer); + c.style.display = 'block'; + if(c.maxh && c.maxh <= c.offsetHeight){return} + else if(!c.maxh){ + c.style.left = (h.offsetWidth + OFFSET) + 'px'; + c.style.height = 'auto'; + c.maxh = c.offsetHeight; + c.style.height = '0px'; + } + ZINT = ZINT + 1; + c.style.zIndex = ZINT; + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + }else{ + h.timer = setTimeout(function(){ddCollapse(c)},50); + } } function ddCollapse(c){ - c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER); + c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER); } function cancelHide(id){ - var h = document.getElementById(id + '-ddheader'); - var c = document.getElementById(id + '-ddcontent'); - clearTimeout(h.timer); - clearInterval(c.timer); - if(c.offsetHeight < c.maxh){ - c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); - } + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearTimeout(h.timer); + clearInterval(c.timer); + if(c.offsetHeight < c.maxh){ + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + } } function ddSlide(c,d){ - var currh = c.offsetHeight; - var dist; - if(d == 1){ - dist = Math.round((c.maxh - currh) / DDSPEED); - }else{ - dist = Math.round(currh / DDSPEED); - } - if(dist <= 1 && d == 1){ - dist = 1; - } - c.style.height = currh + (dist * d) + 'px'; - c.style.opacity = currh / c.maxh; - c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')'; - if(currh > (c.maxh - 2) && d == 1){ - clearInterval(c.timer); - }else if(dist < 1 && d != 1){ - clearInterval(c.timer); - c.style.display = 'none'; - } + var currh = c.offsetHeight; + var dist; + if(d == 1){ + dist = Math.round((c.maxh - currh) / DDSPEED); + }else{ + dist = Math.round(currh / DDSPEED); + } + if(dist <= 1 && d == 1){ + dist = 1; + } + c.style.height = currh + (dist * d) + 'px'; + c.style.opacity = currh / c.maxh; + c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')'; + if(currh > (c.maxh - 2) && d == 1){ + clearInterval(c.timer); + }else if(dist < 1 && d != 1){ + clearInterval(c.timer); + c.style.display = 'none'; + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-23 12:09:02
|
Revision: 9449 http://weberp.svn.sourceforge.net/weberp/?rev=9449&view=rev Author: tim_schofield Date: 2012-07-23 12:08:56 +0000 (Mon, 23 Jul 2012) Log Message: ----------- Ricard: Restrict internal departments to users as described in http://www.weberp.org/forum/showthread.php?tid=171&pid=1029#pid1029 Modified Paths: -------------- trunk/InternalStockRequest.php trunk/WWW_Users.php trunk/includes/UserLogin.php Added Paths: ----------- trunk/sql/mysql/updates/144.php Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-07-23 07:40:30 UTC (rev 9448) +++ trunk/InternalStockRequest.php 2012-07-23 12:08:56 UTC (rev 9449) @@ -164,19 +164,28 @@ echo '<tr> <td>' . _('Department') . ':</td>'; -$sql="SELECT departmentid, - description - FROM departments - ORDER BY description"; +if($_SESSION['AllowedDepartment'] == 0){ + // any internal department allowed + $sql="SELECT departmentid, + description + FROM departments + ORDER BY description"; +} else { + // just 1 internal department allowed + $sql="SELECT departmentid, + description + FROM departments + WHERE departmentid = '". $_SESSION['AllowedDepartment'] ."' + ORDER BY description"; +} $result=DB_query($sql, $db); echo '<td><select name="Department">'; -echo '<option value="">' . _('Select your department') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_SESSION['Request']->Department) and $_SESSION['Request']->Department==$myrow['departmentid']){ - echo '<option selected="True" value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlentities($myrow['description'], ENT_QUOTES,'UTF-8').'</option>'; + echo '<option selected="True" value="' . $myrow['departmentid'] . '">' . htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8').'</option>'; } else { - echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlentities($myrow['description'], ENT_QUOTES,'UTF-8').'</option>'; + echo '<option value="' . $myrow['departmentid'] . '">' . htmlspecialchars($myrow['description'], ENT_QUOTES,'UTF-8').'</option>'; } } echo '</select></td></tr>'; Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2012-07-23 07:40:30 UTC (rev 9448) +++ trunk/WWW_Users.php 2012-07-23 12:08:56 UTC (rev 9449) @@ -141,7 +141,8 @@ defaultlocation='" . $_POST['DefaultLocation'] ."', modulesallowed='" . $ModulesAllowed . "', blocked='" . $_POST['Blocked'] . "', - pdflanguage='" . $_POST['PDFLanguage'] . "' + pdflanguage='" . $_POST['PDFLanguage'] . "', + department='" . $_POST['Department'] . "' WHERE userid = '". $SelectedUser . "'"; prnMsg( _('The selected user record has been updated'), 'success' ); @@ -164,7 +165,8 @@ displayrecordsmax, theme, language, - pdflanguage) + pdflanguage, + department) VALUES ('" . $_POST['UserID'] . "', '" . $_POST['RealName'] ."', '" . $_POST['Cust'] ."', @@ -181,8 +183,9 @@ '" . $ModulesAllowed . "', '" . $_SESSION['DefaultDisplayRecordsMax'] . "', '" . $_POST['Theme'] . "', - '". $_POST['UserLanguage'] ."', - '" . $_POST['PDFLanguage'] . "')"; + '" . $_POST['UserLanguage'] ."', + '" . $_POST['PDFLanguage'] . "', + '" . $_POST['Department'] . "')"; prnMsg( _('A new user record has been inserted'), 'success' ); } @@ -210,6 +213,7 @@ unset($_POST['Theme']); unset($_POST['UserLanguage']); unset($_POST['PDFLanguage']); + unset($_POST['Department']); unset($SelectedUser); } @@ -361,7 +365,8 @@ blocked, theme, language, - pdflanguage + pdflanguage, + department FROM www_users WHERE userid='" . $SelectedUser . "'"; @@ -385,6 +390,7 @@ $_POST['UserLanguage'] = $myrow['language']; $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; + $_POST['Department'] = $myrow['department']; echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />'; @@ -638,6 +644,35 @@ } echo '</select></td></tr>'; +/* Allowed Department for Internal Requests */ + +echo '<tr> + <td>' . _('Allowed Department for Internal Requests') . ':</td>'; + +$sql="SELECT departmentid, + description + FROM departments + ORDER BY description"; + +$result=DB_query($sql, $db); +echo '<td><select name="Department">'; +if ((isset($_POST['Department']) AND $_POST['Department']=='0') OR !isset($_POST['Department'])){ + echo '<option selected="selected" value="0">' . _('Any Internal Department') . '</option>'; +} else { + echo '<option value="">' . _('Any Internal Department') . '</option>'; +} +while ($myrow=DB_fetch_array($result)){ + if (isset($_POST['Department']) AND $myrow['departmentid'] == $_POST['Department']){ + echo '<option selected="selected" value="' . $myrow['departmentid'] . '">' . $myrow['description'] . '</option>'; + } else { + echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['description'] . '</option>'; + } +} +echo '</select></td> + </tr>'; + +/* Account status */ + echo '<tr><td>' . _('Account Status') . ':</td><td><select name="Blocked">'; if ($_POST['Blocked']==0){ echo '<option selected="True" value="0">' . _('Open') . '</option>'; Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2012-07-23 07:40:30 UTC (rev 9448) +++ trunk/includes/UserLogin.php 2012-07-23 12:08:56 UTC (rev 9449) @@ -75,6 +75,7 @@ $_SESSION['Theme'] = $myrow['theme']; $_SESSION['Language'] = $myrow['language']; $_SESSION['SalesmanLogin'] = $myrow['salesman']; + $_SESSION['AllowedDepartment'] = $myrow['department']; if (isset($myrow['pdflanguage'])) { $_SESSION['PDFLanguage'] = $myrow['pdflanguage']; } else { Added: trunk/sql/mysql/updates/144.php =================================================================== --- trunk/sql/mysql/updates/144.php (rev 0) +++ trunk/sql/mysql/updates/144.php 2012-07-23 12:08:56 UTC (rev 9449) @@ -0,0 +1,9 @@ +<?php + +// Add a field in stockmaster to record the last time the category was changed. + +AddColumn('department', 'www_users', 'INT( 11 )', 'NOT NULL', '0', 'pdflanguage', $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. |
From: <tim...@us...> - 2012-07-28 18:11:21
|
Revision: 9452 http://weberp.svn.sourceforge.net/weberp/?rev=9452&view=rev Author: tim_schofield Date: 2012-07-28 18:11:13 +0000 (Sat, 28 Jul 2012) Log Message: ----------- New product search facility Modified Paths: -------------- trunk/SelectProduct.php trunk/css/silverwolf/images/maintenance.png trunk/css/silverwolf/images/supplier.png trunk/css/silverwolf/images/transactions.png trunk/css/silverwolf/sub.css Added Paths: ----------- trunk/css/silverwolf/images/inquiry.png trunk/includes/ProductSearch.php Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-07-27 07:33:08 UTC (rev 9451) +++ trunk/SelectProduct.php 2012-07-28 18:11:13 UTC (rev 9452) @@ -16,21 +16,9 @@ $_POST['Select'] = trim(mb_strtoupper($_GET['StockID'])); } -if (isset($_GET['NewSearch']) or isset($_POST['Next']) or isset($_POST['Previous']) or isset($_POST['Go'])) { - unset($StockID); - unset($_SESSION['SelectedStockItem']); - unset($_POST['Select']); +if (isset($_POST['ChooseProduct'])) { + $_SESSION['SelectedStockItem'] = trim(mb_strtoupper($_POST['ChooseProduct'])); } -if (!isset($_POST['PageOffset'])) { - $_POST['PageOffset'] = 1; -} else { - if ($_POST['PageOffset'] == 0) { - $_POST['PageOffset'] = 1; - } -} -if (isset($_POST['StockCode'])) { - $_POST['StockCode'] = trim(mb_strtoupper($_POST['StockCode'])); -} if (isset($_GET['ShowAll']) and $_GET['ShowAll']=='Yes') { $_SESSION['ShowAllPrices'][$_SESSION['SelectedStockItem']]='Yes'; @@ -78,20 +66,8 @@ } } -// Always show the search facilities -$SQL = "SELECT categoryid, - categorydescription - FROM stockcategory - ORDER BY categorydescription"; -$result1 = DB_query($SQL, $db); -if (DB_num_rows($result1) == 0) { - echo '<p><font size="4" color="red">' . _('Problem Report') . ':</font><br />' . _('There are no stock categories currently defined please use the link below to set them up').'</p>'; - echo InternalLink('' . 'StockCategories.php', _('Define Stock Categories')); - exit; -} -// end of showing search facilities /* displays item options if there is one and only one selected */ -if (!isset($_POST['Search']) AND (isset($_POST['Select']) OR isset($_SESSION['SelectedStockItem']))) { +if (isset($_SESSION['SelectedStockItem'])) { if (isset($_POST['Select'])) { $_SESSION['SelectedStockItem'] = $_POST['Select']; $StockID = $_POST['Select']; @@ -127,7 +103,7 @@ } echo '<br /><table width="95%" class="selection"> <tr> - <th title="'. $myrow['longdescription'] . '" colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th></tr>'; + <th title="'. $myrow['longdescription'] . '" colspan="3" class="header"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th></tr>'; echo '<tr><td width="40%" valign="top"> <table align="left" style="background: transparent;">'; //nested table echo '<tr><th style="text-align:right;"><b>' . _('Item Type:') . '</b></th> @@ -464,10 +440,17 @@ DB_data_seek($result, 0); } echo '</td></tr></table><br />'; // end first item details table - echo '<table width="90%" class="selection" cellpadding="1"><tr> - <th width="33%">' . _('Item Inquiries') . '</th> - <th width="33%">' . _('Item Transactions') . '</th> - <th width="33%">' . _('Item Maintenance') . '</th> + echo '<table width="90%" class="selection" cellpadding="1">'; + echo '<tr> + <th width="33%" class="header">' . _('Item Inquiries') . ' + <img src="' . $rootpath . '/css/' . $theme . '/images/inquiry.png" title="' . _('Items') . '" alt="" /> + </th> + <th width="33%" class="header">' . _('Item Transactions') . ' + <img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Items') . '" alt="" /> + </th> + <th width="33%" class="header">' . _('Item Maintenance') . ' + <img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Items') . '" alt="" /> + </th> </tr>'; echo '<tr><td valign="top" class="select">'; /*Stock Inquiry Options */ @@ -553,11 +536,11 @@ echo '</td></tr></table>'; } else { // options (links) to pages. This requires stock id also to be passed. - echo '<table width="90%" cellpadding="4" class="selection">'; + echo '<br /><table width="90%" cellpadding="4" class="selection">'; echo '<tr> - <th width="33%">' . _('Item Inquiries') . '</th> - <th width="33%">' . _('Item Transactions') . '</th> - <th width="33%">' . _('Item Maintenance') . '</th> + <th width="33%" class="header">' . _('Item Inquiries') . '</th> + <th width="33%" class="header">' . _('Item Transactions') . '</th> + <th width="33%" class="header">' . _('Item Maintenance') . '</th> </tr>'; echo '<tr><td class="select">'; /*Stock Inquiry Options */ @@ -571,294 +554,19 @@ echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Inventory Items'). '</p>'; -echo '<table class="selection"><tr>'; -echo '<td>' . _('In Stock Category') . ':'; -echo '<select name="StockCat">'; -if (!isset($_POST['StockCat'])) { - $_POST['StockCat'] = ""; -} -if ($_POST['StockCat'] == 'All') { - echo '<option selected="True" value="All">' . _('All').'</option>'; -} else { - echo '<option value="All">' . _('All').'</option>'; -} -while ($myrow1 = DB_fetch_array($result1)) { - if ($myrow1['categoryid'] == $_POST['StockCat']) { - echo '<option selected="True" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; - } else { - echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; - } -} -echo '</select></td>'; -echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; -if (isset($_POST['Keywords'])) { - echo '<input type="search" name="Keywords" value="' . $_POST['Keywords'] . '" size="34" maxlength="25" />'; -} else { - echo '<input type="search" name="Keywords" size="34" maxlength="25" placeholder="Enter part of the item description" />'; -} -echo '</td></tr><tr><td></td>'; -echo '<td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; -echo '<td>'; -if (isset($_POST['StockCode'])) { - echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" />'; -} else { - echo '<input type="text" name="StockCode" size="15" maxlength="18" />'; -} -echo '</td></tr></table><br />'; -echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div><br />'; -echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; -echo '</form>'; -// query for list of record(s) -if(isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { - $_POST['Search']='Search'; -} -if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { - if (!isset($_POST['Go']) AND !isset($_POST['Next']) AND !isset($_POST['Previous'])) { - // if Search then set to first page - $_POST['PageOffset'] = 1; - } - if ($_POST['Keywords'] AND $_POST['StockCode']) { - prnMsg (_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); - } - if ($_POST['Keywords']) { - //insert wildcard characters in spaces - $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); - $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - if ($_POST['StockCat'] == 'All') { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - FROM stockmaster - LEFT JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.description " . LIKE . " '$SearchString' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - ORDER BY stockmaster.stockid"; - } else { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND description " . LIKE . " '$SearchString' - AND categoryid='" . $_POST['StockCat'] . "' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - ORDER BY stockmaster.stockid"; - } - } elseif (isset($_POST['StockCode'])) { - $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); - if ($_POST['StockCat'] == 'All') { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - stockmaster.mbflag, - stockmaster.discontinued, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster - INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - ORDER BY stockmaster.stockid"; - } else { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - stockmaster.mbflag, - stockmaster.discontinued, - sum(locstock.quantity) as qoh, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' - AND categoryid='" . $_POST['StockCat'] . "' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - ORDER BY stockmaster.stockid"; - } - } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { - if ($_POST['StockCat'] == 'All') { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - stockmaster.mbflag, - stockmaster.discontinued, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster - LEFT JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid, - locstock - WHERE stockmaster.stockid=locstock.stockid - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - ORDER BY stockmaster.stockid"; - } else { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - stockmaster.mbflag, - stockmaster.discontinued, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND categoryid='" . $_POST['StockCat'] . "' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.mbflag, - stockmaster.discontinued, - stockmaster.decimalplaces - ORDER BY stockmaster.stockid"; - } - } - $ErrMsg = _('No stock items were returned by the SQL because'); - $DbgMsg = _('The SQL that returned an error was'); - $searchresult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); - if (DB_num_rows($searchresult) == 0) { - prnMsg(_('No stock items were returned by this search please re-enter alternative criteria to try again'), 'info'); - } - unset($_POST['Search']); -} -/* end query for list of records */ -/* display list if there is more than one record */ -if (isset($searchresult) AND !isset($_POST['Select'])) { - echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - $ListCount = DB_num_rows($searchresult); - if ($ListCount > 0) { - // If the user hit the search button and there is more than one item to show - $ListPageMax = ceil($ListCount / $_SESSION['DisplayRecordsMax']); - if (isset($_POST['Next'])) { - if ($_POST['PageOffset'] < $ListPageMax) { - $_POST['PageOffset'] = $_POST['PageOffset'] + 1; - } - } - if (isset($_POST['Previous'])) { - if ($_POST['PageOffset'] > 1) { - $_POST['PageOffset'] = $_POST['PageOffset'] - 1; - } - } - if ($_POST['PageOffset'] > $ListPageMax) { - $_POST['PageOffset'] = $ListPageMax; - } - if ($ListPageMax > 1) { - echo '<div class="centre"><br /> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; - echo '<select name="PageOffset">'; - $ListPage = 1; - while ($ListPage <= $ListPageMax) { - if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; - } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; - } - $ListPage++; - } - echo '</select> - <button type="submit" name="Go">' . _('Go') . '</button> - <button type="submit" name="Previous">' . _('Previous') . '</button> - <button type="submit" name="Next">' . _('Next') . '</button>'; - echo '<input type="hidden" name=Keywords value="'.$_POST['Keywords'].'" />'; - echo '<input type="hidden" name=StockCat value="'.$_POST['StockCat'].'" />'; - echo '<input type="hidden" name=StockCode value="'.$_POST['StockCode'].'" />'; -// echo '<input type="hidden" name=Search value="Search" />'; - echo '<br /></div>'; - } - echo '<table cellpadding="2" class="selection">'; - echo '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Total Qty On Hand') . '</th> - <th>' . _('Units') . '</th> - <th>' . _('Stock Status') . '</th> - </tr>'; - $j = 1; - $k = 0; //row counter to determine background colour - $RowIndex = 0; - if (DB_num_rows($searchresult) <> 0) { - DB_data_seek($searchresult, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']); - } - while (($myrow = DB_fetch_array($searchresult)) AND ($RowIndex <> $_SESSION['DisplayRecordsMax'])) { - if ($k == 1) { - echo '<tr class="EvenTableRows">'; - $k = 0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - if ($myrow['mbflag'] == 'D') { - $qoh = _('N/A'); - } else { - $qoh = locale_number_format($myrow['qoh'], $myrow['decimalplaces']); - } - if ($myrow['discontinued']==1){ - $ItemStatus = '<font class="bad">' . _('Obsolete') . '</font>'; - } else { - $ItemStatus = '<font class="good">' . _('Current') . '</font>'; - } +$URLArray=explode('/', $_SERVER['PHP_SELF']); +echo '<div class="centre"> + <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/ProductSearch.php\', \'' . htmlspecialchars(array_pop($URLArray), ENT_QUOTES, 'UTF-8') . '\')"> + <img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Click To Search For Inventory Items') . '" alt="" /> + ' . _('Search For Items') . ' + </button> + </div>'; - echo '<td><button type="submit" name="Select" value="' . $myrow['stockid'] . '" />' . $myrow['stockid'] . '</button></td> - <td title="'. $myrow['longdescription'] . '">'.$myrow['description'].'</td> - <td class="number">' . $qoh . '</td> - <td>' . $myrow['units'] . '</td> - <td>' . $ItemStatus . '</td> - <td>' . InternalLink('', '/StockStatus.php?StockID=' . $myrow['stockid'], _('View')) . '</td> - </tr>'; - $RowIndex = $RowIndex + 1; - //end of page full new headings if - } - //end of while loop - echo '</table></form><br />'; - } -} -/* end display list if there is more than one record */ +echo '<div id="SearchMask"></div>'; +echo '<div id="SearchWindow">'; +echo '</div>'; + + include ('includes/footer.inc'); -?> \ No newline at end of file +?> Added: trunk/css/silverwolf/images/inquiry.png =================================================================== --- trunk/css/silverwolf/images/inquiry.png (rev 0) +++ trunk/css/silverwolf/images/inquiry.png 2012-07-28 18:11:13 UTC (rev 9452) @@ -0,0 +1,14 @@ +\x89PNG + + |
From: <tim...@us...> - 2012-07-28 18:11:37
|
Revision: 9453 http://weberp.svn.sourceforge.net/weberp/?rev=9453&view=rev Author: tim_schofield Date: 2012-07-28 18:11:31 +0000 (Sat, 28 Jul 2012) Log Message: ----------- New product search facility Modified Paths: -------------- trunk/SelectSupplier.php Added Paths: ----------- trunk/includes/SupplierSearch.php Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2012-07-28 18:11:13 UTC (rev 9452) +++ trunk/SelectSupplier.php 2012-07-28 18:11:31 UTC (rev 9453) @@ -11,6 +11,7 @@ if (isset($_GET['SupplierID'])) { $_SESSION['SupplierID']=$_GET['SupplierID']; } + // only get geocode information if integration is on, and supplier has been selected if ($_SESSION['geocode_integration'] == 1 AND isset($_SESSION['SupplierID'])) { $sql = "SELECT geocode_key, @@ -60,16 +61,8 @@ </script> <body onload="load()" onunload="GUnload()" >'; } - -if (!isset($_POST['PageOffset'])) { - $_POST['PageOffset'] = 1; -} else { - if ($_POST['PageOffset'] == 0) { - $_POST['PageOffset'] = 1; - } -} -if (isset($_POST['Select'])) { /*User has hit the button selecting a supplier */ - $_SESSION['SupplierID'] = $_POST['Select']; +if (isset($_POST['ChooseSupplier'])) { /*User has hit the button selecting a supplier */ + $_SESSION['SupplierID'] = $_POST['ChooseSupplier']; unset($_POST['Select']); unset($_POST['Keywords']); unset($_POST['SupplierCode']); @@ -78,60 +71,6 @@ unset($_POST['Next']); unset($_POST['Previous']); } -if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { - if (mb_strlen($_POST['Keywords']) > 0 AND mb_strlen($_POST['SupplierCode']) > 0) { - prnMsg( '<br />' . _('Supplier name keywords have been used in preference to the Supplier code extract entered'), 'info' ); - } - if ($_POST['Keywords'] == '' AND $_POST['SupplierCode'] == '') { - $SQL = "SELECT supplierid, - suppname, - currcode, - address1, - address2, - address3, - address4 - FROM suppliers - ORDER BY suppname"; - } else { - if (mb_strlen($_POST['Keywords']) > 0) { - $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); - //insert wildcard characters in spaces - $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - $SQL = "SELECT supplierid, - suppname, - currcode, - address1, - address2, - address3, - address4 - FROM suppliers - WHERE suppname " . LIKE . " '$SearchString' - ORDER BY suppname"; - } elseif (mb_strlen($_POST['SupplierCode']) > 0) { - $_POST['SupplierCode'] = mb_strtoupper($_POST['SupplierCode']); - $SQL = "SELECT supplierid, - suppname, - currcode, - address1, - address2, - address3, - address4 - FROM suppliers - WHERE supplierid " . LIKE . " '%" . $_POST['SupplierCode'] . "%' - ORDER BY supplierid"; - } - } //one of keywords or SupplierCode was more than a zero length string - $result = DB_query($SQL, $db); - if (DB_num_rows($result) == 1) { - $myrow = DB_fetch_array($result); - $SingleSupplierReturned = $myrow['supplierid']; - } -} //end of if search -if (isset($SingleSupplierReturned)) { /*there was only one supplier returned */ - $_SESSION['SupplierID'] = $SingleSupplierReturned; - unset($_POST['Keywords']); - unset($_POST['SupplierCode']); -} if (isset($_SESSION['SupplierID'])) { $SupplierName = ''; $SQL = "SELECT suppliers.suppname @@ -142,39 +81,44 @@ $myrow = DB_fetch_array($SupplierNameResult); $SupplierName = $myrow['suppname']; } - echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : <b>' . stripslashes($_SESSION['SupplierID']) . - ' - ' . $SupplierName . '</b> ' . _('has been selected') . '.</p>'; - echo '<div class="page_help_text">' . _('Select a menu option to operate using this supplier.') . '</div>'; echo '<br /><table width=90% cellpadding="4" class="selection">'; echo '<tr> - <th width="33%" class="header">' . _('Supplier Inquiries') . '</th> - <th width="33%" class="header">' . _('Supplier Transactions') . '</th> - <th width="33%" class="header">' . _('Supplier Maintenance') . '</th> + <th colspan="3" class="header"> + <img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Supplier') . '" alt="" />' . ' ' . _('Supplier') . ' : <b>' . stripslashes($_SESSION['SupplierID']) . ' - ' . $SupplierName . '</b> ' . _('has been selected') . '. + </th> + </tr>'; + echo '<tr> + <th width="33%" class="header">' . _('Supplier Inquiries') . ' + <img src="' . $rootpath . '/css/' . $theme . '/images/inquiry.png" title="' . _('Supplier') . '" alt="" /> + </th> + <th width="33%" class="header">' . _('Supplier Transactions') . ' + <img src="' . $rootpath . '/css/' . $theme . '/images/transactions.png" title="' . _('Supplier') . '" alt="" /> + </th> + <th width="33%" class="header">' . _('Supplier Maintenance') . ' + <img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Supplier') . '" alt="" /> + </th> </tr>'; echo '<tr><td valign="top" class="select">'; /* Inquiry Options */ - echo '<a href="' . $rootpath . '/SupplierInquiry.php?SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Supplier Account Inquiry') . '</a><br />'; - echo '<br />'; - echo '<br /><a href="'.$rootpath.'/PO_SelectOSPurchOrder.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Add / Receive / View Outstanding Purchase Orders') . '</a>'; - echo '<br /><a href="'.$rootpath.'/PO_SelectPurchOrder.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']) . '">' . _('View All Purchase Orders') . '</a><br />'; + echo InternalLink('', 'SupplierInquiry.php?SupplierID=' . stripslashes($_SESSION['SupplierID']) , _('Supplier Account Inquiry')); + echo '<br />' . InternalLink('', 'PO_SelectOSPurchOrder.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']), _('Add / Receive / View Outstanding Purchase Orders')); + echo '<br />' . InternalLink('', 'PO_SelectPurchOrder.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']), _('View All Purchase Orders')); wikiLink('Supplier', stripslashes($_SESSION['SupplierID'])); - echo '<br /><a href="'.$rootpath.'/ShiptsList.php?SupplierID=' . stripslashes($_SESSION['SupplierID']) . '&SupplierName='.urlencode($SupplierName).'">' . _('List all open shipments for') .' '.$SupplierName. '</a>'; - echo '<br /><a href="' . $rootpath . '/Shipt_Select.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Search / Modify / Close Shipments') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SuppPriceList.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Supplier Price List') . '</a>'; + echo '<br />' . InternalLink('', 'ShiptsList.php?SupplierID=' . stripslashes($_SESSION['SupplierID']) . '&SupplierName='.urlencode($SupplierName), _('List all open shipments for') .' '.$SupplierName); + echo '<br />' . InternalLink('', 'Shipt_Select.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']), _('Search / Modify / Close Shipments')); + echo '<br />' . InternalLink('', 'SuppPriceList.php?SelectedSupplier=' . stripslashes($_SESSION['SupplierID']), _('Supplier Price List')); echo '</td><td valign=top class="select">'; /* Supplier Transactions */ - echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Enter a Purchase Order for This Supplier') . '</a><br />'; - echo '<a href="' . $rootpath . '/SupplierInvoice.php?SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Enter a Suppliers Invoice') . '</a><br />'; - echo '<a href="' . $rootpath . '/SupplierCredit.php?New=true&SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Enter a Suppliers Credit Note') . '</a><br />'; - echo '<a href="' . $rootpath . '/Payments.php?SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Enter a Payment to, or Receipt from the Supplier') . '</a><br />'; - echo '<br />'; - echo '<br /><a href="'.$rootpath.'/ReverseGRN.php?&SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Reverse an Outstanding Goods Received Note (GRN)') . '</a>'; + echo '<br />' . InternalLink('', 'PO_Header.php?NewOrder=Yes&SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Enter a Purchase Order for This Supplier')); + echo '<br />' . InternalLink('', 'SupplierInvoice.php?SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Enter a Suppliers Invoice')); + echo '<br />' . InternalLink('', 'SupplierCredit.php?New=true&SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Enter a Suppliers Credit Note')); + echo '<br />' . InternalLink('', 'Payments.php?SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Enter a Payment to, or Receipt from the Supplier')); + echo '<br />' . InternalLink('', 'ReverseGRN.php?&SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Reverse an Outstanding Goods Received Note (GRN)')); echo '</td><td valign=top class="select">'; /* Supplier Maintenance */ - echo '<a href="' . $rootpath . '/Suppliers.php?">' . _('Add a New Supplier') . '</a><br />'; - echo '<a href="' . $rootpath . '/Suppliers.php?SupplierID=' . urlencode(stripslashes($_SESSION['SupplierID'])) . '">' . _('Modify Or Delete Supplier Details') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SupplierContacts.php?&SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Add/Modify/Delete Supplier Contacts') . '</a>'; - echo '<br /><a href="' . $rootpath . '/SupplierPriceList.php?&SupplierID=' . stripslashes($_SESSION['SupplierID']) . '">' . _('Add or Modify Supplier Price List') . '</a>'; - echo '<br />'; - echo '<br /><a href="'.$rootpath.'/Shipments.php?NewShipment=Yes">' . _('Set Up A New Shipment') . '</a>'; - echo '<br /><a href="'.$rootpath.'/SuppLoginSetup.php">' . _('Supplier Login Configuration') . '</a>'; + echo '<br />' . InternalLink('', 'Suppliers.php?"', _('Add a New Supplier')); + echo '<br />' . InternalLink('', 'Suppliers.php?SupplierID=' . urlencode(stripslashes($_SESSION['SupplierID'])), _('Modify Or Delete Supplier Details')); + echo '<br />' . InternalLink('', 'SupplierContacts.php?&SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Add/Modify/Delete Supplier Contacts')); + echo '<br />' . InternalLink('', 'SupplierPriceList.php?&SupplierID=' . stripslashes($_SESSION['SupplierID']), _('Add or Modify Supplier Price List')); + echo '<br />' . InternalLink('', 'Shipments.php?NewShipment=Yes', _('Set Up A New Shipment')); + echo '<br />' . InternalLink('', 'SuppLoginSetup.php', _('Supplier Login Configuration')); echo '</td></tr></table>'; } else { // Supplier is not selected yet @@ -191,114 +135,19 @@ echo '<a href="' . $rootpath . '/Suppliers.php?">' . _('Add a New Supplier') . '</a><br />'; echo '</td></tr></table>'; } -echo '<form onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Suppliers') . '</p> - <table cellpadding="3" class="selection"><tr><td>' . _('Enter a partial Name') . ':</font></td><td>'; -if (isset($_POST['Keywords'])) { - echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; -} else { - echo '<input type="text" name="Keywords" size="20" maxlength="25" />'; -} -echo '</td><td><b>' . _('OR') . '</b></font></td><td>' . _('Enter a partial Code') . ':</font></td><td>'; -if (isset($_POST['SupplierCode'])) { - echo '<input type="text" name="SupplierCode" value="' . $_POST['SupplierCode'] . '" size="15" maxlength="18" />'; -} else { - echo '<input type="text" name="SupplierCode" size="15" maxlength="18" />'; -} -echo '</td></tr></table><br /><div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div>'; -//if (isset($result) AND !isset($SingleSupplierReturned)) { -if (isset($_POST['Search'])) { - $ListCount = DB_num_rows($result); - $ListPageMax = ceil($ListCount / $_SESSION['DisplayRecordsMax']); - if (isset($_POST['Next'])) { - if ($_POST['PageOffset'] < $ListPageMax) { - $_POST['PageOffset'] = $_POST['PageOffset'] + 1; - } - } - if (isset($_POST['Previous'])) { - if ($_POST['PageOffset'] > 1) { - $_POST['PageOffset'] = $_POST['PageOffset'] - 1; - } - } - if ($ListPageMax > 1) { - echo '<br /> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; - echo '<select name="PageOffset">'; - $ListPage = 1; - while ($ListPage <= $ListPageMax) { - if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; - } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; - } - $ListPage++; - } - echo '</select> - <button type="submit" name="Go">' . _('Go') . '</button> - <button type="submit" name="Previous">' . _('Previous') . '</button> - <button type="submit" name="Next">' . _('Next') . '</button>'; - echo '<br />'; - } - echo '<input type="hidden" name="Search" value="' . _('Search Now') . '" />'; - echo '<br /><br />'; - echo '<br /><table cellpadding="2" class="selection">'; - $tableheader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Supplier Name') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Address 1') . '</th> - <th>' . _('Address 2') . '</th> - <th>' . _('Address 3') . '</th> - <th>' . _('Address 4') . '</th> - </tr>'; - echo $tableheader; - $j = 1; - $k = 0; //row counter to determine background colour - $RowIndex = 0; - if (DB_num_rows($result) <> 0) { - DB_data_seek($result, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']); - } - while (($myrow = DB_fetch_array($result)) AND ($RowIndex <> $_SESSION['DisplayRecordsMax'])) { - if ($k == 1) { - echo '<tr class="EvenTableRows">'; - $k = 0; - } else { - echo '<tr class="OddTableRows">'; - $k = 1; - } - echo '<td><button type="submit" name="Select" value="'.DB_escape_string($myrow['supplierid']).'">'.DB_escape_string($myrow['supplierid']).'</button></td> - <td>'.$myrow['suppname'].'</td> - <td>'.$myrow['currcode'].'</td> - <td>'.$myrow['address1'].'</td> - <td>'.$myrow['address2'].'</td> - <td>'.$myrow['address3'].'</td> - <td>'.$myrow['address4'].'</td> - </tr>'; - $RowIndex = $RowIndex + 1; - //end of page full new headings if - } - //end of while loop - echo '</table>'; -} -//end if results to show -if (isset($ListPageMax) and $ListPageMax > 1) { - echo '<br /> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; - echo '<select name="PageOffset">'; - $ListPage = 1; - while ($ListPage <= $ListPageMax) { - if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; - } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; - } - $ListPage++; - } - echo '</select> - <button type="submit" name="Go">' . _('Go') . '</button> - <button type="submit" name="Previous">' . _('Previous') . '</button> - <button type="submit" name="Next">' . _('Next') . '</button>'; - echo '<br />'; -} + +$URLArray=explode('/', $_SERVER['PHP_SELF']); +echo '<div class="centre"> + <button type="submit" name="Search" onclick="return OpenSearchWindow(\'includes/SupplierSearch.php\', \'' . htmlspecialchars(array_pop($URLArray), ENT_QUOTES, 'UTF-8') . '\')"> + <img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Click To Search For Suppliers') . '" alt="" /> + ' . _('Search For Suppliers') . ' + </button> + </div>'; + +echo '<div id="SearchMask"></div>'; +echo '<div id="SearchWindow">'; +echo '</div>'; +- echo '</form>'; // Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display if (isset($_SESSION['SupplierID']) and $_SESSION['SupplierID'] != '') { Added: trunk/includes/SupplierSearch.php =================================================================== --- trunk/includes/SupplierSearch.php (rev 0) +++ trunk/includes/SupplierSearch.php 2012-07-28 18:11:31 UTC (rev 9453) @@ -0,0 +1,105 @@ +<?php + +$PageSecurity=1; + +if (!isset($PathPrefix)) { + $PathPrefix=$_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF']) . '/../'; + $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8')); +} + +include($PathPrefix . 'config.php'); +require_once($PathPrefix . 'includes/session.inc'); + +if (!isset($_POST['PartialID']) and !isset($_POST['PartialDescription'])) { + $_POST['PartialID']=''; + $_POST['PartialName']=''; + $_POST['PartialAddress']=''; + $_POST['PartialTelephone']=''; + echo '<form name="search" onkeyup="return SubmitSearchForm(this,\'includes/SupplierSearch.php?CallingURL='.$_GET['CallingURL'].'\');" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div class="manual_title_bar">' . _('Search Suppliers') . '</div>'; + + echo '<table class="background_table" width="98%"> + <tr> + <td class="background_td" width="33%">'; + echo '<table style="border: solid #000000 1px;width:100%;border-radius: 5px"> + <tr> + <th colspan="2" class="dialog_header">' . _('Selection Criteria') . '</th> + </tr>'; + echo '<tr> + <td>' . _('Partial ID') . '</td> + <td><input type="text" name="PartialID" class="SearchInput" /></td> + </tr>'; + echo '<tr> + <td>' . _('Partial Name') . '</td> + <td><input type="text" name="PartialName" class="SearchInput" /></td> + </tr>'; + echo '<tr> + <td>' . _('Partial Address') . '</td> + <td><input type="text" name="PartialAddress" class="SearchInput" /></td> + </tr>'; + echo '<tr> + <td>' . _('Partial Telephone Number') . '</td> + <td><input type="text" name="PartialTelephone" class="SearchInput" /></td> + </tr>'; + echo '</table></form>'; + echo '</td>'; + echo '<td class="background_td" width="66%" id="SearchResults">'; +} + +echo '<form onkeyup="return SubmitSearchForm(this);" name="SearchForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<table style="border: solid #000000 1px;width:100%;border-radius: 5px;"> + <tr> + <th class="dialog_header" colspan="5">' . _('Suppliers') . '</th> + </tr>'; + + +$SearchResult = SupplierSearchSQL($db); +while ($myrow=DB_fetch_array($SearchResult)) { + $address=$myrow['address1'].','.$myrow['address2'].','.$myrow['address3'].','.$myrow['address4']; + echo '<tr> + <td>' . $myrow['supplierid'] . '</td> + <td>' . $myrow['suppname'] . '</td> + <td>' . $address . '</td> + <td class="number"><input name="SupplierID" value="' . $myrow['supplierid'] . '" type="radio" onclick="OnSelectClick(this, ChooseSupplier)" /></td> + </tr>'; +} +echo '<tr> + <th class="dialog_header" style="background:transparent" colspan="5"> + <button class="dialog_button" type="submit" name="ChooseSupplier" id="ChooseSupplier" value="submit" onclick="return SubmitForm(SearchForm,\''.$_GET['CallingURL'].'\')"> + <img src="css/'.$theme.'/images/tick.png" title="' . _('Save') . '" alt="" class="ButtonIcon" /> ' . _('Select') . ' + </button> + <button class="dialog_button" type="cancel" id="CancelSearch" value="submit" onclick="CloseSearchWindow()"> + <img src="css/'.$theme.'/images/cross.png" title="' . _('Save') . '" alt="" class="ButtonIcon" /> ' . _('Cancel') . ' + </button> + </th> + </tr>'; +echo '</table>'; + +echo '</td> + </tr> + </table></form>'; + +function SupplierSearchSQL($db) { + $SQL = "SELECT suppliers.supplierid, + suppliers.suppname, + suppliers.address1, + suppliers.address2, + suppliers.address3, + suppliers.address4 + FROM suppliers + WHERE suppliers.suppname " . LIKE . " '%" . $_POST['PartialName'] . "%' + AND suppliers.supplierid " . LIKE . " '%" . $_POST['PartialID'] . "%' + AND suppliers.telephone " . LIKE . " '%" . $_POST['PartialTelephone'] . "%' + AND (suppliers.address1 " . LIKE . " '%" . $_POST['PartialAddress'] . "%' + OR suppliers.address2 " . LIKE . " '%" . $_POST['PartialAddress'] . "%' + OR suppliers.address3 " . LIKE . " '%" . $_POST['PartialAddress'] . "%' + OR suppliers.address4 " . LIKE . " '%" . $_POST['PartialAddress'] . "%') + LIMIT 15"; + $result=DB_query($SQL, $db); + return $result; +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-28 18:11:49
|
Revision: 9454 http://weberp.svn.sourceforge.net/weberp/?rev=9454&view=rev Author: tim_schofield Date: 2012-07-28 18:11:43 +0000 (Sat, 28 Jul 2012) Log Message: ----------- New table sorting functionality Modified Paths: -------------- trunk/AccountGroups.php trunk/javascripts/FormFunctions.js Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-07-28 18:11:31 UTC (rev 9453) +++ trunk/AccountGroups.php 2012-07-28 18:11:43 UTC (rev 9454) @@ -242,10 +242,10 @@ </tr> <tr> <th class="SortableColumn" onclick="SortSelect(this)">' . _('Group Name') . '</th> - <th>' . _('Section') . '</th> - <th>' . _('Sequence In TB') . '</th> - <th>' . _('Profit and Loss') . '</th> - <th>' . _('Parent Group') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Section') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Sequence In TB') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Profit and Loss') . '</th> + <th class="SortableColumn" onclick="SortSelect(this)">' . _('Parent Group') . '</th> </tr>'; $k=0; //row colour counter @@ -290,7 +290,7 @@ if (!isset($_GET['delete'])) { echo '<td class="background_td" width="50%">'; - echo '<form method="post" id="AccountGroups" onsubmit="return SubmitForm(this)" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<form method="post" id="AccountGroups" onsubmit="return SubmitForm(this, \'\')" action="' . basename(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8')) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['SelectedAccountGroup'])) { @@ -443,4 +443,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-28 18:11:31 UTC (rev 9453) +++ trunk/javascripts/FormFunctions.js 2012-07-28 18:11:43 UTC (rev 9454) @@ -11,8 +11,8 @@ return false; } -function MakePageInVisible() { - document.getElementById("contents").style.display='none'; +function MakePageInVisible(w) { + w.style.display='none'; return false; } @@ -32,34 +32,59 @@ function SortSelect(selElem) { var tmpArray = new Array(); + columnText=selElem.innerHTML; parentElem=selElem.parentNode; table=parentElem.parentNode; - for (var i = 0, row; row = table.rows[i]; i++) { - //iterate through rows - //rows would be accessed using the "row" variable assigned in the for loop + row = table.rows[1]; + for (var j = 0, col; col = row.cells[j]; j++) { + if (row.cells[j].innerHTML==columnText) { + columnNumber=j; + s=getComputedStyle(row.cells[j]); + if (s.cursor=="s-resize") { + row.cells[j].style.cursor="n-resize"; + direction="a"; + } else { + row.cells[j].style.cursor="s-resize"; + direction="d"; + } + } + } + for (var i = 2, row; row = table.rows[i]; i++) { + var rowArray = new Array(); for (var j = 0, col; col = row.cells[j]; j++) { - //iterate through columns - //columns would be accessed using the "col" variable assigned in the for loop if (row.cells[j].tagName == 'TD' ) { - tmpArray[i,j]=row.cells[j].innerHTML; - alert(tmpArray[i,j]); + rowArray[j]=row.cells[j].innerHTML; + columnClass=row.cells[columnNumber].className; } } + tmpArray[i]=rowArray; } - for (var i=0;i<selElem.options.length;i++) { - tmpArray[i] = new Array(); - tmpArray[i][0] = parseInt(selElem.options[i].text); - tmpArray[i][1] = parseInt(selElem.options[i].value); + tmpArray.sort( + function(a,b) { + if (direction=="a") { + if (columnClass=="number") { + return a[columnNumber]-b[columnNumber]; + } else { + return a[columnNumber].localeCompare(b[columnNumber]) + } + } else { + if (columnClass=="number") { + return b[columnNumber]-a[columnNumber]; + } else { + return b[columnNumber].localeCompare(a[columnNumber]) + } + } + } + ); + for (var i = 0, row; row = table.rows[i+2]; i++) { + var rowArray = new Array(); + rowArray=tmpArray[i]; + for (var j = 0, col; col = row.cells[j]; j++) { + if (row.cells[j].tagName == 'TD' ) { + row.cells[j].innerHTML=rowArray[j]; + } + } } - tmpArray.sort(function(a,b){return b-a}); - tmpArray.reverse(); - while (selElem.options.length > 0) { - selElem.options[0] = null; - } - for (var i=0;i<tmpArray.length;i++) { - var op = new Option(tmpArray[i][0], tmpArray[i][1]); - selElem.options[i] = op; - } return; } @@ -172,8 +197,8 @@ return false; } -function OnSelectClick(RadioButton) { - document.getElementById("ChooseCustomer").value=RadioButton.value; +function OnSelectClick(RadioButton, ButtonID) { + ButtonID.value=RadioButton.value; return false; } @@ -198,7 +223,7 @@ function CloseSubWindow() { document.getElementById("Mask").setAttribute("class", "unmask"); - document.getElementById("contents").innerHTML=""; +// document.getElementById("contents").innerHTML=""; document.getElementById("SubWindow").innerHTML="<div id=\"contents\"></div>"; document.getElementById("SubWindow").removeAttribute("class", "inputbox"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-07-29 07:45:39
|
Revision: 9464 http://weberp.svn.sourceforge.net/weberp/?rev=9464&view=rev Author: tim_schofield Date: 2012-07-29 07:45:32 +0000 (Sun, 29 Jul 2012) Log Message: ----------- Phil: few more manual links Modified Paths: -------------- trunk/Areas.php trunk/COGSGLPostings.php trunk/SalesGLPostings.php trunk/SystemParameters.php trunk/doc/Manual/ManualCreatingNewSystem.html Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-07-28 20:40:09 UTC (rev 9463) +++ trunk/Areas.php 2012-07-29 07:45:32 UTC (rev 9464) @@ -5,7 +5,8 @@ include('includes/session.inc'); $title = _('Sales Area Maintenance'); - +$ViewTopic= 'CreatingNewSystem'; +$BookMark = 'Areas'; include('includes/header.inc'); Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2012-07-28 20:40:09 UTC (rev 9463) +++ trunk/COGSGLPostings.php 2012-07-29 07:45:32 UTC (rev 9464) @@ -5,7 +5,8 @@ include('includes/session.inc'); $title = _('Cost Of Sales GL Postings Set Up'); - +$ViewTopic= 'CreatingNewSystem'; +$BookMark = 'SalesGLPostings'; include('includes/header.inc'); Modified: trunk/SalesGLPostings.php =================================================================== --- trunk/SalesGLPostings.php 2012-07-28 20:40:09 UTC (rev 9463) +++ trunk/SalesGLPostings.php 2012-07-29 07:45:32 UTC (rev 9464) @@ -4,6 +4,8 @@ include('includes/session.inc'); $title = _('Sales GL Postings Set Up'); +$ViewTopic= 'CreatingNewSystem'; +$BookMark = 'SalesGLPostings'; include('includes/header.inc'); if (isset($_GET['SelectedSalesPostingID'])){ Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2012-07-28 20:40:09 UTC (rev 9463) +++ trunk/SystemParameters.php 2012-07-29 07:45:32 UTC (rev 9464) @@ -5,7 +5,8 @@ include('includes/session.inc'); $title = _('System Configuration'); - +$ViewTopic= 'CreatingNewSystem'; +$BookMark = 'SystemConfiguration'; include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Supplier Types') . '" alt="" />' . $title. '</p>'; Modified: trunk/doc/Manual/ManualCreatingNewSystem.html =================================================================== --- trunk/doc/Manual/ManualCreatingNewSystem.html 2012-07-28 20:40:09 UTC (rev 9463) +++ trunk/doc/Manual/ManualCreatingNewSystem.html 2012-07-29 07:45:32 UTC (rev 9464) @@ -62,7 +62,7 @@ <!-- Help End: CompanyPreferences --> <!-- Help Begin: SystemConfiguration --> <div class="floatright"> <a class="minitext" href="#top">⬆ Top</a></div> -<h2>System Configuration</h2> +<h2><a id="SystemConfiguration">System Configuration</a></h2> <p> From the setup tab the main system configuration parameters can be set from the link "Configuration Settings". Narrative is shown alongside each parameter to give the user an idea of where the setting is used.</p> @@ -385,7 +385,7 @@ <p> However, accounts receivable also requires that certain branch information, relating to delivery address etc must be entered against each customer. But before customer branches can be created the following base information must be entered - the links to the forms that allow all this information to be defined are available from the main menu under system set up:</p> <ul> - <li>Sales areas - these are for analysing sales by area. Also, GL integration can be set up to look at the area of the customer to determine the GL account to post sales to. Each branch of a customer's account must refer to a sales area. If sales areas are not necessary in your business a single area must be defined - called say "default area"</li> + <li><a id="Areas">Sales areas</a> - these are for analysing sales by area. Also, GL integration can be set up to look at the area of the customer to determine the GL account to post sales to. Each branch of a customer's account must refer to a sales area. If sales areas are not necessary in your business a single area must be defined - called say "default area"</li> <li>As many sales types as required can be set up. It should be borne in mind that prices are held against sales types (and currencies). The sales type would reflect whether the sale was a trade sale, retail, wholesale, indent, cash sale, special sale etc.</li> @@ -426,7 +426,7 @@ <p> It is not necessary to use the stock integration to the general ledger although a fully standard costing based accounting system with full general ledger integration, will arguably provide the fastest and most informative financial reporting system for manufacturers.</p> -<h3>Sales Ledger - Accounts Receivable Integration to General Ledger Issues</h3> +<h3><a id="SalesGLPostings">Sales Ledger - Accounts Receivable Integration to General Ledger Issues</a></h3> <p> Some flexibility is provided in how sales transactions are posted to the general ledger. Different sales accounts can be used depending on any combination of the sales area of the customer, the sales type and the stock category of the item sold. Before entering any sales it is important to defined the posting schema under setup - Sales GL Interface Postings. The same flexibility is also afforded to the posting of cost of goods sold (COGS)- of course these journals are only created if the stock GL interface is activated. If it is then again it is critical to ensure the proper set up of the posting schema for COGS under the setup tab - COGS GL Interface posting</p> <div class="floatright"> <a class="minitext" href="#top">⬆ Top</a></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |