From: <dai...@us...> - 2012-02-22 06:26:55
|
Revision: 4950 http://web-erp.svn.sourceforge.net/web-erp/?rev=4950&view=rev Author: daintree Date: 2012-02-22 06:26:38 +0000 (Wed, 22 Feb 2012) Log Message: ----------- fully qualify htmlspecialchars() function Modified Paths: -------------- trunk/AddCustomerTypeNotes.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BackupDatabase.php trunk/BankReconciliation.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractCosting.php trunk/ContractOtherReqts.php trunk/Contracts.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/FTP_RadioBeacon.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLJournal.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTrialBalance.php trunk/GLTrialBalance_csv.php trunk/GeocodeSetup.php trunk/GoodsReceived.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/OffersReceived.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PageSecurity.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategories.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGLPostings.php trunk/SalesGraph.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectCompletedOrder.php trunk/SelectContract.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItemResearch.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxGroups.php trunk/TaxProvinces.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/UserSettings.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_CheckDebtorsControl.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_DeleteSalesTransActions.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeNewCompany.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/config.distrib.php trunk/doc/Change.log trunk/doc/Manual/ManualContents.php trunk/doc/Manual/ManualGettingStarted.html trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/includes/session.inc trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/locale/zh_CN.utf8/Manual/ManualContents.php trunk/locale/zh_CN.utf8/Manual/ManualGettingStarted.html trunk/locale/zh_HK.utf8/Manual/ManualContents.php trunk/locale/zh_HK.utf8/Manual/ManualGettingStarted.html Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/AddCustomerTypeNotes.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -147,7 +147,7 @@ } if (isset($Id)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorType=' . $DebtorType . '">' . _('Review all notes for this Customer Type') .'</a> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DebtorType=' . $DebtorType . '">' . _('Review all notes for this Customer Type') .'</a> </div>'; } Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/AuditTrail.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -34,7 +34,7 @@ // Get list of users $UserResult = DB_query("SELECT userid FROM www_users",$db); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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">'; Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMExtendedQty.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -262,7 +262,7 @@ echo '<br /> <br /> - <form action=' . htmlspecialchars($_SERVER['PHP_SELF']) . ' method="post"> + <form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> <table class="selection"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMIndented.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -247,7 +247,7 @@ echo '<br /> <br /> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr> Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMIndentedReverse.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -235,7 +235,7 @@ _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<br /> <br /> - <form action=' . htmlspecialchars($_SERVER['PHP_SELF']) . ' method="post"> + <form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> <table class="selection"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -13,7 +13,7 @@ } if (!isset($_POST['StockID'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <b> <br /> </b> Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMListing.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -112,7 +112,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="POST"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="POST"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMs.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -113,7 +113,7 @@ $DrillID=''; } else { $DrillText = '<a href="%s&Select=%s">' . _('Drill Down'); - $DrillLink = htmlspecialchars($_SERVER['PHP_SELF']) . '?'; + $DrillLink = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?'; $DrillID=$myrow['component']; } if ($ParentMBflag!='M' AND $ParentMBflag!='G'){ @@ -160,12 +160,12 @@ ConvertSQLDate($myrow['effectiveto']), $AutoIssue, $QuantityOnHand, - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $Parent, $myrow['component'], $DrillLink, $DrillID, - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $Parent, $myrow['component'], $UltimateParent); @@ -418,7 +418,7 @@ break; } - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Select a Different BOM') . '</a></div><br />'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; echo '<table class="selection">'; // Display Manufatured Parent Items $sql = "SELECT bom.parent, @@ -437,7 +437,7 @@ if( DB_num_rows($result) > 0 ) { echo '<tr><td><div class="centre">'._('Manufactured parent items').' : '; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -460,7 +460,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Assembly parent items').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -482,7 +482,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Kit sets').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -504,7 +504,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Phantom').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -564,7 +564,7 @@ if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Select=' . $SelectedParent .'">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select=' . $SelectedParent .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['SelectedComponent']) and $InputError !=1) { @@ -830,7 +830,7 @@ if (!isset($SelectedParent)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '<br /><font size="1">' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . ', ' . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. '</font> <br /> <table class="selection" cellpadding="3" colspan="4"> Modified: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BackupDatabase.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -44,7 +44,7 @@ prnMsg(_('Once you have downloaded the database backup file to your local machine you should use the link below to delete it - backup files can consume a lot of space on your hosting account and will accumulate if not deleted - they also contain sensitive information which would otherwise be available for others to download!'),'info'); echo '<br /> <br /> - <a href="'. htmlspecialchars($_SERVER['PHP_SELF']) . '?BackupFile=' .$BackupFile .'">' . _('Delete the backup file off the server') . '</a>'; + <a href="'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?BackupFile=' .$BackupFile .'">' . _('Delete the backup file off the server') . '</a>'; } else { prnMsg(_('There was some problem producing a backup using mysqldump. Normally this relates to a permissions issue - the web-server user must have permission to write to the companies directory'),'error'); } Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BankReconciliation.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -8,7 +8,7 @@ include('includes/header.inc'); -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/COGSGLPostings.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -111,9 +111,9 @@ $myrow['stkcat'], $myrow['salestype'], $myrow['accountname'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id'], - htmlspecialchars($_SERVER['PHP_SELF']). '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?', $myrow['id']); }//end while echo '</table>'; @@ -210,9 +210,9 @@ $myrow['stkcat'], $myrow['salestype'], $myrow['accountname'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id']); }//END WHILE LIST LOOP @@ -222,12 +222,12 @@ //end of ifs and buts! if (isset($SelectedCOGSPostingID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) .'">' . _('Show all cost of sales posting records') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Show all cost of sales posting records') . '</a></div>'; } echo '<br />'; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCOGSPostingID)) { Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CompanyPreferences.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -153,7 +153,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ConfirmDispatch_Invoice.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -266,7 +266,7 @@ </table> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ContractBOM.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -215,7 +215,7 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ -echo '<form name="ContractBOMForm" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '" method="post">'; +echo '<form name="ContractBOMForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (count($_SESSION['Contract'.$identifier]->ContractBOM)>0){ @@ -263,7 +263,7 @@ <td>' . $ContractComponent->UOM . '</td> <td class="number">' . locale_number_format($ContractComponent->ItemCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . '\');">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . '\');">' . _('Delete') . '</a></td></tr>'; $TotalCost += $LineTotal; } Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ContractCosting.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -432,7 +432,7 @@ if ($_SESSION['Contract'.$identifier]->Status ==2){//the contract is an order being processed now - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /> <div class="centre"> Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ContractOtherReqts.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -75,7 +75,7 @@ /* This is where the other requirement as entered/modified should be displayed reflecting any deletions or insertions*/ -echo '<form name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '" method="post">'; +echo '<form name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('Contract Other Requirements') . '" alt="" /> ' . _('Contract Other Requirements') . ' - ' . $_SESSION['Contract'.$identifier]->CustomerName.'</p>'; @@ -116,7 +116,7 @@ <td><input type="text" class="number" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,'Variable') . '" /></td> <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->CostPerUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this contract requirement?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this contract requirement?') . '\');">' . _('Delete') . '</a></td> </tr>'; $TotalCost += $LineTotal; } Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Contracts.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -746,7 +746,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('Contract') . '" alt="" />' . ' ' . _('Contract: Select Customer') . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier=' . $identifier .'" name="CustomerSelection" method="post">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier .'" name="CustomerSelection" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table cellpadding="3" colspan="4" class="selection"> @@ -814,7 +814,7 @@ //end if RequireCustomerSelection } else { /*A customer is already selected so get into the contract setup proper */ - echo '<form name="ContractEntry" enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier=' . $identifier . '" method="post">'; + echo '<form name="ContractEntry" enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CounterSales.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -212,7 +212,7 @@ echo '<br /><br />'; prnMsg(_('This sale has been cancelled as requested'),'success'); - echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Start a new Counter Sale') . '</a>'; + echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Start a new Counter Sale') . '</a>'; include('includes/footer.inc'); exit; @@ -361,7 +361,7 @@ /* Always do the stuff below */ -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" name="SelectParts" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; //Get The exchange rate used for GPPercent calculations on adding or amending items @@ -819,7 +819,7 @@ $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; echo '<td class="number">' . locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; echo '<td class="number">' . locale_number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ echo $RowStarter; @@ -1980,7 +1980,7 @@ } else { echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; } - echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Start a new Counter Sale') . '</a></div>'; + echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Start a new Counter Sale') . '</a></div>'; } // There were input errors so don't process nuffin @@ -2197,7 +2197,7 @@ if (isset($SearchResult)) { $j = 1; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; echo '<tr> Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CreditStatus.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -177,9 +177,9 @@ $myrow['reasoncode'], $myrow['reasondescription'], $DissallowText, - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $myrow['reasoncode'], - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $myrow['reasoncode']); } //END WHILE LIST LOOP @@ -189,13 +189,13 @@ if (isset($SelectedReason)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Show Defined Credit Status Codes') . '</a> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show Defined Credit Status Codes') . '</a> </div>'; } if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedReason) and ($InputError!=1)) { Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Credit_Invoice.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -256,7 +256,7 @@ if (!isset($_POST['ProcessCredit'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'" method="post">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -378,7 +378,7 @@ echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the credit?') . '\');">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . $LnItm->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the credit?') . '\');">' . _('Delete') . '</a></td></tr>'; echo '<tr' . $RowStarter . '><td colspan="12"><textarea tabindex="' . $j .'" name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; $j++; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Currencies.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -267,10 +267,10 @@ locale_number_format($myrow['decimalplaces'],0), locale_number_format($myrow['rate'],6), locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),6), - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['currabrev'], _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['currabrev'], _('Delete'), $rootpath, @@ -301,14 +301,14 @@ if (isset($SelectedCurrency)) { - echo '<div class="centre"><a href="' .htmlspecialchars($_SERVER['PHP_SELF']) . '">'._('Show all currency definitions').'</a></div>'; + echo '<div class="centre"><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'._('Show all currency definitions').'</a></div>'; } echo '<br />'; if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCurrency) AND $SelectedCurrency!='') { Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustEDISetup.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -69,7 +69,7 @@ } } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class="selection">'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustLoginSetup.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -123,7 +123,7 @@ } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustWhereAlloc.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -6,7 +6,7 @@ $title = _('Customer How Paid Inquiry'); include('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<p class="page_title_text"> Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerAllocations.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -336,7 +336,7 @@ if (isset($_POST['AllocTrans'])) { // Page called with trans number - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<input type="hidden" name="AllocTrans" value="' . $_POST['AllocTrans'] . '" />'; @@ -488,7 +488,7 @@ <td class="number">' . locale_number_format($myrow['total'],$myrow['currdecimalplaces']) . '</td> <td class="number">' . locale_number_format($myrow['total']-$myrow['alloc'],$myrow['currdecimalplaces']) . '</td> <td>' . $myrow['currcode'] . '</td>'; - echo '<td><a href=' . htmlspecialchars($_SERVER['PHP_SELF']). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; + echo '<td><a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; } echo '</table><p>'; } else { @@ -529,7 +529,7 @@ $k=0; while ($myrow = DB_fetch_array($result)) { - $AllocateLink = '<a href=' . htmlspecialchars($_SERVER['PHP_SELF']). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a>'; + $AllocateLink = '<a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a>'; if ( $CurrentDebtor != $myrow['debtorno'] ) { if ( $CurrentTransaction > 1 ) { Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerBranches.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -409,11 +409,11 @@ $myrow[8], $myrow[9], ($myrow[11]?_('No'):_('Yes')), - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $DebtorNo, urlencode($myrow[1]), _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $DebtorNo, urlencode($myrow[1]), _('Delete Branch')); @@ -463,7 +463,7 @@ } if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedBranch)) { @@ -539,7 +539,7 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" /> ' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>'; if (isset($SelectedBranch)) { - echo '<div class="centre"><a href=' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; + echo '<div class="centre"><a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; } echo '<br /> <table class="selection"> Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -152,7 +152,7 @@ echo '<br /> <div class="centre"> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' . _('Show all transactions after') . ': <input tabindex="1" type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /> <input tabindex="2" type="submit" name="Refresh Inquiry" value="' . _('Refresh Inquiry') . '" /> Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerReceipt.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -729,7 +729,7 @@ /*set up the form whatever */ -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*show the batch header details and the entries in the batch so far */ @@ -918,7 +918,7 @@ <td>' . stripslashes($ReceiptItem->CustomerName) . '</td> <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> <td>'.$ReceiptItem->Narrative . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $ReceiptItem->ID . '&Type=' . $_GET['Type']. '">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type=' . $_GET['Type']. '">' . _('Delete') . '</a></td> </tr>'; $BatchTotal= $BatchTotal + $ReceiptItem->Amount; } Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerTransInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -12,7 +12,7 @@ echo '<div class="page_help_text">' . _('Choose which type of transaction to report on.') . '</div> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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"> Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerTypes.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -204,9 +204,9 @@ </tr>', $myrow[0], $myrow[1], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); } //END WHILE LIST LOOP @@ -216,11 +216,11 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<div class="centre"><p><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Show All Types Defined') . '</a></div><p>'; + echo '<div class="centre"><p><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Types Defined') . '</a></div><p>'; } if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class="selection">'; //Main table Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Customers.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -420,11 +420,11 @@ } if ($SetupErrors>0) { - echo '<br /><div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF']) .'" >'._('Click here to continue').'</a></div>'; + echo '<br /><div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" >'._('Click here to continue').'</a></div>'; include('includes/footer.inc'); exit; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="Yes" />'; @@ -618,7 +618,7 @@ //DebtorNo exists - either passed when calling the form or from the form itself - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr><td valign="top"><table class="selection">'; @@ -1069,7 +1069,7 @@ $myrow['notes'], $myrow['contid'], $myrow['debtorno'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['contid'], $myrow['debtorno']); } Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DailyBankTransactions.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -12,7 +12,7 @@ </p>'; if (!isset($_POST['Show'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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">'; @@ -139,7 +139,7 @@ echo '</table>'; } //end if no bank trans in the range to show - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>'; echo '</form>'; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DebtorsAtPeriodEnd.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -129,7 +129,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DiscountCategories.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -65,7 +65,7 @@ } if (isset($_POST['selectchoice'])) { - echo '<form name="update" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form name="update" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; @@ -91,7 +91,7 @@ <br />'; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="ChooseOption" value="'.$_POST['ChooseOption'].'" />'; echo '<input type="hidden" name="selectchoice" value="'.$_POST['selectchoice'].'" />'; @@ -212,7 +212,7 @@ echo '<tr class="OddTableRows">'; $k=1; } - $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; + $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; printf('<td>%s</td> <td>%s - %s</td> @@ -235,7 +235,7 @@ } if (!isset($_POST['selectchoice'])) { - echo '<form method="post" name="choose" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" name="choose" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Update discount category for').'</td>'; Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DiscountMatrix.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -81,7 +81,7 @@ echo '<br />'; } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -173,7 +173,7 @@ echo '<tr class="OddTableRows">'; $k=1; } - $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; + $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; printf('<td>%s</td> <td>%s</td> Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/EDIMessageFormat.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -97,7 +97,7 @@ prnMsg($msg,'success'); } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table border="0" width="100%"> @@ -153,9 +153,9 @@ $myrow[1], $myrow[2], $myrow[3], - htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID, $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID, $myrow[0]); } //END WHILE LIST LOOP @@ -189,7 +189,7 @@ $_POST['SequenceNo'] = $myrow['sequenceno']; $_POST['LineText'] = $myrow['linetext']; - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; echo '<input type="hidden" name="SelectedMessageLine" value="' . $SelectedMessageLine . '" />'; echo '<input type="hidden" name="MessageType" value="' . $myrow['messagetype'] . '" />'; Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/EmailCustTrans.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -35,7 +35,7 @@ include ('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<input type="hidden" name="TransNo" value="' . $_GET['FromTransNo'] . '" />'; Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ExchangeRateTrend.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -21,7 +21,7 @@ // SHOW OUR MAIN INPUT FORM // ************************ - echo '<form method="post" name="update" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" name="update" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; Modified: trunk/FTP_RadioBeacon.php =================================================================== --- trunk/FTP_RadioBeacon.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FTP_RadioBeacon.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -71,7 +71,7 @@ $k=1; } - $FTPDispatchNote = htmlspecialchars($_SERVER['PHP_SELF']) . '?OrderNo=' . $myrow['orderno']; + $FTPDispatchNote = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?OrderNo=' . $myrow['orderno']; $FormatedDelDate = ConvertSQLDate($myrow['deliverydate']); $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = locale_number_format($myrow['ordervalue'],2); Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Factors.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -197,7 +197,7 @@ if (isset($_POST['Amend']) or isset($_POST['Create'])) { // its a new factor being added - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="FactorID" value="' . $FactorID .'" /> <table class="selection"> @@ -272,7 +272,7 @@ if (empty($FactorID) AND !isset($_POST['Create']) AND !isset($_POST['Amend'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No" />'; Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetCategories.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -192,9 +192,9 @@ $myrow['depnact'], $myrow['disposalact'], $myrow['accumdepnact'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['categoryid'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['categoryid']); } //END WHILE LIST LOOP @@ -204,10 +204,10 @@ //end of ifs and buts! if (isset($SelectedCategory)) { - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } -echo '<form name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetDepreciation.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -267,7 +267,7 @@ /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" name="form">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p /> <table class="selection" width="30%"> Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetItems.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -380,7 +380,7 @@ } /* end if delete asset */ $result = DB_Txn_Commit($db); -echo '<form name="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '"> +echo '<form name="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetLocations.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -56,7 +56,7 @@ WH... [truncated message content] |
From: <dai...@us...> - 2012-02-22 06:26:56
|
Revision: 4950 http://web-erp.svn.sourceforge.net/web-erp/?rev=4950&view=rev Author: daintree Date: 2012-02-22 06:26:38 +0000 (Wed, 22 Feb 2012) Log Message: ----------- fully qualify htmlspecialchars() function Modified Paths: -------------- trunk/AddCustomerTypeNotes.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BackupDatabase.php trunk/BankReconciliation.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractCosting.php trunk/ContractOtherReqts.php trunk/Contracts.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/FTP_RadioBeacon.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLJournal.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTrialBalance.php trunk/GLTrialBalance_csv.php trunk/GeocodeSetup.php trunk/GoodsReceived.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/OffersReceived.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PageSecurity.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcExpensesTypeTab.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategories.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGLPostings.php trunk/SalesGraph.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectCompletedOrder.php trunk/SelectContract.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItemResearch.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/Stocks.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierContacts.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/SystemParameters.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxGroups.php trunk/TaxProvinces.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/UserSettings.php trunk/WOSerialNos.php trunk/WWW_Access.php trunk/WWW_Users.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeBranchCode.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_CheckDebtorsControl.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_DataExport.php trunk/Z_DeleteSalesTransActions.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeNewCompany.php trunk/Z_ReApplyCostToSA.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.04-3.05.php trunk/Z_Upgrade_3.05-3.06.php trunk/Z_Upgrade_3.07-3.08.php trunk/Z_Upgrade_3.08-3.09.php trunk/Z_Upgrade_3.09-3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/config.distrib.php trunk/doc/Change.log trunk/doc/Manual/ManualContents.php trunk/doc/Manual/ManualGettingStarted.html trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/includes/session.inc trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/locale/zh_CN.utf8/Manual/ManualContents.php trunk/locale/zh_CN.utf8/Manual/ManualGettingStarted.html trunk/locale/zh_HK.utf8/Manual/ManualContents.php trunk/locale/zh_HK.utf8/Manual/ManualGettingStarted.html Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/AddCustomerTypeNotes.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -147,7 +147,7 @@ } if (isset($Id)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorType=' . $DebtorType . '">' . _('Review all notes for this Customer Type') .'</a> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DebtorType=' . $DebtorType . '">' . _('Review all notes for this Customer Type') .'</a> </div>'; } Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/AuditTrail.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -34,7 +34,7 @@ // Get list of users $UserResult = DB_query("SELECT userid FROM www_users",$db); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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">'; Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMExtendedQty.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -262,7 +262,7 @@ echo '<br /> <br /> - <form action=' . htmlspecialchars($_SERVER['PHP_SELF']) . ' method="post"> + <form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> <table class="selection"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMIndented.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -247,7 +247,7 @@ echo '<br /> <br /> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr> Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMIndentedReverse.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -235,7 +235,7 @@ _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<br /> <br /> - <form action=' . htmlspecialchars($_SERVER['PHP_SELF']) . ' method="post"> + <form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> <table class="selection"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -13,7 +13,7 @@ } if (!isset($_POST['StockID'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <b> <br /> </b> Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMListing.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -112,7 +112,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="POST"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="POST"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BOMs.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -113,7 +113,7 @@ $DrillID=''; } else { $DrillText = '<a href="%s&Select=%s">' . _('Drill Down'); - $DrillLink = htmlspecialchars($_SERVER['PHP_SELF']) . '?'; + $DrillLink = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?'; $DrillID=$myrow['component']; } if ($ParentMBflag!='M' AND $ParentMBflag!='G'){ @@ -160,12 +160,12 @@ ConvertSQLDate($myrow['effectiveto']), $AutoIssue, $QuantityOnHand, - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $Parent, $myrow['component'], $DrillLink, $DrillID, - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $Parent, $myrow['component'], $UltimateParent); @@ -418,7 +418,7 @@ break; } - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Select a Different BOM') . '</a></div><br />'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; echo '<table class="selection">'; // Display Manufatured Parent Items $sql = "SELECT bom.parent, @@ -437,7 +437,7 @@ if( DB_num_rows($result) > 0 ) { echo '<tr><td><div class="centre">'._('Manufactured parent items').' : '; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -460,7 +460,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Assembly parent items').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -482,7 +482,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Kit sets').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -504,7 +504,7 @@ echo (($reqnl)?'<br />':'').'<tr><td><div class="centre">'._('Phantom').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ - echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?Select='.$myrow['parent'].'">'. + echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>'; $ix++; } //end while loop @@ -564,7 +564,7 @@ if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Select=' . $SelectedParent .'">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select=' . $SelectedParent .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_GET['SelectedComponent']) and $InputError !=1) { @@ -830,7 +830,7 @@ if (!isset($SelectedParent)) { echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '<br /><font size="1">' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . ', ' . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. '</font> <br /> <table class="selection" cellpadding="3" colspan="4"> Modified: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BackupDatabase.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -44,7 +44,7 @@ prnMsg(_('Once you have downloaded the database backup file to your local machine you should use the link below to delete it - backup files can consume a lot of space on your hosting account and will accumulate if not deleted - they also contain sensitive information which would otherwise be available for others to download!'),'info'); echo '<br /> <br /> - <a href="'. htmlspecialchars($_SERVER['PHP_SELF']) . '?BackupFile=' .$BackupFile .'">' . _('Delete the backup file off the server') . '</a>'; + <a href="'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?BackupFile=' .$BackupFile .'">' . _('Delete the backup file off the server') . '</a>'; } else { prnMsg(_('There was some problem producing a backup using mysqldump. Normally this relates to a permissions issue - the web-server user must have permission to write to the companies directory'),'error'); } Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/BankReconciliation.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -8,7 +8,7 @@ include('includes/header.inc'); -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/COGSGLPostings.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -111,9 +111,9 @@ $myrow['stkcat'], $myrow['salestype'], $myrow['accountname'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id'], - htmlspecialchars($_SERVER['PHP_SELF']). '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?', $myrow['id']); }//end while echo '</table>'; @@ -210,9 +210,9 @@ $myrow['stkcat'], $myrow['salestype'], $myrow['accountname'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id']); }//END WHILE LIST LOOP @@ -222,12 +222,12 @@ //end of ifs and buts! if (isset($SelectedCOGSPostingID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) .'">' . _('Show all cost of sales posting records') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Show all cost of sales posting records') . '</a></div>'; } echo '<br />'; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCOGSPostingID)) { Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CompanyPreferences.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -153,7 +153,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ConfirmDispatch_Invoice.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -266,7 +266,7 @@ </table> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ContractBOM.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -215,7 +215,7 @@ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ -echo '<form name="ContractBOMForm" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '" method="post">'; +echo '<form name="ContractBOMForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (count($_SESSION['Contract'.$identifier]->ContractBOM)>0){ @@ -263,7 +263,7 @@ <td>' . $ContractComponent->UOM . '</td> <td class="number">' . locale_number_format($ContractComponent->ItemCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . '\');">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . '\');">' . _('Delete') . '</a></td></tr>'; $TotalCost += $LineTotal; } Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ContractCosting.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -432,7 +432,7 @@ if ($_SESSION['Contract'.$identifier]->Status ==2){//the contract is an order being processed now - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /> <div class="centre"> Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ContractOtherReqts.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -75,7 +75,7 @@ /* This is where the other requirement as entered/modified should be displayed reflecting any deletions or insertions*/ -echo '<form name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '" method="post">'; +echo '<form name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('Contract Other Requirements') . '" alt="" /> ' . _('Contract Other Requirements') . ' - ' . $_SESSION['Contract'.$identifier]->CustomerName.'</p>'; @@ -116,7 +116,7 @@ <td><input type="text" class="number" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,'Variable') . '" /></td> <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->CostPerUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this contract requirement?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this contract requirement?') . '\');">' . _('Delete') . '</a></td> </tr>'; $TotalCost += $LineTotal; } Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Contracts.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -746,7 +746,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/contract.png" title="' . _('Contract') . '" alt="" />' . ' ' . _('Contract: Select Customer') . '</p>'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier=' . $identifier .'" name="CustomerSelection" method="post">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier .'" name="CustomerSelection" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table cellpadding="3" colspan="4" class="selection"> @@ -814,7 +814,7 @@ //end if RequireCustomerSelection } else { /*A customer is already selected so get into the contract setup proper */ - echo '<form name="ContractEntry" enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier=' . $identifier . '" method="post">'; + echo '<form name="ContractEntry" enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CounterSales.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -212,7 +212,7 @@ echo '<br /><br />'; prnMsg(_('This sale has been cancelled as requested'),'success'); - echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Start a new Counter Sale') . '</a>'; + echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Start a new Counter Sale') . '</a>'; include('includes/footer.inc'); exit; @@ -361,7 +361,7 @@ /* Always do the stuff below */ -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" name="SelectParts" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; //Get The exchange rate used for GPPercent calculations on adding or amending items @@ -819,7 +819,7 @@ $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; echo '<td class="number">' . locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; echo '<td class="number">' . locale_number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ echo $RowStarter; @@ -1980,7 +1980,7 @@ } else { echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; } - echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Start a new Counter Sale') . '</a></div>'; + echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Start a new Counter Sale') . '</a></div>'; } // There were input errors so don't process nuffin @@ -2197,7 +2197,7 @@ if (isset($SearchResult)) { $j = 1; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; echo '<tr> Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CreditStatus.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -177,9 +177,9 @@ $myrow['reasoncode'], $myrow['reasondescription'], $DissallowText, - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $myrow['reasoncode'], - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $myrow['reasoncode']); } //END WHILE LIST LOOP @@ -189,13 +189,13 @@ if (isset($SelectedReason)) { echo '<div class="centre"> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Show Defined Credit Status Codes') . '</a> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show Defined Credit Status Codes') . '</a> </div>'; } if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedReason) and ($InputError!=1)) { Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Credit_Invoice.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -256,7 +256,7 @@ if (!isset($_POST['ProcessCredit'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'" method="post">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -378,7 +378,7 @@ echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the credit?') . '\');">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . $LnItm->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the credit?') . '\');">' . _('Delete') . '</a></td></tr>'; echo '<tr' . $RowStarter . '><td colspan="12"><textarea tabindex="' . $j .'" name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; $j++; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Currencies.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -267,10 +267,10 @@ locale_number_format($myrow['decimalplaces'],0), locale_number_format($myrow['rate'],6), locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),6), - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['currabrev'], _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['currabrev'], _('Delete'), $rootpath, @@ -301,14 +301,14 @@ if (isset($SelectedCurrency)) { - echo '<div class="centre"><a href="' .htmlspecialchars($_SERVER['PHP_SELF']) . '">'._('Show all currency definitions').'</a></div>'; + echo '<div class="centre"><a href="' .htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'._('Show all currency definitions').'</a></div>'; } echo '<br />'; if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCurrency) AND $SelectedCurrency!='') { Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustEDISetup.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -69,7 +69,7 @@ } } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class="selection">'; Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustLoginSetup.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -123,7 +123,7 @@ } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustWhereAlloc.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -6,7 +6,7 @@ $title = _('Customer How Paid Inquiry'); include('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<p class="page_title_text"> Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerAllocations.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -336,7 +336,7 @@ if (isset($_POST['AllocTrans'])) { // Page called with trans number - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<input type="hidden" name="AllocTrans" value="' . $_POST['AllocTrans'] . '" />'; @@ -488,7 +488,7 @@ <td class="number">' . locale_number_format($myrow['total'],$myrow['currdecimalplaces']) . '</td> <td class="number">' . locale_number_format($myrow['total']-$myrow['alloc'],$myrow['currdecimalplaces']) . '</td> <td>' . $myrow['currcode'] . '</td>'; - echo '<td><a href=' . htmlspecialchars($_SERVER['PHP_SELF']). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; + echo '<td><a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a></td></tr>'; } echo '</table><p>'; } else { @@ -529,7 +529,7 @@ $k=0; while ($myrow = DB_fetch_array($result)) { - $AllocateLink = '<a href=' . htmlspecialchars($_SERVER['PHP_SELF']). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a>'; + $AllocateLink = '<a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?AllocTrans=' . $myrow['id'] . '>' . _('Allocate') . '</a>'; if ( $CurrentDebtor != $myrow['debtorno'] ) { if ( $CurrentTransaction > 1 ) { Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerBranches.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -409,11 +409,11 @@ $myrow[8], $myrow[9], ($myrow[11]?_('No'):_('Yes')), - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $DebtorNo, urlencode($myrow[1]), _('Edit'), - htmlspecialchars($_SERVER['PHP_SELF']), + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), $DebtorNo, urlencode($myrow[1]), _('Delete Branch')); @@ -463,7 +463,7 @@ } if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedBranch)) { @@ -539,7 +539,7 @@ echo '<p Class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" /> ' . ' ' . _('Change Details for Branch'). ' '. $SelectedBranch . '</p>'; if (isset($SelectedBranch)) { - echo '<div class="centre"><a href=' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; + echo '<div class="centre"><a href=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; } echo '<br /> <table class="selection"> Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -152,7 +152,7 @@ echo '<br /> <div class="centre"> - <form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' . _('Show all transactions after') . ': <input tabindex="1" type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /> <input tabindex="2" type="submit" name="Refresh Inquiry" value="' . _('Refresh Inquiry') . '" /> Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerReceipt.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -729,7 +729,7 @@ /*set up the form whatever */ -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Type='.$_GET['Type'] . '" method="post" name="form1">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*show the batch header details and the entries in the batch so far */ @@ -918,7 +918,7 @@ <td>' . stripslashes($ReceiptItem->CustomerName) . '</td> <td>'.$ReceiptItem->GLCode.' - '.$myrow['accountname'].'</td> <td>'.$ReceiptItem->Narrative . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $ReceiptItem->ID . '&Type=' . $_GET['Type']. '">' . _('Delete') . '</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type=' . $_GET['Type']. '">' . _('Delete') . '</a></td> </tr>'; $BatchTotal= $BatchTotal + $ReceiptItem->Amount; } Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerTransInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -12,7 +12,7 @@ echo '<div class="page_help_text">' . _('Choose which type of transaction to report on.') . '</div> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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"> Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/CustomerTypes.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -204,9 +204,9 @@ </tr>', $myrow[0], $myrow[1], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); } //END WHILE LIST LOOP @@ -216,11 +216,11 @@ //end of ifs and buts! if (isset($SelectedType)) { - echo '<div class="centre"><p><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' . _('Show All Types Defined') . '</a></div><p>'; + echo '<div class="centre"><p><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All Types Defined') . '</a></div><p>'; } if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table class="selection">'; //Main table Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Customers.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -420,11 +420,11 @@ } if ($SetupErrors>0) { - echo '<br /><div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF']) .'" >'._('Click here to continue').'</a></div>'; + echo '<br /><div class="centre"><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'" >'._('Click here to continue').'</a></div>'; include('includes/footer.inc'); exit; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="Yes" />'; @@ -618,7 +618,7 @@ //DebtorNo exists - either passed when calling the form or from the form itself - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr><td valign="top"><table class="selection">'; @@ -1069,7 +1069,7 @@ $myrow['notes'], $myrow['contid'], $myrow['debtorno'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['contid'], $myrow['debtorno']); } Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DailyBankTransactions.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -12,7 +12,7 @@ </p>'; if (!isset($_POST['Show'])) { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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">'; @@ -139,7 +139,7 @@ echo '</table>'; } //end if no bank trans in the range to show - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>'; echo '</form>'; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DebtorsAtPeriodEnd.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -129,7 +129,7 @@ /*if $FromCriteria is not set then show a form to allow input */ - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DiscountCategories.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -65,7 +65,7 @@ } if (isset($_POST['selectchoice'])) { - echo '<form name="update" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form name="update" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; @@ -91,7 +91,7 @@ <br />'; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="ChooseOption" value="'.$_POST['ChooseOption'].'" />'; echo '<input type="hidden" name="selectchoice" value="'.$_POST['selectchoice'].'" />'; @@ -212,7 +212,7 @@ echo '<tr class="OddTableRows">'; $k=1; } - $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; + $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=yes&StockID=' . $myrow['stockid'] . '&DiscountCategory=' . $myrow['discountcategory']; printf('<td>%s</td> <td>%s - %s</td> @@ -235,7 +235,7 @@ } if (!isset($_POST['selectchoice'])) { - echo '<form method="post" name="choose" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" name="choose" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr><td>'._('Update discount category for').'</td>'; Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/DiscountMatrix.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -81,7 +81,7 @@ echo '<br />'; } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -173,7 +173,7 @@ echo '<tr class="OddTableRows">'; $k=1; } - $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; + $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; printf('<td>%s</td> <td>%s</td> Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/EDIMessageFormat.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -97,7 +97,7 @@ prnMsg($msg,'success'); } -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p><table border="0" width="100%"> @@ -153,9 +153,9 @@ $myrow[1], $myrow[2], $myrow[3], - htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID, $myrow[0], - htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID, $myrow[0]); } //END WHILE LIST LOOP @@ -189,7 +189,7 @@ $_POST['SequenceNo'] = $myrow['sequenceno']; $_POST['LineText'] = $myrow['linetext']; - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?MessageType=INVOIC&PartnerCode=' . $myrow['partnercode'] . '">' . _('Review Message Lines') . '</a></div>'; echo '<input type="hidden" name="SelectedMessageLine" value="' . $SelectedMessageLine . '" />'; echo '<input type="hidden" name="MessageType" value="' . $myrow['messagetype'] . '" />'; Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/EmailCustTrans.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -35,7 +35,7 @@ include ('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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 '<input type="hidden" name="TransNo" value="' . $_GET['FromTransNo'] . '" />'; Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/ExchangeRateTrend.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -21,7 +21,7 @@ // SHOW OUR MAIN INPUT FORM // ************************ - echo '<form method="post" name="update" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" name="update" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; Modified: trunk/FTP_RadioBeacon.php =================================================================== --- trunk/FTP_RadioBeacon.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FTP_RadioBeacon.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -71,7 +71,7 @@ $k=1; } - $FTPDispatchNote = htmlspecialchars($_SERVER['PHP_SELF']) . '?OrderNo=' . $myrow['orderno']; + $FTPDispatchNote = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?OrderNo=' . $myrow['orderno']; $FormatedDelDate = ConvertSQLDate($myrow['deliverydate']); $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); $FormatedOrderValue = locale_number_format($myrow['ordervalue'],2); Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/Factors.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -197,7 +197,7 @@ if (isset($_POST['Amend']) or isset($_POST['Create'])) { // its a new factor being added - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="FactorID" value="' . $FactorID .'" /> <table class="selection"> @@ -272,7 +272,7 @@ if (empty($FactorID) AND !isset($_POST['Create']) AND !isset($_POST['Amend'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="New" value="No" />'; Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetCategories.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -192,9 +192,9 @@ $myrow['depnact'], $myrow['disposalact'], $myrow['accumdepnact'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['categoryid'], - htmlspecialchars($_SERVER['PHP_SELF']) . '?', + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['categoryid']); } //END WHILE LIST LOOP @@ -204,10 +204,10 @@ //end of ifs and buts! if (isset($SelectedCategory)) { - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } -echo '<form name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; +echo '<form name="CategoryForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetDepreciation.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -267,7 +267,7 @@ /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" name="form">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p /> <table class="selection" width="30%"> Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetItems.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -380,7 +380,7 @@ } /* end if delete asset */ $result = DB_Txn_Commit($db); -echo '<form name="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '"> +echo '<form name="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-02-22 06:06:03 UTC (rev 4949) +++ trunk/FixedAssetLocations.php 2012-02-22 06:26:38 UTC (rev 4950) @@ -56,7 +56,7 @@ WH... [truncated message content] |
From: <dai...@us...> - 2012-02-22 09:05:35
|
Revision: 4951 http://web-erp.svn.sourceforge.net/web-erp/?rev=4951&view=rev Author: daintree Date: 2012-02-22 09:05:28 +0000 (Wed, 22 Feb 2012) Log Message: ----------- cost of negative stock changes Modified Paths: -------------- trunk/DailySalesInquiry.php trunk/SupplierInvoice.php trunk/doc/Change.log Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) +++ trunk/DailySalesInquiry.php 2012-02-22 09:05:28 UTC (rev 4951) @@ -81,12 +81,14 @@ $sql = "SELECT trandate, SUM(price*(1-discountpercent)* (-qty)) as salesvalue, - SUM((standardcost * -qty)) as cost + SUM(CASE WHEN mbflag='A' THEN 0 ELSE (standardcost * -qty) END) as cost FROM stockmoves - INNER JOIN custbranch ON stockmoves.debtorno=custbranch.debtorno - AND stockmoves.branchcode=custbranch.branchcode + INNER JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + INNER JOIN custbranch + ON stockmoves.debtorno=custbranch.debtorno + AND stockmoves.branchcode=custbranch.branchcode WHERE (stockmoves.type=10 or stockmoves.type=11) - AND show_on_inv_crds =1 AND trandate>='" . $StartDateSQL . "' AND trandate<='" . $EndDateSQL . "'"; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-02-22 06:26:38 UTC (rev 4950) +++ trunk/SupplierInvoice.php 2012-02-22 09:05:28 UTC (rev 4951) @@ -1325,7 +1325,17 @@ WHERE stkmoveno = '" . $StkMoveRow['stkmoveno'] . "'", $db,$ErrMsg,$DbgMsg,True); } - } //end if the invoice qty is more than is left to allocate + } else { //Only $QuantityVarianceAllocated left to allocate so need need to apportion cost using weighted average + if ($StkMoveRow['type']==10) { //its a sales invoice + + $WACost = (((-$StkMoveRow['qty']- $QuantityVarianceAllocated)*$StkMoveRow['standardcost'])+($QuantityVarianceAllocated*$ActualCost))/-$StkMoveRow['qty']; + + $UpdStkMovesResult = DB_query("UPDATE stockmoves + SET standardcost = '" . $WACost . "' + WHERE stkmoveno = '" . $StkMoveRow['stkmoveno'] . "'", + $db,$ErrMsg,$DbgMsg,True); + } + } $QuantityVarianceAllocated+=$StkMoveRow['qty']; } } // end if the quantity being invoiced here is greater than the current stock on hand @@ -1353,7 +1363,7 @@ /* if stock is negative then update the cost to this cost */ $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, - materialcost='" . ($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) . "' + materialcost='" . $ActualCost . "' WHERE stockid='" . $EnteredGRN->ItemCode . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, True); } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-22 06:26:38 UTC (rev 4950) +++ trunk/doc/Change.log 2012-02-22 09:05:28 UTC (rev 4951) @@ -1,5 +1,6 @@ webERP Change Log +22/2/12 Phil: Make daily sales inquiry work correctly with assembly items where costs are recalculated in the case of negatives stock when supplier invoices entered 22/2/12 James Dupin: Update to French translation 22/2/12 Phil: Add ENT_QUOTES, 'UTF-8' to all htmlspecialchars calls 17/2/12 Phil: SuppCreditGRNs.php SuppInvGRNs.php DefineSuppTransClass.php SupplierInvoice.php stock movement was not being updated correctly with cost on purchase invoice entry as was using GRNNo not GRNBatchNo - which is used as the GRN transaction number in stock movements. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-22 09:05:39
|
Revision: 4951 http://web-erp.svn.sourceforge.net/web-erp/?rev=4951&view=rev Author: daintree Date: 2012-02-22 09:05:28 +0000 (Wed, 22 Feb 2012) Log Message: ----------- cost of negative stock changes Modified Paths: -------------- trunk/DailySalesInquiry.php trunk/SupplierInvoice.php trunk/doc/Change.log Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-02-22 06:26:38 UTC (rev 4950) +++ trunk/DailySalesInquiry.php 2012-02-22 09:05:28 UTC (rev 4951) @@ -81,12 +81,14 @@ $sql = "SELECT trandate, SUM(price*(1-discountpercent)* (-qty)) as salesvalue, - SUM((standardcost * -qty)) as cost + SUM(CASE WHEN mbflag='A' THEN 0 ELSE (standardcost * -qty) END) as cost FROM stockmoves - INNER JOIN custbranch ON stockmoves.debtorno=custbranch.debtorno - AND stockmoves.branchcode=custbranch.branchcode + INNER JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + INNER JOIN custbranch + ON stockmoves.debtorno=custbranch.debtorno + AND stockmoves.branchcode=custbranch.branchcode WHERE (stockmoves.type=10 or stockmoves.type=11) - AND show_on_inv_crds =1 AND trandate>='" . $StartDateSQL . "' AND trandate<='" . $EndDateSQL . "'"; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-02-22 06:26:38 UTC (rev 4950) +++ trunk/SupplierInvoice.php 2012-02-22 09:05:28 UTC (rev 4951) @@ -1325,7 +1325,17 @@ WHERE stkmoveno = '" . $StkMoveRow['stkmoveno'] . "'", $db,$ErrMsg,$DbgMsg,True); } - } //end if the invoice qty is more than is left to allocate + } else { //Only $QuantityVarianceAllocated left to allocate so need need to apportion cost using weighted average + if ($StkMoveRow['type']==10) { //its a sales invoice + + $WACost = (((-$StkMoveRow['qty']- $QuantityVarianceAllocated)*$StkMoveRow['standardcost'])+($QuantityVarianceAllocated*$ActualCost))/-$StkMoveRow['qty']; + + $UpdStkMovesResult = DB_query("UPDATE stockmoves + SET standardcost = '" . $WACost . "' + WHERE stkmoveno = '" . $StkMoveRow['stkmoveno'] . "'", + $db,$ErrMsg,$DbgMsg,True); + } + } $QuantityVarianceAllocated+=$StkMoveRow['qty']; } } // end if the quantity being invoiced here is greater than the current stock on hand @@ -1353,7 +1363,7 @@ /* if stock is negative then update the cost to this cost */ $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, - materialcost='" . ($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) . "' + materialcost='" . $ActualCost . "' WHERE stockid='" . $EnteredGRN->ItemCode . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, True); } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-22 06:26:38 UTC (rev 4950) +++ trunk/doc/Change.log 2012-02-22 09:05:28 UTC (rev 4951) @@ -1,5 +1,6 @@ webERP Change Log +22/2/12 Phil: Make daily sales inquiry work correctly with assembly items where costs are recalculated in the case of negatives stock when supplier invoices entered 22/2/12 James Dupin: Update to French translation 22/2/12 Phil: Add ENT_QUOTES, 'UTF-8' to all htmlspecialchars calls 17/2/12 Phil: SuppCreditGRNs.php SuppInvGRNs.php DefineSuppTransClass.php SupplierInvoice.php stock movement was not being updated correctly with cost on purchase invoice entry as was using GRNNo not GRNBatchNo - which is used as the GRN transaction number in stock movements. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-23 05:57:50
|
Revision: 4955 http://web-erp.svn.sourceforge.net/web-erp/?rev=4955&view=rev Author: daintree Date: 2012-02-23 05:57:43 +0000 (Thu, 23 Feb 2012) Log Message: ----------- put back ENT_QUOTES etc Modified Paths: -------------- trunk/CustomerTransInquiry.php trunk/WWW_Users.php trunk/includes/IndexArray.php Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-02-22 13:13:19 UTC (rev 4954) +++ trunk/CustomerTransInquiry.php 2012-02-23 05:57:43 UTC (rev 4955) @@ -12,7 +12,7 @@ echo '<div class="page_help_text">' . _('Choose which type of transaction to report on.') . '</div> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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"> Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2012-02-22 13:13:19 UTC (rev 4954) +++ trunk/WWW_Users.php 2012-02-23 05:57:43 UTC (rev 4955) @@ -18,7 +18,9 @@ _('General Ledger'), _('Asset Manager'), _('Petty Cash'), - _('Setup')); + _('Setup'), + _('DB Management') + ); $PDFLanguages = array(_('Latin Western Languages'), _('Eastern European Russian Japanese Korean Vietnamese Hebrew Arabic Thai'), Modified: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-02-22 13:13:19 UTC (rev 4954) +++ trunk/includes/IndexArray.php 2012-02-23 05:57:43 UTC (rev 4955) @@ -1,5 +1,5 @@ <?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system'); +$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'DBManagement'); $ReportList = array('orders'=>'ord', 'AR'=>'ar', 'AP'=>'ap', @@ -9,7 +9,8 @@ 'GL'=>'gl', 'FA'=>'fa', 'PC'=>'pc', - 'system'=>'sys' + 'system'=>'sys', + 'DBManagement'=>'dbm' ); /*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ @@ -22,7 +23,8 @@ _('General Ledger'), _('Asset Manager'), _('Petty Cash'), - _('Setup')); + _('Setup'), + _('DB Management')); $MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), _('Enter Counter Sales'), @@ -514,4 +516,58 @@ '/MRPCalendar.php', '/MRPDemandTypes.php' ); + +$MenuItems['DBManagement']['Transactions']['Caption'] = array (_('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier Code'), + _('Update costs for all BOM items, from the bottom up'), + _('Re-apply costs to Sales Analysis'), + _('Send All Unsent EDI Invoices and Credits'), + _('Delete sales transactions'), + _('Reverse all supplier payments on a specified date') + ); + +$MenuItems['DBManagement']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', + '/Z_ChangeBranchCode.php', + '/Z_ChangeStockCode.php', + '/Z_ChangeSupplierCode.php', + '/Z_BottomUpCosts.php', + '/Z_ReApplyCostToSA.php', + '/EDISendInvoices.php', + '/Z_DeleteSalesTransActions.php', + '/Z_ReverseSuppPaymentRun.php' + ); + +$MenuItems['DBManagement']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), + _('Show Local Currency Total Suppliers Balances'), + _('Show General Transactions That Do Not Balance') + ); + +$MenuItems['DBManagement']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.php' + ); + +$MenuItems['DBManagement']['Maintenance']['Caption'] = array (_('Maintain Language Files'), + _('Make New Company'), + _('Data Export Options'), + _('Image Manipulation Utility'), + _('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['DBManagement']['Maintenance']['URL'] = array ('/Z_poAdmin.php', + '/Z_MakeNewCOmpany.php', + '/Z_DataExportOptions.php', + '/Z_GetStockImage.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: <dai...@us...> - 2012-02-23 05:57:50
|
Revision: 4955 http://web-erp.svn.sourceforge.net/web-erp/?rev=4955&view=rev Author: daintree Date: 2012-02-23 05:57:43 +0000 (Thu, 23 Feb 2012) Log Message: ----------- put back ENT_QUOTES etc Modified Paths: -------------- trunk/CustomerTransInquiry.php trunk/WWW_Users.php trunk/includes/IndexArray.php Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-02-22 13:13:19 UTC (rev 4954) +++ trunk/CustomerTransInquiry.php 2012-02-23 05:57:43 UTC (rev 4955) @@ -12,7 +12,7 @@ echo '<div class="page_help_text">' . _('Choose which type of transaction to report on.') . '</div> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" 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"> Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2012-02-22 13:13:19 UTC (rev 4954) +++ trunk/WWW_Users.php 2012-02-23 05:57:43 UTC (rev 4955) @@ -18,7 +18,9 @@ _('General Ledger'), _('Asset Manager'), _('Petty Cash'), - _('Setup')); + _('Setup'), + _('DB Management') + ); $PDFLanguages = array(_('Latin Western Languages'), _('Eastern European Russian Japanese Korean Vietnamese Hebrew Arabic Thai'), Modified: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-02-22 13:13:19 UTC (rev 4954) +++ trunk/includes/IndexArray.php 2012-02-23 05:57:43 UTC (rev 4955) @@ -1,5 +1,5 @@ <?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system'); +$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'DBManagement'); $ReportList = array('orders'=>'ord', 'AR'=>'ar', 'AP'=>'ap', @@ -9,7 +9,8 @@ 'GL'=>'gl', 'FA'=>'fa', 'PC'=>'pc', - 'system'=>'sys' + 'system'=>'sys', + 'DBManagement'=>'dbm' ); /*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ @@ -22,7 +23,8 @@ _('General Ledger'), _('Asset Manager'), _('Petty Cash'), - _('Setup')); + _('Setup'), + _('DB Management')); $MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), _('Enter Counter Sales'), @@ -514,4 +516,58 @@ '/MRPCalendar.php', '/MRPDemandTypes.php' ); + +$MenuItems['DBManagement']['Transactions']['Caption'] = array (_('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier Code'), + _('Update costs for all BOM items, from the bottom up'), + _('Re-apply costs to Sales Analysis'), + _('Send All Unsent EDI Invoices and Credits'), + _('Delete sales transactions'), + _('Reverse all supplier payments on a specified date') + ); + +$MenuItems['DBManagement']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', + '/Z_ChangeBranchCode.php', + '/Z_ChangeStockCode.php', + '/Z_ChangeSupplierCode.php', + '/Z_BottomUpCosts.php', + '/Z_ReApplyCostToSA.php', + '/EDISendInvoices.php', + '/Z_DeleteSalesTransActions.php', + '/Z_ReverseSuppPaymentRun.php' + ); + +$MenuItems['DBManagement']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), + _('Show Local Currency Total Suppliers Balances'), + _('Show General Transactions That Do Not Balance') + ); + +$MenuItems['DBManagement']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.php' + ); + +$MenuItems['DBManagement']['Maintenance']['Caption'] = array (_('Maintain Language Files'), + _('Make New Company'), + _('Data Export Options'), + _('Image Manipulation Utility'), + _('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['DBManagement']['Maintenance']['URL'] = array ('/Z_poAdmin.php', + '/Z_MakeNewCOmpany.php', + '/Z_DataExportOptions.php', + '/Z_GetStockImage.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: <dai...@us...> - 2012-02-23 06:24:02
|
Revision: 4956 http://web-erp.svn.sourceforge.net/web-erp/?rev=4956&view=rev Author: daintree Date: 2012-02-23 06:23:54 +0000 (Thu, 23 Feb 2012) Log Message: ----------- Ricards work on Utilities menu Modified Paths: -------------- trunk/WWW_Users.php trunk/Z_MakeNewCompany.php trunk/doc/Change.log trunk/index.php Added Paths: ----------- trunk/includes/MainMenuLinksArray.php Removed Paths: ------------- trunk/includes/IndexArray.php Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/WWW_Users.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -19,7 +19,7 @@ _('Asset Manager'), _('Petty Cash'), _('Setup'), - _('DB Management') + _('Utilities') ); $PDFLanguages = array(_('Latin Western Languages'), Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/Z_MakeNewCompany.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -191,9 +191,9 @@ prnMsg (_('The new company database has been created for' . ' ' . $_POST['NewCompany'] . '. ' . _('The company details and parameters should now be set up for the new company. NB: Only a single user "demo" is defined with the password "weberp" in the new company database. A new system administrator user should be defined for the new company and this account deleted immediately.')), 'info'); - echo '<p><a href="' . $rootpath . '/CompanyPreferences.php?' . SID .'">' . _('Set Up New Company Details') . '</a>'; - echo '<p><a href="' . $rootpath . '/SystemParameters.php?' . SID .'">' . _('Set Up Configuration Details') . '</a>'; - echo '<p><a href="' . $rootpath . '/WWW_Users.php?' . SID .'">' . _('Set Up User Accounts') . '</a>'; + echo '<p><a href="' . $rootpath . '/CompanyPreferences.php">' . _('Set Up New Company Details') . '</a>'; + echo '<p><a href="' . $rootpath . '/SystemParameters.php">' . _('Set Up Configuration Details') . '</a>'; + echo '<p><a href="' . $rootpath . '/WWW_Users.php">' . _('Set Up User Accounts') . '</a>'; echo '</form>'; echo '</div>'; @@ -214,12 +214,18 @@ echo '<table><tr>'; echo '<td>' . _('Enter up to 32 character lower case character abbreviation for the company') . '</td> - <td><input type="TEXT" size="33" maxlength="32" name="NewCompany" /></td></tr> - <tr><td>'. _('Logo Image File (.jpg)') . ':</td><td><input type="FILE" ID="LogoFile" name="LogoFile" /></td></tr> - <tr><td>' . _('Create Database?') . '</td><td><input type="CHECKBOX" name="CreateDB" /></td></tr> + <td><input type="text" size="33" maxlength="32" name="NewCompany" /></td> + </tr> + <tr> + <td>'. _('Logo Image File (.jpg)') . ':</td><td><input type="FILE" ID="LogoFile" name="LogoFile" /></td> + </tr> + <tr> + <td>' . _('Create Database?') . '</td> + <td><input type="CHECKBOX" name="CreateDB" /></td> + </tr> </table>'; -echo '<br /><input type="SUBMIT" name="submit" value="' . _('Proceed') . '" /> '; +echo '<br /><input type="submit" name="submit" value="' . _('Proceed') . '" />'; echo '</form>'; echo '</div>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/doc/Change.log 2012-02-23 06:23:54 UTC (rev 4956) @@ -1,5 +1,6 @@ webERP Change Log +23/2/12 Ricard: Moved Utility scripts from Z_index.php to their own module named Utilities 22/2/12 Phil: Make daily sales inquiry work correctly with assembly items where costs are recalculated in the case of negatives stock when supplier invoices entered 22/2/12 James Dupin: Update to French translation 22/2/12 Phil: Add ENT_QUOTES, 'UTF-8' to all htmlspecialchars calls Deleted: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/includes/IndexArray.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -1,573 +0,0 @@ -<?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'DBManagement'); -$ReportList = array('orders'=>'ord', - 'AR'=>'ar', - 'AP'=>'ap', - 'PO'=>'prch', - 'stock'=>'inv', - 'manuf'=>'man', - 'GL'=>'gl', - 'FA'=>'fa', - 'PC'=>'pc', - 'system'=>'sys', - 'DBManagement'=>'dbm' - ); - -/*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'), - _('DB Management')); - -$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'), - _('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', - '/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 ( - ); -$MenuItems['PO']['Maintenance']['URL'] = array ( - ); -$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') - ); -$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/StockLocTransfer.php', - '/StockLocTransferReceive.php', - '/StockTransfers.php?New=Yes', - '/StockAdjustments.php?NewAdjustment=Yes', - '/ReverseGRN.php', - '/StockCounts.php' - ); - -$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), - _('Print Price Labels'), - _('Reprint GRN'), - _('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', - '/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') - ); -$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', - '/SelectProduct.php', - '/SalesCategories.php', - '/PricesBasedOnMarkUp.php', - '/PricesByCost.php', - '/ReorderLevelLocation.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 (_('Select A Work Order'), - _('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 ('/WorkOrderEntry.php', - '/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 a Bill Of Materials Between Items'), - _('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'), - _('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', - '/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'), - _('Role Permissions'), - _('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') - ); - -$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', - '/Locations.php', - '/DiscountCategories.php', - '/UnitsOfMeasure.php', - '/MRPCalendar.php', - '/MRPDemandTypes.php' - ); - -$MenuItems['DBManagement']['Transactions']['Caption'] = array (_('Change A Customer Code'), - _('Change A Customer Branch Code'), - _('Change An Inventory Item Code'), - _('Change A Supplier Code'), - _('Update costs for all BOM items, from the bottom up'), - _('Re-apply costs to Sales Analysis'), - _('Send All Unsent EDI Invoices and Credits'), - _('Delete sales transactions'), - _('Reverse all supplier payments on a specified date') - ); - -$MenuItems['DBManagement']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', - '/Z_ChangeBranchCode.php', - '/Z_ChangeStockCode.php', - '/Z_ChangeSupplierCode.php', - '/Z_BottomUpCosts.php', - '/Z_ReApplyCostToSA.php', - '/EDISendInvoices.php', - '/Z_DeleteSalesTransActions.php', - '/Z_ReverseSuppPaymentRun.php' - ); - -$MenuItems['DBManagement']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), - _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance') - ); - -$MenuItems['DBManagement']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', - '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php' - ); - -$MenuItems['DBManagement']['Maintenance']['Caption'] = array (_('Maintain Language Files'), - _('Make New Company'), - _('Data Export Options'), - _('Image Manipulation Utility'), - _('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['DBManagement']['Maintenance']['URL'] = array ('/Z_poAdmin.php', - '/Z_MakeNewCOmpany.php', - '/Z_DataExportOptions.php', - '/Z_GetStockImage.php', - '/Z_ImportStocks.php', - '/Z_ImportFixedAssets.php', - '/Z_CreateCompanyTemplateFile.php', - '/Z_UpdateChartDetailsBFwd.php', - '/Z_RePostGLFromPeriod.php' - ); -?> \ No newline at end of file Added: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php (rev 0) +++ trunk/includes/MainMenuLinksArray.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -0,0 +1,562 @@ +<?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'), + _('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', + '/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 ( + ); +$MenuItems['PO']['Maintenance']['URL'] = array ( + ); +$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') + ); +$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/StockLocTransfer.php', + '/StockLocTransferReceive.php', + '/StockTransfers.php?New=Yes', + '/StockAdjustments.php?NewAdjustment=Yes', + '/ReverseGRN.php', + '/StockCounts.php' + ); + +$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), + _('Print Price Labels'), + _('Reprint GRN'), + _('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', + '/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') + ); +$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', + '/SelectProduct.php', + '/SalesCategories.php', + '/PricesBasedOnMarkUp.php', + '/PricesByCost.php', + '/ReorderLevelLocation.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 (_('Select A Work Order'), + _('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 ('/WorkOrderEntry.php', + '/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 a Bill Of Materials Between Items'), + _('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'), + _('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', + '/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'), + _('Role Permissions'), + _('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') + ); + +$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', + '/Locations.php', + '/DiscountCategories.php', + '/UnitsOfMeasure.php', + '/MRPCalendar.php', + '/MRPDemandTypes.php'); + +$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier 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_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')); + +$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.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 Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/index.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -6,7 +6,7 @@ include('includes/header.inc'); /*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'); +include('includes/MainMenuLinksArray.php'); if (isset($SupplierLogin) AND $SupplierLogin==1){ echo '<table class="table_index"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-23 06:24:05
|
Revision: 4956 http://web-erp.svn.sourceforge.net/web-erp/?rev=4956&view=rev Author: daintree Date: 2012-02-23 06:23:54 +0000 (Thu, 23 Feb 2012) Log Message: ----------- Ricards work on Utilities menu Modified Paths: -------------- trunk/WWW_Users.php trunk/Z_MakeNewCompany.php trunk/doc/Change.log trunk/index.php Added Paths: ----------- trunk/includes/MainMenuLinksArray.php Removed Paths: ------------- trunk/includes/IndexArray.php Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/WWW_Users.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -19,7 +19,7 @@ _('Asset Manager'), _('Petty Cash'), _('Setup'), - _('DB Management') + _('Utilities') ); $PDFLanguages = array(_('Latin Western Languages'), Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/Z_MakeNewCompany.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -191,9 +191,9 @@ prnMsg (_('The new company database has been created for' . ' ' . $_POST['NewCompany'] . '. ' . _('The company details and parameters should now be set up for the new company. NB: Only a single user "demo" is defined with the password "weberp" in the new company database. A new system administrator user should be defined for the new company and this account deleted immediately.')), 'info'); - echo '<p><a href="' . $rootpath . '/CompanyPreferences.php?' . SID .'">' . _('Set Up New Company Details') . '</a>'; - echo '<p><a href="' . $rootpath . '/SystemParameters.php?' . SID .'">' . _('Set Up Configuration Details') . '</a>'; - echo '<p><a href="' . $rootpath . '/WWW_Users.php?' . SID .'">' . _('Set Up User Accounts') . '</a>'; + echo '<p><a href="' . $rootpath . '/CompanyPreferences.php">' . _('Set Up New Company Details') . '</a>'; + echo '<p><a href="' . $rootpath . '/SystemParameters.php">' . _('Set Up Configuration Details') . '</a>'; + echo '<p><a href="' . $rootpath . '/WWW_Users.php">' . _('Set Up User Accounts') . '</a>'; echo '</form>'; echo '</div>'; @@ -214,12 +214,18 @@ echo '<table><tr>'; echo '<td>' . _('Enter up to 32 character lower case character abbreviation for the company') . '</td> - <td><input type="TEXT" size="33" maxlength="32" name="NewCompany" /></td></tr> - <tr><td>'. _('Logo Image File (.jpg)') . ':</td><td><input type="FILE" ID="LogoFile" name="LogoFile" /></td></tr> - <tr><td>' . _('Create Database?') . '</td><td><input type="CHECKBOX" name="CreateDB" /></td></tr> + <td><input type="text" size="33" maxlength="32" name="NewCompany" /></td> + </tr> + <tr> + <td>'. _('Logo Image File (.jpg)') . ':</td><td><input type="FILE" ID="LogoFile" name="LogoFile" /></td> + </tr> + <tr> + <td>' . _('Create Database?') . '</td> + <td><input type="CHECKBOX" name="CreateDB" /></td> + </tr> </table>'; -echo '<br /><input type="SUBMIT" name="submit" value="' . _('Proceed') . '" /> '; +echo '<br /><input type="submit" name="submit" value="' . _('Proceed') . '" />'; echo '</form>'; echo '</div>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/doc/Change.log 2012-02-23 06:23:54 UTC (rev 4956) @@ -1,5 +1,6 @@ webERP Change Log +23/2/12 Ricard: Moved Utility scripts from Z_index.php to their own module named Utilities 22/2/12 Phil: Make daily sales inquiry work correctly with assembly items where costs are recalculated in the case of negatives stock when supplier invoices entered 22/2/12 James Dupin: Update to French translation 22/2/12 Phil: Add ENT_QUOTES, 'UTF-8' to all htmlspecialchars calls Deleted: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/includes/IndexArray.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -1,573 +0,0 @@ -<?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'DBManagement'); -$ReportList = array('orders'=>'ord', - 'AR'=>'ar', - 'AP'=>'ap', - 'PO'=>'prch', - 'stock'=>'inv', - 'manuf'=>'man', - 'GL'=>'gl', - 'FA'=>'fa', - 'PC'=>'pc', - 'system'=>'sys', - 'DBManagement'=>'dbm' - ); - -/*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'), - _('DB Management')); - -$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'), - _('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', - '/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 ( - ); -$MenuItems['PO']['Maintenance']['URL'] = array ( - ); -$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') - ); -$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/StockLocTransfer.php', - '/StockLocTransferReceive.php', - '/StockTransfers.php?New=Yes', - '/StockAdjustments.php?NewAdjustment=Yes', - '/ReverseGRN.php', - '/StockCounts.php' - ); - -$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), - _('Print Price Labels'), - _('Reprint GRN'), - _('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', - '/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') - ); -$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', - '/SelectProduct.php', - '/SalesCategories.php', - '/PricesBasedOnMarkUp.php', - '/PricesByCost.php', - '/ReorderLevelLocation.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 (_('Select A Work Order'), - _('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 ('/WorkOrderEntry.php', - '/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 a Bill Of Materials Between Items'), - _('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'), - _('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', - '/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'), - _('Role Permissions'), - _('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') - ); - -$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', - '/Locations.php', - '/DiscountCategories.php', - '/UnitsOfMeasure.php', - '/MRPCalendar.php', - '/MRPDemandTypes.php' - ); - -$MenuItems['DBManagement']['Transactions']['Caption'] = array (_('Change A Customer Code'), - _('Change A Customer Branch Code'), - _('Change An Inventory Item Code'), - _('Change A Supplier Code'), - _('Update costs for all BOM items, from the bottom up'), - _('Re-apply costs to Sales Analysis'), - _('Send All Unsent EDI Invoices and Credits'), - _('Delete sales transactions'), - _('Reverse all supplier payments on a specified date') - ); - -$MenuItems['DBManagement']['Transactions']['URL'] = array ('/Z_ChangeCustomerCode.php', - '/Z_ChangeBranchCode.php', - '/Z_ChangeStockCode.php', - '/Z_ChangeSupplierCode.php', - '/Z_BottomUpCosts.php', - '/Z_ReApplyCostToSA.php', - '/EDISendInvoices.php', - '/Z_DeleteSalesTransActions.php', - '/Z_ReverseSuppPaymentRun.php' - ); - -$MenuItems['DBManagement']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), - _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance') - ); - -$MenuItems['DBManagement']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', - '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php' - ); - -$MenuItems['DBManagement']['Maintenance']['Caption'] = array (_('Maintain Language Files'), - _('Make New Company'), - _('Data Export Options'), - _('Image Manipulation Utility'), - _('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['DBManagement']['Maintenance']['URL'] = array ('/Z_poAdmin.php', - '/Z_MakeNewCOmpany.php', - '/Z_DataExportOptions.php', - '/Z_GetStockImage.php', - '/Z_ImportStocks.php', - '/Z_ImportFixedAssets.php', - '/Z_CreateCompanyTemplateFile.php', - '/Z_UpdateChartDetailsBFwd.php', - '/Z_RePostGLFromPeriod.php' - ); -?> \ No newline at end of file Added: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php (rev 0) +++ trunk/includes/MainMenuLinksArray.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -0,0 +1,562 @@ +<?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'), + _('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', + '/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 ( + ); +$MenuItems['PO']['Maintenance']['URL'] = array ( + ); +$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') + ); +$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', + '/StockLocTransfer.php', + '/StockLocTransferReceive.php', + '/StockTransfers.php?New=Yes', + '/StockAdjustments.php?NewAdjustment=Yes', + '/ReverseGRN.php', + '/StockCounts.php' + ); + +$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), + _('Print Price Labels'), + _('Reprint GRN'), + _('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', + '/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') + ); +$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', + '/SelectProduct.php', + '/SalesCategories.php', + '/PricesBasedOnMarkUp.php', + '/PricesByCost.php', + '/ReorderLevelLocation.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 (_('Select A Work Order'), + _('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 ('/WorkOrderEntry.php', + '/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 a Bill Of Materials Between Items'), + _('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'), + _('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', + '/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'), + _('Role Permissions'), + _('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') + ); + +$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', + '/Locations.php', + '/DiscountCategories.php', + '/UnitsOfMeasure.php', + '/MRPCalendar.php', + '/MRPDemandTypes.php'); + +$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Change A Customer Code'), + _('Change A Customer Branch Code'), + _('Change An Inventory Item Code'), + _('Change A Supplier 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_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')); + +$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.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 Modified: trunk/index.php =================================================================== --- trunk/index.php 2012-02-23 05:57:43 UTC (rev 4955) +++ trunk/index.php 2012-02-23 06:23:54 UTC (rev 4956) @@ -6,7 +6,7 @@ include('includes/header.inc'); /*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'); +include('includes/MainMenuLinksArray.php'); if (isset($SupplierLogin) AND $SupplierLogin==1){ echo '<table class="table_index"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-24 09:38:59
|
Revision: 4964 http://web-erp.svn.sourceforge.net/web-erp/?rev=4964&view=rev Author: daintree Date: 2012-02-24 09:38:53 +0000 (Fri, 24 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/PDFPrintLabel.php trunk/PricesByCost.php trunk/StockSerialItemResearch.php trunk/locale/en_US.utf8/LC_MESSAGES/messages.po Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/PDFPrintLabel.php 2012-02-24 09:38:53 UTC (rev 4964) @@ -174,7 +174,7 @@ <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td></tr>'; echo '<tr> <th colspan="2"> - <input type="submit" name="refresh" value="Refresh options" /> + <input type="submit" name="refresh" value="' . _('Refresh options') . '" /> </th>'; echo '<tr> <td colspan="2"> Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/PricesByCost.php 2012-02-24 09:38:53 UTC (rev 4964) @@ -226,7 +226,7 @@ echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div><p>'; } } else { /*The option to submit was not hit so display form */ - echo '<div class="page_help_text">' . _('Use this report to display price list with the cost.') . '</div><br />'; + echo '<div class="page_help_text">' . _('Prices can be displayed based on their relation to cost') . '</div><br />'; echo '<br /> <br /> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> Modified: trunk/StockSerialItemResearch.php =================================================================== --- trunk/StockSerialItemResearch.php 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/StockSerialItemResearch.php 2012-02-24 09:38:53 UTC (rev 4964) @@ -26,14 +26,14 @@ <form name="SerialNoResearch" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Serial Number') .': <input ID="serialno" name="serialno" size="21" maxlength="20" value="'. $SerialNo . '" /> <input type="submit" name="submit" /> +echo _('Serial Number') .': <input ID="serialno" type="text" name="serialno" size="21" maxlength="20" value="'. $SerialNo . '" /> <input type="submit" name="submit" value="' . _('Search') . '" /> </div> <br /> </form>'; -echo '<SCRIPT> -document.getElementById("serialno").focus(); -</SCRIPT>'; +echo '<script> + document.getElementById("serialno").focus(); + </script>'; if ($SerialNo!='') { Modified: trunk/locale/en_US.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/en_US.utf8/LC_MESSAGES/messages.po 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/locale/en_US.utf8/LC_MESSAGES/messages.po 2012-02-24 09:38:53 UTC (rev 4964) @@ -19906,13 +19906,13 @@ #: PrintCustTransPortrait.php:1034 includes/PDFTransPageHeader.inc:15 #: includes/PDFTransPageHeaderPortrait.inc:17 msgid "TAX INVOICE" -msgstr "" +msgstr "INVOICE" #: PrintCustTrans.php:697 PrintCustTrans.php:930 PrintCustTrans.php:979 #: PrintCustTransPortrait.php:733 PrintCustTransPortrait.php:981 #: PrintCustTransPortrait.php:1036 includes/PDFTransPageHeaderPortrait.inc:19 msgid "TAX CREDIT NOTE" -msgstr "" +msgstr "CREDIT NOTE" #: PrintCustTrans.php:699 PrintCustTransPortrait.php:736 msgid "Tax Authority Ref" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-24 09:39:04
|
Revision: 4964 http://web-erp.svn.sourceforge.net/web-erp/?rev=4964&view=rev Author: daintree Date: 2012-02-24 09:38:53 +0000 (Fri, 24 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/PDFPrintLabel.php trunk/PricesByCost.php trunk/StockSerialItemResearch.php trunk/locale/en_US.utf8/LC_MESSAGES/messages.po Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/PDFPrintLabel.php 2012-02-24 09:38:53 UTC (rev 4964) @@ -174,7 +174,7 @@ <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td></tr>'; echo '<tr> <th colspan="2"> - <input type="submit" name="refresh" value="Refresh options" /> + <input type="submit" name="refresh" value="' . _('Refresh options') . '" /> </th>'; echo '<tr> <td colspan="2"> Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/PricesByCost.php 2012-02-24 09:38:53 UTC (rev 4964) @@ -226,7 +226,7 @@ echo '<p><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Back') . '<a/></div><p>'; } } else { /*The option to submit was not hit so display form */ - echo '<div class="page_help_text">' . _('Use this report to display price list with the cost.') . '</div><br />'; + echo '<div class="page_help_text">' . _('Prices can be displayed based on their relation to cost') . '</div><br />'; echo '<br /> <br /> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> Modified: trunk/StockSerialItemResearch.php =================================================================== --- trunk/StockSerialItemResearch.php 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/StockSerialItemResearch.php 2012-02-24 09:38:53 UTC (rev 4964) @@ -26,14 +26,14 @@ <form name="SerialNoResearch" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Serial Number') .': <input ID="serialno" name="serialno" size="21" maxlength="20" value="'. $SerialNo . '" /> <input type="submit" name="submit" /> +echo _('Serial Number') .': <input ID="serialno" type="text" name="serialno" size="21" maxlength="20" value="'. $SerialNo . '" /> <input type="submit" name="submit" value="' . _('Search') . '" /> </div> <br /> </form>'; -echo '<SCRIPT> -document.getElementById("serialno").focus(); -</SCRIPT>'; +echo '<script> + document.getElementById("serialno").focus(); + </script>'; if ($SerialNo!='') { Modified: trunk/locale/en_US.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/en_US.utf8/LC_MESSAGES/messages.po 2012-02-24 09:37:00 UTC (rev 4963) +++ trunk/locale/en_US.utf8/LC_MESSAGES/messages.po 2012-02-24 09:38:53 UTC (rev 4964) @@ -19906,13 +19906,13 @@ #: PrintCustTransPortrait.php:1034 includes/PDFTransPageHeader.inc:15 #: includes/PDFTransPageHeaderPortrait.inc:17 msgid "TAX INVOICE" -msgstr "" +msgstr "INVOICE" #: PrintCustTrans.php:697 PrintCustTrans.php:930 PrintCustTrans.php:979 #: PrintCustTransPortrait.php:733 PrintCustTransPortrait.php:981 #: PrintCustTransPortrait.php:1036 includes/PDFTransPageHeaderPortrait.inc:19 msgid "TAX CREDIT NOTE" -msgstr "" +msgstr "CREDIT NOTE" #: PrintCustTrans.php:699 PrintCustTransPortrait.php:736 msgid "Tax Authority Ref" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-25 01:49:06
|
Revision: 4968 http://web-erp.svn.sourceforge.net/web-erp/?rev=4968&view=rev Author: daintree Date: 2012-02-25 01:49:00 +0000 (Sat, 25 Feb 2012) Log Message: ----------- added module to www-users Modified Paths: -------------- trunk/includes/ConnectDB.inc trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2012-02-24 10:35:15 UTC (rev 4967) +++ trunk/includes/ConnectDB.inc 2012-02-25 01:49:00 UTC (rev 4968) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.08.1'; //must update manually every time there is a DB change +$Version='4.08'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-24 10:35:15 UTC (rev 4967) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-25 01:49:00 UTC (rev 4968) @@ -4,6 +4,7 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('reportwriter/admin/ReportCreator.php', '15', 'Report Writer'); INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RecurringSalesOrdersProcess.php', '1', 'Process Recurring Sales Orders'); -UPDATE `scripts` SET `script`='CopyBOM.php' WHERE `script`='Z_CopyBOM.php'; +DELETE `scripts` WHERE `script`='Z_CopyBOM.php'; -UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; \ No newline at end of file +UPDATE `www_users` SET `modulesallowed` = CONCAT(`modulesallowed`,'0,'); +UPDATE config SET confvalue='4.08' WHERE confname='VersionNumber'; \ 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: <dai...@us...> - 2012-02-25 01:49:06
|
Revision: 4968 http://web-erp.svn.sourceforge.net/web-erp/?rev=4968&view=rev Author: daintree Date: 2012-02-25 01:49:00 +0000 (Sat, 25 Feb 2012) Log Message: ----------- added module to www-users Modified Paths: -------------- trunk/includes/ConnectDB.inc trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2012-02-24 10:35:15 UTC (rev 4967) +++ trunk/includes/ConnectDB.inc 2012-02-25 01:49:00 UTC (rev 4968) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.08.1'; //must update manually every time there is a DB change +$Version='4.08'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-24 10:35:15 UTC (rev 4967) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-25 01:49:00 UTC (rev 4968) @@ -4,6 +4,7 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('reportwriter/admin/ReportCreator.php', '15', 'Report Writer'); INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RecurringSalesOrdersProcess.php', '1', 'Process Recurring Sales Orders'); -UPDATE `scripts` SET `script`='CopyBOM.php' WHERE `script`='Z_CopyBOM.php'; +DELETE `scripts` WHERE `script`='Z_CopyBOM.php'; -UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; \ No newline at end of file +UPDATE `www_users` SET `modulesallowed` = CONCAT(`modulesallowed`,'0,'); +UPDATE config SET confvalue='4.08' WHERE confname='VersionNumber'; \ 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: <vv...@us...> - 2012-02-25 22:46:00
|
Revision: 4971 http://web-erp.svn.sourceforge.net/web-erp/?rev=4971&view=rev Author: vvs2012 Date: 2012-02-25 22:45:53 +0000 (Sat, 25 Feb 2012) Log Message: ----------- sql in PDFSuppTransListing.php would not fetch any data and debug message was not showing Modified Paths: -------------- trunk/PDFChequeListing.php trunk/PDFSuppTransListing.php trunk/SelectSalesOrder.php Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2012-02-25 14:07:04 UTC (rev 4970) +++ trunk/PDFChequeListing.php 2012-02-25 22:45:53 UTC (rev 4971) @@ -76,17 +76,17 @@ include('includes/ConnectDB.inc'); } -$SQL = "SELECT bankaccountname, +$sql = "SELECT bankaccountname, decimalplaces AS bankcurrdecimalplaces FROM bankaccounts INNER JOIN currencies ON bankaccounts.currcode=currencies.currabrev WHERE accountcode = '" .$_POST['BankAccount'] . "'"; -$BankActResult = DB_query($SQL,$db); +$BankActResult = DB_query($sql,$db); $myrow = DB_fetch_row($BankActResult); $BankAccountName = $myrow[0]; $BankCurrDecimalPlaces = $myrow[1]; -$SQL= "SELECT amount, +$sql= "SELECT amount, ref, transdate, banktranstype, @@ -98,13 +98,13 @@ AND transdate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'"; -$Result=DB_query($SQL,$db,'','',false,false); +$Result=DB_query($sql,$db,'','',false,false); if (DB_error_no($db)!=0){ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); + if ($debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $sql,'error'); } include('includes/footer.inc'); exit; Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2012-02-25 14:07:04 UTC (rev 4970) +++ trunk/PDFSuppTransListing.php 2012-02-25 22:45:53 UTC (rev 4971) @@ -65,11 +65,11 @@ decimalplaces AS currdecimalplaces, suppname FROM supptrans INNER JOIN suppliers - ON supptrans.supplierno = suppliers.supplierno + ON supptrans.supplierno = suppliers.supplierid INNER JOIN currencies ON suppliers.currcode=currencies.currabrev WHERE type='" . $_POST['TransType'] . "' - AND inputdate='" . FormatDateForSQL($_POST['Date']) . "'"; + AND trandate='" . FormatDateForSQL($_POST['Date']) . "'"; $result=DB_query($sql,$db,'','',false,false); @@ -77,8 +77,8 @@ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); + if ($debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $sql,'error'); } include('includes/footer.inc'); exit; Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-02-25 14:07:04 UTC (rev 4970) +++ trunk/SelectSalesOrder.php 2012-02-25 22:45:53 UTC (rev 4971) @@ -186,7 +186,7 @@ if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order $StatusComment = date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . ' ' . $UserDetails . ' - '._('Auto created from sales orders') .'<br />'; $ErrMsg = _('Could not update purchase order status to Authorised'); - $Debug = _('The SQL that failed was'); + $DbgMsg = _('The SQL that failed was'); $result = DB_query("UPDATE purchorders SET allowprint=1, status='Authorised', stat_comment='" . $StatusComment . "' @@ -350,7 +350,7 @@ if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order $StatusComment = date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . ' - '._('Auto created from sales orders') .'<br />'; $ErrMsg = _('Could not update purchase order status to Authorised'); - $Debug = _('The SQL that failed was'); + $DbgMsg = _('The SQL that failed was'); $result = DB_query("UPDATE purchorders SET allowprint=1, status='Authorised', stat_comment='" . $StatusComment . "' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-25 22:46:05
|
Revision: 4971 http://web-erp.svn.sourceforge.net/web-erp/?rev=4971&view=rev Author: vvs2012 Date: 2012-02-25 22:45:53 +0000 (Sat, 25 Feb 2012) Log Message: ----------- sql in PDFSuppTransListing.php would not fetch any data and debug message was not showing Modified Paths: -------------- trunk/PDFChequeListing.php trunk/PDFSuppTransListing.php trunk/SelectSalesOrder.php Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2012-02-25 14:07:04 UTC (rev 4970) +++ trunk/PDFChequeListing.php 2012-02-25 22:45:53 UTC (rev 4971) @@ -76,17 +76,17 @@ include('includes/ConnectDB.inc'); } -$SQL = "SELECT bankaccountname, +$sql = "SELECT bankaccountname, decimalplaces AS bankcurrdecimalplaces FROM bankaccounts INNER JOIN currencies ON bankaccounts.currcode=currencies.currabrev WHERE accountcode = '" .$_POST['BankAccount'] . "'"; -$BankActResult = DB_query($SQL,$db); +$BankActResult = DB_query($sql,$db); $myrow = DB_fetch_row($BankActResult); $BankAccountName = $myrow[0]; $BankCurrDecimalPlaces = $myrow[1]; -$SQL= "SELECT amount, +$sql= "SELECT amount, ref, transdate, banktranstype, @@ -98,13 +98,13 @@ AND transdate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'"; -$Result=DB_query($SQL,$db,'','',false,false); +$Result=DB_query($sql,$db,'','',false,false); if (DB_error_no($db)!=0){ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); + if ($debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $sql,'error'); } include('includes/footer.inc'); exit; Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2012-02-25 14:07:04 UTC (rev 4970) +++ trunk/PDFSuppTransListing.php 2012-02-25 22:45:53 UTC (rev 4971) @@ -65,11 +65,11 @@ decimalplaces AS currdecimalplaces, suppname FROM supptrans INNER JOIN suppliers - ON supptrans.supplierno = suppliers.supplierno + ON supptrans.supplierno = suppliers.supplierid INNER JOIN currencies ON suppliers.currcode=currencies.currabrev WHERE type='" . $_POST['TransType'] . "' - AND inputdate='" . FormatDateForSQL($_POST['Date']) . "'"; + AND trandate='" . FormatDateForSQL($_POST['Date']) . "'"; $result=DB_query($sql,$db,'','',false,false); @@ -77,8 +77,8 @@ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the payments'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); + if ($debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $sql,'error'); } include('includes/footer.inc'); exit; Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-02-25 14:07:04 UTC (rev 4970) +++ trunk/SelectSalesOrder.php 2012-02-25 22:45:53 UTC (rev 4971) @@ -186,7 +186,7 @@ if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order $StatusComment = date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . ' ' . $UserDetails . ' - '._('Auto created from sales orders') .'<br />'; $ErrMsg = _('Could not update purchase order status to Authorised'); - $Debug = _('The SQL that failed was'); + $DbgMsg = _('The SQL that failed was'); $result = DB_query("UPDATE purchorders SET allowprint=1, status='Authorised', stat_comment='" . $StatusComment . "' @@ -350,7 +350,7 @@ if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order $StatusComment = date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . ' - '._('Auto created from sales orders') .'<br />'; $ErrMsg = _('Could not update purchase order status to Authorised'); - $Debug = _('The SQL that failed was'); + $DbgMsg = _('The SQL that failed was'); $result = DB_query("UPDATE purchorders SET allowprint=1, status='Authorised', stat_comment='" . $StatusComment . "' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-25 23:23:59
|
Revision: 4972 http://web-erp.svn.sourceforge.net/web-erp/?rev=4972&view=rev Author: vvs2012 Date: 2012-02-25 23:23:53 +0000 (Sat, 25 Feb 2012) Log Message: ----------- xhtml cleanup Modified Paths: -------------- trunk/PDFChequeListing.php trunk/PDFCustTransListing.php Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2012-02-25 22:45:53 UTC (rev 4971) +++ trunk/PDFChequeListing.php 2012-02-25 23:23:53 UTC (rev 4972) @@ -32,7 +32,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div><input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /></div>'; echo '<table class="selection"> <tr> <td>' . _('Enter the date from which cheques are to be listed') . ':</td> @@ -64,10 +64,11 @@ </select></td> </tr> </table> - <br /> <div class="centre"> + <br /> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; + </div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2012-02-25 22:45:53 UTC (rev 4971) +++ trunk/PDFCustTransListing.php 2012-02-25 23:23:53 UTC (rev 4972) @@ -27,27 +27,27 @@ } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div><input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /></div>'; echo '<table class="selection"> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> - <td><input type="text" name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + <td><input type="text" name="Date" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> </tr>'; echo '<tr><td>' . _('Transaction type') . '</td> <td><select name="TransType"> <option value="10">' . _('Invoices') . '</option> <option value="11">' . _('Credit Notes') . '</option> - <option value="12">' . _('Receipts') . '</option> - </select></td> - </tr>'; + <option value="12">' . _('Receipts') . '</option>'; echo '</select></td></tr> </table> - <br /> <div class="centre"> + <br /> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; + </div> + </form> + </div>'; include('includes/footer.inc'); exit; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-25 23:23:59
|
Revision: 4972 http://web-erp.svn.sourceforge.net/web-erp/?rev=4972&view=rev Author: vvs2012 Date: 2012-02-25 23:23:53 +0000 (Sat, 25 Feb 2012) Log Message: ----------- xhtml cleanup Modified Paths: -------------- trunk/PDFChequeListing.php trunk/PDFCustTransListing.php Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2012-02-25 22:45:53 UTC (rev 4971) +++ trunk/PDFChequeListing.php 2012-02-25 23:23:53 UTC (rev 4972) @@ -32,7 +32,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div><input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /></div>'; echo '<table class="selection"> <tr> <td>' . _('Enter the date from which cheques are to be listed') . ':</td> @@ -64,10 +64,11 @@ </select></td> </tr> </table> - <br /> <div class="centre"> + <br /> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; + </div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2012-02-25 22:45:53 UTC (rev 4971) +++ trunk/PDFCustTransListing.php 2012-02-25 23:23:53 UTC (rev 4972) @@ -27,27 +27,27 @@ } echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<div><input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /></div>'; echo '<table class="selection"> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> - <td><input type="text" name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + <td><input type="text" name="Date" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> </tr>'; echo '<tr><td>' . _('Transaction type') . '</td> <td><select name="TransType"> <option value="10">' . _('Invoices') . '</option> <option value="11">' . _('Credit Notes') . '</option> - <option value="12">' . _('Receipts') . '</option> - </select></td> - </tr>'; + <option value="12">' . _('Receipts') . '</option>'; echo '</select></td></tr> </table> - <br /> <div class="centre"> + <br /> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; + </div> + </form> + </div>'; include('includes/footer.inc'); exit; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-02-26 09:19:47
|
Revision: 4973 http://web-erp.svn.sourceforge.net/web-erp/?rev=4973&view=rev Author: tim_schofield Date: 2012-02-26 09:19:38 +0000 (Sun, 26 Feb 2012) Log Message: ----------- New functionality for internal stock requests Modified Paths: -------------- trunk/StockCategories.php trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/includes/MainMenuLinksArray.php trunk/includes/SQL_CommonFunctions.inc trunk/sql/mysql/upgrade4.07-4.08.sql Added Paths: ----------- trunk/Departments.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/includes/DefineStockRequestClass.php Added: trunk/Departments.php =================================================================== --- trunk/Departments.php (rev 0) +++ trunk/Departments.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,261 @@ +<?php +/* $Id: UnitsOfMeasure.php 4567 2011-05-15 04:34:49Z daintree $*/ + +include('includes/session.inc'); + +$title = _('Departments'); + +include('includes/header.inc'); +echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . + _('Top Sales Order Search') . '" alt="" />' . ' ' . $title . '</p>'; + +if ( isset($_GET['SelectedDepartmentID']) ) + $SelectedDepartmentID = $_GET['SelectedDepartmentID']; +elseif (isset($_POST['SelectedDepartmentID'])) + $SelectedDepartmentID = $_POST['SelectedDepartmentID']; + +if (isset($_POST['Submit'])) { + + //initialise no input errors assumed initially before we test + + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + + if (strpos($_POST['DepartmentName'],'&')>0 OR strpos($_POST['DepartmentName'],"'")>0) { + $InputError = 1; + prnMsg( _('The description of the department must not contain the character') . " '&' " . _('or the character') ." '",'error'); + } + if (trim($_POST['DepartmentName']) == '') { + $InputError = 1; + prnMsg( _('The Name of the Department should not be empty'), 'error'); + } + + if (isset($_POST['SelectedDepartmentID']) AND $_POST['SelectedDepartmentID']!='' AND $InputError !=1) { + + + /*SelectedDepartmentID could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ + // Check the name does not clash + $sql = "SELECT count(*) FROM departments + WHERE departmentid <> '" . $SelectedDepartmentID ."' + AND description ".LIKE." '" . $_POST['DepartmentName'] . "'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ( $myrow[0] > 0 ) { + $InputError = 1; + prnMsg( _('This department name already exists.'),'error'); + } else { + // Get the old name and check that the record still exist neet to be very carefull here + // idealy this is one of those sets that should be in a stored procedure simce even the checks are + // relavant + $sql = "SELECT description FROM departments + WHERE departmentid = '" . $SelectedDepartmentID . "'"; + $result = DB_query($sql,$db); + if ( DB_num_rows($result) != 0 ) { + // This is probably the safest way there is + $myrow = DB_fetch_row($result); + $OldDepartmentName = $myrow[0]; + $sql = array(); + $sql[] = "UPDATE departments + SET description='" . $_POST['DepartmentName'] . "', + authoriser='" . $_POST['Authoriser'] . "' + WHERE description ".LIKE." '".$OldDepartmentName."'"; + } else { + $InputError = 1; + prnMsg( _('The Department does not exist.'),'error'); + } + } + $msg = _('The department has been modified'); + } elseif ($InputError !=1) { + /*SelectedDepartmentID is null cos no item selected on first time round so must be adding a record*/ + $sql = "SELECT count(*) FROM departments + WHERE description " .LIKE. " '".$_POST['DepartmentName'] ."'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ( $myrow[0] > 0 ) { + $InputError = 1; + prnMsg( _('There is already a Department with the specified name.'),'error'); + } else { + $sql = "INSERT INTO departments ( + description, + authoriser ) + VALUES ( + '" . $_POST['DepartmentName'] ."', + '" . $_POST['Authoriser'] ."' + )"; + } + $msg = _('The new department has been created'); + } + + if ($InputError!=1){ + //run the SQL from either of the above possibilites + if (is_array($sql)) { + $result = DB_Txn_Begin($db); + $tmpErr = _('The department could not be inserted'); + $tmpDbg = _('The sql that failed was') . ':'; + foreach ($sql as $stmt ) { + $result = DB_query($stmt,$db, $tmpErr,$tmpDbg,true); + if(!$result) { + $InputError = 1; + break; + } + } + if ($InputError!=1){ + $result = DB_Txn_Commit($db); + } else { + $result = DB_Txn_Rollback($db); + } + } else { + $result = DB_query($sql,$db); + } + prnMsg($msg,'success'); + } + unset ($SelectedDepartmentID); + unset ($_POST['SelectedDepartmentID']); + unset ($_POST['DepartmentName']); + +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button +// PREVENT DELETES IF DEPENDENT RECORDS IN 'stockmaster' + // Get the original name of the unit of measure the ID is just a secure way to find the unit of measure + $sql = "SELECT description FROM departments + WHERE departmentid = '" . $SelectedDepartmentID . "'"; + $result = DB_query($sql,$db); + if ( DB_num_rows($result) == 0 ) { + // This is probably the safest way there is + prnMsg( _('You cannot delete this Department'),'warn'); + } else { + $myrow = DB_fetch_row($result); + $OldDepartmentName = $myrow[0]; + $sql= "SELECT COUNT(*) FROM dispatch,departments WHERE dispatch.departmentid=departments.departmentid and description ".LIKE." '" . $OldDepartmentName . "'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + prnMsg( _('You cannot delete this Department'),'warn'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('There are items related to this department'); + } else { + $sql="DELETE FROM departments WHERE description ".LIKE."'" . $OldDepartmentName . "'"; + $result = DB_query($sql,$db); + prnMsg( $OldDepartmentName . ' ' . _('The department has been removed') . '!','success'); + } + } //end if account group used in GL accounts + unset ($SelectedDepartmentID); + unset ($_GET['SelectedDepartmentID']); + unset($_GET['delete']); + unset ($_POST['SelectedDepartmentID']); + unset ($_POST['DepartmentID']); + unset ($_POST['DepartmentName']); +} + + if (!isset($SelectedDepartmentID)) { + +/* An unit of measure could be posted when one has been edited and is being updated + or GOT when selected for modification + SelectedDepartmentID will exist because it was sent with the page in a GET . + If its the first time the page has been displayed with no parameters + then none of the above are true and the list of account groups will be displayed with + links to delete or edit each. These will call the same page again and allow update/input + or deletion of the records*/ + + $sql = "SELECT departmentid, + description, + authoriser + FROM departments + ORDER BY departmentid"; + + $ErrMsg = _('There are no departments created'); + $result = DB_query($sql,$db,$ErrMsg); + + echo '<table class="selection"> + <tr> + <th>' . _('Department Name') . '</th> + <th>' . _('Authoriser') . '</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++; + } + + echo '<td>' . $myrow['description'] . '</td>'; + echo '<td>' . $myrow['authoriser'] . '</td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '">' . _('Edit') . '</a></td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '</tr>'; + + } //END WHILE LIST LOOP + echo '</table>'; +} //end of ifs and buts! + + +if (isset($SelectedDepartmentID)) { + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('View all Departments') . '</a></div>'; +} + +echo '<br />'; + +if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($SelectedDepartmentID)) { + //editing an existing section + + $sql = "SELECT departmentid, + description + FROM departments + WHERE departmentid='" . $SelectedDepartmentID . "'"; + + $result = DB_query($sql, $db); + if ( DB_num_rows($result) == 0 ) { + prnMsg( _('The selected departemnt could not be found.'),'warn'); + unset($SelectedDepartmentID); + } else { + $myrow = DB_fetch_array($result); + + $_POST['DepartmentID'] = $myrow['departmentid']; + $_POST['DepartmentName'] = $myrow['description']; + + echo '<input type="hidden" name="SelectedDepartmentID" value="' . $_POST['DepartmentID'] . '" />'; + echo '<table class="selection">'; + } + + } else { + $_POST['DepartmentName']=''; + echo '<table class="selection">'; + } + echo '<tr> + <td>' . _('Department Name') . ':' . '</td> + <td><input type="text" name="DepartmentName" size="50" maxlength="100" value="' . $_POST['DepartmentName'] . '" /></td> + </tr>'; + echo '<tr><td>'._('Authoriser').'</td><td><select name="Authoriser">'; + $usersql="SELECT userid FROM www_users"; + $userresult=DB_query($usersql,$db); + while ($myrow=DB_fetch_array($userresult)) { + if ($myrow['userid']==$UserID) { + echo '<option selected="True" value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } else { + echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } + } + echo '</select></td></tr>'; + echo '</table><br />'; + + echo '<div class="centre"><input type="submit" name="Submit" value="' . _('Enter Information') . '" /></div>'; + + echo '</form>'; + +} //end if record deleted no point displaying form to add record + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php (rev 0) +++ trunk/InternalStockRequest.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,682 @@ +<?php + +/* $Id: StockTransfers.php 4576 2011-05-27 10:59:20Z daintree $*/ + +include('includes/DefineStockRequestClass.php'); + +include('includes/session.inc'); +$title = _('Create an Internal Materials Request'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_GET['New'])) { + unset($_SESSION['Transfer']); + $_SESSION['Request'] = new StockRequest(); +} + +if (isset($_POST['Update'])) { + $InputError=0; + if ($_POST['Department']=='') { + prnMsg( _('You must select a Department for the request'), 'error'); + $InputError=1; + } + if ($_POST['Location']=='') { + prnMsg( _('You must select a Location to request the items from'), 'error'); + $InputError=1; + } + if ($InputError==0) { + $_SESSION['Request']->Department=$_POST['Department']; + $_SESSION['Request']->Location=$_POST['Location']; + $_SESSION['Request']->DispatchDate=$_POST['DispatchDate']; + $_SESSION['Request']->Narrative=$_POST['Narrative']; + } +} + +if (isset($_POST['Edit'])) { + $_SESSION['Request']->LineItems[$_POST['LineNumber']]->Quantity=$_POST['Quantity']; +} + +if (isset($_GET['Delete'])) { + unset($_SESSION['Request']->LineItems[$_GET['Delete']]); + echo '<br />'; + prnMsg( _('The line was successfully deleted'), 'success'); + echo '<br />'; +} + +foreach ($_POST as $key => $value) { + if (mb_strstr($key,'StockID')) { + $Index=mb_substr($key, 7); + if (filter_number_format($_POST['Quantity'.$Index])>0) { + $StockID=$value; + $ItemDescription=$_POST['ItemDescription'.$Index]; + $DecimalPlaces=$_POST['DecimalPlaces'.$Index]; + $NewItem_array[$StockID] = filter_number_format($_POST['Quantity'.$Index]); + $_POST['Units'.$StockID]=$_POST['Units'.$Index]; + $_SESSION['Request']->AddLine($StockID, $ItemDescription, $NewItem_array[$StockID], $_POST['Units'.$StockID], $DecimalPlaces); + } + } +} + +if (isset($_POST['Submit'])) { + DB_Txn_Begin($db); + $InputError=0; + if ($_SESSION['Request']->Department=='') { + prnMsg( _('You must select a Department for the request'), 'error'); + $InputError=1; + } + if ($_SESSION['Request']->Location=='') { + prnMsg( _('You must select a Location to request the items from'), 'error'); + $InputError=1; + } + if ($InputError==0) { + $RequestNo = GetNextTransNo(38, $db); + $HeaderSQL="INSERT INTO stockrequest (dispatchid, + loccode, + departmentid, + despatchdate, + narrative) + VALUES( + '" . $RequestNo . "', + '" . $_SESSION['Request']->Location . "', + '" . $_SESSION['Request']->Department . "', + '" . FormatDateForSQL($_SESSION['Request']->DispatchDate) . "', + '" . $_SESSION['Request']->Narrative . "' + )"; + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The request header record could not be inserted because'); + $DbgMsg = _('The following SQL to insert the request header record was used'); + $Result = DB_query($HeaderSQL,$db,$ErrMsg,$DbgMsg,true); + + foreach ($_SESSION['Request']->LineItems as $LineItems) { + $LineSQL="INSERT INTO stockrequestitems (dispatchitemsid, + dispatchid, + stockid, + quantity, + decimalplaces, + uom) + VALUES( + '".$LineItems->LineNumber."', + '".$RequestNo."', + '".$LineItems->StockID."', + '".$LineItems->Quantity."', + '".$LineItems->DecimalPlaces."', + '".$LineItems->UOM."' + )"; + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The request line record could not be inserted because'); + $DbgMsg = _('The following SQL to insert the request header record was used'); + $Result = DB_query($LineSQL,$db,$ErrMsg,$DbgMsg,true); + + } + + } + DB_Txn_Commit($db); + prnMsg( _('The internal stock request has been entered and now needs to be authorised'), 'success'); + echo '<br /><div class="centre"><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?New=Yes">' . _('Create another request') . '</a></div>'; + include('includes/footer.inc'); + unset($_SESSION['Request']); + exit; +} + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Dispatch') . + '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_GET['Edit'])) { + 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">'; + echo '<tr> + <th colspan="2"><font size="2" color="navy">' . _('Edit the Request Line') . '</font></th> + </tr>'; + echo '<tr> + <td>' . _('Line number') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->LineNumber . '</td> + </tr>'; + echo '<tr> + <td>' . _('Stock Code') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->StockID . '</td> + </tr>'; + echo '<tr> + <td>' . _('Item Description') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->ItemDescription . '</td> + </tr>'; + echo '<tr> + <td>' . _('Unit of Measure') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->UOM . '</td> + </tr>'; + echo '<tr> + <td>' . _('Quantity Requested') . '</td> + <td><input type="text" class="number" name="Quantity" value="' . locale_number_format($_SESSION['Request']->LineItems[$_GET['Edit']]->Quantity, $_SESSION['Request']->LineItems[$_GET['Edit']]->DecimalPlaces) . '" /></td> + </tr>'; + echo '<input type="hidden" name="LineNumber" value="' . $_SESSION['Request']->LineItems[$_GET['Edit']]->LineNumber . '" />'; + echo '</table><br />'; + echo '<div class="centre"><input type="submit" name="Edit" value="' . _('Update Line') . '" /></div></form>'; + include('includes/footer.inc'); + exit; +} + +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">'; +echo '<tr> + <th colspan="2"><font color="navy" size="2">' . _('Internal Stock Request Details') . '</font></th> + </tr>'; +echo '<tr> + <td>' . _('Department') . ':</td>'; + +$sql="SELECT departmentid, + description + FROM departments + 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>'; + } else { + echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlentities($myrow['description'], ENT_QUOTES,'UTF-8').'</option>'; + } +} +echo '</select></td></tr>'; + +echo '<tr> + <td>' . _('Location from which to request stock') . ':</td>'; +$sql="SELECT loccode, + locationname + FROM locations + ORDER BY locationname"; + +$result=DB_query($sql, $db); +echo '<td><select name="Location">'; +echo '<option value="">' . _('Select a Location') . '</option>'; +while ($myrow=DB_fetch_array($result)){ + if (isset($_SESSION['Request']->Location) and $_SESSION['Request']->Location==$myrow['loccode']){ + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['loccode'].' - ' .htmlentities($myrow['locationname'], ENT_QUOTES,'UTF-8').'</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['loccode'].' - ' .htmlentities($myrow['locationname'], ENT_QUOTES,'UTF-8').'</option>'; + } +} +echo '</select></td></tr>'; + +echo '<tr> + <td>' . _('Date when required') . ':</td>'; +echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DispatchDate" maxlength="10" size="11" value="' . $_SESSION['Request']->DispatchDate . '" /></td>'; + +echo '<tr><td>' . _('Narrative') . ':</td>'; +echo '<td><textarea name="Narrative" cols="30">'.$_SESSION['Request']->Narrative.'</textarea></td>'; + +echo '</table><br />'; + +echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" /></div>'; + +echo '</div></form>'; + +if (!isset($_SESSION['Request']->Location)) { + include('includes/footer.inc'); + exit; +} + +//****************MUESTRO LA TABLA CON LOS REGISTROS DE LA TRANSFERENCIA************************************* +$i = 0; //Line Item Array pointer +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<br /><table class="selection">'; +echo '<tr> + <th colspan="7"><font size="2" color="navy">' . _('Details of Items Requested') . '</font></th> + </tr>'; +echo '<tr> + <th>'. _('Line Number') . '</th> + <th>'. _('Item Code') . '</th> + <th>'. _('Item Description'). '</th> + <th>'. _('Quantity Required'). '</th> + <th>'. _('UOM'). '</th> + </tr>'; + +$k=0; + +foreach ($_SESSION['Request']->LineItems as $LineItems) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + echo '<td>' . $LineItems->LineNumber . '</td> + <td>' . $LineItems->StockID . '</td> + <td>' . $LineItems->ItemDescription . '</td> + <td class="number">' . locale_number_format($LineItems->Quantity, $LineItems->DecimalPlaces) . '</td> + <td>' . $LineItems->UOM . '</td> + <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit='.$LineItems->LineNumber.'">' . _('Edit') . '</a></td> + <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete='.$LineItems->LineNumber.'">' . _('Delete') . '</a></td> + </tr>'; + +} + +echo '</table><br />'; +echo '<div class="centre"><input type="submit" name="Submit" value="' . _('Submit') . '" /></div><br />'; + +echo '<form 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>'; +$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 '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + exit; +} +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>'; +if (isset($_POST['Keywords'])) { + echo '<td><input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" /></td>'; +} else { + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; +} +echo '</tr> + <tr> + <td></td>'; +echo '<td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + +if (isset($_POST['StockCode'])) { + echo '<td><input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" /></td>'; +} else { + echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td>'; +} +echo '</tr></table><br />'; +echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; +echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; +echo '</form>'; + +if (isset($_POST['Search']) or isset($_POST['Next']) or isset($_POST['Prev'])){ + + if ($_POST['Keywords']!='' AND $_POST['StockCode']=='') { + prnMsg ( _('Order Item description has been used in search'), 'warn' ); + } elseif ($_POST['StockCode']!='' AND $_POST['Keywords']=='') { + prnMsg ( _('Stock Code has been used in search'), 'warn' ); + } elseif ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { + prnMsg ( _('Stock Category has been used in search'), 'warn' ); + } + if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { + //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.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.description " . LIKE . " '$SearchString' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + + } elseif (mb_strlen($_POST['StockCode'])>0){ + + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); + $SearchString = '%' . $_POST['StockCode'] . '%'; + + if ($_POST['StockCat']=='All'){ + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + + } else { + if ($_POST['StockCat']=='All'){ + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + } + + if (isset($_POST['Next'])) { + $Offset = $_POST['nextlist']; + } + if (isset($_POST['Prev'])) { + $Offset = $_POST['previous']; + } + if (!isset($Offset) or $Offset<0) { + $Offset=0; + } + $SQL = $SQL . ' LIMIT ' . $_SESSION['DefaultDisplayRecordsMax'].' OFFSET '.($_SESSION['DefaultDisplayRecordsMax']*$Offset); + + $ErrMsg = _('There is a problem selecting the part records to display because'); + $DbgMsg = _('The SQL used to get the part selection was'); + $SearchResult = DB_query($SQL,$db,$ErrMsg, $DbgMsg); + + if (DB_num_rows($SearchResult)==0 ){ + prnMsg (_('There are no products available meeting the criteria specified'),'info'); + } + if (DB_num_rows($SearchResult)<$_SESSION['DisplayRecordsMax']){ + $Offset=0; + } + +} //end of if search +/* display list if there is more than one record */ +if (isset($searchresult) AND !isset($_POST['Select'])) { + echo '<form 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> + <input type="submit" name="Go" value="' . _('Go') . '" /> + <input type="submit" name="Previous" value="' . _('Previous') . '" /> + <input type="submit" name="Next" value="' . _('Next') . '" />'; + 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">'; + 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 =''; + } + + echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> + <td>'.$myrow['description'].'</td> + <td class="number">' . $qoh . '</td> + <td>' . $myrow['units'] . '</td> + <td><a target="_blank" href="' . $rootpath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> + <td>' . $ItemStatus . '</td> + </tr>'; + //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 */ + +if (isset($SearchResult)) { + echo '<br />'; + echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '</div>'; + echo '<br />'; + $j = 1; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="orderform">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="table1">'; + echo '<tr><td> + <input type="hidden" name="previous" value="'.($Offset-1).'" /> + <input tabindex="'.($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<td style="text-align:center" colspan="6"> + <input type="hidden" name="order_items" value="1" /> + <input tabindex="'.($j+9).'" type="submit" value="'._('Add to Requisition').'" /></td>'; + echo '<td> + <input type="hidden" name="nextlist" value="'.($Offset+1).'" /> + <input tabindex="'.($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('On Demand') . '</th> + <th>' . _('On Order') . '</th> + <th>' . _('Available') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; + $ImageSource = _('No Image'); + + $k=0; //row colour counter + $i=0; + while ($myrow=DB_fetch_array($SearchResult)) { + if ($myrow['decimalplaces']=='') { + $DecimalPlacesSQL="SELECT decimalplaces + FROM stockmaster + WHERE stockid='" .$myrow['stockid'] . "'"; + $DecimalPlacesResult = DB_query($DecimalPlacesSQL, $db); + $DecimalPlacesRow = DB_fetch_array($DecimalPlacesResult); + $DecimalPlaces = $DecimalPlacesRow['decimalplaces']; + } else { + $DecimalPlaces=$myrow['decimalplaces']; + } + + $QOHSQL = "SELECT sum(locstock.quantity) AS qoh + FROM locstock + WHERE locstock.stockid='" .$myrow['stockid'] . "' AND + loccode = '" . $_SESSION['Request']->Location . "'"; + $QOHResult = DB_query($QOHSQL,$db); + $QOHRow = DB_fetch_array($QOHResult); + $QOH = $QOHRow['qoh']; + + // Find the quantity on outstanding sales orders + $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem + FROM salesorderdetails, + salesorders + WHERE salesorders.orderno = salesorderdetails.orderno AND + salesorders.fromstkloc='" . $_SESSION['Request']->Location . "' AND + salesorderdetails.completed=0 AND + salesorders.quotation=0 AND + salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; + $ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Request']->Location . ' ' . _('cannot be retrieved because'); + $DemandResult = DB_query($sql,$db,$ErrMsg); + + $DemandRow = DB_fetch_row($DemandResult); + if ($DemandRow[0] != null){ + $DemandQty = $DemandRow[0]; + } else { + $DemandQty = 0; + } + + // Find the quantity on purchase orders + $sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd)*purchorderdetails.conversionfactor AS dem + FROM purchorderdetails LEFT JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno + WHERE purchorderdetails.completed=0 + AND purchorders.status<>'Cancelled' + AND purchorders.status<>'Rejected' + AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'"; + + $ErrMsg = _('The order details for this product cannot be retrieved because'); + $PurchResult = DB_query($sql,$db,$ErrMsg); + + $PurchRow = DB_fetch_row($PurchResult); + if ($PurchRow[0]!=null){ + $PurchQty = $PurchRow[0]; + } else { + $PurchQty = 0; + } + + // Find the quantity on works orders + $sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm + FROM woitems + WHERE stockid='" . $myrow['stockid'] ."'"; + $ErrMsg = _('The order details for this product cannot be retrieved because'); + $WoResult = DB_query($sql,$db,$ErrMsg); + + $WoRow = DB_fetch_row($WoResult); + if ($WoRow[0]!=null){ + $WoQty = $WoRow[0]; + } else { + $WoQty = 0; + } + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + $OnOrder = $PurchQty + $WoQty; + $Available = $QOH - $DemandQty + $OnOrder; + echo '<td>'.$myrow['stockid'].'</font></td> + <td>'.$myrow['description'].'</td> + <td>'.$myrow['stockunits'].'</td> + <td class="number">'.locale_number_format($QOH,$DecimalPlaces).'</td> + <td class="number">'.locale_number_format($DemandQty,$DecimalPlaces).'</td> + <td class="number">'.locale_number_format($OnOrder, $DecimalPlaces).'</td> + <td class="number">'.locale_number_format($Available,$DecimalPlaces).'</td> + <td><font size="1"><input class="number" tabindex="'.($j+7).'" type="text" size="6" name="Quantity'.$i.'" value="0" /> + <input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" /> + </td> + </tr>'; + echo '<input type="hidden" name="DecimalPlaces'.$i.'" value="' . $myrow['decimalplaces'] . '" />'; + echo '<input type="hidden" name="ItemDescription'.$i.'" value="' . $myrow['description'] . '" />'; + echo '<input type="hidden" name="Units'.$i.'" value="' . $myrow['stockunits'] . '" />'; + if ($j==1) { + $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; + } + $i++; +#end of page full new headings if + } +#end of while loop + echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /> + <input tabindex="'.($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<td style="text-align:center" colspan="6"><input type="hidden" name="order_items" value="1" /> + <input tabindex="'.($j+8).'" type="submit" value="'._('Add to Requisition').'" /></td>'; + echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /> + <input tabindex="'.($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td><tr/>'; + echo '</table></form>'; + echo $jsCall; + +}#end if SearchResults to show + +//********************************************************************************************************* +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php (rev 0) +++ trunk/InternalStockRequestAuthorisation.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,111 @@ +<?php + +/* $Id$*/ + +include('includes/session.inc'); + +$title = _('Authorise Internal Stock Requests'); + +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; + +$emailsql="SELECT email FROM www_users WHERE userid='".$_SESSION['UserID']."'"; +$emailresult=DB_query($emailsql, $db); +$emailrow=DB_fetch_array($emailresult); + +if (isset($_POST['updateall'])) { + foreach ($_POST as $key => $value) { + if (mb_substr($key,0,6)=='status') { + $RequestNo=mb_substr($key,6); + $sql="UPDATE stockrequest + SET authorised='1' + WHERE dispatchid='".$RequestNo."'"; + $result=DB_query($sql, $db); + } + } +} + +/* Retrieve the requisition header information + */ +$sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest + LEFT JOIN departments + ON stockrequest.departmentid=departments.departmentid + LEFT JOIN locations + ON stockrequest.loccode=locations.loccode + LEFT JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=0 + AND stockrequest.closed=0 + AND www_users.userid='".$_SESSION['UserID']."'"; +$result=DB_query($sql, $db); + +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; + +/* Create the table for the purchase order header */ +echo '<tr> + <th>'._('Request Number').'</th> + <th>'._('Department').'</th> + <th>'._('Location Of Stock').'</th> + <th>'._('Requested Date').'</th> + <th>'._('Narrative').'</th> + <th>'._('Authorise').'</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + + echo '<tr> + <td>'.$myrow['dispatchid'].'</td> + <td>'.$myrow['description'].'</td> + <td>'.$myrow['locationname'].'</td> + <td>'.ConvertSQLDate($myrow['despatchdate']).'</td> + <td>'.$myrow['narrative'].'</td> + <td><input type="checkbox" name="status'.$myrow['dispatchid'].'" /></td> + </tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity + FROM stockrequestitems + LEFT JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "'"; + $lineresult=DB_query($linesql, $db); + + echo '<tr> + <td></td> + <td colspan="5" align="left"> + <table class="selection" align="left"> + <tr> + <th>'._('Product').'</th> + <th>'._('Quantity Required').'</th> + <th>'._('Units').'</th> + </tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr> + <td>'.$linerow['description'].'</td> + <td class="number">'.locale_number_format($linerow['quantity'],$linerow['decimalplaces']).'</td> + <td>'.$linerow['uom'].'</td> + </tr>'; + } // end while order line detail + echo '</table> + </td> + </tr>'; +} //end while header loop +echo '</table>'; +echo '<br /><div class="centre"><input type="submit" name="updateall" value="' . _('Update'). '" /></form>'; + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php (rev 0) +++ trunk/InternalStockRequestFulfill.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,343 @@ +<?php + +$PageSecurity=1; + +include('includes/session.inc'); + +$title = _('Fulfill Stock Requests'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . + ' ' . _('Fulfill Stock Requests') . '</p>'; + +if (isset($_POST['UpdateAll'])) { + foreach ($_POST as $key => $value) { + if (mb_strpos($key,'Qty')) { + $RequestID = mb_substr($key,0, mb_strpos($key,'Qty')); + $LineID = mb_substr($key,mb_strpos($key,'Qty')+3); + $Quantity = $_POST[$RequestID.'Qty'.$LineID]; + $StockID = $_POST[$RequestID.'StockID'.$LineID]; + $Location = $_POST[$RequestID.'Location'.$LineID]; + $Tag = $_POST[$RequestID.'Tag'.$LineID]; + $RequestedQuantity = $_POST[$RequestID.'RequestedQuantity'.$LineID]; + if (isset($_POST[$RequestID.'Completed'.$LineID])) { + $Completed=True; + } else { + $Completed=False; + } + + $sql="SELECT materialcost, labourcost, overheadcost FROM stockmaster WHERE stockid='".$StockID."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + + $Narrative = _('Issue') . ' ' . $Quantity . ' ' . _('of') . ' '. $StockID . ' ' . _('to department'); + + $AdjustmentNumber = GetNextTransNo(17,$db); + $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); + $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); + + $Result = DB_Txn_Begin($db); + + // Need to get the current location quantity will need it later for the stock movement + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $StockID . "' + AND loccode= '" . $Location . "'"; + $Result = DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + // There must actually be some error this should never happen + $QtyOnHandPrior = 0; + } + + if ($_SESSION['ProhibitNegativeStock']==0 or ($_SESSION['ProhibitNegativeStock']==1 and $QtyOnHandPrior>=$Quantity)) { + + $SQL = "INSERT INTO stockmoves ( + stockid, + type, + transno, + loccode, + trandate, + prd, + reference, + qty, + newqoh) + VALUES ( + '" . $StockID . "', + 17, + '" . $AdjustmentNumber . "', + '" . $Location . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $Narrative ."', + '" . -$Quantity . "', + '" . ($QtyOnHandPrior - $Quantity) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); + $DbgMsg = _('The following SQL to insert the stock movement record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + $SQL="UPDATE stockrequestitems + SET qtydelivered=qtydelivered+".$Quantity." + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + + $SQL = "UPDATE locstock SET quantity = quantity - '" . $Quantity . "' + WHERE stockid='" . $StockID . "' + AND loccode='" . $Location . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $StandardCost > 0){ + + $StockGLCodes = GetStockGLCode($StockID,$db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" .$AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['issueglact'] . "', + '" . $StandardCost * -($Quantity) . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" . $AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['stockact'] . "', + '" . $StandardCost * $Quantity . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + if (($Quantity>=$RequestedQuantity) or $Completed==True) { + $SQL="UPDATE stockrequestitems + SET completed=1 + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + $Result = DB_Txn_Commit($db); + + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('has been created from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity ; + prnMsg( $ConfirmationText,'success'); + + if ($_SESSION['InventoryManagerEmail']!=''){ + $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); + $EmailSubject = _('Stock adjustment for'). ' ' . $StockID; + mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); + } + } else { + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity . ' ' . _('cannot be created as there is insufficient stock and your system is configured to not allow negative stocks'); + prnMsg( $ConfirmationText,'warn'); + } + } +} + +// Check if request can be closed and close if done. +if (isset($RequestID)) { + $SQL="SELECT dispatchid + FROM stockrequestitems + WHERE dispatchid='".$RequestID."' + AND completed=0"; + $Result=DB_query($SQL, $db); + if (DB_num_rows($Result)==0) { + $SQL="UPDATE stockrequest + SET closed=1 + WHERE dispatchid='".$RequestID."'"; + $Result=DB_query($SQL, $db); + } +} + +if (!isset($_POST['Location'])) { + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + echo '<td>' . _('Choose a location to issue requests from') . '</td> + <td><select name="Location">'; + $sql = "SELECT loccode, locationname FROM locations"; + $resultStkLocs = DB_query($sql,$db); + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_SESSION['Adjustment']->StockLocation)){ + if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + $_POST['StockLocation']=$myrow['loccode']; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } + echo '</select></td></tr>'; + echo '</table><br />'; + echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; + include('includes/footer.inc'); + exit; +} + +/* Retrieve the requisition header information + */ +if (isset($_POST['Location'])) { + $sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest + LEFT JOIN departments + ON stockrequest.departmentid=departments.departmentid + LEFT JOIN locations + ON stockrequest.loccode=locations.loccode + LEFT JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=1 + AND stockrequest.closed=0 + AND stockrequest.loccode='".$_POST['Location']."'"; + $result=DB_query($sql, $db); + + if (DB_num_rows($result)==0) { + prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); + echo '<br />'; + echo '<div class="centre"><a href="' . $_SESSION['FormID'] . '">' . _('Select another location') . '</a></div>'; + include('includes/footer.inc'); + exit; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + + /* Create the table for the purchase order header */ + echo '<th>'._('Request Number').'</th>'; + echo '<th>'._('Department').'</th>'; + echo '<th>'._('Location Of Stock').'</th>'; + echo '<th>'._('Requested Date').'</th>'; + echo '<th>'._('Narrative').'</th>'; + echo '</tr>'; + + while ($myrow=DB_fetch_array($result)) { + + echo '<tr>'; + echo '<td>'.$myrow['dispatchid'].'</td>'; + echo '<td>'.$myrow['description'].'</td>'; + echo '<td>'.$myrow['locationname'].'</td>'; + echo '<td>'.ConvertSQLDate($myrow['despatchdate']).'</td>'; + echo '<td>'.$myrow['narrative'].'</td>'; + echo '</tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.dispatchid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity, + stockrequestitems.qtydelivered + FROM stockrequestitems + LEFT JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "' + AND completed=0"; + $lineresult=DB_query($linesql, $db); + + echo '<tr><td></td><td colspan="5" align="left"><table class="selection" align="left">'; + echo '<th>'._('Product').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Required').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Delivered').'</th>'; + echo '<th>'._('Units').'</th>'; + echo '<th>'._('Completed').'</th>'; + echo '<th>'._('Tag').'</th>'; + echo '</tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr>'; + echo '<td>'.$linerow['description'].'</td>'; + echo '<td class="number">'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'</td>'; + echo '<td class="number"> + <input type="text" class="number" name="'. $linerow['dispatchid'] . 'Qty'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" /> + </td>'; + echo '<td>'.$linerow['uom'].'</td>'; + echo '<td><input type="checkbox" name="'. $linerow['dispatchid'] . 'Completed'. $linerow['dispatchitemsid'] . '" /></td>'; + //Select the tag + echo '<td><select name="'. $linerow['dispatchid'] . 'Tag'. $linerow['dispatchitemsid'] . '">'; + + $SQL = "SELECT tagref, + tagdescription + FROM tags + ORDER BY tagref"; + + $TagResult=DB_query($SQL,$db); + echo '<option value=0>0 - None</option>'; + while ($mytagrow=DB_fetch_array($TagResult)){ + if (isset($_SESSION['Adjustment']->tag) and $_SESSION['Adjustment']->tag==$mytagrow['tagref']){ + echo '<option selected="True" value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; + } else { + echo '<option value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$mytagrow['tagdescription'] . '</option>'; + } + } + echo '</select></td>'; +// End select tag + echo '</tr>'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'StockID'. $linerow['dispatchitemsid'] . '" value="'.$linerow['stockid'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'Location'. $linerow['dispatchitemsid'] . '" value="'.$_POST['Location'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'RequestedQuantity'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" />'; + } // end while order line detail + echo '</table></td></tr>'; + } //end while header loop + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; +} + +include('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-02-25 23:23:53 UTC (rev 4972) +++ trunk/StockCategories.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -7,9 +7,7 @@ include('includes/header.inc'); -echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . $title . ' - </p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); @@ -57,102 +55,110 @@ if (!is_numeric(filter_number_format($_POST['PropMinimum' .$i]))){ $InputError = 1; prnMsg(_('The minimum value is expected to be a numeric value'),'error'); - } - if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){ + } + if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){ $InputError = 1; prnMsg(_('The maximum value is expected to be a numeric value'),'error'); - } + } } } //check the properties are sensible - if ($SelectedCategory AND $InputError !=1) { + if (isset($SelectedCategory) AND $InputError !=1) { /*SelectedCategory could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ $sql = "UPDATE stockcategory SET stocktype = '" . $_POST['StockType'] . "', - categorydescription = '" . $_POST['CategoryDescription'] . "', - stockact = " . $_POST['StockAct'] . ", - adjglact = " . $_POST['AdjGLAct'] . ", - purchpricevaract = " . $_POST['PurchPriceVarAct'] . ", - materialuseagevarac = " . $_POST['MaterialUseageVarAc'] . ", - wipact = " . $_POST['WIPAct'] . " - WHERE - categoryid = '$SelectedCategory'"; - $ErrMsg = _('Could not update the stock category') . $_POST['CategoryDescription'] . _('because'); - $result = DB_query($sql,$db,$ErrMsg); + categorydescription = '" . $_POST['CategoryDescription'] . "', + stockact = " . $_POST['StockAct'] . ", + adjglact = " . $_POST['AdjGLAct'] . ", + issueglact = " . $_POST['IssueGLAct'] . ", + purchpricevaract = " . $_POST['PurchPriceVarAct'] . ", + materialuseagevarac = " . $_POST['MaterialUseageVarAc'] . ", + wipact = " . $_POST['WIPAct'] . " + WHERE + categoryid = '$SelectedCategory'"; + $ErrMsg = _('Could not update the stock category') . $_POST['CategoryDescription'] . _('because'); + $result = DB_query($sql,$db,$ErrMsg); - for ($i=0;$i<=$_POST['PropertyCounter'];$i++){ + if ($_POST['PropertyCounter']==0 and $_POST['PropLabel0']!='') { + $_POST['PropertyCounter']=0; + } - if (isset($_POST['PropReqSO' .$i]) and $_POST['PropReqSO' .$i] == true){ - $_POST['PropReqSO' .$i] =1; - } else { - $_POST['PropReqSO' .$i] =0; - } - if (isset($_POST['PropNumeric' .$i]) and $_POST['PropNumeric' .$i] == true){ - $_POST['PropNumeric' .$i] =1; - } else { - $_POST['PropNumeric' .$i] =0; - } - if ($_POST['PropID' .$i] =='NewProperty' AND mb_strlen($_POST['PropLabel'.$i])>0){ - $sql = "INSERT INTO stockcatproperties (categoryid, - label, - controltype, - defaultvalue, - minimumvalue, - maximumvalue, - numericvalue, - reqatsalesorder) - VALUES ('" . $SelectedCategory . "', - '" . $_POST['PropLabel' . $i] . "', - " . $_POST['PropControlType' . $i] . ", - '" . $_POST['PropDefault' .$i] . "', - '" . filter_number... [truncated message content] |
From: <tim...@us...> - 2012-02-26 09:19:48
|
Revision: 4973 http://web-erp.svn.sourceforge.net/web-erp/?rev=4973&view=rev Author: tim_schofield Date: 2012-02-26 09:19:38 +0000 (Sun, 26 Feb 2012) Log Message: ----------- New functionality for internal stock requests Modified Paths: -------------- trunk/StockCategories.php trunk/UpgradeDatabase.php trunk/includes/ConnectDB.inc trunk/includes/MainMenuLinksArray.php trunk/includes/SQL_CommonFunctions.inc trunk/sql/mysql/upgrade4.07-4.08.sql Added Paths: ----------- trunk/Departments.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/includes/DefineStockRequestClass.php Added: trunk/Departments.php =================================================================== --- trunk/Departments.php (rev 0) +++ trunk/Departments.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,261 @@ +<?php +/* $Id: UnitsOfMeasure.php 4567 2011-05-15 04:34:49Z daintree $*/ + +include('includes/session.inc'); + +$title = _('Departments'); + +include('includes/header.inc'); +echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . + _('Top Sales Order Search') . '" alt="" />' . ' ' . $title . '</p>'; + +if ( isset($_GET['SelectedDepartmentID']) ) + $SelectedDepartmentID = $_GET['SelectedDepartmentID']; +elseif (isset($_POST['SelectedDepartmentID'])) + $SelectedDepartmentID = $_POST['SelectedDepartmentID']; + +if (isset($_POST['Submit'])) { + + //initialise no input errors assumed initially before we test + + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + + //first off validate inputs sensible + + if (strpos($_POST['DepartmentName'],'&')>0 OR strpos($_POST['DepartmentName'],"'")>0) { + $InputError = 1; + prnMsg( _('The description of the department must not contain the character') . " '&' " . _('or the character') ." '",'error'); + } + if (trim($_POST['DepartmentName']) == '') { + $InputError = 1; + prnMsg( _('The Name of the Department should not be empty'), 'error'); + } + + if (isset($_POST['SelectedDepartmentID']) AND $_POST['SelectedDepartmentID']!='' AND $InputError !=1) { + + + /*SelectedDepartmentID could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ + // Check the name does not clash + $sql = "SELECT count(*) FROM departments + WHERE departmentid <> '" . $SelectedDepartmentID ."' + AND description ".LIKE." '" . $_POST['DepartmentName'] . "'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ( $myrow[0] > 0 ) { + $InputError = 1; + prnMsg( _('This department name already exists.'),'error'); + } else { + // Get the old name and check that the record still exist neet to be very carefull here + // idealy this is one of those sets that should be in a stored procedure simce even the checks are + // relavant + $sql = "SELECT description FROM departments + WHERE departmentid = '" . $SelectedDepartmentID . "'"; + $result = DB_query($sql,$db); + if ( DB_num_rows($result) != 0 ) { + // This is probably the safest way there is + $myrow = DB_fetch_row($result); + $OldDepartmentName = $myrow[0]; + $sql = array(); + $sql[] = "UPDATE departments + SET description='" . $_POST['DepartmentName'] . "', + authoriser='" . $_POST['Authoriser'] . "' + WHERE description ".LIKE." '".$OldDepartmentName."'"; + } else { + $InputError = 1; + prnMsg( _('The Department does not exist.'),'error'); + } + } + $msg = _('The department has been modified'); + } elseif ($InputError !=1) { + /*SelectedDepartmentID is null cos no item selected on first time round so must be adding a record*/ + $sql = "SELECT count(*) FROM departments + WHERE description " .LIKE. " '".$_POST['DepartmentName'] ."'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ( $myrow[0] > 0 ) { + $InputError = 1; + prnMsg( _('There is already a Department with the specified name.'),'error'); + } else { + $sql = "INSERT INTO departments ( + description, + authoriser ) + VALUES ( + '" . $_POST['DepartmentName'] ."', + '" . $_POST['Authoriser'] ."' + )"; + } + $msg = _('The new department has been created'); + } + + if ($InputError!=1){ + //run the SQL from either of the above possibilites + if (is_array($sql)) { + $result = DB_Txn_Begin($db); + $tmpErr = _('The department could not be inserted'); + $tmpDbg = _('The sql that failed was') . ':'; + foreach ($sql as $stmt ) { + $result = DB_query($stmt,$db, $tmpErr,$tmpDbg,true); + if(!$result) { + $InputError = 1; + break; + } + } + if ($InputError!=1){ + $result = DB_Txn_Commit($db); + } else { + $result = DB_Txn_Rollback($db); + } + } else { + $result = DB_query($sql,$db); + } + prnMsg($msg,'success'); + } + unset ($SelectedDepartmentID); + unset ($_POST['SelectedDepartmentID']); + unset ($_POST['DepartmentName']); + +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button +// PREVENT DELETES IF DEPENDENT RECORDS IN 'stockmaster' + // Get the original name of the unit of measure the ID is just a secure way to find the unit of measure + $sql = "SELECT description FROM departments + WHERE departmentid = '" . $SelectedDepartmentID . "'"; + $result = DB_query($sql,$db); + if ( DB_num_rows($result) == 0 ) { + // This is probably the safest way there is + prnMsg( _('You cannot delete this Department'),'warn'); + } else { + $myrow = DB_fetch_row($result); + $OldDepartmentName = $myrow[0]; + $sql= "SELECT COUNT(*) FROM dispatch,departments WHERE dispatch.departmentid=departments.departmentid and description ".LIKE." '" . $OldDepartmentName . "'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + prnMsg( _('You cannot delete this Department'),'warn'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('There are items related to this department'); + } else { + $sql="DELETE FROM departments WHERE description ".LIKE."'" . $OldDepartmentName . "'"; + $result = DB_query($sql,$db); + prnMsg( $OldDepartmentName . ' ' . _('The department has been removed') . '!','success'); + } + } //end if account group used in GL accounts + unset ($SelectedDepartmentID); + unset ($_GET['SelectedDepartmentID']); + unset($_GET['delete']); + unset ($_POST['SelectedDepartmentID']); + unset ($_POST['DepartmentID']); + unset ($_POST['DepartmentName']); +} + + if (!isset($SelectedDepartmentID)) { + +/* An unit of measure could be posted when one has been edited and is being updated + or GOT when selected for modification + SelectedDepartmentID will exist because it was sent with the page in a GET . + If its the first time the page has been displayed with no parameters + then none of the above are true and the list of account groups will be displayed with + links to delete or edit each. These will call the same page again and allow update/input + or deletion of the records*/ + + $sql = "SELECT departmentid, + description, + authoriser + FROM departments + ORDER BY departmentid"; + + $ErrMsg = _('There are no departments created'); + $result = DB_query($sql,$db,$ErrMsg); + + echo '<table class="selection"> + <tr> + <th>' . _('Department Name') . '</th> + <th>' . _('Authoriser') . '</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++; + } + + echo '<td>' . $myrow['description'] . '</td>'; + echo '<td>' . $myrow['authoriser'] . '</td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '">' . _('Edit') . '</a></td>'; + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1">' . _('Delete') .'</a></td>'; + echo '</tr>'; + + } //END WHILE LIST LOOP + echo '</table>'; +} //end of ifs and buts! + + +if (isset($SelectedDepartmentID)) { + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('View all Departments') . '</a></div>'; +} + +echo '<br />'; + +if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($SelectedDepartmentID)) { + //editing an existing section + + $sql = "SELECT departmentid, + description + FROM departments + WHERE departmentid='" . $SelectedDepartmentID . "'"; + + $result = DB_query($sql, $db); + if ( DB_num_rows($result) == 0 ) { + prnMsg( _('The selected departemnt could not be found.'),'warn'); + unset($SelectedDepartmentID); + } else { + $myrow = DB_fetch_array($result); + + $_POST['DepartmentID'] = $myrow['departmentid']; + $_POST['DepartmentName'] = $myrow['description']; + + echo '<input type="hidden" name="SelectedDepartmentID" value="' . $_POST['DepartmentID'] . '" />'; + echo '<table class="selection">'; + } + + } else { + $_POST['DepartmentName']=''; + echo '<table class="selection">'; + } + echo '<tr> + <td>' . _('Department Name') . ':' . '</td> + <td><input type="text" name="DepartmentName" size="50" maxlength="100" value="' . $_POST['DepartmentName'] . '" /></td> + </tr>'; + echo '<tr><td>'._('Authoriser').'</td><td><select name="Authoriser">'; + $usersql="SELECT userid FROM www_users"; + $userresult=DB_query($usersql,$db); + while ($myrow=DB_fetch_array($userresult)) { + if ($myrow['userid']==$UserID) { + echo '<option selected="True" value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } else { + echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; + } + } + echo '</select></td></tr>'; + echo '</table><br />'; + + echo '<div class="centre"><input type="submit" name="Submit" value="' . _('Enter Information') . '" /></div>'; + + echo '</form>'; + +} //end if record deleted no point displaying form to add record + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php (rev 0) +++ trunk/InternalStockRequest.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,682 @@ +<?php + +/* $Id: StockTransfers.php 4576 2011-05-27 10:59:20Z daintree $*/ + +include('includes/DefineStockRequestClass.php'); + +include('includes/session.inc'); +$title = _('Create an Internal Materials Request'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_GET['New'])) { + unset($_SESSION['Transfer']); + $_SESSION['Request'] = new StockRequest(); +} + +if (isset($_POST['Update'])) { + $InputError=0; + if ($_POST['Department']=='') { + prnMsg( _('You must select a Department for the request'), 'error'); + $InputError=1; + } + if ($_POST['Location']=='') { + prnMsg( _('You must select a Location to request the items from'), 'error'); + $InputError=1; + } + if ($InputError==0) { + $_SESSION['Request']->Department=$_POST['Department']; + $_SESSION['Request']->Location=$_POST['Location']; + $_SESSION['Request']->DispatchDate=$_POST['DispatchDate']; + $_SESSION['Request']->Narrative=$_POST['Narrative']; + } +} + +if (isset($_POST['Edit'])) { + $_SESSION['Request']->LineItems[$_POST['LineNumber']]->Quantity=$_POST['Quantity']; +} + +if (isset($_GET['Delete'])) { + unset($_SESSION['Request']->LineItems[$_GET['Delete']]); + echo '<br />'; + prnMsg( _('The line was successfully deleted'), 'success'); + echo '<br />'; +} + +foreach ($_POST as $key => $value) { + if (mb_strstr($key,'StockID')) { + $Index=mb_substr($key, 7); + if (filter_number_format($_POST['Quantity'.$Index])>0) { + $StockID=$value; + $ItemDescription=$_POST['ItemDescription'.$Index]; + $DecimalPlaces=$_POST['DecimalPlaces'.$Index]; + $NewItem_array[$StockID] = filter_number_format($_POST['Quantity'.$Index]); + $_POST['Units'.$StockID]=$_POST['Units'.$Index]; + $_SESSION['Request']->AddLine($StockID, $ItemDescription, $NewItem_array[$StockID], $_POST['Units'.$StockID], $DecimalPlaces); + } + } +} + +if (isset($_POST['Submit'])) { + DB_Txn_Begin($db); + $InputError=0; + if ($_SESSION['Request']->Department=='') { + prnMsg( _('You must select a Department for the request'), 'error'); + $InputError=1; + } + if ($_SESSION['Request']->Location=='') { + prnMsg( _('You must select a Location to request the items from'), 'error'); + $InputError=1; + } + if ($InputError==0) { + $RequestNo = GetNextTransNo(38, $db); + $HeaderSQL="INSERT INTO stockrequest (dispatchid, + loccode, + departmentid, + despatchdate, + narrative) + VALUES( + '" . $RequestNo . "', + '" . $_SESSION['Request']->Location . "', + '" . $_SESSION['Request']->Department . "', + '" . FormatDateForSQL($_SESSION['Request']->DispatchDate) . "', + '" . $_SESSION['Request']->Narrative . "' + )"; + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The request header record could not be inserted because'); + $DbgMsg = _('The following SQL to insert the request header record was used'); + $Result = DB_query($HeaderSQL,$db,$ErrMsg,$DbgMsg,true); + + foreach ($_SESSION['Request']->LineItems as $LineItems) { + $LineSQL="INSERT INTO stockrequestitems (dispatchitemsid, + dispatchid, + stockid, + quantity, + decimalplaces, + uom) + VALUES( + '".$LineItems->LineNumber."', + '".$RequestNo."', + '".$LineItems->StockID."', + '".$LineItems->Quantity."', + '".$LineItems->DecimalPlaces."', + '".$LineItems->UOM."' + )"; + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The request line record could not be inserted because'); + $DbgMsg = _('The following SQL to insert the request header record was used'); + $Result = DB_query($LineSQL,$db,$ErrMsg,$DbgMsg,true); + + } + + } + DB_Txn_Commit($db); + prnMsg( _('The internal stock request has been entered and now needs to be authorised'), 'success'); + echo '<br /><div class="centre"><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?New=Yes">' . _('Create another request') . '</a></div>'; + include('includes/footer.inc'); + unset($_SESSION['Request']); + exit; +} + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Dispatch') . + '" alt="" />' . ' ' . $title . '</p>'; + +if (isset($_GET['Edit'])) { + 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">'; + echo '<tr> + <th colspan="2"><font size="2" color="navy">' . _('Edit the Request Line') . '</font></th> + </tr>'; + echo '<tr> + <td>' . _('Line number') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->LineNumber . '</td> + </tr>'; + echo '<tr> + <td>' . _('Stock Code') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->StockID . '</td> + </tr>'; + echo '<tr> + <td>' . _('Item Description') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->ItemDescription . '</td> + </tr>'; + echo '<tr> + <td>' . _('Unit of Measure') . '</td> + <td>' . $_SESSION['Request']->LineItems[$_GET['Edit']]->UOM . '</td> + </tr>'; + echo '<tr> + <td>' . _('Quantity Requested') . '</td> + <td><input type="text" class="number" name="Quantity" value="' . locale_number_format($_SESSION['Request']->LineItems[$_GET['Edit']]->Quantity, $_SESSION['Request']->LineItems[$_GET['Edit']]->DecimalPlaces) . '" /></td> + </tr>'; + echo '<input type="hidden" name="LineNumber" value="' . $_SESSION['Request']->LineItems[$_GET['Edit']]->LineNumber . '" />'; + echo '</table><br />'; + echo '<div class="centre"><input type="submit" name="Edit" value="' . _('Update Line') . '" /></div></form>'; + include('includes/footer.inc'); + exit; +} + +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">'; +echo '<tr> + <th colspan="2"><font color="navy" size="2">' . _('Internal Stock Request Details') . '</font></th> + </tr>'; +echo '<tr> + <td>' . _('Department') . ':</td>'; + +$sql="SELECT departmentid, + description + FROM departments + 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>'; + } else { + echo '<option value="' . $myrow['departmentid'] . '">' . $myrow['departmentid'].' - ' .htmlentities($myrow['description'], ENT_QUOTES,'UTF-8').'</option>'; + } +} +echo '</select></td></tr>'; + +echo '<tr> + <td>' . _('Location from which to request stock') . ':</td>'; +$sql="SELECT loccode, + locationname + FROM locations + ORDER BY locationname"; + +$result=DB_query($sql, $db); +echo '<td><select name="Location">'; +echo '<option value="">' . _('Select a Location') . '</option>'; +while ($myrow=DB_fetch_array($result)){ + if (isset($_SESSION['Request']->Location) and $_SESSION['Request']->Location==$myrow['loccode']){ + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['loccode'].' - ' .htmlentities($myrow['locationname'], ENT_QUOTES,'UTF-8').'</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['loccode'].' - ' .htmlentities($myrow['locationname'], ENT_QUOTES,'UTF-8').'</option>'; + } +} +echo '</select></td></tr>'; + +echo '<tr> + <td>' . _('Date when required') . ':</td>'; +echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="DispatchDate" maxlength="10" size="11" value="' . $_SESSION['Request']->DispatchDate . '" /></td>'; + +echo '<tr><td>' . _('Narrative') . ':</td>'; +echo '<td><textarea name="Narrative" cols="30">'.$_SESSION['Request']->Narrative.'</textarea></td>'; + +echo '</table><br />'; + +echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" /></div>'; + +echo '</div></form>'; + +if (!isset($_SESSION['Request']->Location)) { + include('includes/footer.inc'); + exit; +} + +//****************MUESTRO LA TABLA CON LOS REGISTROS DE LA TRANSFERENCIA************************************* +$i = 0; //Line Item Array pointer +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<br /><table class="selection">'; +echo '<tr> + <th colspan="7"><font size="2" color="navy">' . _('Details of Items Requested') . '</font></th> + </tr>'; +echo '<tr> + <th>'. _('Line Number') . '</th> + <th>'. _('Item Code') . '</th> + <th>'. _('Item Description'). '</th> + <th>'. _('Quantity Required'). '</th> + <th>'. _('UOM'). '</th> + </tr>'; + +$k=0; + +foreach ($_SESSION['Request']->LineItems as $LineItems) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + echo '<td>' . $LineItems->LineNumber . '</td> + <td>' . $LineItems->StockID . '</td> + <td>' . $LineItems->ItemDescription . '</td> + <td class="number">' . locale_number_format($LineItems->Quantity, $LineItems->DecimalPlaces) . '</td> + <td>' . $LineItems->UOM . '</td> + <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Edit='.$LineItems->LineNumber.'">' . _('Edit') . '</a></td> + <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete='.$LineItems->LineNumber.'">' . _('Delete') . '</a></td> + </tr>'; + +} + +echo '</table><br />'; +echo '<div class="centre"><input type="submit" name="Submit" value="' . _('Submit') . '" /></div><br />'; + +echo '<form 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>'; +$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 '<br /><a href="' . $rootpath . '/StockCategories.php">' . _('Define Stock Categories') . '</a>'; + exit; +} +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>'; +if (isset($_POST['Keywords'])) { + echo '<td><input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" /></td>'; +} else { + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; +} +echo '</tr> + <tr> + <td></td>'; +echo '<td><font size="3"><b>' . _('OR') . ' ' . '</b></font>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; + +if (isset($_POST['StockCode'])) { + echo '<td><input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" size="15" maxlength="18" /></td>'; +} else { + echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td>'; +} +echo '</tr></table><br />'; +echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; +echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; +echo '</form>'; + +if (isset($_POST['Search']) or isset($_POST['Next']) or isset($_POST['Prev'])){ + + if ($_POST['Keywords']!='' AND $_POST['StockCode']=='') { + prnMsg ( _('Order Item description has been used in search'), 'warn' ); + } elseif ($_POST['StockCode']!='' AND $_POST['Keywords']=='') { + prnMsg ( _('Stock Code has been used in search'), 'warn' ); + } elseif ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { + prnMsg ( _('Stock Category has been used in search'), 'warn' ); + } + if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { + //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.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.description " . LIKE . " '$SearchString' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + + } elseif (mb_strlen($_POST['StockCode'])>0){ + + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); + $SearchString = '%' . $_POST['StockCode'] . '%'; + + if ($_POST['StockCat']=='All'){ + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + + } else { + if ($_POST['StockCat']=='All'){ + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units as stockunits, + stockmaster.decimalplaces + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; + } + } + + if (isset($_POST['Next'])) { + $Offset = $_POST['nextlist']; + } + if (isset($_POST['Prev'])) { + $Offset = $_POST['previous']; + } + if (!isset($Offset) or $Offset<0) { + $Offset=0; + } + $SQL = $SQL . ' LIMIT ' . $_SESSION['DefaultDisplayRecordsMax'].' OFFSET '.($_SESSION['DefaultDisplayRecordsMax']*$Offset); + + $ErrMsg = _('There is a problem selecting the part records to display because'); + $DbgMsg = _('The SQL used to get the part selection was'); + $SearchResult = DB_query($SQL,$db,$ErrMsg, $DbgMsg); + + if (DB_num_rows($SearchResult)==0 ){ + prnMsg (_('There are no products available meeting the criteria specified'),'info'); + } + if (DB_num_rows($SearchResult)<$_SESSION['DisplayRecordsMax']){ + $Offset=0; + } + +} //end of if search +/* display list if there is more than one record */ +if (isset($searchresult) AND !isset($_POST['Select'])) { + echo '<form 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> + <input type="submit" name="Go" value="' . _('Go') . '" /> + <input type="submit" name="Previous" value="' . _('Previous') . '" /> + <input type="submit" name="Next" value="' . _('Next') . '" />'; + 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">'; + 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 =''; + } + + echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> + <td>'.$myrow['description'].'</td> + <td class="number">' . $qoh . '</td> + <td>' . $myrow['units'] . '</td> + <td><a target="_blank" href="' . $rootpath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> + <td>' . $ItemStatus . '</td> + </tr>'; + //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 */ + +if (isset($SearchResult)) { + echo '<br />'; + echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '</div>'; + echo '<br />'; + $j = 1; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="orderform">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="table1">'; + echo '<tr><td> + <input type="hidden" name="previous" value="'.($Offset-1).'" /> + <input tabindex="'.($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<td style="text-align:center" colspan="6"> + <input type="hidden" name="order_items" value="1" /> + <input tabindex="'.($j+9).'" type="submit" value="'._('Add to Requisition').'" /></td>'; + echo '<td> + <input type="hidden" name="nextlist" value="'.($Offset+1).'" /> + <input tabindex="'.($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('On Demand') . '</th> + <th>' . _('On Order') . '</th> + <th>' . _('Available') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; + $ImageSource = _('No Image'); + + $k=0; //row colour counter + $i=0; + while ($myrow=DB_fetch_array($SearchResult)) { + if ($myrow['decimalplaces']=='') { + $DecimalPlacesSQL="SELECT decimalplaces + FROM stockmaster + WHERE stockid='" .$myrow['stockid'] . "'"; + $DecimalPlacesResult = DB_query($DecimalPlacesSQL, $db); + $DecimalPlacesRow = DB_fetch_array($DecimalPlacesResult); + $DecimalPlaces = $DecimalPlacesRow['decimalplaces']; + } else { + $DecimalPlaces=$myrow['decimalplaces']; + } + + $QOHSQL = "SELECT sum(locstock.quantity) AS qoh + FROM locstock + WHERE locstock.stockid='" .$myrow['stockid'] . "' AND + loccode = '" . $_SESSION['Request']->Location . "'"; + $QOHResult = DB_query($QOHSQL,$db); + $QOHRow = DB_fetch_array($QOHResult); + $QOH = $QOHRow['qoh']; + + // Find the quantity on outstanding sales orders + $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem + FROM salesorderdetails, + salesorders + WHERE salesorders.orderno = salesorderdetails.orderno AND + salesorders.fromstkloc='" . $_SESSION['Request']->Location . "' AND + salesorderdetails.completed=0 AND + salesorders.quotation=0 AND + salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; + $ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Request']->Location . ' ' . _('cannot be retrieved because'); + $DemandResult = DB_query($sql,$db,$ErrMsg); + + $DemandRow = DB_fetch_row($DemandResult); + if ($DemandRow[0] != null){ + $DemandQty = $DemandRow[0]; + } else { + $DemandQty = 0; + } + + // Find the quantity on purchase orders + $sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd)*purchorderdetails.conversionfactor AS dem + FROM purchorderdetails LEFT JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno + WHERE purchorderdetails.completed=0 + AND purchorders.status<>'Cancelled' + AND purchorders.status<>'Rejected' + AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'"; + + $ErrMsg = _('The order details for this product cannot be retrieved because'); + $PurchResult = DB_query($sql,$db,$ErrMsg); + + $PurchRow = DB_fetch_row($PurchResult); + if ($PurchRow[0]!=null){ + $PurchQty = $PurchRow[0]; + } else { + $PurchQty = 0; + } + + // Find the quantity on works orders + $sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm + FROM woitems + WHERE stockid='" . $myrow['stockid'] ."'"; + $ErrMsg = _('The order details for this product cannot be retrieved because'); + $WoResult = DB_query($sql,$db,$ErrMsg); + + $WoRow = DB_fetch_row($WoResult); + if ($WoRow[0]!=null){ + $WoQty = $WoRow[0]; + } else { + $WoQty = 0; + } + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + $OnOrder = $PurchQty + $WoQty; + $Available = $QOH - $DemandQty + $OnOrder; + echo '<td>'.$myrow['stockid'].'</font></td> + <td>'.$myrow['description'].'</td> + <td>'.$myrow['stockunits'].'</td> + <td class="number">'.locale_number_format($QOH,$DecimalPlaces).'</td> + <td class="number">'.locale_number_format($DemandQty,$DecimalPlaces).'</td> + <td class="number">'.locale_number_format($OnOrder, $DecimalPlaces).'</td> + <td class="number">'.locale_number_format($Available,$DecimalPlaces).'</td> + <td><font size="1"><input class="number" tabindex="'.($j+7).'" type="text" size="6" name="Quantity'.$i.'" value="0" /> + <input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" /> + </td> + </tr>'; + echo '<input type="hidden" name="DecimalPlaces'.$i.'" value="' . $myrow['decimalplaces'] . '" />'; + echo '<input type="hidden" name="ItemDescription'.$i.'" value="' . $myrow['description'] . '" />'; + echo '<input type="hidden" name="Units'.$i.'" value="' . $myrow['stockunits'] . '" />'; + if ($j==1) { + $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; + } + $i++; +#end of page full new headings if + } +#end of while loop + echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /> + <input tabindex="'.($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<td style="text-align:center" colspan="6"><input type="hidden" name="order_items" value="1" /> + <input tabindex="'.($j+8).'" type="submit" value="'._('Add to Requisition').'" /></td>'; + echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /> + <input tabindex="'.($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td><tr/>'; + echo '</table></form>'; + echo $jsCall; + +}#end if SearchResults to show + +//********************************************************************************************************* +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php (rev 0) +++ trunk/InternalStockRequestAuthorisation.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,111 @@ +<?php + +/* $Id$*/ + +include('includes/session.inc'); + +$title = _('Authorise Internal Stock Requests'); + +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . $title . '</p>'; + +$emailsql="SELECT email FROM www_users WHERE userid='".$_SESSION['UserID']."'"; +$emailresult=DB_query($emailsql, $db); +$emailrow=DB_fetch_array($emailresult); + +if (isset($_POST['updateall'])) { + foreach ($_POST as $key => $value) { + if (mb_substr($key,0,6)=='status') { + $RequestNo=mb_substr($key,6); + $sql="UPDATE stockrequest + SET authorised='1' + WHERE dispatchid='".$RequestNo."'"; + $result=DB_query($sql, $db); + } + } +} + +/* Retrieve the requisition header information + */ +$sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest + LEFT JOIN departments + ON stockrequest.departmentid=departments.departmentid + LEFT JOIN locations + ON stockrequest.loccode=locations.loccode + LEFT JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=0 + AND stockrequest.closed=0 + AND www_users.userid='".$_SESSION['UserID']."'"; +$result=DB_query($sql, $db); + +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection">'; + +/* Create the table for the purchase order header */ +echo '<tr> + <th>'._('Request Number').'</th> + <th>'._('Department').'</th> + <th>'._('Location Of Stock').'</th> + <th>'._('Requested Date').'</th> + <th>'._('Narrative').'</th> + <th>'._('Authorise').'</th> + </tr>'; + +while ($myrow=DB_fetch_array($result)) { + + echo '<tr> + <td>'.$myrow['dispatchid'].'</td> + <td>'.$myrow['description'].'</td> + <td>'.$myrow['locationname'].'</td> + <td>'.ConvertSQLDate($myrow['despatchdate']).'</td> + <td>'.$myrow['narrative'].'</td> + <td><input type="checkbox" name="status'.$myrow['dispatchid'].'" /></td> + </tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity + FROM stockrequestitems + LEFT JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "'"; + $lineresult=DB_query($linesql, $db); + + echo '<tr> + <td></td> + <td colspan="5" align="left"> + <table class="selection" align="left"> + <tr> + <th>'._('Product').'</th> + <th>'._('Quantity Required').'</th> + <th>'._('Units').'</th> + </tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr> + <td>'.$linerow['description'].'</td> + <td class="number">'.locale_number_format($linerow['quantity'],$linerow['decimalplaces']).'</td> + <td>'.$linerow['uom'].'</td> + </tr>'; + } // end while order line detail + echo '</table> + </td> + </tr>'; +} //end while header loop +echo '</table>'; +echo '<br /><div class="centre"><input type="submit" name="updateall" value="' . _('Update'). '" /></form>'; + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php (rev 0) +++ trunk/InternalStockRequestFulfill.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -0,0 +1,343 @@ +<?php + +$PageSecurity=1; + +include('includes/session.inc'); + +$title = _('Fulfill Stock Requests'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Contract') . '" alt="" />' . + ' ' . _('Fulfill Stock Requests') . '</p>'; + +if (isset($_POST['UpdateAll'])) { + foreach ($_POST as $key => $value) { + if (mb_strpos($key,'Qty')) { + $RequestID = mb_substr($key,0, mb_strpos($key,'Qty')); + $LineID = mb_substr($key,mb_strpos($key,'Qty')+3); + $Quantity = $_POST[$RequestID.'Qty'.$LineID]; + $StockID = $_POST[$RequestID.'StockID'.$LineID]; + $Location = $_POST[$RequestID.'Location'.$LineID]; + $Tag = $_POST[$RequestID.'Tag'.$LineID]; + $RequestedQuantity = $_POST[$RequestID.'RequestedQuantity'.$LineID]; + if (isset($_POST[$RequestID.'Completed'.$LineID])) { + $Completed=True; + } else { + $Completed=False; + } + + $sql="SELECT materialcost, labourcost, overheadcost FROM stockmaster WHERE stockid='".$StockID."'"; + $result=DB_query($sql, $db); + $myrow=DB_fetch_array($result); + $StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; + + $Narrative = _('Issue') . ' ' . $Quantity . ' ' . _('of') . ' '. $StockID . ' ' . _('to department'); + + $AdjustmentNumber = GetNextTransNo(17,$db); + $PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db); + $SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat'])); + + $Result = DB_Txn_Begin($db); + + // Need to get the current location quantity will need it later for the stock movement + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $StockID . "' + AND loccode= '" . $Location . "'"; + $Result = DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + // There must actually be some error this should never happen + $QtyOnHandPrior = 0; + } + + if ($_SESSION['ProhibitNegativeStock']==0 or ($_SESSION['ProhibitNegativeStock']==1 and $QtyOnHandPrior>=$Quantity)) { + + $SQL = "INSERT INTO stockmoves ( + stockid, + type, + transno, + loccode, + trandate, + prd, + reference, + qty, + newqoh) + VALUES ( + '" . $StockID . "', + 17, + '" . $AdjustmentNumber . "', + '" . $Location . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $Narrative ."', + '" . -$Quantity . "', + '" . ($QtyOnHandPrior - $Quantity) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because'); + $DbgMsg = _('The following SQL to insert the stock movement record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + $SQL="UPDATE stockrequestitems + SET qtydelivered=qtydelivered+".$Quantity." + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + + $SQL = "UPDATE locstock SET quantity = quantity - '" . $Quantity . "' + WHERE stockid='" . $StockID . "' + AND loccode='" . $Location . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' ._('The location stock record could not be updated because'); + $DbgMsg = _('The following SQL to update the stock record was used'); + + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + + if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $StandardCost > 0){ + + $StockGLCodes = GetStockGLCode($StockID,$db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" .$AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['issueglact'] . "', + '" . $StandardCost * -($Quantity) . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + amount, + narrative, + tag) + VALUES (17, + '" . $AdjustmentNumber . "', + '" . $SQLAdjustmentDate . "', + '" . $PeriodNo . "', + '" . $StockGLCodes['stockact'] . "', + '" . $StandardCost * $Quantity . "', + '" . $Narrative . "', + '" . $Tag . "' + )"; + + $Errmsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction entries could not be added because'); + $DbgMsg = _('The following SQL to insert the GL entries was used'); + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + if (($Quantity>=$RequestedQuantity) or $Completed==True) { + $SQL="UPDATE stockrequestitems + SET completed=1 + WHERE dispatchid='".$RequestID."' + AND dispatchitemsid='".$LineID."'"; + $Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg,true); + } + + $Result = DB_Txn_Commit($db); + + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('has been created from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity ; + prnMsg( $ConfirmationText,'success'); + + if ($_SESSION['InventoryManagerEmail']!=''){ + $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s'); + $EmailSubject = _('Stock adjustment for'). ' ' . $StockID; + mail($_SESSION['InventoryManagerEmail'],$EmailSubject,$ConfirmationText); + } + } else { + $ConfirmationText = _('A stock issue for'). ' ' . $StockID . ' ' . _('from location').' ' . $Location .' '. _('for a quantity of') . ' ' . $Quantity . ' ' . _('cannot be created as there is insufficient stock and your system is configured to not allow negative stocks'); + prnMsg( $ConfirmationText,'warn'); + } + } +} + +// Check if request can be closed and close if done. +if (isset($RequestID)) { + $SQL="SELECT dispatchid + FROM stockrequestitems + WHERE dispatchid='".$RequestID."' + AND completed=0"; + $Result=DB_query($SQL, $db); + if (DB_num_rows($Result)==0) { + $SQL="UPDATE stockrequest + SET closed=1 + WHERE dispatchid='".$RequestID."'"; + $Result=DB_query($SQL, $db); + } +} + +if (!isset($_POST['Location'])) { + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + echo '<td>' . _('Choose a location to issue requests from') . '</td> + <td><select name="Location">'; + $sql = "SELECT loccode, locationname FROM locations"; + $resultStkLocs = DB_query($sql,$db); + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_SESSION['Adjustment']->StockLocation)){ + if ($myrow['loccode'] == $_SESSION['Adjustment']->StockLocation){ + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + $_POST['StockLocation']=$myrow['loccode']; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } + echo '</select></td></tr>'; + echo '</table><br />'; + echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; + include('includes/footer.inc'); + exit; +} + +/* Retrieve the requisition header information + */ +if (isset($_POST['Location'])) { + $sql="SELECT stockrequest.dispatchid, + locations.locationname, + stockrequest.despatchdate, + stockrequest.narrative, + departments.description, + www_users.realname, + www_users.email + FROM stockrequest + LEFT JOIN departments + ON stockrequest.departmentid=departments.departmentid + LEFT JOIN locations + ON stockrequest.loccode=locations.loccode + LEFT JOIN www_users + ON www_users.userid=departments.authoriser + WHERE stockrequest.authorised=1 + AND stockrequest.closed=0 + AND stockrequest.loccode='".$_POST['Location']."'"; + $result=DB_query($sql, $db); + + if (DB_num_rows($result)==0) { + prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); + echo '<br />'; + echo '<div class="centre"><a href="' . $_SESSION['FormID'] . '">' . _('Select another location') . '</a></div>'; + include('includes/footer.inc'); + exit; + } + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"><tr>'; + + /* Create the table for the purchase order header */ + echo '<th>'._('Request Number').'</th>'; + echo '<th>'._('Department').'</th>'; + echo '<th>'._('Location Of Stock').'</th>'; + echo '<th>'._('Requested Date').'</th>'; + echo '<th>'._('Narrative').'</th>'; + echo '</tr>'; + + while ($myrow=DB_fetch_array($result)) { + + echo '<tr>'; + echo '<td>'.$myrow['dispatchid'].'</td>'; + echo '<td>'.$myrow['description'].'</td>'; + echo '<td>'.$myrow['locationname'].'</td>'; + echo '<td>'.ConvertSQLDate($myrow['despatchdate']).'</td>'; + echo '<td>'.$myrow['narrative'].'</td>'; + echo '</tr>'; + $linesql="SELECT stockrequestitems.dispatchitemsid, + stockrequestitems.dispatchid, + stockrequestitems.stockid, + stockrequestitems.decimalplaces, + stockrequestitems.uom, + stockmaster.description, + stockrequestitems.quantity, + stockrequestitems.qtydelivered + FROM stockrequestitems + LEFT JOIN stockmaster + ON stockmaster.stockid=stockrequestitems.stockid + WHERE dispatchid='".$myrow['dispatchid'] . "' + AND completed=0"; + $lineresult=DB_query($linesql, $db); + + echo '<tr><td></td><td colspan="5" align="left"><table class="selection" align="left">'; + echo '<th>'._('Product').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Required').'</th>'; + echo '<th>'._('Quantity') . '<br />' . _('Delivered').'</th>'; + echo '<th>'._('Units').'</th>'; + echo '<th>'._('Completed').'</th>'; + echo '<th>'._('Tag').'</th>'; + echo '</tr>'; + + while ($linerow=DB_fetch_array($lineresult)) { + echo '<tr>'; + echo '<td>'.$linerow['description'].'</td>'; + echo '<td class="number">'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'</td>'; + echo '<td class="number"> + <input type="text" class="number" name="'. $linerow['dispatchid'] . 'Qty'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" /> + </td>'; + echo '<td>'.$linerow['uom'].'</td>'; + echo '<td><input type="checkbox" name="'. $linerow['dispatchid'] . 'Completed'. $linerow['dispatchitemsid'] . '" /></td>'; + //Select the tag + echo '<td><select name="'. $linerow['dispatchid'] . 'Tag'. $linerow['dispatchitemsid'] . '">'; + + $SQL = "SELECT tagref, + tagdescription + FROM tags + ORDER BY tagref"; + + $TagResult=DB_query($SQL,$db); + echo '<option value=0>0 - None</option>'; + while ($mytagrow=DB_fetch_array($TagResult)){ + if (isset($_SESSION['Adjustment']->tag) and $_SESSION['Adjustment']->tag==$mytagrow['tagref']){ + echo '<option selected="True" value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; + } else { + echo '<option value="' . $mytagrow['tagref'] . '">' . $mytagrow['tagref'].' - ' .$mytagrow['tagdescription'] . '</option>'; + } + } + echo '</select></td>'; +// End select tag + echo '</tr>'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'StockID'. $linerow['dispatchitemsid'] . '" value="'.$linerow['stockid'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'Location'. $linerow['dispatchitemsid'] . '" value="'.$_POST['Location'].'" />'; + echo '<input type="hidden" class="number" name="'. $linerow['dispatchid'] . 'RequestedQuantity'. $linerow['dispatchitemsid'] . '" value="'.locale_number_format($linerow['quantity']-$linerow['qtydelivered'],$linerow['decimalplaces']).'" />'; + } // end while order line detail + echo '</table></td></tr>'; + } //end while header loop + echo '</table>'; + echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; +} + +include('includes/footer.inc'); + +?> \ No newline at end of file Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-02-25 23:23:53 UTC (rev 4972) +++ trunk/StockCategories.php 2012-02-26 09:19:38 UTC (rev 4973) @@ -7,9 +7,7 @@ include('includes/header.inc'); -echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . $title . ' - </p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); @@ -57,102 +55,110 @@ if (!is_numeric(filter_number_format($_POST['PropMinimum' .$i]))){ $InputError = 1; prnMsg(_('The minimum value is expected to be a numeric value'),'error'); - } - if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){ + } + if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){ $InputError = 1; prnMsg(_('The maximum value is expected to be a numeric value'),'error'); - } + } } } //check the properties are sensible - if ($SelectedCategory AND $InputError !=1) { + if (isset($SelectedCategory) AND $InputError !=1) { /*SelectedCategory could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ $sql = "UPDATE stockcategory SET stocktype = '" . $_POST['StockType'] . "', - categorydescription = '" . $_POST['CategoryDescription'] . "', - stockact = " . $_POST['StockAct'] . ", - adjglact = " . $_POST['AdjGLAct'] . ", - purchpricevaract = " . $_POST['PurchPriceVarAct'] . ", - materialuseagevarac = " . $_POST['MaterialUseageVarAc'] . ", - wipact = " . $_POST['WIPAct'] . " - WHERE - categoryid = '$SelectedCategory'"; - $ErrMsg = _('Could not update the stock category') . $_POST['CategoryDescription'] . _('because'); - $result = DB_query($sql,$db,$ErrMsg); + categorydescription = '" . $_POST['CategoryDescription'] . "', + stockact = " . $_POST['StockAct'] . ", + adjglact = " . $_POST['AdjGLAct'] . ", + issueglact = " . $_POST['IssueGLAct'] . ", + purchpricevaract = " . $_POST['PurchPriceVarAct'] . ", + materialuseagevarac = " . $_POST['MaterialUseageVarAc'] . ", + wipact = " . $_POST['WIPAct'] . " + WHERE + categoryid = '$SelectedCategory'"; + $ErrMsg = _('Could not update the stock category') . $_POST['CategoryDescription'] . _('because'); + $result = DB_query($sql,$db,$ErrMsg); - for ($i=0;$i<=$_POST['PropertyCounter'];$i++){ + if ($_POST['PropertyCounter']==0 and $_POST['PropLabel0']!='') { + $_POST['PropertyCounter']=0; + } - if (isset($_POST['PropReqSO' .$i]) and $_POST['PropReqSO' .$i] == true){ - $_POST['PropReqSO' .$i] =1; - } else { - $_POST['PropReqSO' .$i] =0; - } - if (isset($_POST['PropNumeric' .$i]) and $_POST['PropNumeric' .$i] == true){ - $_POST['PropNumeric' .$i] =1; - } else { - $_POST['PropNumeric' .$i] =0; - } - if ($_POST['PropID' .$i] =='NewProperty' AND mb_strlen($_POST['PropLabel'.$i])>0){ - $sql = "INSERT INTO stockcatproperties (categoryid, - label, - controltype, - defaultvalue, - minimumvalue, - maximumvalue, - numericvalue, - reqatsalesorder) - VALUES ('" . $SelectedCategory . "', - '" . $_POST['PropLabel' . $i] . "', - " . $_POST['PropControlType' . $i] . ", - '" . $_POST['PropDefault' .$i] . "', - '" . filter_number... [truncated message content] |
From: <vv...@us...> - 2012-02-26 14:59:24
|
Revision: 4975 http://web-erp.svn.sourceforge.net/web-erp/?rev=4975&view=rev Author: vvs2012 Date: 2012-02-26 14:59:18 +0000 (Sun, 26 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-26 10:18:47 UTC (rev 4974) +++ trunk/doc/Change.log 2012-02-26 14:59:18 UTC (rev 4975) @@ -1,4 +1,5 @@ webERP Change Log +25/2/12 Vitaly: sql in PDFSuppTransListing.php would not fetch any data and debug message was not showing. Missing FROM in upgrade4.07-4.08.sql. 25/2/12 James Dupin: Remove extra ) after Create GL entries for stock transactions in CompanyPreferences.php 23/2/12 Ricard: Moved Utility scripts from Z_index.php to their own module named Utilities 22/2/12 Phil: Make daily sales inquiry work correctly with assembly items where costs are recalculated in the case of negatives stock when supplier invoices entered Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-26 10:18:47 UTC (rev 4974) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-26 14:59:18 UTC (rev 4975) @@ -4,7 +4,7 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('reportwriter/admin/ReportCreator.php', '15', 'Report Writer'); INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RecurringSalesOrdersProcess.php', '1', 'Process Recurring Sales Orders'); -DELETE `scripts` WHERE `script`='Z_CopyBOM.php'; +DELETE FROM `scripts` WHERE `script`='Z_CopyBOM.php'; UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-26 14:59:24
|
Revision: 4975 http://web-erp.svn.sourceforge.net/web-erp/?rev=4975&view=rev Author: vvs2012 Date: 2012-02-26 14:59:18 +0000 (Sun, 26 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/doc/Change.log trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-02-26 10:18:47 UTC (rev 4974) +++ trunk/doc/Change.log 2012-02-26 14:59:18 UTC (rev 4975) @@ -1,4 +1,5 @@ webERP Change Log +25/2/12 Vitaly: sql in PDFSuppTransListing.php would not fetch any data and debug message was not showing. Missing FROM in upgrade4.07-4.08.sql. 25/2/12 James Dupin: Remove extra ) after Create GL entries for stock transactions in CompanyPreferences.php 23/2/12 Ricard: Moved Utility scripts from Z_index.php to their own module named Utilities 22/2/12 Phil: Make daily sales inquiry work correctly with assembly items where costs are recalculated in the case of negatives stock when supplier invoices entered Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-26 10:18:47 UTC (rev 4974) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-26 14:59:18 UTC (rev 4975) @@ -4,7 +4,7 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('reportwriter/admin/ReportCreator.php', '15', 'Report Writer'); INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RecurringSalesOrdersProcess.php', '1', 'Process Recurring Sales Orders'); -DELETE `scripts` WHERE `script`='Z_CopyBOM.php'; +DELETE FROM `scripts` WHERE `script`='Z_CopyBOM.php'; UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-26 15:59:44
|
Revision: 4977 http://web-erp.svn.sourceforge.net/web-erp/?rev=4977&view=rev Author: vvs2012 Date: 2012-02-26 15:59:37 +0000 (Sun, 26 Feb 2012) Log Message: ----------- xhtml cleanup Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/includes/Login.php Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-02-26 15:28:19 UTC (rev 4976) +++ trunk/GLBalanceSheet.php 2012-02-26 15:59:37 UTC (rev 4977) @@ -22,11 +22,12 @@ . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</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 '<table class="selection"> <tr> <td>'._('Select the balance date').':</td> - <td><select Name="BalancePeriodEnd">'; + <td><select name="BalancePeriodEnd">'; $periodno=GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='".$periodno . "'"; @@ -49,7 +50,7 @@ echo '<tr> <td>'._('Detail Or Summary').':</td> - <td><select Name="Detail"> + <td><select name="Detail"> <option value="Summary">'._('Summary') . '</option> <option selected="selected" value="Detailed">'._('All Accounts') . '</option> </select></td> @@ -64,8 +65,8 @@ echo '<br /> <div class="centre"> <input type="submit" name="PrintPDF" value="'._('Produce PDF Report').'" /> - </div> - </form>'; + </div>'; + echo '</div></form>'; /*Now do the posting while the user is thinking about the period to select */ include ('includes/GLPostings.inc'); @@ -313,6 +314,7 @@ } else { include('includes/header.inc'); 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="BalancePeriodEnd" value="' . $_POST['BalancePeriodEnd'] . '" />'; @@ -671,8 +673,8 @@ echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="SelectADifferentPeriod" value="'._('Select A Different Balance Date').'" /></div>'; + echo '</div></form>'; } -echo '</form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2012-02-26 15:28:19 UTC (rev 4976) +++ trunk/includes/Login.php 2012-02-26 15:59:37 UTC (rev 4977) @@ -34,6 +34,7 @@ <div id="login_logo"></div> <div id="login_box"> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8');?>" method="post"> + <div> <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <span><?php echo _('Company'); ?>:</span> @@ -64,6 +65,7 @@ <input type="password" name="Password" /><br /> <div id="demo_text"><?php echo $demo_text;?></div> <input class="button" type="submit" value="<?php echo _('Login'); ?>" name="SubmitUser" /> + </div> </form> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-26 15:59:44
|
Revision: 4977 http://web-erp.svn.sourceforge.net/web-erp/?rev=4977&view=rev Author: vvs2012 Date: 2012-02-26 15:59:37 +0000 (Sun, 26 Feb 2012) Log Message: ----------- xhtml cleanup Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/includes/Login.php Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-02-26 15:28:19 UTC (rev 4976) +++ trunk/GLBalanceSheet.php 2012-02-26 15:59:37 UTC (rev 4977) @@ -22,11 +22,12 @@ . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</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 '<table class="selection"> <tr> <td>'._('Select the balance date').':</td> - <td><select Name="BalancePeriodEnd">'; + <td><select name="BalancePeriodEnd">'; $periodno=GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='".$periodno . "'"; @@ -49,7 +50,7 @@ echo '<tr> <td>'._('Detail Or Summary').':</td> - <td><select Name="Detail"> + <td><select name="Detail"> <option value="Summary">'._('Summary') . '</option> <option selected="selected" value="Detailed">'._('All Accounts') . '</option> </select></td> @@ -64,8 +65,8 @@ echo '<br /> <div class="centre"> <input type="submit" name="PrintPDF" value="'._('Produce PDF Report').'" /> - </div> - </form>'; + </div>'; + echo '</div></form>'; /*Now do the posting while the user is thinking about the period to select */ include ('includes/GLPostings.inc'); @@ -313,6 +314,7 @@ } else { include('includes/header.inc'); 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="BalancePeriodEnd" value="' . $_POST['BalancePeriodEnd'] . '" />'; @@ -671,8 +673,8 @@ echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="SelectADifferentPeriod" value="'._('Select A Different Balance Date').'" /></div>'; + echo '</div></form>'; } -echo '</form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2012-02-26 15:28:19 UTC (rev 4976) +++ trunk/includes/Login.php 2012-02-26 15:59:37 UTC (rev 4977) @@ -34,6 +34,7 @@ <div id="login_logo"></div> <div id="login_box"> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8');?>" method="post"> + <div> <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <span><?php echo _('Company'); ?>:</span> @@ -64,6 +65,7 @@ <input type="password" name="Password" /><br /> <div id="demo_text"><?php echo $demo_text;?></div> <input class="button" type="submit" value="<?php echo _('Login'); ?>" name="SubmitUser" /> + </div> </form> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-27 10:04:30
|
Revision: 4980 http://web-erp.svn.sourceforge.net/web-erp/?rev=4980&view=rev Author: daintree Date: 2012-02-27 10:04:19 +0000 (Mon, 27 Feb 2012) Log Message: ----------- Fix typo ;-) Modified Paths: -------------- trunk/css/default/default.css trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2012-02-26 16:09:07 UTC (rev 4979) +++ trunk/css/default/default.css 2012-02-27 10:04:19 UTC (rev 4980) @@ -2,17 +2,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://weberp.sourceforge.net | -| by Logic Works Ltd | -|---------------------------------------------------| -| Developer: | -| Shane Barnaby | -| Steve Kaill | -|---------------------------------------------------| -| Note: | -| Changes can be made to this CSS that will be | -| reflected throughout Web-ERP. | -| +| Web-ERP - http://web-erp.sourceforge.net | \--------------------------------------------------*/ /* $Id$*/ Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-26 16:09:07 UTC (rev 4979) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-27 10:04:19 UTC (rev 4980) @@ -6,8 +6,6 @@ DELETE FROM `scripts` WHERE `script`='Z_CopyBOM.php'; -UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; - ALTER TABLE `stockcategory` ADD `issueglact` int(11) NOT NULL DEFAULT 0 AFTER `adjglact`; CREATE TABLE departments ( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-02-27 10:04:30
|
Revision: 4980 http://web-erp.svn.sourceforge.net/web-erp/?rev=4980&view=rev Author: daintree Date: 2012-02-27 10:04:19 +0000 (Mon, 27 Feb 2012) Log Message: ----------- Fix typo ;-) Modified Paths: -------------- trunk/css/default/default.css trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2012-02-26 16:09:07 UTC (rev 4979) +++ trunk/css/default/default.css 2012-02-27 10:04:19 UTC (rev 4980) @@ -2,17 +2,7 @@ | | | default.css | |---------------------------------------------------| | For use with: | -| Web-ERP - http://weberp.sourceforge.net | -| by Logic Works Ltd | -|---------------------------------------------------| -| Developer: | -| Shane Barnaby | -| Steve Kaill | -|---------------------------------------------------| -| Note: | -| Changes can be made to this CSS that will be | -| reflected throughout Web-ERP. | -| +| Web-ERP - http://web-erp.sourceforge.net | \--------------------------------------------------*/ /* $Id$*/ Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-26 16:09:07 UTC (rev 4979) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-02-27 10:04:19 UTC (rev 4980) @@ -6,8 +6,6 @@ DELETE FROM `scripts` WHERE `script`='Z_CopyBOM.php'; -UPDATE config SET confvalue='4.08.1' WHERE confname='VersionNumber'; - ALTER TABLE `stockcategory` ADD `issueglact` int(11) NOT NULL DEFAULT 0 AFTER `adjglact`; CREATE TABLE departments ( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-02-27 22:29:59
|
Revision: 4983 http://web-erp.svn.sourceforge.net/web-erp/?rev=4983&view=rev Author: vvs2012 Date: 2012-02-27 22:29:51 +0000 (Mon, 27 Feb 2012) Log Message: ----------- xhtml cleanup Modified Paths: -------------- trunk/CompanyPreferences.php trunk/Credit_Invoice.php trunk/CustomerTransInquiry.php trunk/InventoryValuation.php trunk/PDFPriceList.php trunk/PDFRemittanceAdvice.php trunk/Payments.php trunk/PcReportTab.php trunk/ReorderLevel.php trunk/SalesAnalRepts.php trunk/SalesGraph.php trunk/SelectWorkOrder.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocTransfer.php trunk/StockTransfers.php trunk/SuppLoginSetup.php trunk/SuppPriceList.php trunk/SystemParameters.php trunk/Z_DataExport.php trunk/install/timezone.php trunk/reportwriter/admin/RCFunctions.inc Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/CompanyPreferences.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -151,9 +151,10 @@ } /* end of if submit */ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . - '" alt="" />' . ' ' . $title.'</p><br />'; + '" alt="" />' . ' ' . $title.'</p>'; 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">'; @@ -313,9 +314,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['DebtorsAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -330,9 +331,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['CreditorsAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="' . $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="' . $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -347,9 +348,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['PayrollAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -364,9 +365,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['GRNAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -380,9 +381,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['RetainedEarnings']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -405,9 +406,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['FreightAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -422,9 +423,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['ExchangeDiffAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -439,9 +440,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['PurchasesExchangeDiffAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -456,9 +457,9 @@ while ($myrow = DB_fetch_row($result)) { if ($_POST['PytDiscountAct']==$myrow[0]){ - echo '<option selected="selected" value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option selected="selected" value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } else { - echo '<option value="'. $myrow[0] . '">' . $myrow[1] . ' ('.$myrow[0].')</option>'; + echo '<option value="'. $myrow[0] . '">' . htmlentities($myrow[1],ENT_QUOTES,'UTF-8') . ' ('.$myrow[0].')</option>'; } } //end while loop @@ -518,6 +519,7 @@ <div class="centre"> <input tabindex="26" type="submit" name="submit" value="' . _('Update') . '" /> </div>'; +echo '</div></form>'; include('includes/footer.inc'); ?> Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/Credit_Invoice.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -1511,7 +1511,7 @@ echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex="' . $j . '" name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; echo '</table><br /><div class="centre"><input tabindex="' . $j . '" type="submit" name="Update" value="' . _('Update') . '" /><br />'; $j++; - echo '<input type="submit" tabindex="'.$j++.'" name="ProcessCredit" Value="' . _('Process Credit') .'" /></div>'; + echo '<input type="submit" tabindex="'.$j++.'" name="ProcessCredit" value="' . _('Process Credit') .'" /></div>'; } echo '</form>'; Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/CustomerTransInquiry.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -37,7 +37,7 @@ echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } else { - echo '<option Value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; + echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } } echo '</select></td>'; Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/InventoryValuation.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -259,7 +259,7 @@ <td>' . _('Summary or Detailed Report') . ':</td> <td><select name="DetailedReport"> <option selected="selected" value="No">' . _('Summary Report') . '</option> - <option Value="Yes">' . _('Detailed Report') . '</option> + <option value="Yes">' . _('Detailed Report') . '</option> </select></td> </tr> </table> Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/PDFPriceList.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -286,27 +286,27 @@ $SalesTypesResult=DB_query($sql,$db); while ($myrow=DB_fetch_array($SalesTypesResult)){ - echo '<option Value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; } echo '</select></td></tr>'; echo '<tr><td>' . _('Show Gross Profit %') . ':</td> <td><select name="ShowGPPercentages">'; - echo '<option selected="selected" Value="No">'. _('Prices Only') . '</option>'; - echo '<option Value="Yes">'. _('Show GP % too') . '</option>'; + echo '<option selected="selected" value="No">'. _('Prices Only') . '</option>'; + echo '<option value="Yes">'. _('Show GP % too') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">'; echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices'); - echo '<option Value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>'; - echo '<option Value="Full Description">'. _('Full Description') . '</option>'; + echo '<option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>'; + echo '<option value="Full Description">'. _('Full Description') . '</option>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Effective As At') . ':</td>'; echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; echo '</td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" Name="PrintPDF" Value="'. _('Print PDF'). '" /></div>'; + echo '</table><br /><div class="centre"><input type="submit" Name="PrintPDF" value="'. _('Print PDF'). '" /></div>'; } include('includes/footer.inc'); Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/PDFRemittanceAdvice.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -167,7 +167,7 @@ echo '</table> <div class="centre"> - <input type="submit" Name="PrintPDF" Value="' . _('Print PDF') . '" /> + <input type="submit" Name="PrintPDF" value="' . _('Print PDF') . '" /> </div>'; include ('includes/footer.inc'); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/Payments.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -1103,7 +1103,7 @@ </tr>'; echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail' . $identifier]->SuppName . '" />'; } else { - echo '<input type="hidden" name="Discount" Value="0" />'; + echo '<input type="hidden" name="Discount" value="0" />'; } echo '</table><br />'; echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/PcReportTab.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -67,7 +67,7 @@ echo '<tr><td>' . _('To Date:') .'</td><td>'; echo '<input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" />'; echo '</td></tr></table><br />'; - echo '<div class="centre"><input type="submit" Name="ShowTB" Value="' . _('Show HTML') .'" />'; + echo '<div class="centre"><input type="submit" Name="ShowTB" value="' . _('Show HTML') .'" />'; echo '<input type="submit" name="PrintPDF" value="' . _('PrintPDF') . '" /></div>'; } else if (isset($_POST['PrintPDF'])) { Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/ReorderLevel.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -184,9 +184,9 @@ } while ($myrow=DB_fetch_array($resultStkLocs)){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected="selected" Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/SalesAnalRepts.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -31,22 +31,22 @@ if ($GroupByDataX == 'Sales Type') { echo '<option selected="selected" value="Sales Type">' . _('Sales Type') . '</option>'; } else { - echo '<option Value="Sales Type">' . _('Sales Type') . '</option>'; + echo '<option value="Sales Type">' . _('Sales Type') . '</option>'; } if ($GroupByDataX == 'Product Type') { echo '<option selected="selected" value="Product Type">' . _('Product Type') . '</option>'; } else { - echo '<option Value="Product Type">' . _('Product Type') . '</option>'; + echo '<option value="Product Type">' . _('Product Type') . '</option>'; } if ($GroupByDataX == 'Customer Branch') { echo '<option selected="selected" value="Customer Branch">' . _('Customer Branch') . '</option>'; } else { - echo '<option Value="Customer Branch">' . _('Customer Branch') . '</option>'; + echo '<option value="Customer Branch">' . _('Customer Branch') . '</option>'; } if ($GroupByDataX == 'Sales Person') { echo '<option selected="selected" value="Sales Person">' . _('Sales Person') . '</option>'; } else { - echo '<option Value="Sales Person">' . _('Sales Person') . '</option>'; + echo '<option value="Sales Person">' . _('Sales Person') . '</option>'; } if ($GroupByDataX=='Not Used' OR $GroupByDataX == '' OR ! isset($GroupByDataX) OR is_null($GroupByDataX)){ echo '<option selected="selected" value="Not Used">' . _('Not Used') . '</option>'; @@ -470,7 +470,7 @@ echo '<option selected="selected" value="0">' . _('No') . '</option>'; echo '<option value="1">' . _('Yes') . '</option>'; } else { - echo 'OPTION value="0">' . _('No') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; } Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/SalesGraph.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -189,7 +189,7 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" Name="ShowGraph" Value="' . _('Show Sales Graph') .'" /></div>'; + echo '<br /><div class="centre"><input type="submit" Name="ShowGraph" value="' . _('Show Sales Graph') .'" /></div>'; include('includes/footer.inc'); } else { Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/SelectWorkOrder.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -128,7 +128,7 @@ } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } Modified: trunk/StockCounts.php =================================================================== --- trunk/StockCounts.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/StockCounts.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -126,7 +126,7 @@ //START OF action=VIEW $SQL = "select * from stockcounts"; $result = DB_query($SQL, $db); - echo '<input type="hidden" name=Action Value="View" />'; + echo '<input type="hidden" name=Action value="View" />'; echo '<table cellpadding="2" class="selection">'; echo "<tr> <th>" . _('Stock Code') . "</th> Modified: trunk/StockDispatch.php =================================================================== --- trunk/StockDispatch.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/StockDispatch.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -249,9 +249,9 @@ <td><select name="FromLocation"> '; while ($myrow=DB_fetch_array($resultStkLocs)){ if ($myrow['loccode'] == $_POST['FromLocation']){ - echo '<option selected="selected" Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td> Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/StockLocTransfer.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -237,7 +237,7 @@ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo '<option selected="selected" Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['FromStockLocation']=$myrow['loccode']; } else { echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/StockTransfers.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -522,12 +522,12 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_SESSION['Transfer']) AND isset($_SESSION['Transfer']->StockLocationTo)){ if ($myrow['loccode'] == $_SESSION['Transfer']->StockLocationTo){ - echo '<option selected="selected" Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation'] AND isset($_SESSION['Transfer'])){ - echo '<option selected="selected" Value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_SESSION['Transfer']->StockLocationTo=$myrow['loccode'] . '</option>'; } else { echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/SuppLoginSetup.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -238,7 +238,7 @@ if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal'){ echo '<option selected="selected" value="legal">' . _('Legal') . '</option>'; } else { - echo '<option Value="legal">' . _('Legal') . '</option>'; + echo '<option value="legal">' . _('Legal') . '</option>'; } if(isset($_POST['PageSize']) and $_POST['PageSize']=='legal_landscape'){ echo '<option selected="selected" value="legal_landscape">' . _('Legal') . ' ' . _('landscape') . '</option>'; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/SuppPriceList.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -233,7 +233,7 @@ if (isset($_POST['categoryid']) and ($myrow['categoryid'] == $_POST['categoryid'])) { echo '<option selected="selected" value="' . $myrow['categoryid'] . '">' . $myrow['categoryid']-$myrow['categorydescription'] . '</option>'; } else { - echo '<option Value="' . $myrow['categoryid'] . '">' .$myrow['categoryid'].' - '. $myrow['categorydescription'] . '</option>'; + echo '<option value="' . $myrow['categoryid'] . '">' .$myrow['categoryid'].' - '. $myrow['categorydescription'] . '</option>'; } } echo '</select></td> Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/SystemParameters.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -325,14 +325,16 @@ } /* end of if submit */ -echo '<form method="post" action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '>'; +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 cellpadding="2" class="selection" width="98%">'; $TableHeader = '<tr> <th>' . _('System Variable Name') . '</th> <th>' . _('Value') . '</th> - <th>' . _('Notes') . '</th>'; + <th>' . _('Notes') . '</th> + </tr>'; echo '<tr><th colspan="3">' . _('General Settings') . '</th></tr>'; echo $TableHeader; @@ -340,10 +342,10 @@ // DefaultDateFormat echo '<tr style="outline: 1px solid"><td>' . _('Default Date Format') . ':</td> <td><select name="X_DefaultDateFormat"> - <option '.(($_SESSION['DefaultDateFormat']=='d/m/Y')?'selected ':'').'Value="d/m/Y">d/m/Y</option> - <option '.(($_SESSION['DefaultDateFormat']=='d.m.Y')?'selected ':'').'Value="d.m.Y">d.m.Y</option> - <option '.(($_SESSION['DefaultDateFormat']=='m/d/Y')?'selected ':'').'Value="m/d/Y">m/d/Y</option> - <option '.(($_SESSION['DefaultDateFormat']=='Y/m/d')?'selected ':'').'Value="Y/m/d">Y/m/d</option> + <option '.(($_SESSION['DefaultDateFormat']=='d/m/Y')?'selected="selected" ':'').'value="d/m/Y">d/m/Y</option> + <option '.(($_SESSION['DefaultDateFormat']=='d.m.Y')?'selected="selected" ':'').'value="d.m.Y">d.m.Y</option> + <option '.(($_SESSION['DefaultDateFormat']=='m/d/Y')?'selected="selected" ':'').'value="m/d/Y">m/d/Y</option> + <option '.(($_SESSION['DefaultDateFormat']=='Y/m/d')?'selected="selected" ':'').'value="Y/m/d">Y/m/d</option> </select></td> <td>' . _('The default date format for entry of dates and display.') . '</td></tr>'; @@ -384,17 +386,17 @@ // Check Credit Limits echo '<tr style="outline: 1px solid"><td>' . _('Check Credit Limits') . ':</td> <td><select name="X_CheckCreditLimits"> - <option '.($_SESSION['CheckCreditLimits']==0?'selected ':'').'value="0">'._('Do not check').'</option> - <option '.($_SESSION['CheckCreditLimits']==1?'selected ':'').'value="1">'._('Warn on breach').'</option> - <option '.($_SESSION['CheckCreditLimits']==2?'selected ':'').'value="2">'._('Prohibit Sales').'</option> + <option '.($_SESSION['CheckCreditLimits']==0?'selected="selected" ':'').'value="0">'._('Do not check').'</option> + <option '.($_SESSION['CheckCreditLimits']==1?'selected="selected" ':'').'value="1">'._('Warn on breach').'</option> + <option '.($_SESSION['CheckCreditLimits']==2?'selected="selected" ':'').'value="2">'._('Prohibit Sales').'</option> </select></td> <td>' . _('Credit limits can be checked at order entry to warn only or to stop the order from being entered where it would take a customer account balance over their limit') . '</td></tr>'; // Show_Settled_LastMonth echo '<tr style="outline: 1px solid"><td>' . _('Show Settled Last Month') . ':</td> <td><select name="X_Show_Settled_LastMonth"> - <option '.($_SESSION['Show_Settled_LastMonth']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['Show_Settled_LastMonth']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['Show_Settled_LastMonth']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['Show_Settled_LastMonth']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('This setting refers to the format of customer statements. If the invoices and credit notes that have been paid and settled during the course of the current month should be shown then select Yes. Selecting No will only show currently outstanding invoices, credits and payments that have not been allocated') . '</td></tr>'; @@ -416,15 +418,15 @@ // SO_AllowSameItemMultipleTimes echo '<tr style="outline: 1px solid"><td>' . _('Sales Order Allows Same Item Multiple Times') . ':</td> <td><select name="X_SO_AllowSameItemMultipleTimes"> - <option '.($_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['SO_AllowSameItemMultipleTimes']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['SO_AllowSameItemMultipleTimes']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td><td> </td></tr>'; //'AllowOrderLineItemNarrative' echo '<tr style="outline: 1px solid"><td>' . _('Order Entry allows Line Item Narrative') . ':</td> <td><select name="X_AllowOrderLineItemNarrative"> - <option '.($_SESSION['AllowOrderLineItemNarrative']=='1'?'selected ':'').'value="1">'._('Allow Narrative Entry').'</option> - <option '.($_SESSION['AllowOrderLineItemNarrative']=='0'?'selected ':'').'value="0">'._('No Narrative Line').'</option> + <option '.($_SESSION['AllowOrderLineItemNarrative']=='1'?'selected="selected" ':'').'value="1">'._('Allow Narrative Entry').'</option> + <option '.($_SESSION['AllowOrderLineItemNarrative']=='0'?'selected="selected" ':'').'value="0">'._('No Narrative Line').'</option> </select></td> <td>' . _('Select whether or not to allow entry of narrative on order line items. This narrative will appear on invoices and packing slips. Useful mainly for service businesses.') . '</td> </tr>'; @@ -432,8 +434,8 @@ //'RequirePickingNote' echo '<tr style="outline: 1px solid"><td>' . _('A picking note must be produced before an order can be delivered') . ':</td> <td><select name="X_RequirePickingNote"> - <option '.($_SESSION['RequirePickingNote']=='1'?'selected ':'').'value="1">'._('Yes').'</option> - <option '.($_SESSION['RequirePickingNote']=='0'?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['RequirePickingNote']=='1'?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.($_SESSION['RequirePickingNote']=='0'?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('Select whether or not a picking note must be produced before an order can be delivered to a customer.') . '</td> </tr>'; @@ -441,8 +443,8 @@ //UpdateCurrencyRatesDaily echo '<tr style="outline: 1px solid"><td>' . _('Auto Update Exchange Rates Daily') . ':</td> <td><select name="X_UpdateCurrencyRatesDaily"> - <option '.($_SESSION['UpdateCurrencyRatesDaily']!='1'?'selected ':'').'value="1">'._('Automatic').'</option> - <option '.($_SESSION['UpdateCurrencyRatesDaily']=='0'?'selected ':'').'value="0">'._('Manual').'</option> + <option '.($_SESSION['UpdateCurrencyRatesDaily']!='1'?'selected="selected" ':'').'value="1">'._('Automatic').'</option> + <option '.($_SESSION['UpdateCurrencyRatesDaily']=='0'?'selected="selected" ':'').'value="0">'._('Manual').'</option> </select></td> <td>' . _('Automatic updates to exchange rates will retrieve the latest daily rates from the European Central Bank once per day - when the first user logs in for the day. Manual will never update the rates automatically - exchange rates will need to be maintained manually') . '</td> </tr>'; @@ -450,8 +452,8 @@ //Default Packing Note Format echo '<tr style="outline: 1px solid"><td>' . _('Format of Packing Slips') . ':</td> <td><select name="X_PackNoteFormat"> - <option '.($_SESSION['PackNoteFormat']=='1'?'selected ':'').'value="1">'._('Laser Printed').'</option> - <option '.($_SESSION['PackNoteFormat']=='2'?'selected ':'').'value="2">'._('Special Stationery').'</option> + <option '.($_SESSION['PackNoteFormat']=='1'?'selected="selected" ':'').'value="1">'._('Laser Printed').'</option> + <option '.($_SESSION['PackNoteFormat']=='2'?'selected="selected" ':'').'value="2">'._('Special Stationery').'</option> </select></td> <td>' . _('Choose the format that packing notes should be printed by default') . '</td> </tr>'; @@ -459,8 +461,8 @@ //Default Invoice Format echo '<tr style="outline: 1px solid"><td>' . _('Invoice Orientation') . ':</td> <td><select name="X_InvoicePortraitFormat"> - <option '.($_SESSION['InvoicePortraitFormat']=='0'?'selected ':'').'value="0">'._('Landscape').'</option> - <option '.($_SESSION['InvoicePortraitFormat']=='1'?'selected ':'').'value="1">'._('Portrait').'</option> + <option '.($_SESSION['InvoicePortraitFormat']=='0'?'selected="selected" ':'').'value="0">'._('Landscape').'</option> + <option '.($_SESSION['InvoicePortraitFormat']=='1'?'selected="selected" ':'').'value="1">'._('Portrait').'</option> </select></td> <td>' . _('Select the invoice layout') . '</td> </tr>'; @@ -468,8 +470,8 @@ //Blind packing note echo '<tr style="outline: 1px solid"><td>' . _('Show company details on packing slips') . ':</td> <td><select name="X_DefaultBlindPackNote"> - <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected ':'').'value="1">'._('Show Company Details').'</option> - <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected ':'').'value="2">'._('Hide Company Details').'</option> + <option '.($_SESSION['DefaultBlindPackNote']=='1'?'selected="selected" ':'').'value="1">'._('Show Company Details').'</option> + <option '.($_SESSION['DefaultBlindPackNote']=='2'?'selected="selected" ':'').'value="2">'._('Hide Company Details').'</option> </select></td> <td>' . _('Customer branches can be set by default not to print packing slips with the company logo and address. This is useful for companies that ship to customers customers and to show the source of the shipment would be inappropriate. There is an option on the setup of customer branches to ship blind, this setting is the default applied to all new customer branches') . '</td> </tr>'; @@ -477,9 +479,9 @@ // Working days on a week echo '<tr style="outline: 1px solid"><td>' . _('Working Days on a Week') . ':</td> <td><select name="X_WorkingDaysWeek"> - <option '.($_SESSION['WorkingDaysWeek']=='7'?'selected ':'').'value="7">7 '._('working days').'</option> - <option '.($_SESSION['WorkingDaysWeek']=='6'?'selected ':'').'value="6">6 '._('working days').'</option> - <option '.($_SESSION['WorkingDaysWeek']=='5'?'selected ':'').'value="5">5 '._('working days').'</option> + <option '.($_SESSION['WorkingDaysWeek']=='7'?'selected="selected" ':'').'value="7">7 '._('working days').'</option> + <option '.($_SESSION['WorkingDaysWeek']=='6'?'selected="selected" ':'').'value="6">6 '._('working days').'</option> + <option '.($_SESSION['WorkingDaysWeek']=='5'?'selected="selected" ':'').'value="5">5 '._('working days').'</option> </select></td> <td>' . _('Number of working days on a week') . '</td> </tr>'; @@ -488,23 +490,23 @@ echo '<tr style="outline: 1px solid"><td>' . _('Dispatch Cut-Off Time') . ':</td> <td><select name="X_DispatchCutOffTime">'; for ($i=0; $i < 24; $i++ ) - echo '<option '.($_SESSION['DispatchCutOffTime'] == $i?'selected ':'').'value="'.$i.'">'.$i; + echo '<option '.($_SESSION['DispatchCutOffTime'] == $i?'selected="selected" ':'').'value="'.$i.'">' . $i . '</option>'; echo '</select></td> <td>' . _('Orders entered after this time will default to be dispatched the following day, this can be over-ridden at the time of sales order entry') . '</td></tr>'; // AllowSalesOfZeroCostItems echo '<tr style="outline: 1px solid"><td>' . _('Allow Sales Of Zero Cost Items') . ':</td> <td><select name="X_AllowSalesOfZeroCostItems"> - <option '.($_SESSION['AllowSalesOfZeroCostItems']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['AllowSalesOfZeroCostItems']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['AllowSalesOfZeroCostItems']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['AllowSalesOfZeroCostItems']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('If an item selected at order entry does not have a cost set up then if this parameter is set to No then the order line will not be able to be entered') . '</td></tr>'; // CreditingControlledItems_MustExist echo '<tr style="outline: 1px solid"><td>' . _('Controlled Items Must Exist For Crediting') . ':</td> <td><select name="X_CreditingControlledItems_MustExist"> - <option '.($_SESSION['CreditingControlledItems_MustExist']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['CreditingControlledItems_MustExist']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['CreditingControlledItems_MustExist']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['CreditingControlledItems_MustExist']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('This parameter relates to the behaviour of the controlled items code. If a serial numbered item has not previously existed then a credit note for it will not be allowed if this is set to Yes') . '</td></tr>'; @@ -518,7 +520,7 @@ echo '<option selected="selected" value="">'._('Unavailable'); } else { while( $row = DB_fetch_array($result) ) { - echo '<option '.($_SESSION['DefaultPriceList'] == $row['typeabbrev']?'selected ':'').'value="'.$row['typeabbrev'].'">'.$row['sales_type']; + echo '<option '.($_SESSION['DefaultPriceList'] == $row['typeabbrev']?'selected="selected" ':'').'value="'.$row['typeabbrev'].'">' . $row['sales_type'] . '</option>'; } } echo '</select></td> @@ -534,7 +536,7 @@ echo '<option selected="selected" value="">'._('Unavailable') . '</option>'; } else { while( $row = DB_fetch_array($result) ) { - echo '<option '.($_SESSION['Default_Shipper'] == $row['shipper_id']?'selected ':'').'value="'.$row['shipper_id'].'">'.$row['shippername'] . '</option>'; + echo '<option '.($_SESSION['Default_Shipper'] == $row['shipper_id']?'selected="selected" ':'').'value="'.$row['shipper_id'].'">'.$row['shippername'] . '</option>'; } } echo '</select></td> @@ -543,8 +545,8 @@ // DoFreightCalc echo '<tr style="outline: 1px solid"><td>' . _('Do Freight Calculation') . ':</td> <td><select name="X_DoFreightCalc"> - <option '.($_SESSION['DoFreightCalc']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['DoFreightCalc']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['DoFreightCalc']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['DoFreightCalc']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('If this is set to Yes then the system will attempt to calculate the freight cost of a dispatch based on the weight and cubic and the data defined for each shipper and their rates for shipping to various locations. The results of this calculation will only be meaningful if the data is entered for the item weight and volume in the stock item setup for all items and the freight costs for each shipper properly maintained.') . '</td></tr>'; @@ -578,7 +580,7 @@ echo '<option selected="selected" value="">'._('Unavailable') . '</option>'; } else { while( $row = DB_fetch_array($result) ) { - echo '<option '.($_SESSION['DefaultTaxCategory'] == $row['taxcatid']?'selected ':'').'value="'.$row['taxcatid'].'">'.$row['taxcatname'] . '</option>'; + echo '<option '.($_SESSION['DefaultTaxCategory'] == $row['taxcatid']?'selected="selected" ':'').'value="'.$row['taxcatid'].'">'.$row['taxcatname'] . '</option>'; } } echo '</select></td> @@ -600,7 +602,7 @@ echo '<option selected="selected" value="">'._('Unavailable') . '</option>'; } else { while( $row = DB_fetch_array($result) ) { - echo '<option '.($_SESSION['CountryOfOperation'] == $row['currabrev']?'selected ':'').'value="'.$row['currabrev'].'">'.$row['country'] . '</option>'; + echo '<option '.($_SESSION['CountryOfOperation'] == $row['currabrev']?'selected="selected" ':'').'value="'.$row['currabrev'].'">'.$row['country'] . '</option>'; } } echo '</select></td> @@ -610,21 +612,21 @@ echo '<tr style="outline: 1px solid"><td>' . _('Standard Cost Decimal Places') . ':</td> <td><select name="X_StandardCostDecimalPlaces">'; for ($i=0; $i <= 4; $i++ ) - echo '<option '.($_SESSION['StandardCostDecimalPlaces'] == $i?'selected ':'').'value="'.$i.'">'.$i; + echo '<option '.($_SESSION['StandardCostDecimalPlaces'] == $i?'selected="selected" ':'').'value="'.$i.'">' . $i . '</option>'; echo '</select></td><td>' . _('Decimal Places to be used in Standard Cost') .'</td></tr>'; // NumberOfPeriodsOfStockUsage echo '<tr style="outline: 1px solid"><td>' . _('Number Of Periods Of StockUsage') . ':</td> <td><select name="X_NumberOfPeriodsOfStockUsage">'; for ($i=1; $i <= 12; $i++ ) - echo '<option '.($_SESSION['NumberOfPeriodsOfStockUsage'] == $i?'selected ':'').'value="'.$i.'">'.$i; + echo '<option '.($_SESSION['NumberOfPeriodsOfStockUsage'] == $i?'selected="selected" ':'').'value="'.$i.'">' . $i . '</option>'; echo '</select></td><td>' . _('In stock usage inquiries this determines how many periods of stock usage to show. An average is calculated over this many periods') .'</td></tr>'; //Show values on GRN echo '<tr style="outline: 1px solid"><td>' . _('Show order values on GRN') . ':</td> <td><select name="X_ShowValueOnGRN"> - <option '.($_SESSION['ShowValueOnGRN']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['ShowValueOnGRN']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['ShowValueOnGRN']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['ShowValueOnGRN']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('Should the value of the purchased stock be shown on the GRN screen') . '</td> </tr>'; @@ -632,16 +634,16 @@ // Check_Qty_Charged_vs_Del_Qty echo '<tr style="outline: 1px solid"><td>' . _('Check Quantity Charged vs Deliver Qty') . ':</td> <td><select name="X_Check_Qty_Charged_vs_Del_Qty"> - <option '.($_SESSION['Check_Qty_Charged_vs_Del_Qty']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['Check_Qty_Charged_vs_Del_Qty']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['Check_Qty_Charged_vs_Del_Qty']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['Check_Qty_Charged_vs_Del_Qty']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('In entry of AP invoices this determines whether or not to check the quantities received into stock tie up with the quantities invoiced') .'</td></tr>'; // Check_Price_Charged_vs_Order_Price echo '<tr style="outline: 1px solid"><td>' . _('Check Price Charged vs Order Price') . ':</td> <td><select name="X_Check_Price_Charged_vs_Order_Price"> - <option '.($_SESSION['Check_Price_Charged_vs_Order_Price']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['Check_Price_Charged_vs_Order_Price']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['Check_Price_Charged_vs_Order_Price']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['Check_Price_Charged_vs_Order_Price']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('In entry of AP invoices this parameter determines whether or not to check invoice prices tie up to ordered prices') .'</td></tr>'; @@ -658,15 +660,15 @@ // PO_AllowSameItemMultipleTimes echo '<tr style="outline: 1px solid"><td>' . _('Purchase Order Allows Same Item Multiple Times') . ':</td> <td><select name="X_PO_AllowSameItemMultipleTimes"> - <option '.($_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes') . '</option> - <option '.(!$_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No') . '</option> + <option '.($_SESSION['PO_AllowSameItemMultipleTimes']?'selected="selected" ':'').'value="1">'._('Yes') . '</option> + <option '.(!$_SESSION['PO_AllowSameItemMultipleTimes']?'selected="selected" ':'').'value="0">'._('No') . '</option> </select></td><td>' . _('If a purchase order can have the same item on the order several times this parameter should be set to yes') . '</td></tr>'; // AutoAuthorisePO echo '<tr style="outline: 1px solid"><td>' . _('Automatically authorise purchase orders if user has authority') . ':</td> <td><select name="X_AutoAuthorisePO"> - <option '.($_SESSION['AutoAuthorisePO'] ?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['AutoAuthorisePO'] ?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['AutoAuthorisePO'] ?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['AutoAuthorisePO'] ?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td><td>' . _('If the user changing an existing purchase order or adding a new puchase order is set up to authorise purchase orders and the order is within their limit, then the purchase order status is automatically set to authorised') . '</td></tr>'; @@ -689,7 +691,7 @@ echo '<tr style="outline: 1px solid"><td>' . _('Financial Year Ends On') . ':</td> <td><select name="X_YearEnd">'; for ($i=1; $i <= sizeof($MonthNames); $i++ ) - echo '<option '.($_SESSION['YearEnd'] == $i ? 'selected ' : '').'value="'.$i.'">'.$MonthNames[$i] . '</option>'; + echo '<option '.($_SESSION['YearEnd'] == $i ? 'selected="selected" ' : '').'value="'.$i.'">'.$MonthNames[$i] . '</option>'; echo '</select></td> <td>' . _('Defining the month in which the financial year ends enables the system to provide useful defaults for general ledger reports') .'</td></tr>'; @@ -792,8 +794,8 @@ // HTTPS_Only echo '<tr style="outline: 1px solid"><td>' . _('Only allow secure socket connections') . ':</td> <td><select name="X_HTTPS_Only"> - <option '.($_SESSION['HTTPS_Only']?'selected ':'').'value="1">'._('Yes') . '</option> - <option '.(!$_SESSION['HTTPS_Only']?'selected ':'').'value="0">'._('No') . '</option> + <option '.($_SESSION['HTTPS_Only']?'selected="selected" ':'').'value="1">'._('Yes') . '</option> + <option '.(!$_SESSION['HTTPS_Only']?'selected="selected" ':'').'value="0">'._('No') . '</option> </select></td> <td>' . _('Force connections to be only over secure sockets - ie encrypted data only') . '</td> </tr>'; @@ -834,7 +836,7 @@ echo '<tr style="outline: 1px solid"><td>' . _('Wiki application') . ':</td> <td><select name="X_WikiApp">'; for ($i=0; $i < sizeof($WikiApplications); $i++ ) { - echo '<option '.($_SESSION['WikiApp'] == $WikiApplications[$i] ? 'selected ' : '').'value="'.$WikiApplications[$i].'">'.$WikiApplications[$i] . '</option>'; + echo '<option '.($_SESSION['WikiApp'] == $WikiApplications[$i] ? 'selected="selected" ' : '').'value="'.$WikiApplications[$i].'">'.$WikiApplications[$i] . '</option>'; } echo '</select></td> <td>' . _('This feature makes webERP show links to a free form company knowledge base using a wiki. This allows sharing of important company information - about customers, suppliers and products and the set up of work flow menus and/or company procedures documentation') .'</td></tr>'; @@ -995,8 +997,8 @@ //DefineControlledOnWOEntry echo '<tr style="outline: 1px solid"><td>' . _('Controlled Items Defined At Work Order Entry') . ':</td> <td><select name="X_DefineControlledOnWOEntry"> - <option '.($_SESSION['DefineControlledOnWOEntry']?'selected ':'').'value="1">'._('Yes').'</option> - <option '.(!$_SESSION['DefineControlledOnWOEntry']?'selected ':'').'value="0">'._('No').'</option> + <option '.($_SESSION['DefineControlledOnWOEntry']?'selected="selected" ':'').'value="1">'._('Yes').'</option> + <option '.(!$_SESSION['DefineControlledOnWOEntry']?'selected="selected" ':'').'value="0">'._('No').'</option> </select></td> <td>' . _('When set to yes, controlled items are defined at the time of the work order creation. Otherwise controlled items (serial numbers and batch/roll/lot references) are entered at the time the finished items are received against the work order') . '</td></tr>'; @@ -1043,7 +1045,8 @@ echo '</table> - <br /><div class="centre"><input type="Submit" name="submit" value="' . _('Update') . '" /></div> + <br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '" /></div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/Z_DataExport.php =================================================================== --- trunk/Z_DataExport.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/Z_DataExport.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -541,7 +541,7 @@ echo '<tr><td>' . _('For Sales Type/Price List') . ':</td>'; echo '<td><select name="SalesType">'; while ($myrow=DB_fetch_array($SalesTypesResult)){ - echo '<option Value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type']; + echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type']; } echo '</select></td></tr>'; @@ -550,7 +550,7 @@ echo '<tr><td>' . _('For Location') . ':</td>'; echo '<td><select name="Location">'; while ($myrow=DB_fetch_array($SalesTypesResult)){ - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname']; } echo '</select></td></tr>'; echo '</table>'; @@ -572,7 +572,7 @@ echo '<tr><td>' . _('For Location') . ':</td>'; echo '<td><select name="Location">'; while ($myrow=DB_fetch_array($SalesTypesResult)){ - echo '<option Value="' . $myrow['loccode'] . '">' . $myrow['locationname']; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname']; } echo '</select></td></tr>'; echo '</table>'; Modified: trunk/install/timezone.php =================================================================== --- trunk/install/timezone.php 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/install/timezone.php 2012-02-27 22:29:51 UTC (rev 4983) @@ -16,9 +16,9 @@ $timezone=$data[$c]; $c++; if ($timezone==$ltz) { - echo "<OPTION selected value='".$timezone."'>".$timezone; + echo "<option selected='selected' value='".$timezone."'>".$timezone; } else { - echo "<OPTION value='".$timezone."'>".$timezone; + echo "<option value='".$timezone."'>".$timezone; } } } Modified: trunk/reportwriter/admin/RCFunctions.inc =================================================================== --- trunk/reportwriter/admin/RCFunctions.inc 2012-02-27 19:19:27 UTC (rev 4982) +++ trunk/reportwriter/admin/RCFunctions.inc 2012-02-27 22:29:51 UTC (rev 4983) @@ -717,8 +717,8 @@ while ($mytable=DB_fetch_row($Result)) { $tablename = strtolower($mytable[0]); - if ($myrow[0] == $tablename) $TableList .= "<OPTION SELECTED Value='" . $tablename . "'>" . $tablename . "</OPTION>"; - else $TableList .= "<OPTION Value='" . $tablename . "'>" . $tablename . "</OPTION>"; + if ($myrow[0] == $tablename) $TableList .= "<option selected='selected' value='" . $tablename . "'>" . $tablename . "</option>"; + else $TableList .= "<option value='" . $tablename . "'>" . $tablename . "</option>"; } return $TableList; } // CreateTableList @@ -739,15 +739,15 @@ while($mytable=DB_fetch_row($Result)) { if ($myrow[$Table]) { if ($myrow[$Table] == $mytable[1]){ - $LinkList .= "<OPTION SELECTED Value='" . $mytable[1] . "'>" . $mytable[1]; + $LinkList .= "<option selected='selected' value='" . $mytable[1] . "'>" . $mytable[1]; } else { - $LinkList .= "<OPTION Value='" . $mytable[1] . "'>" . $mytable[1]; + $LinkList .= "<option value='" . $mytable[1] . "'>" . $mytable[1]; } } else { if ($j == 0){ - $LinkList .= "<OPTION SELECTED Value='" . $mytable[1] . "'>" . $mytable[1]; + $LinkList .= "<option selected='selected' value='" . $mytable[1] . "'>" . $mytable[1]; } else { - $LinkList .= "<OPTION Value='" . $mytable[1] . "'>" . $mytable[1]; + $LinkList .= "<option value='" . $mytable[1] . "'>" . $mytable[1]; } $j++; } @@ -780,15 +780,15 @@ while($mytable=DB_fetch_row($Result)) { if ($myrow[$Table+3]) { if ($myrow[$Table+3] == $mytable[2]){ - $LinkEqList .= "<OPTION SELECTED Value='" . $mytable[2] . "'>" . $mytable[2]; + $LinkEqList .= "<option selected='selected' value='" . $mytable[2] . "'>" . $mytable[2]; } else { - $LinkEqList .= "<OPTION Value='" . $mytable[2] . "'>" . $mytable[2]; + $LinkEqList .= "<option value='" . $mytable[2] . "'>" . $mytable[2]; } } else { if ($j == 0){ - $LinkEqList .= "<OPTION SELECTED Value='" . $mytable[2] . "'>" . $mytable[2]; + $LinkEqList .= "<option selected='selected' value='" . $mytable[2] . "'>" . $mytable[2]; } else { - $LinkEqList .= "<OPTION Value='" . $mytable[2] . "'>" . $mytable[2]; + $LinkEqList .= "<option value='" . $mytable[2] . "'>" . $mytable[2]; } $j++; } @@ -818,9 +818,9 @@ while ($mytable=DB_fetch_row($Result)) { $fieldname = strtolower($myrow[$i]) . "." . strtolower($mytable[0]); if ($FName == $fieldname){ - $FieldList .= "<OPTION SELECTED Value='" . $fieldname . "'>" . $fieldname . "</OPTION>"; + $FieldList .= "<option selected='selected' value='" . $fieldname . "'>" . $fieldname . "</option>"; } else { - $FieldList .= "<OPTION Value='" . $fieldname . "'>" . $fieldname . "</OPTION>"; + $FieldList .= "<option value='" . $fieldname . "'>" . $fieldname . "</option>"; } } // while } // if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |