From: webERP D. <web...@li...> - 2012-12-18 23:18:52
|
Tim, Whilst I am a bit pedantic about the code, I am thinking that a commit like this has the potential to destroy the system and it is simply not possible to reveiw this much work. For the sake of the odd bit of white-space which is mostly helpful to easy reading of the code I am intending to reverse this commital. I am concerned that you are in tail spin mode and are hell bent on destroying the project - given your other interests outside of webERP. If this is the case then the decision I must make in relation to protection of our code base are obvious. If you just cannot tow the line then let me know and I will remove you altogether. Regards Phil Phil Daintree Logic Works Ltd http://www.logicworks.co.nz Cell: +64 (0)275 567890 Skype: daintree On Wed 19/12/12 11:00 AM , tim...@us... wrote:Revision: 5765 http://sourceforge.net/p/web-erp/reponame/5765 [1]">http://sourceforge.net/p/web-erp/reponame/5765 Author: tim_schofield Date: 2012-12-18 23:00:00 +0000 (Tue, 18 Dec 2012) Log Message: ----------- Remove superfluous whitesdpace from the end of lines. Originally input by Phil Daintree to inflate his contribution to project Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AddCustomerNotes.php trunk/AddCustomerTypeNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.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/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractCosting.php trunk/ContractOtherReqts.php trunk/CopyBOM.php trunk/CounterReturns.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.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/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDISendInvoices.php trunk/EDISendInvoices_Reece.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.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/GLCodesInquiry.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/GetStockImage.php trunk/GoodsReceived.php trunk/InternalStockCategoriesByRole.php trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.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/NoSalesItems.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/PDFGLJournal.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFReceipt.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockNegatives.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/POReport.php trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Chk_ShiptRef_JobRef.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_OrderDetails.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/PeriodsInquiry.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCheque.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.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/SelectAsset.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/ShiptsList.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockAdjustmentsControlled.php trunk/StockCategories.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQties_csv.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.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/SupplierPriceList.php trunk/SupplierTenderCreate.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_ChangeLocationCode.php trunk/Z_ChangeStockCode.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CreateCompanyTemplateFile.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/Z_DataExport.php trunk/Z_DeleteCreditNote.php trunk/Z_DeleteInvoice.php trunk/Z_DeleteOldPrices.php trunk/Z_DeleteSalesTransActions.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_MakeStockLocns.php trunk/Z_RePostGLFromPeriod.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.01-3.02.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_poAdmin.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/geo_displaymap_customers.php trunk/geocode.php trunk/includes/Add_SerialItems.php trunk/includes/Add_SerialItemsOut.php trunk/includes/ConnectDB.inc trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_mysqli.inc trunk/includes/ConnectDB_postgres.inc trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/CountriesArray.php trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/DefineContractClass.php trunk/includes/DefineJournalClass.php trunk/includes/DefineLabelClass.php trunk/includes/DefineOfferClass.php trunk/includes/DefineReceiptClass.php trunk/includes/DefineSpecialOrderClass.php trunk/includes/DefineStockAdjustment.php trunk/includes/DefineStockTransfers.php trunk/includes/DefineSuppAllocsClass.php trunk/includes/DefineSuppTransClass.php trunk/includes/DefineTenderClass.php trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/GetConfig.php trunk/includes/GetSalesTransGLCodes.inc trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/LanguageSetup.php trunk/includes/LanguagesArray.php trunk/includes/Login.php trunk/includes/MiscFunctions.php trunk/includes/OutputSerialItems.php trunk/includes/PDFAgedDebtorsPageHeader.inc trunk/includes/PDFDeliveryDifferencesPageHeader.inc trunk/includes/PDFOrderPageHeader_generic.inc trunk/includes/PDFOrderStatusPageHeader.inc trunk/includes/PDFOrdersInvoicedPageHeader.inc trunk/includes/PDFPaymentRun_PymtFooter.php trunk/includes/PDFProfitAndLossPageHeader.inc trunk/includes/PDFSalesAnalPageHeader.inc trunk/includes/PDFSalesAnalysis.inc trunk/includes/PDFSalesOrder_generic.inc trunk/includes/PDFStarter.php trunk/includes/PDFStatementPageHeader.inc trunk/includes/PDFTopItemsHeader.inc trunk/includes/PDFTransPageHeader.inc trunk/includes/PDFTransPageHeaderPortrait.inc trunk/includes/PDFTrialBalancePageHeader.inc trunk/includes/PO_ReadInOrder.inc trunk/includes/PO_UnsetFormVbls.php trunk/includes/SelectOrderItems_IntoCart.inc trunk/includes/Z_POSDataCreation.php trunk/includes/class.pdf.php trunk/includes/footer.inc trunk/includes/header.inc trunk/includes/htmlMimeMail.php trunk/includes/session.inc trunk/index.php trunk/report_runner.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AccountGroups.php2012-12-18 23:00:00 UTC (rev 5765) @@ -63,7 +63,7 @@ $i=1; $sql="SELECT count(groupname) -FROM accountgroups +FROM accountgroups WHERE groupname='".$_POST['GroupName']."'"; $DbgMsg = _('The SQL that was used to retrieve the information was'); @@ -191,7 +191,7 @@ prnMsg( _('Cannot delete this account group because general ledger accounts have been created using this group'),'warn'); echo ' ' . _('There are') . ' ' . $myrow['groups'] . ' ' . _('general ledger accounts that refer to this account group'); echo ' '; - + echo ''; echo ' '; echo ''; @@ -313,7 +313,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ' '; +echo ' '; echo ''; if (isset($_GET['SelectedAccountGroup'])) { @@ -347,10 +347,10 @@ echo ' '; - echo ' - - - '; +echo ' + + + '; echo ' ' . _('Account Group') . ':' . ' @@ -358,7 +358,7 @@ '; } elseif (!isset($_POST['MoveGroup'])) { //end of if $_POST['SelectedAccountGroup'] only do the else when a new record is being entered - + if (!isset($_POST['SelectedAccountGroup'])){ $_POST['SelectedAccountGroup']=''; } @@ -379,10 +379,10 @@ echo ' '; - echo ' - - '; echo ' + + '; +echo ' ' . _('Account Group Name') . ':' . ' '; @@ -455,7 +455,7 @@ echo ' '; echo ''; - echo ''; +echo ''; echo ''; } //end if record deleted no point displaying form to add record Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AccountSections.php2012-12-18 23:00:00 UTC (rev 5765) @@ -126,9 +126,9 @@ $myrow = DB_fetch_array($result); if ($myrow['sections']>0) { prnMsg( _('Cannot delete this account section because general ledger accounts groups have been created using this section'),'warn'); - echo ''; +echo ''; echo ' ' . _('There are') . ' ' . $myrow['sections'] . ' ' . _('general ledger accounts groups that refer to this account section'); - echo ''; +echo ''; } else { //Fetch section name @@ -205,7 +205,7 @@ if (! isset($_GET['delete'])) { echo ''; - echo ' '; +echo ' '; echo ''; if (isset($_GET['SelectedSectionID'])) { @@ -266,7 +266,7 @@ } else { echo ''; } - echo ''; +echo ''; echo ''; } //end if record deleted no point displaying form to add record Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AddCustomerContacts.php2012-12-18 23:00:00 UTC (rev 5765) @@ -171,7 +171,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; if (isset($Id)) { @@ -253,7 +253,7 @@ } else { echo ' '; } - echo ' '; +echo ' '; echo ' @@ -262,7 +262,7 @@ - + '; } //end if record deleted no point displaying form to add record Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AddCustomerNotes.php2012-12-18 23:00:00 UTC (rev 5765) @@ -162,7 +162,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; if (isset($Id)) { @@ -244,7 +244,7 @@ - + '; } //end if record deleted no point displaying form to add record Modified: trunk/AddCustomerTypeNotes.php =================================================================== --- trunk/AddCustomerTypeNotes.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AddCustomerTypeNotes.php2012-12-18 23:00:00 UTC (rev 5765) @@ -154,7 +154,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; if (isset($Id)) { @@ -220,7 +220,7 @@ - + '; } //end if record deleted no point displaying form to add record Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AgedDebtors.php2012-12-18 23:00:00 UTC (rev 5765) @@ -448,7 +448,7 @@ /*if $FromCriteria is not set then show a form to allow input*/ echo ' - + @@ -510,8 +510,8 @@ - - '; + +'; } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AgedSuppliers.php2012-12-18 23:00:00 UTC (rev 5765) @@ -280,7 +280,7 @@ /*if $FromCriteria is not set then show a form to allow input*/ echo ' - + @@ -326,10 +326,10 @@ - - '; + +'; } include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> +?> No newline at end of file Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/Areas.php2012-12-18 23:00:00 UTC (rev 5765) @@ -180,7 +180,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ' '; +echo ' '; echo ''; if (isset($SelectedArea)) { @@ -231,7 +231,7 @@ - + '; } //end if record deleted no point displaying form to add record Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/AuditTrail.php2012-12-18 23:00:00 UTC (rev 5765) @@ -117,7 +117,7 @@ $SQLString = str_replace('SET','',$SQLString); $SQLString = str_replace('WHERE',',',$SQLString); $SQLString = str_replace('AND',',',$SQLString); -$FieldArray = preg_split("/[[:space:]]*([[:alnum:].]+[[:space:]]*=[[:space:]]*(?:'[^']*'|[[:digit:].]+))[[:space:]]*,/", $SQLString, 0, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); +$FieldArray = preg_split("/[[:space:]]*([[:alnum:].]+[[:space:]]*=[[:space:]]*(?:'[^']*'|[[:digit:].]+))[[:space:]]*,/", $SQLString, 0, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); for ($i=0; $i 0) { - $ContainingText = " AND querystring LIKE '%" . $ContainingText . "%' "; +$ContainingText = " AND querystring LIKE '%" . $ContainingText . "%' "; }else{ - $ContainingText = ""; +$ContainingText = ""; } if ($_POST['SelectedUser'] == 'ALL') { Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BOMExtendedQty.php2012-12-18 23:00:00 UTC (rev 5765) @@ -14,7 +14,7 @@ $FontSize=9; $PageNumber=1; $line_height=12; - PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width,$Right_Margin); +PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width,$Right_Margin); if (!$_POST['Quantity'] or !is_numeric(filter_number_format($_POST['Quantity']))) { $_POST['Quantity'] = 1; @@ -250,8 +250,8 @@ echo ' ' . ' ' . $title.' '; echo ' - - + + ' . _('Part') . ': @@ -282,8 +282,8 @@ - - '; + +'; include('includes/footer.inc'); Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BOMIndented.php2012-12-18 23:00:00 UTC (rev 5765) @@ -11,7 +11,7 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Indented BOM Listing')); $pdf->addInfo('Subject',_('Indented BOM Listing')); - $FontSize=9; +$FontSize=9; $PageNumber=1; $line_height=12; @@ -49,7 +49,7 @@ CONCAT(bom.parent,bom.component) AS sortpart FROM bom WHERE bom.parent ='" . $_POST['Part'] . "' - AND bom.effectiveto >= NOW() + AND bom.effectiveto >= NOW() AND bom.effectiveafter = NOW() AND bom.effectiveafter line($Page_Width-$Right_Margin, $YPos,$Left_Margin, $YPos); - - $pdf->OutputD($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf'); - $pdf->__destruct(); +$pdf->OutputD($_SESSION['DatabaseName'] . '_BOMListing_' . date('Y-m-d').'.pdf'); +$pdf->__destruct(); + } else { /*The option to print PDF was not hit */ $title=_('Bill Of Material Listing'); @@ -113,8 +113,8 @@ /*if $FromCriteria is not set then show a form to allow input*/ echo ' - - + + '; echo ' ' . _('From Inventory Part Code') . ':' . ' @@ -128,8 +128,8 @@ echo ' - - '; + + '; echo ''; } include('includes/footer.inc'); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BOMs.php2012-12-18 23:00:00 UTC (rev 5765) @@ -20,7 +20,7 @@ FROM bom WHERE parent='" . $Parent. "'" ,$db); if (DB_num_rows($c_result) > 0) { - + while ($row = DB_fetch_array($c_result)) { //echo ' Parent: ' . $Parent . ' Level: ' . $Level . ' row[component]: ' . $row['component'] .' '; if ($Parent != $row['component']) { @@ -85,13 +85,13 @@ locstock.quantity AS qoh, stockmaster.decimalplaces FROM bom INNER JOIN stockmaster -ON bom.component=stockmaster.stockid -INNER JOIN locations ON -bom.loccode = locations.loccode -INNER JOIN workcentres +ON bom.component=stockmaster.stockid +INNER JOIN locations ON +bom.loccode = locations.loccode +INNER JOIN workcentres ON bom.workcentreadded=workcentres.code -INNER JOIN locstock -ON bom.loccode=locstock.loccode +INNER JOIN locstock +ON bom.loccode=locstock.loccode AND bom.component = locstock.stockid WHERE bom.component='".$Component."' AND bom.parent = '".$Parent."'"; @@ -106,10 +106,10 @@ while ($myrow=DB_fetch_array($result)) { $Level1 = str_repeat('- ',$Level-1).$Level; -if( $myrow['mbflag']=='B' -OR $myrow['mbflag']=='K' +if( $myrow['mbflag']=='B' +OR $myrow['mbflag']=='K' OR $myrow['mbflag']=='D') { - + $DrillText = '%s%s'; $DrillLink = ''._('No lower levels').''; $DrillID=''; @@ -132,12 +132,12 @@ OR $myrow['mbflag']=='K' //kit-set OR $myrow['mbflag']=='A' // assembly OR $myrow['mbflag']=='G') /* ghost */ { - + $QuantityOnHand = _('N/A'); } else { $QuantityOnHand = locale_number_format($myrow['qoh'],$myrow['decimalplaces']); -} - +} + printf(' %s %s %s @@ -372,8 +372,8 @@ //the link to delete a selected record was clicked instead of the Submit button -$sql="DELETE FROM bom -WHERE parent='".$SelectedParent."' +$sql="DELETE FROM bom +WHERE parent='".$SelectedParent."' AND component='".$SelectedComponent."' AND loccode='".$Location."' AND workcentreadded='".$WorkCentre."'"; @@ -382,8 +382,8 @@ $DbgMsg = _('The SQL used to delete the BOM was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -$ComponentSQL = "SELECT component -FROM bom +$ComponentSQL = "SELECT component +FROM bom WHERE parent='" . $SelectedParent ."'"; $ComponentResult = DB_query($ComponentSQL,$db); $ComponentArray = DB_fetch_row($ComponentResult); @@ -453,7 +453,7 @@ $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); $ix = 0; if( DB_num_rows($result) > 0 ) { - echo ' '; + echo ' '; echo ' '._('Manufactured parent items').' : '; while ($myrow = DB_fetch_array($result)){ echo (($ix)?', ':'').''. @@ -461,14 +461,14 @@ $ix++; } //end while loop echo ' '; - echo ' '; + echo ' '; } // Display Assembly Parent Items -$sql = "SELECT bom.parent, -stockmaster.description, +$sql = "SELECT bom.parent, +stockmaster.description, stockmaster.mbflag FROM bom INNER JOIN stockmaster -ON bom.parent=stockmaster.stockid +ON bom.parent=stockmaster.stockid WHERE bom.component='".$SelectedParent."' AND stockmaster.mbflag='A'"; @@ -476,7 +476,7 @@ $DbgMsg = _('The SQL used to retrieve description of the parent part was'); $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { - echo ' '; +echo ' '; echo ' '._('Assembly parent items').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ @@ -485,14 +485,14 @@ $ix++; } //end while loop echo ' '; - echo ' '; +echo ' '; } // Display Kit Sets -$sql = "SELECT bom.parent, -stockmaster.description, +$sql = "SELECT bom.parent, +stockmaster.description, stockmaster.mbflag FROM bom INNER JOIN stockmaster -ON bom.parent=stockmaster.stockid +ON bom.parent=stockmaster.stockid WHERE bom.component='".$SelectedParent."' AND stockmaster.mbflag='K'"; @@ -500,7 +500,7 @@ $DbgMsg = _('The SQL used to retrieve description of the parent part was'); $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { - echo ' '; +echo ' '; echo ' '._('Kit sets').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ @@ -509,14 +509,14 @@ $ix++; } //end while loop echo ' '; - echo ' '; +echo ' '; } // Display Phantom/Ghosts -$sql = "SELECT bom.parent, -stockmaster.description, +$sql = "SELECT bom.parent, +stockmaster.description, stockmaster.mbflag FROM bom INNER JOIN stockmaster -ON bom.parent=stockmaster.stockid +ON bom.parent=stockmaster.stockid WHERE bom.component='".$SelectedParent."' AND stockmaster.mbflag='G'"; @@ -525,7 +525,7 @@ $result=DB_query($sql,$db,$ErrMsg,$DbgMsg); if( DB_num_rows($result) > 0 ) { echo ' '; - echo ' '._('Phantom').' : '; +echo ' '._('Phantom').' : '; $ix = 0; while ($myrow = DB_fetch_array($result)){ echo (($ix)?', ':'').''. @@ -533,7 +533,7 @@ $ix++; } //end while loop echo ' '; - echo ' '; +echo ' '; } echo ' '; @@ -589,7 +589,7 @@ if (! isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; if (isset($_GET['SelectedComponent']) and $InputError !=1) { @@ -601,7 +601,7 @@ workcentreadded, quantity, autoissue -FROM bom +FROM bom WHERE parent='".$SelectedParent."' AND component='".$SelectedComponent."'"; @@ -784,7 +784,7 @@ echo ' - + '; } //end if record deleted no point displaying form to add record @@ -858,9 +858,9 @@ echo ' ' . ' ' . $title . ''; echo '' . ''. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . ' ' . _('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') .''. ' - - - + + + ' . _('Enter text extracts in the') . ' ' . _('DESCRIPTION') . ': ' . _('OR') . ' @@ -871,10 +871,10 @@ '; echo ''; -if (isset($_POST['Search']) -AND isset($result) +if (isset($_POST['Search']) +AND isset($result) AND !isset($SelectedParent)) { - + echo ' '; $TableHeader = ' @@ -883,9 +883,9 @@ '; - + echo $TableHeader; - + $j = 1; $k=0; //row colour counter while ($myrow=DB_fetch_array($result)) { @@ -911,17 +911,17 @@ $myrow['description'], $StockOnHand, $myrow['units']); - + $j++; //end of page full new headings if } //end of while loop - + echo ' '; - + } //end if results to show - + if (!isset($SelectedParent) or $SelectedParent=='') { echo ''; } else { @@ -941,7 +941,7 @@ foreach($array as $key => $item) { // Serialize the current element and create a md5 hash $hash = md5(serialize($item)); -// If the md5 didn't come up yet, add the element to +// If the md5 didn't come up yet, add the element to // arrayRewrite, otherwise drop it if (!isset($arrayHashes[$hash])) { // Save the current element hash @@ -958,4 +958,4 @@ } include('includes/footer.inc'); -?> +?> No newline at end of file Modified: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BackupDatabase.php2012-12-18 23:00:00 UTC (rev 5765) @@ -11,11 +11,11 @@ $BackupFiles = scandir('companies/' . $_SESSION['DatabaseName'], 0); $DeletedFiles = false; foreach ($BackupFiles as $BackupFile){ - + if (mb_substr($BackupFile,0,6)=='Backup'){ - + $DeleteResult = unlink('companies/' . $_SESSION['DatabaseName'] . '/' . $BackupFile); - + if ($DeleteResult==true){ prnMsg(_('Deleted') . ' companies/' . $_SESSION['DatabaseName'] . '/' . $BackupFile,'info'); $DeletedFiles = true; @@ -30,15 +30,15 @@ prnMsg(_('No backup files on the server were deleted'),'info'); } } else { - + $BackupFile = $rootpath . '/companies/' . $_SESSION['DatabaseName'] .'/' . _('Backup') . '_' . Date('Y-m-d-H-i-s') . '.sql.gz'; -$Command = 'mysqldump --opt -h' . $host . ' -u' . $dbuser . ' -p' . $dbpassword . ' ' . $_SESSION['DatabaseName'] . '| gzip > ' . +$Command = 'mysqldump --opt -h' . $host . ' -u' . $dbuser . ' -p' . $dbpassword . ' ' . $_SESSION['DatabaseName'] . '| gzip > ' . $_SERVER['DOCUMENT_ROOT'] . $BackupFile; - - + + $CommandOutput = array(); exec($Command,$CommandOutput, $ReturnValue); - + if ($ReturnValue ==0) { prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . ' ' . _('Download the backup file to your locale machine') . '','success'); 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'); @@ -50,7 +50,7 @@ } } /* -//this could be a weighty file attachment!! +//this could be a weighty file attachment!! include('includes/htmlMimeMail.php'); $mail = new htmlMimeMail(); $attachment = $mail->getFile( $BackupFile); Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BankAccounts.php2012-12-18 23:00:00 UTC (rev 5765) @@ -318,7 +318,7 @@ $_POST['BankAccountNumber']=''; } if (!isset($_POST['BankAccountCode'])) { - $_POST['BankAccountCode']=''; +$_POST['BankAccountCode']=''; } if (!isset($_POST['BankAddress'])) { $_POST['BankAddress']=''; Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BankMatching.php2012-12-18 23:00:00 UTC (rev 5765) @@ -125,7 +125,7 @@ '; echo ' - ' . _('to') . ': + ' . _('to') . ': '; echo ' @@ -343,4 +343,4 @@ echo ''; echo ''; include('includes/footer.inc'); -?> +?> No newline at end of file Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/BankReconciliation.php2012-12-18 23:00:00 UTC (rev 5765) @@ -254,8 +254,8 @@ //end of while loop echo ' - - + + ' . _('Total of all unpresented cheques') . ' ' . locale_number_format($TotalUnpresentedCheques,$CurrencyRow['currdecimalplaces']) . ' @@ -330,7 +330,7 @@ } //end of while loop echo ' - + ' . _('Total of all uncleared deposits') . ' @@ -338,7 +338,7 @@ '; $FXStatementBalance = ($Balance*$CurrencyRow['rate'] - $TotalUnpresentedCheques -$TotalUnclearedDeposits); echo ' - + ' . _('BANK STATEMENT BALANCE SHOULD BE') . ' (' . $CURRENCYROW['CURRCODE'] . ') Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/COGSGLPostings.php2012-12-18 23:00:00 UTC (rev 5765) @@ -138,12 +138,12 @@ $sql = "INSERT INTO accountgroups (groupname, sectioninaccounts, pandl, -sequenceintb ) +sequenceintb ) VALUES ('Sales', '1', '1', '10')"; - + $result = DB_query($sql,$db); } $sql = "SELECT accountcode FROM chartmaster WHERE accountcode ='1'"; @@ -215,7 +215,7 @@ $myrow['id'], htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['id']); - + }//END WHILE LIST LOOP echo ' '; } @@ -355,8 +355,8 @@ - + '; include('includes/footer.inc'); -?> +?> No newline at end of file Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/CompanyPreferences.php2012-12-18 23:00:00 UTC (rev 5765) @@ -524,4 +524,4 @@ echo ''; include('includes/footer.inc'); -?> +?> No newline at end of file Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/ConfirmDispatchControlled_Invoice.php2012-12-18 23:00:00 UTC (rev 5765) @@ -19,9 +19,9 @@ } if (isset($_GET['LineNo'])){ - $LineNo = (int)$_GET['LineNo']; +$LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ - $LineNo = (int)$_POST['LineNo']; +$LineNo = (int)$_POST['LineNo']; } else { echo ' '. _('Select a line item to invoice').' Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/ConfirmDispatch_Invoice.php2012-12-18 23:00:00 UTC (rev 5765) @@ -116,7 +116,7 @@ $_SESSION['Items'.$identifier]->PhoneNo = $myrow['contactphone']; $_SESSION['Items'.$identifier]->Email = $myrow['contactemail']; $_SESSION['Items'.$identifier]->SalesPerson = $myrow['salesperson']; - + $_SESSION['Items'.$identifier]->Location = $myrow['fromstkloc']; $_SESSION['Items'.$identifier]->FreightCost = $myrow['freightcost']; $_SESSION['Old_FreightCost'] = $myrow['freightcost']; @@ -322,7 +322,7 @@ $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); - echo $RowStarter; +echo $RowStarter; echo ' '.$LnItm->StockID.' LongDescription . '">' .$LnItm->ItemDescription.' ' . locale_number_format($LnItm->Quantity,$LnItm->DecimalPlaces) . ' @@ -635,9 +635,9 @@ } //end of loop around items on the order for negative check if ($NegativesFound){ - echo ''; - echo ''; - echo ' +echo ''; +echo ''; +echo ' '; include('includes/footer.inc'); exit; @@ -941,7 +941,7 @@ /* Need to get the current location quantity will need it later for the stock movement */ - $SQL="SELECT locstock.quantity + $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $OrderLine->StockID . "' AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; @@ -949,8 +949,8 @@ $Result = DB_query($SQL, $db, $ErrMsg); if (DB_num_rows($Result)==1){ - $LocQtyRow = DB_fetch_row($Result); - $QtyOnHandPrior = $LocQtyRow[0]; + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; } else { /* There must be some error this should never happen */ $QtyOnHandPrior = 0; @@ -988,7 +988,7 @@ $StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ; /* Need to get the current location quantity will need it later for the stock movement */ - $SQL="SELECT locstock.quantity + $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; @@ -996,9 +996,9 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because '); $DbgMsg = _('The SQL that failed was'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - if (DB_num_rows($Result)==1){ - $LocQtyRow = DB_fetch_row($Result); - $QtyOnHandPrior = $LocQtyRow[0]; + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; } else { /*There must be some error this should never happen */ $QtyOnHandPrior = 0; @@ -1060,7 +1060,7 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves (stockid, +$SQL = "INSERT INTO stockmoves (stockid, type, transno, loccode, @@ -1091,7 +1091,7 @@ '" . ($QtyOnHandPrior - $OrderLine->QtyDispatched) . "', '" . $OrderLine->Narrative . "' )"; } else { - // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil +// its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost=0; } @@ -1157,7 +1157,7 @@ if ($OrderLine->Controlled ==1){ foreach($OrderLine->SerialItems as $Item){ - /*We need to add the StockSerialItem record and the StockSerialMoves as well */ + /*We need to add the StockSerialItem record and the StockSerialMoves as well */ $SQL = "UPDATE stockserialitemsSET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $OrderLine->StockID . "' @@ -1678,4 +1678,4 @@ echo ''; include('includes/footer.inc'); -?> +?> No newline at end of file Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/ContractBOM.php2012-12-18 23:00:00 UTC (rev 5765) @@ -399,7 +399,7 @@ }#end if SearchResults to show echo ' ------------------------- - + '; include('includes/footer.inc'); ?> No newline at end of file Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/ContractCosting.php2012-12-18 23:00:00 UTC (rev 5765) @@ -51,7 +51,7 @@ $InventoryIssues[$InventoryIssuesRow['stockid']]->Units = $InventoryIssuesRow['units']; $InventoryIssues[$InventoryIssuesRow['stockid']]->DecimalPlaces = $InventoryIssuesRow['decimalplaces']; $InventoryIssues[$InventoryIssuesRow['stockid']]->Matched = 0; - + } echo ' @@ -89,7 +89,7 @@ '; - + $ContractBOMBudget = 0; $ContractBOMActual = 0; foreach ($_SESSION['Contract'.$identifier]->ContractBOM as $Component) { @@ -100,9 +100,9 @@ ' . $Component->UOM . ' ' . locale_number_format($Component->ItemCost,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . locale_number_format(($Component->ItemCost * $Component->Quantity),$_SESSION['CompanyRecord']['decimalplaces']) . ' '; - + $ContractBOMBudget += ($Component->ItemCost * $Component->Quantity); - + if (isset($InventoryIssues[$Component->StockID])){ $InventoryIssues[$Component->StockID]->Matched=1; echo ' ' . _('Actual usage') . ' @@ -153,7 +153,7 @@ '; - + foreach ($_SESSION['Contract'.$identifier]->ContractReqts as $Requirement) { echo ' ' . $Requirement->Requirement . ' ' . locale_number_format($Requirement->Quantity,'Variable') . ' @@ -355,7 +355,7 @@ 1, '" . ($OtherReqtsBudget+$ContractBOMBudget) . "', '" . ($QtyOnHandPrior + 1) . "')"; - + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('stock movement records could not be inserted when processing the work order receipt because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -433,13 +433,13 @@ if ($_SESSION['Contract'.$identifier]->Status ==2){//the contract is an order being processed now echo 'Branch . "' AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; - $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->Branch . ' ' . _('cannot be retrieved because'); +$ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->Branch . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was') . ':'; $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -179,9 +179,9 @@ $_SESSION['Items'.$identifier]->DeliverBlind = $myrow['deliverblind']; $_SESSION['Items'.$identifier]->SpecialInstructions = $myrow['specialinstructions']; $_SESSION['Items'.$identifier]->DeliveryDays = $myrow['estdeliverydays']; -$_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; +$_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; $_SESSION['Items'.$identifier]->SalesPerson = $myrow['salesman']; - + if ($_SESSION['Items'.$identifier]->SpecialInstructions) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } @@ -318,7 +318,7 @@ AND stockmaster.controlled 1 AND stockmaster.discontinued=0 ORDER BY stockmaster.stockid"; - } else { +} else { $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units, @@ -662,8 +662,8 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){/*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom +bom.quantity + FROM bom WHERE bom.parent='" . $NewItem . "' AND bom.effectiveto > '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; @@ -741,19 +741,19 @@ '; echo ' - - - - - '; + + + + + '; if (in_array($_SESSION['PageSecurityArray']['OrderEntryDiscountPricing'], $_SESSION['AllowedPageSecurityTokens'])){ echo ' '; } echo ' - - ' . _('Total') . ' ' . _('Incl Tax') . ' - '; + + ' . _('Total') . ' ' . _('Incl Tax') . ' + '; $_SESSION['Items'.$identifier]->total = 0; $_SESSION['Items'.$identifier]->totalVolume = 0; @@ -880,7 +880,7 @@ if (!isset($_POST['SalesPerson']) AND $_SESSION['SalesmanLogin']!=NULL ){ $_SESSION['Items'.$identifier]->SalesPerson = $_SESSION['SalesmanLogin']; } - + while ($SalesPersonRow = DB_fetch_array($SalesPeopleResult)){ if ($SalesPersonRow['salesmancode']==$_SESSION['Items'.$identifier]->SalesPerson){ echo '' . $SalesPersonRow['salesmanname'] . ''; @@ -888,7 +888,7 @@ echo '' . $SalesPersonRow['salesmanname'] . ''; } } - + echo ' '; echo ' @@ -1448,7 +1448,7 @@ qty, standardcost, show_on_inv_crds, -newqoh) +newqoh) VALUES ('" . $AssParts['component'] . "', 10, '" . $InvoiceNo . "', @@ -2224,13 +2224,13 @@ echo ' ' . _('ENTER PARTIAL DESCRIPTION') . ': +if (isset($_POST['Keywords'])) echo $_POST['Keywords']; +echo '" /> ' . _('OR') . ' ' . _('ENTER EXTRACT OF THE STOCK CODE') . ': +if (isset($_POST['StockCode'])) echo $_POST['StockCode']; +echo '" /> @@ -2376,13 +2376,13 @@ #end of page full new headings if } #end of while loop - echo ' '; +echo ' '; echo ''; echo ''; echo ''; echo ''; echo ''; - echo ' '; +echo ' '; echo ' '; echo ' '; @@ -2395,13 +2395,13 @@ else { /* show the quick entry form variable */ echo '' . _('USE THIS FORM TO ADD ITEMS QUICKLY IF THE ITEM CODES ARE ALREADY KNOWN') . ' '; - if (count($_SESSION['Items'.$identifier]->LineItems)==0) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } +if (count($_SESSION['Items'.$identifier]->LineItems)==0) { +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +} echo ' '; /*do not display colum unless customer requires po line number by sales order line*/ @@ -2420,11 +2420,11 @@ echo ' '; - echo ''; - echo ''; - echo ''; +echo ''; +echo ''; +echo ''; - } +} if ($_SESSION['Items'.$identifier]->ItemsOrdered >=1){ echo ' '; } Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/CreditStatus.php2012-12-18 23:00:00 UTC (rev 5765) @@ -151,7 +151,7 @@ - '; + '; $k=0; //row colour counter while ($myrow=DB_fetch_array($result)) { @@ -197,7 +197,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; if (isset($SelectedReason) and ($InputError!=1)) { @@ -258,7 +258,7 @@ - + '; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/Credit_Invoice.php2012-12-18 23:00:00 UTC (rev 5765) @@ -57,14 +57,14 @@ stockmoves.loccode, locations.taxprovinceid, currencies.decimalplaces -FROM debtortrans INNER JOIN debtorsmaster +FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno = debtorsmaster.debtorno -INNER JOIN custbranch +INNER JOIN custbranch ON debtortrans.branchcode = custbranch.branchcode AND debtortrans.debtorno = custbranch.debtorno -INNER JOIN currencies +INNER JOIN currencies ON debtorsmaster.currcode = currencies.currabrev -INNER JOIN stockmoves +INNER JOIN stockmoves ON stockmoves.transno=debtortrans.transno AND stockmoves.type=debtortrans.type INNER JOIN locations ON @@ -100,7 +100,7 @@ $_SESSION['CreditItems' . $identifier]->GetFreightTaxes(); $_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $_SESSION['CreditItems' . $identifier]->SalesPerson = $myrow['salesman']; - + DB_free_result($GetInvHdrResult); /*now populate the line items array with the stock movement records for the invoice*/ @@ -168,7 +168,7 @@ '', '', $myrow['standardcost']); - + $_SESSION['CreditItems' . $identifier]->GetExistingTaxes($LineNumber, $myrow['stkmoveno']); if ($myrow['controlled']==1){/* Populate the SerialItems array too*/ @@ -272,7 +272,7 @@ if (!isset($_POST['ProcessCredit'])) { echo ''; - echo ''; +echo ''; echo ''; @@ -521,7 +521,7 @@ /*Start an SQL transaction */ - + $Result = DB_Txn_Begin($db); $DefaultDispatchDate= FormatDateForSQL($DefaultDispatchDate); @@ -530,7 +530,7 @@ $SQL = "SELECT (ovamount+ovgst+ovfreight-ovdiscount-alloc) AS baltoallocate FROM debtortrans -WHERE transno=" . $_SESSION['ProcessingCredit'] . " +WHERE transno=" . $_SESSION['ProcessingCredit'] . " AND type=10"; $Result = DB_query($SQL,$db); $myrow = DB_fetch_row($Result); @@ -653,7 +653,7 @@ foreach ($_SESSION['CreditItems' . $identifier]->LineItems as $CreditLine) { if ($CreditLine->QtyDispatched >0){ - + $LocalCurrencyPrice= round(($CreditLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); if ($CreditLine->MBflag=='M' oR $CreditLine->MBflag=='B'){ @@ -662,7 +662,7 @@ FROM locstock WHERE locstock.stockid='" . $CreditLine->StockID . "' AND loccode= '" . $_SESSION['CreditItems' . $identifier]->Location . "'"; - + $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ $LocQtyRow = DB_fetch_row($Result); @@ -677,10 +677,10 @@ if ($_POST['CreditType']=='Return'){ -/* some want this some do not +/* some want this some do not * We cannot use the orderlineno to update with as it could be different when added to the credit note than it was when the order was created * Also there could potentially be the same item on the order multiple times with different delivery dates - * So all up the SQL below is a bit hit and miss !! + * So all up the SQL below is a bit hit and miss !! * Probably right 99% of time with the item on the order only once */ $SQL = "UPDATE salesorderdetails @@ -689,8 +689,8 @@ WHERE orderno = '" . $_SESSION['CreditItems' . $identifier]->OrderNo . "' AND stkcode = '" . $CreditLine->StockID . "' AND quantity >=" . $CreditLine->QtyDispatched; - + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated for the reduced quantity invoiced because'); $DbgMsg = _('The following SQL to update the sales order detail record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); @@ -998,13 +998,13 @@ '" . $CreditLine->StandardCost . "', '" . ($QtyOnHandPrior + $CreditLine->QtyDispatched) . "', '" . $CreditLine->Narrative . "')"; - + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); $Result = DB_query($SQL, $db,$ErrMsg, $DbgMsg, true); /*Get the ID of the StockMove... */ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); - + $SQL = "INSERT INTO stockmoves (stockid, type, transno, @@ -1038,7 +1038,7 @@ 0, '" . $QtyOnHandPrior . "', '" . $CreditLine->Narrative . "')"; - + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1077,8 +1077,8 @@ '" . $QtyOnHandPrior . "', 1, '" . $CreditLine->Narrative . "')"; - + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records for the purpose of display on the credit note was used'); @@ -1125,8 +1125,8 @@ AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND budgetoractual=1 AND salesanalysis.salesperson='" . $_SESSION['CreditItems' . $identifier]->SalesPerson . "' -GROUP BY stkcategory, -salesanalysis.area, +GROUP BY stkcategory, +salesanalysis.area, salesperson"; $ErrMsg = _('The count to check for existing Sales analysis records could not run because'); @@ -1527,9 +1527,9 @@ accountname FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_=accountgroups.groupname -WHERE accountgroups.pandl=1 +WHERE accountgroups.pandl=1 ORDER BY chartmaster.accountcode"; - + $Result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($Result)) { @@ -1554,7 +1554,7 @@ if (!isset($_POST['SalesPerson']) AND $_SESSION['SalesmanLogin']!=NULL ){ $_SESSION['CreditItems'.$identifier]->SalesPerson = $_SESSION['SalesmanLogin']; } - + while ($SalesPersonRow = DB_fetch_array($SalesPeopleResult)){ if ($SalesPersonRow['salesmancode']==$_SESSION['CreditItems'.$identifier]->SalesPerson){ echo '' . $SalesPersonRow['salesmanname'] . ''; @@ -1562,7 +1562,7 @@ echo '' . $SalesPersonRow['salesmanname'] . ''; } } - + echo ' '; echo ' @@ -1582,4 +1582,4 @@ echo ''; echo ''; include('includes/footer.inc'); -?> +?> No newline at end of file Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/Currencies.php2012-12-18 23:00:00 UTC (rev 5765) @@ -41,9 +41,9 @@ $i=1; $sql="SELECT count(currabrev) -FROM currencies +FROM currencies WHERE currabrev='".$_POST['Abbreviation']."'"; - + $result=DB_query($sql, $db); $myrow=DB_fetch_row($result); @@ -136,7 +136,7 @@ '" . $_POST['HundredsName'] . "', '" . filter_number_format($_POST['DecimalPlaces']) . "', '" . filter_number_format($_POST['ExchangeRate']) . "')"; - + $msg = _('The currency definition record has been added'); } //run the SQL from either of the above possibilites @@ -157,7 +157,7 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN DebtorsMaster -$sql= "SELECT COUNT(*) FROM debtorsmaster +$sql= "SELECT COUNT(*) FROM debtorsmaster WHERE currcode = '" . $SelectedCurrency . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -166,7 +166,7 @@ prnMsg(_('Cannot delete this currency because customer accounts have been created referring to this currency') . ' ' . _('There are') . ' ' . $myrow[0] . ' ' . _('customer accounts that refer to this currency'),'warn'); } else { -$sql= "SELECT COUNT(*) FROM suppliers +$sql= "SELECT COUNT(*) FROM suppliers WHERE suppliers.currcode = '".$SelectedCurrency."'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -174,7 +174,7 @@ prnMsg(_('Cannot delete this currency because supplier accounts have been created referring to this currency') . ' ' . _('There are') . ' ' . $myrow[0] . ' ' . _('supplier accounts that refer to this currency'),'warn'); } else { -$sql= "SELECT COUNT(*) FROM banktrans +$sql= "SELECT COUNT(*) FROM banktrans WHERE currcode = '" . $SelectedCurrency . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -201,12 +201,12 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ -$sql = "SELECT currency, -currabrev, -country, -hundredsname, +$sql = "SELECT currency, +currabrev, +country, +hundredsname, rate, -decimalplaces +decimalplaces FROM currencies"; $result = DB_query($sql, $db); @@ -313,7 +313,7 @@ if (!isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; if (isset($SelectedCurrency) AND $SelectedCurrency!='') { @@ -405,7 +405,7 @@ - + '; } //end if record deleted no point displaying form to add record Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/CustEDISetup.php2012-12-18 23:00:00 UTC (rev 5765) @@ -129,7 +129,7 @@ echo ' '._('Customer EDI Reference') . ': '; +' tabindex="3" type="text" name="EDIReference" size="20" maxlength="20" value="' . $myrow['edireference'] . '" /> '; echo ' '._('EDI Communication Method') . ': '; @@ -146,7 +146,7 @@ echo ' '._('FTP Server or Email Address') . ': '; +' tabindex="5" type="text" name="EDIAddress" size="42" maxlength="40" value="' . $myrow['ediaddress'] . '" /> '; if ($myrow['editransport']=='ftp'){ @@ -158,7 +158,7 @@ echo ' - + '; include('includes/footer.inc'); Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/CustLoginSetup.php2012-12-18 23:00:00 UTC (rev 5765) @@ -162,7 +162,7 @@ ' . _('Email Address') .': - + ' . _('Branch Code') . ': '; @@ -272,7 +272,7 @@ - + '; if (isset($_GET['SelectedUser'])) { Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/CustomerAllocations.php2012-12-18 23:00:00 UTC (rev 5765) @@ -226,12 +226,12 @@ debtortrans.diffonexch, debtortrans.alloc, currencies.decimalplaces -FROM debtortrans INNER JOIN systypes +FROM debtortrans INNER JOIN systypes ON debtortrans.type = systypes.typeid -INNER JOIN debtorsmaster -ON debtortrans.debtorno = debtorsmaster.debtorno -INNER JOIN currencies -ON debtorsmaster.currcode=currencies.currabrev +INNER JOIN debtorsmaster +ON debtortrans.debtorno = debtorsmaster.debtorno +INNER JOIN currencies +ON debtorsmaster.currcode=currencies.currabrev WHERE debtortrans.id='" . $_POST['AllocTrans'] . "'"; $Result = DB_query($SQL,$db); $myrow = DB_fetch_array($Result); @@ -291,13 +291,13 @@ amt, custallocns.id AS allocid FROM debtortrans INNER JOIN systypes -ON debtortrans.type = systypes.typeid +ON debtortrans.type = systypes.typeid INNER JOIN custallocns ON debtortrans.id=custallocns.transid_allocto -WHERE custallocns.transid_allocfrom='" . $_POST['AllocTrans'] . "' +WHERE custallocns.transid_allocfrom='" . $_POST['AllocTrans'] . "' AND debtorno='" . $_SESSION['Alloc']->DebtorNo . "' ORDER BY debtortrans.trandate"; - + $Result=DB_query($SQL,$db); while ($myrow=DB_fetch_array($Result)) { @@ -337,7 +337,7 @@ if (isset($_POST['AllocTrans'])) { // Page called with trans number echo ''; - echo ''; +echo ''; echo ''; echo ''; @@ -423,7 +423,7 @@ $j++; echo ' - + '._('LEFT TO ALLOCATE').' ' . LOCALE_NUMBER_FORMAT(-$_SESSION['ALLOC']->TRANSAMT-$TOTALALLOCATED,$_SESSION['ALLOC']->CURRDECIMALPLACES).' @@ -435,8 +435,8 @@ - - '; + +'; } elseif (isset($_GET['DebtorNo'])) { // Page called with customer code @@ -456,14 +456,14 @@ debtortrans.alloc, currencies.decimalplaces AS currdecimalplaces, debtorsmaster.currcode -FROM debtortrans INNER JOIN debtorsmaster +FROM debtortrans INNER JOIN debtorsmaster ON debtortrans.debtorno=debtorsmaster.debtorno -INNER JOIN systypes +INNER JOIN systypes ON debtortrans.type=systypes.typeid -INNER JOIN currencies +INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev -WHERE debtortrans.debtorno='" . $_GET['DebtorNo'] . "' -AND (debtortrans.type=12 OR debtortrans.type=11) +WHERE debtortrans.debtorno='" . $_GET['DebtorNo'] . "' +AND (debtortrans.type=12 OR debtortrans.type=11) AND debtortrans.settled=0 ORDER BY debtortrans.id"; $result = DB_query($SQL,$db); @@ -499,7 +499,7 @@ /* Page called with no parameters */ unset($_SESSION['Alloc']->Allocs); unset($_SESSION['Alloc']); - + $SQL = "SELECT debtortrans.id, debtortrans.transno, systypes.typename, @@ -513,14 +513,14 @@ debtortrans.alloc, debtorsmaster.currcode, currencies.decimalplaces AS currdecimalplaces -FROM debtortrans INNER JOIN debtorsmaster -ON debtortrans.debtorno=debtorsmaster.debtorno -INNER JOIN systypes -ON debtortrans.type=systypes.typeid -INNER JOIN currencies +FROM debtortrans INNER JOIN debtorsmaster +ON debtortrans.debtorno=debtorsmaster.debtorno +INNER JOIN systypes +ON debtortrans.type=systypes.typeid +INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev -WHERE (debtortrans.type=12 OR debtortrans.type=11) -AND debtortrans.settled=0 +WHERE (debtortrans.type=12 OR debtortrans.type=11) +AND debtortrans.settled=0 AND debtortrans.ovamount= 10 +$sql = "SELECT typeid, +typename +FROM systypes +WHERE typeid >= 10 AND typeid No newline at end of file Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php2012-12-18 08:41:23 UTC (rev 5764) +++ trunk/CustomerTypes.php2012-12-18 23:00:00 UTC (rev 5765) @@ -48,8 +48,8 @@ } $checksql = "SELECT count(*) - FROM debtortype - WHERE typename = '" . $_POST['typename'] . "'"; + FROM debtortype + WHERE typename = '" . $_POST['typename'] . "'"; $checkresult=DB_query($checksql, $db); $checkrow=DB_fetch_row($checkresult); if ($checkrow[0]>0 and !isset($SelectedType)) { @@ -72,8 +72,8 @@ // First check the type is not being duplicated $checkSql = "SELECT count(*) - FROM debtortype - WHERE typename = '" . $_POST['typename'] . "'"; + FROM debtortype + WHERE typename = '" . $_POST['typename'] . "'"; $checkresult = DB_query($checkSql,$db); $checkrow = DB_fetch_row($checkresult); @@ -92,7 +92,7 @@ $msg = _('Customer type') . ' ' . $_POST["typename"] . ' ' . _('has been created'); $checkSql = "SELECT count(typeid) - FROM debtortype"; + FROM debtortype"; $result = DB_query($checkSql, $db); $row = DB_fetch_row($result); @@ -109,8 +109,8 @@ // Does it exist $checkSql = "SELECT count(*) - FROM debtortype - WHERE typeid = '" . $DefaultCustomerType . "'"; + FROM debtortype + WHERE typeid = '" . $DefaultCustomerType . "'"; $checkresult = DB_query($checkSql,$db); $checkrow = DB_fetch_row($checkresult); @@ -136,8 +136,8 @@ // Prevent delete if saletype exist in customer transactions $sql= "SELECT COUNT(*) - FROM debtortrans - WHERE debtortrans.type='".$SelectedType."'"; + FROM debtortrans + WHERE debtortrans.type='".$SelectedType."'"; $ErrMsg = _('The number of transactions using this customer type could not be retrieved'); $result = DB_query($sql,$db,$ErrMsg); @@ -160,7 +160,7 @@ if (DB_Num_Rows($result)>0){ $TypeRow = DB_fetch_array($result); $TypeName = $TypeRow['typename']; - + $sql="DELETE FROM debtortype WHERE typeid='".$SelectedType."'"; $ErrMsg = _('The Type record could not be deleted because'); $result = DB_query($sql,$db,$ErrMsg); @@ -208,9 +208,9 @@ ', $myrow[0], $myrow[1], -htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', +htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0], -htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', +htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow[0]); } //END WHILE LIST LOOP @@ -225,7 +225,7 @@ if (! isset($_GET['delete'])) { echo ''; - echo ''; +echo ''; echo ''; echo ' '; @@ -234,9 +234,9 @@ if ( isset($SelectedType) AND $SelectedType!='' ) { $sql = "SELECT typeid, - typename - FROM debtortype - WHERE typeid='".$SelectedType."'"; + typename +FROM debtortype +WHERE typeid='".$SelectedType."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -246,7 +246,7 @@ echo ''; echo ''; -echo ' '; +echo ' '; // We dont allow the user to change an existing type code @@ -266,7 +266,7 @@ echo ' '; // close main table echo ' '; - echo ''; +echo ''; echo ''; } // end if us... [truncated message content] |