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>... [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>... [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 Tran... [truncated message content] |
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 Tran... [truncated message content] |
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="'... [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="'... [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['PackNoteFor... [truncated message content] |