From: <dai...@us...> - 2011-07-02 23:05:11
|
Revision: 4618 http://web-erp.svn.sourceforge.net/web-erp/?rev=4618&view=rev Author: daintree Date: 2011-07-02 23:04:59 +0000 (Sat, 02 Jul 2011) Log Message: ----------- <br> replaced with <br /> Modified Paths: -------------- trunk/Areas.php trunk/BankMatching.php trunk/CustomerBranches.php trunk/CustomerReceipt.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLTagProfit_Loss.php trunk/GLTrialBalance.php trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/GoodsReceivedControlled.php trunk/InventoryPlanningPrefSupplier.php trunk/Labels.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPPlannedPurchaseOrders.php trunk/MailInventoryValuation.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.lt.php trunk/OrderDetails.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFGrn.php trunk/PDFPeriodStockTransListing.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.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_Chk_ShiptRef_JobRef.php trunk/PO_OrderDetails.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/PaymentAllocations.php trunk/PaymentTerms.php trunk/PcExpenses.php trunk/PcTabs.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PrintCustOrder.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/SMTPServer.php trunk/SalesAnalReptCols.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGraph.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectGLAccount.php trunk/SelectSalesOrder.php trunk/Shipments.php trunk/Shippers.php trunk/Shipt_Select.php trunk/StockAdjustments.php trunk/StockCostUpdate.php trunk/StockCounts.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocTransferReceive.php trunk/StockSerialItemResearch.php trunk/StockTransferControlled.php trunk/StockUsageGraph.php trunk/SuppContractChgs.php trunk/SuppFixedAssetChgs.php trunk/SuppLoginSetup.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SupplierContacts.php trunk/SupplierInvoice.php trunk/TaxAuthorities.php trunk/TaxAuthorityRates.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/WhereUsedInquiry.php trunk/WorkCentres.php trunk/WorkOrderCosting.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_BottomUpCosts.php trunk/Z_ChangeCustomerCode.php trunk/Z_ChangeStockCategory.php trunk/Z_CheckAllocs.php trunk/Z_DeleteInvoice.php trunk/Z_ImportChartOfAccounts.php trunk/Z_ImportGLAccountGroups.php trunk/Z_ImportGLAccountSections.php trunk/Z_ImportPartCodes.php trunk/Z_MakeNewCompany.php trunk/Z_ReverseSuppPaymentRun.php trunk/Z_UpdateChartDetailsBFwd.php trunk/Z_Upgrade3.10.php trunk/Z_Upgrade_3.10-3.11.php trunk/Z_Upgrade_3.11-4.00.php trunk/Z_index.php trunk/Z_poAddLanguage.php trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/Z_poRebuildDefault.php trunk/doc/Manual/ManualAPIFunctions.php trunk/geocode.php trunk/includes/DefineLabelClass.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/InputSerialItemsSequential.php trunk/includes/OutputSerialItems.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/Manual/ManualARInquiries.html trunk/locale/de_DE.utf8/Manual/ManualARReports.html trunk/locale/de_DE.utf8/Manual/ManualARTransactions.html trunk/locale/de_DE.utf8/Manual/ManualAccountsPayable.html trunk/locale/de_DE.utf8/Manual/ManualAccountsReceivable.html trunk/locale/de_DE.utf8/Manual/ManualContents.php trunk/locale/de_DE.utf8/Manual/ManualContributors.html trunk/locale/de_DE.utf8/Manual/ManualCreatingNewSystem.html trunk/locale/de_DE.utf8/Manual/ManualCreditStatus.html trunk/locale/de_DE.utf8/Manual/ManualDevelopmentStructure.html trunk/locale/de_DE.utf8/Manual/ManualGeneralLedger.html trunk/locale/de_DE.utf8/Manual/ManualGettingStarted.html trunk/locale/de_DE.utf8/Manual/ManualHeader.html trunk/locale/de_DE.utf8/Manual/ManualIntroduction.html trunk/locale/de_DE.utf8/Manual/ManualInventory.html trunk/locale/de_DE.utf8/Manual/ManualManufacturing.html trunk/locale/de_DE.utf8/Manual/ManualMultilanguage.html trunk/locale/de_DE.utf8/Manual/ManualNewScripts.html trunk/locale/de_DE.utf8/Manual/ManualPaymentTerms.html trunk/locale/de_DE.utf8/Manual/ManualPrices.html trunk/locale/de_DE.utf8/Manual/ManualReportBuilder.html trunk/locale/de_DE.utf8/Manual/ManualRequirements.html trunk/locale/de_DE.utf8/Manual/ManualSalesAnalysis.html trunk/locale/de_DE.utf8/Manual/ManualSalesOrders.html trunk/locale/de_DE.utf8/Manual/ManualSalesPeople.html trunk/locale/de_DE.utf8/Manual/ManualSalesTypes.html trunk/locale/de_DE.utf8/Manual/ManualSecuritySchema.html trunk/locale/de_DE.utf8/Manual/ManualSecuritySchemaorig.html trunk/locale/de_DE.utf8/Manual/ManualShipments.html trunk/locale/de_DE.utf8/Manual/ManualSpecialUtilities.html trunk/locale/de_DE.utf8/Manual/ManualSystemConventions.html trunk/locale/de_DE.utf8/Manual/ManualTax.html trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages-P-Y.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_CN.utf8/Manual/ManualContents.php trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/Manual/ManualAPIFunctions.php trunk/locale/zh_HK.utf8/Manual/ManualContents.php trunk/reportwriter/FormMaker.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/admin/forms/ReportsImport.html trunk/reportwriter/admin/forms/TplFrmCBlk.html trunk/reportwriter/admin/forms/TplFrmCDta.html trunk/reportwriter/admin/forms/TplFrmData.html trunk/reportwriter/admin/forms/TplFrmLine.html trunk/reportwriter/admin/forms/TplFrmPgNum.html trunk/reportwriter/admin/forms/TplFrmRect.html trunk/reportwriter/admin/forms/TplFrmTBlk.html trunk/reportwriter/admin/forms/TplFrmTbl.html trunk/reportwriter/admin/forms/TplFrmText.html trunk/reportwriter/admin/forms/TplFrmTtl.html trunk/reportwriter/forms/TplFrmLine.html trunk/reportwriter/languages/en_US/reports.php trunk/sql/mysql/upgrade2.9-2.9a.sql trunk/sql/mysql/weberp-demo.sql Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/Areas.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -113,7 +113,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because customer branches have been created using this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches using this area code'); } else { $sql= "SELECT COUNT(*) FROM salesanalysis WHERE salesanalysis.area ='$SelectedArea'"; @@ -122,7 +122,7 @@ if ($myrow[0]>0) { $CancelDelete = 1; prnMsg( _('Cannot delete this area because sales analysis records exist that use this area'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); + echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('sales analysis records referring this area code'); } } @@ -178,7 +178,7 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><br>'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '"><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedArea)) { Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/BankMatching.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -75,7 +75,7 @@ $_POST['ShowTransactions'] = True; } -echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br>'; +echo '<div class="page_help_text">' . _('Use this screen to match webERP Receipts and Payments to your Bank Statement. Check your bank statement and click the check-box when you find the matching transaction.') . '</div><br />'; echo '<form action="'. $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -136,7 +136,7 @@ echo '</select></td></tr>'; -echo '</table><br><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; +echo '</table><br /><div class="centre"><input tabindex="6" type=submit name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '">'; echo '<p><a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a></div>'; echo '<hr />'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/CustomerBranches.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -534,7 +534,7 @@ if (isset($SelectedBranch)) { echo '<div class="centre"><a href=' . $_SERVER['PHP_SELF'] . '?DebtorNo=' . $DebtorNo. '>' . _('Show all branches defined for'). ' '. $DebtorNo . '</a></div>'; } - echo '<br><table class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan=2><div class="centre"><b>'._('Change Branch').'</b></th></tr>'; echo '<tr><td>'._('Branch Code').':</td><td>'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/CustomerReceipt.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -571,7 +571,7 @@ if (DB_error_no($db) !=0) { prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg($db),'error'); if ($debug==1){ - prnMsg(_('SQL used to retrieve the customer details was') . '<br>' . $sql,'error'); + prnMsg(_('SQL used to retrieve the customer details was') . '<br />' . $sql,'error'); } } elseif (DB_num_rows($CustomerSearchResult)==1){ $myrow=DB_fetch_array($CustomerSearchResult); @@ -723,7 +723,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Enter Receipt') . '" alt="">' . ' ' . _('Enter Customer Receipt') . '</p>'; echo '<div class="page_help_text">' . _('To enter a payment TO a customer (ie. to pay out a credit note), enter a negative payment amount.') . '</div>'; } -echo '<br><table class=selection><tr><td>' . _('Bank Account') . ':</td> +echo '<br /><table class=selection><tr><td>' . _('Bank Account') . ':</td> <td><select tabindex=1 name="BankAccount" onChange="ReloadForm(form1.BatchInput)">'; if (DB_num_rows($AccountsResults)==0){ @@ -895,7 +895,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ - echo '<br><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; + echo '<br /><font color=red size=4><b>' . _('ACCOUNT ON HOLD') . '</font></b><br/>'; } echo '<table width="90%" class=selection> @@ -914,7 +914,7 @@ <td class=number>' . number_format(($_SESSION['CustomerRecord']['overdue1']-$_SESSION['CustomerRecord']['overdue2']) ,2) . '</td> <td class=number>' . number_format($_SESSION['CustomerRecord']['overdue2'],2) . '</td> </tr> - </table><br>'; + </table><br />'; echo '<table class="selection">'; @@ -1009,7 +1009,7 @@ echo '<td>' . _('Narrative') . ':</td>'; echo '<td><textarea name="Narrative" cols=40 rows=1></textarea></td>'; echo '</table>'; - echo '<br><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; + echo '<br /><div class="centre"><input tabindex=14 type="submit" name="Process" value="' . _('Accept') . '">'; echo '<input tabindex=14 type="submit" name="Cancel" value="' . _('Cancel') . '"></div>'; } elseif (isset($_SESSION['ReceiptBatch']) AND !isset($_POST['GLEntry'])){ @@ -1028,7 +1028,7 @@ echo '<td>' . _('Customer invoice number') . ':</td>'; echo '<td><input tabindex=11 type="text" name="CustInvNo" size=8 maxlength=8></td>'; echo '</tr></table>'; - echo '<div class="centre"><br>'; + echo '<div class="centre"><br />'; echo '<input tabindex=11 type=submit name="Search" value="' . _('Search Now') . '">'; echo '<br/><br/><input tabindex=12 type=submit name="GLEntry" value="' . _('Enter A GL Receipt') . '"><br /></div>'; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -58,7 +58,7 @@ </tr>'; echo '</table>'; - echo '<br><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '"></div>'; echo '</form>'; } else { $SQL = "SELECT bankaccountname, @@ -133,7 +133,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '"></div>'; echo '</form>'; } include('includes/footer.inc'); Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -8,7 +8,7 @@ include('includes/DefineCartClass.php'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Daily Sales') . '" alt="" />' . ' ' . _('Daily Sales') . '</p>'; -echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br>'; +echo '<div class="page_help_text">' . _('Select the month to show daily sales for') . '</div><br />'; echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -162,7 +162,7 @@ echo '</table><p>'; if (DB_num_rows($result)==0){ echo '<div class="centre"><input tabindex=1 type=submit name="NewEDIInvMsg" value="' . - _('Create New EDI Invoice Message From Default Template') . '"></div><br>'; + _('Create New EDI Invoice Message From Default Template') . '"></div><br />'; } } //end of ifs SelectedLine is not set @@ -240,7 +240,7 @@ echo '<td>'; echo '<input tabindex=4 type="Text" name="LineText" size=50 maxlength=50 VALUE='.$_POST['LineText'] .'>'; echo '</td></tr>'; -echo '</table><br>'; +echo '</table><br />'; if (isset($_GET['SelectedMessageLine'])) { echo '<div class="centre"><input tabindex=5 type="submit" name="update" value="'. _('Update Information'). '"></div>'; } else { Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -58,7 +58,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br>$OrderFile"; + echo "<br />$OrderFile"; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -79,7 +79,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br>".$LineText; + echo "<br />".$LineText; if ($SegTag != substr($LineText,0,3)){ $SegCounter=1; @@ -87,7 +87,7 @@ } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ - $EmailText = $EmailText . "\n" . _('The EANCOM Standard only allows for') . ' ' . $Seg[$SegID]['MaxOccur'] . ' ' ._('occurrences of the segment') . ' ' . $Seg[$SegID]['SegTag'] . ' ' . _('this is the') . ' ' . $SegCounter . ' ' . _('occurrence') . '<br>' . _('The segment line read as follows') . ':<br>' . $LineText; + $EmailText = $EmailText . "\n" . _('The EANCOM Standard only allows for') . ' ' . $Seg[$SegID]['MaxOccur'] . ' ' ._('occurrences of the segment') . ' ' . $Seg[$SegID]['SegTag'] . ' ' . _('this is the') . ' ' . $SegCounter . ' ' . _('occurrence') . '<br />' . _('The segment line read as follows') . ':<br />' . $LineText; } } @@ -114,12 +114,12 @@ if ($SegTag != $Seg[$SegID]['SegTag']){ - $EmailText .= "\n" . _('ERROR') . ': ' . _('Unable to identify segment tag') . ' ' . $SegTag . ' ' . _('from the message line') . '<br>' . $LineText . '<br><font color=RED><b>' . _('This message processing has been aborted and separate advice will be required from the customer to obtain details of the order') . '<b></font>'; + $EmailText .= "\n" . _('ERROR') . ': ' . _('Unable to identify segment tag') . ' ' . $SegTag . ' ' . _('from the message line') . '<br />' . $LineText . '<br /><font color=RED><b>' . _('This message processing has been aborted and separate advice will be required from the customer to obtain details of the order') . '<b></font>'; $TryNextFile = True; } - echo '<br>' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); + echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': $UNH_elements = explode ('+',substr($LineText,4)); @@ -181,13 +181,13 @@ } /*end switch for type of order */ if (isset($BGM_elements[1])){ - echo '<br>echo BGM_elements[1] ' .$BGM_elements[1]; + echo '<br />echo BGM_elements[1] ' .$BGM_elements[1]; $BGM_C106 = explode(':',$BGM_elements[1]); $Order->CustRef = $BGM_C106[0]; $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br>echo BGM_elements[2] " .$BGM_elements[2]; + echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -222,7 +222,7 @@ if (isset($BGM_1225[1])){ $ResponseCode = $BGM_1225[1]; - echo '<br>' . _('Response Code') . ': ' . $ResponseCode; + echo '<br />' . _('Response Code') . ': ' . $ResponseCode; switch ($ResponseCode) { case 'AC': $EmailText .= "\n" . _('Please acknowledge to customer with detail and changes made to the order'); Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-02 22:51:40 UTC (rev 4617) +++ trunk/EmailConfirmation.php 2011-07-02 23:04:59 UTC (rev 4618) @@ -9,12 +9,12 @@ If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ $title = _('Select Order To Print'); include('includes/header.inc'); - echo '<div class="centre"><br><br><br>'; + echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br><br><br><table class="table_index"><tr><td class="menu_group_item"> + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); } @@ -65,12 +65,12 @@ if (DB_num_rows($result)==0){ $title = _('Print Packing Slip Error'); include('includes/header.inc'); - echo '<div class="centre"><br><br><br>'; + echo '<div class="centre"><br /><br /><br />'; prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br><br><br><table class="table_index"><tr><td class="menu_group_item"> + echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ @@ -86,17 +86,17 @@ echo '<p>'; prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . - '<br>' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); + '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a><p>' . '<a href="' . $rootpath. '/PrintCustOrder_generic.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; - echo '<br><br><br>'; + echo '<br /><br /><br />'; echo _('Or select another Order Number to Print'); echo '<table class="table_index"><tr><td class="menu_group_item"> <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br><br><br>'; + </td></tr></table></div><br /><br /><br />'; include('includes/footer.inc'); exit; @@ -125,11 +125,11 @@ $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br><br><br></td></tr>"; + $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> <h2> Order Acknowledgement</h2></td></tr>"; $MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br><br><br></td></tr>"; + $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; $MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . $myrow['deliverto'] . "</td></tr>"; @@ -139,12 +139,12 @@ { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br><br><br></td></tr>"; + ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; } else { $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br><br><br></td></tr>"; + $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; } $MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; if($_REQUEST['POLine'] == 1){ @@ -205,7 +205,7 @@ } /*end if there are order details to show on the order*/ $MailMessage = $MailMessage . "</Table></body></html>"; -// echo $MailMessage . "=mailMessage<br>"; +// echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ echo " The following E-Mail was sent to $MailTo:"; } @@ -225,7 +225,7 @@ <td align='center' colspan='4'> <h2> Order Acknowledgement</h2></td> </tr> <tr> - <td align='center' colspan='4'> <b>Order Number <?=$_GET['TransNo']?> </b><br><br><br></td> + <td align='center' colspan='... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:01:47
|
Revision: 4619 http://web-erp.svn.sourceforge.net/web-erp/?rev=4619&view=rev Author: daintree Date: 2011-07-03 03:01:39 +0000 (Sun, 03 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/PDFDeliveryDifferences.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFStockCheckComparison.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/WorkOrderCosting.php trunk/doc/Change.log Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/CustWhereAlloc.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -12,7 +12,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; -echo '<table class=selection cellpadding=2><tr>'; +echo '<table class="selection" cellpadding=2> + <tr>'; echo '<td>' . _('Type') . ':</td> <td><select tabindex=1 name="TransType"> '; @@ -36,7 +37,9 @@ echo '<td>'._('Transaction Number').':</td> <td><input tabindex=2 type="text" name="TransNo" maxlength=10 size=10 value="'. $_POST['TransNo'] . '"></td>'; -echo '</tr></table><br /> +echo '</tr> + </table> + <br /> <div class="centre"><input tabindex=3 type="submit" name="ShowResults" value="' . _('Show How Allocated') . '"></div>'; if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ @@ -49,9 +52,9 @@ /*First off get the DebtorTransID of the transaction (invoice normally) selected */ $sql = "SELECT id, - ovamount+ovgst AS totamt - FROM debtortrans - WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; + ovamount+ovgst AS totamt + FROM debtortrans + WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; $result = DB_query($sql , $db); @@ -60,25 +63,26 @@ $AllocToID = $myrow['id']; $sql = "SELECT type, - transno, - trandate, - debtortrans.debtorno, - reference, - rate, - ovamount+ovgst+ovfreight+ovdiscount as totalamt, - custallocns.amt - FROM debtortrans - INNER JOIN custallocns ON debtortrans.id=custallocns.transid_allocfrom - WHERE custallocns.transid_allocto='". $AllocToID."'"; + transno, + trandate, + debtortrans.debtorno, + reference, + rate, + ovamount+ovgst+ovfreight+ovdiscount as totalamt, + custallocns.amt + FROM debtortrans + INNER JOIN custallocns + ON debtortrans.id=custallocns.transid_allocfrom + WHERE custallocns.transid_allocto='". $AllocToID."'"; $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); - $TransResult = DB_query($sql, $db, $ErrMsg); if (DB_num_rows($TransResult)==0){ prnMsg(_('There are no allocations made against this transaction'),'info'); } else { - echo '<br /><table cellpadding=2 class=selection>'; + echo '<br /> + <table cellpadding=2 class="selection">'; echo '<tr> <th colspan=6><div class="centre"><font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. number_format($myrow['totamt'],2) . '</font></b></div></th> @@ -91,7 +95,7 @@ <th>' . _('Ex Rate') . '</th> <th>' . _('Amount') . '</th> <th>' . _('Alloc') . '</th> - </tr>'; + </tr>'; echo $tableheader; $RowCounter = 1; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailyBankTransactions.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -30,7 +30,8 @@ <td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td> + </tr></table>'; prnMsg( _('Bank Accounts have not yet been defined. You must first') . ' <a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a> ' . _('and general ledger accounts to be affected'),'warn'); include('includes/footer.inc'); exit; @@ -41,9 +42,9 @@ $_POST['BankAccount']=$myrow['accountcode']; } if ($_POST['BankAccount']==$myrow['accountcode']){ - echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } } echo '</select></td></tr>'; @@ -95,9 +96,9 @@ } else { $BankDetailRow = DB_fetch_array($BankResult); echo '<table class=selection> - <tr> - <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> - </tr>'; + <tr> + <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> + </tr>'; echo '<tr> <th>' . ('Date') . '</th> <th>'._('Transaction type').'</th> Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -52,7 +52,10 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; +echo '</tr> + </table> + <br /> + <div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ @@ -92,13 +95,14 @@ echo '<table cellpadding=2 class=selection>'; echo'<tr> - <th>' . _('Sunday') . '</th> - <th>' . _('Monday') . '</th> - <th>' . _('Tuesday') . '</th> - <th>' . _('Wednesday') . '</th> - <th>' . _('Thursday') . '</th> - <th>' . _('Friday') . '</th> - <th>' . _('Saturday') . '</th></tr>'; + <th>' . _('Sunday') . '</th> + <th>' . _('Monday') . '</th> + <th>' . _('Tuesday') . '</th> + <th>' . _('Wednesday') . '</th> + <th>' . _('Thursday') . '</th> + <th>' . _('Friday') . '</th> + <th>' . _('Saturday') . '</th> + </tr>'; $CumulativeTotalSales = 0; $CumulativeTotalCost = 0; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -27,28 +27,29 @@ /*Now figure out the aged analysis for the customer range under review */ $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - currencies.currency, - SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, - SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' - AND (debtortrans.type=11 OR debtortrans.type=12) THEN - debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END - ) AS fxafterdatetrans - FROM debtorsmaster, - currencies, - debtortrans - WHERE debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.debtorno = debtortrans.debtorno - AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' + debtorsmaster.name, + currencies.currency, + currencies.decimalplaces, + SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, + SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' + AND (debtortrans.type=11 OR debtortrans.type=12) THEN + debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END + ) AS fxafterdatetrans + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' GROUP BY debtorsmaster.debtorno, debtorsmaster.name, - currencies.currency"; + currencies.currency, + currencies.decimalplaces"; $CustomerResult = DB_query($SQL,$db,'','',false,false); @@ -84,8 +85,8 @@ if (abs($Balance)>0.009 OR ABS($FXBalance)>0.009) { - $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],2); - $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],2); + $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],$DebtorBalances['decimalplaces']); + $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],$DebtorBalances['decimalplaces']); $TotBal += $Balance; @@ -109,7 +110,7 @@ include('includes/PDFDebtorBalsPageHeader.inc'); } - $DisplayTotBalance = number_format($TotBal,2); + $DisplayTotBalance = number_format($TotBal,$_SESSION['CompanyRecord']['decimalplaces']); $LeftOvers = $pdf->addTextWrap(50,$YPos,160,$FontSize,_('Total balances'),'left'); $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -40,7 +40,7 @@ if (isset($_POST['ProcessOrder']) OR isset($_POST['MakeRecurringOrder'])) { /*need to check for input errors in any case before order processed */ - $_POST['Update']='Yes rerun the validation checks'; + $_POST['Update']='Yes rerun the validation checks'; //no need for gettext! /*store the old freight cost before it is recalculated to ensure that there has been no change - test for change after freight recalculated and get user to re-confirm if changed */ @@ -126,22 +126,22 @@ } } $sql = "SELECT custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.phoneno, - custbranch.email, - custbranch.defaultlocation, - custbranch.defaultshipvia, - custbranch.deliverblind, - custbranch.specialinstructions, - custbranch.estdeliverydays - FROM custbranch - WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.phoneno, + custbranch.email, + custbranch.defaultlocation, + custbranch.defaultshipvia, + custbranch.deliverblind, + custbranch.specialinstructions, + custbranch.estdeliverydays + FROM custbranch + WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was') . ':'; @@ -256,7 +256,7 @@ if(isset($_POST['MakeRecurringOrder']) AND ! $InputErrors){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/RecurringSalesOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'; - prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/RecurringOrders.php?identifier='.$identifier . "&NewRecurringOrder=Yes'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/RecurringOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'. _('click here') .'</a> '. _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -569,7 +569,7 @@ if ($_POST['Quotation']==0) { /*then its not a quotation its a real order */ - echo '<br /><table class=selection> + echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> @@ -591,13 +591,13 @@ echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> </tr> </table>'; echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> </tr> </table>'; } @@ -639,7 +639,7 @@ $ErrMsg = _('Could not update the contract status'); $DbgMsg = _('The SQL that failed to update the contract status was'); $UpdContractResult=DB_query("UPDATE contracts SET status=2, - wo='" . $WONo . "' + wo='" . $WONo . "' WHERE orderno='" .$_SESSION['ExistingOrder'] . "'", $db,$ErrMsg,$DbgMsg,true); $ErrMsg = _('Could not insert the contract bill of materials'); $InsContractBOM = DB_query("INSERT INTO bom (parent, @@ -653,7 +653,7 @@ workcentreadded, '" . $_SESSION['Items'.$identifier]->Location ."', '" . Date('Y-m-d') . "', - '2037-12-31' + '2099-12-31' FROM contractbom WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); @@ -707,31 +707,30 @@ } //end test to see if the order was a contract quotation being changed to an order - $HeaderSQL = "UPDATE salesorders - SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', - customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', - comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', - ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', - shipvia = '" . $_POST['ShipVia'] . "', - deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', - quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', - confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', - deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', - deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', - deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', - deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', - deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', - deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', - deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', - contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', - contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', - freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', - fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', - printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', - quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', - deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' - WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; + $HeaderSQL = "UPDATE salesorders SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', + customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', + comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', + ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', + shipvia = '" . $_POST['ShipVia'] . "', + deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', + quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', + confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', + deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', + deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', + deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', + deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', + deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', + deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', + contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', + contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', + freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', + fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', + printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', + quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', + deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' + WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; $DbgMsg = _('The SQL that was used to update the order and failed was'); $ErrMsg = _('The order cannot be updated because'); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountCategories.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -28,10 +28,10 @@ //first off validate inputs sensible $result = DB_query("SELECT stockid - FROM stockmaster - WHERE mbflag <>'K' - AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + FROM stockmaster + WHERE mbflag <>'K' + AND mbflag<>'D' + AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -59,8 +59,8 @@ echo '<br />'; } elseif (isset($_POST['SubmitCategory'])) { $sql="UPDATE stockmaster - SET discountcategory='".$_POST['DiscountCategory']."' - WHERE categoryid='".$_POST['stockcategory']."'"; + SET discountcategory='".$_POST['DiscountCategory']."' + WHERE categoryid='".$_POST['stockcategory']."'"; $result=DB_query($sql, $db); } @@ -85,7 +85,10 @@ } echo '</select></td>'; - echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><br />'; + echo '<td><input type="submit" name="select" value="'._('Select').'"></td> + </tr> + </table> + <br />'; } echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; @@ -125,7 +128,8 @@ <td><input type="text" name="PartID" size=10 maxlength=10 value="' . $_POST['PartID'] . '"></td> <td>' . _('Partial description') . ':</td> <td><input type="text" name="PartDesc" size=10 value="' . $_POST['PartDesc'] .'" maxlength=10></td> - <td><input type="submit" name="search" value="' . _('Search') .'"></td></tr>'; + <td><input type="submit" name="search" value="' . _('Search') .'"></td> + </tr>'; echo '</table>'; @@ -212,7 +216,7 @@ printf('<td>%s</td> <td>%s - %s</td> - <td><a href="%s">'. _('Delete') .'</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount category?') . '\');">'. _('Delete') .'</td> </tr>', $myrow['discountcategory'], $myrow['stockid'], Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountMatrix.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -136,23 +136,25 @@ echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br />'; $sql = "SELECT sales_type, - salestype, - discountcategory, - quantitybreak, - discountrate - FROM discountmatrix INNER JOIN salestypes - ON discountmatrix.salestype=salestypes.typeabbrev - ORDER BY salestype, - discountcategory, - quantitybreak"; + salestype, + discountcategory, + quantitybreak, + discountrate + FROM discountmatrix INNER JOIN salestypes + ON discountmatrix.salestype=salestypes.typeabbrev + ORDER BY salestype, + discountcategory, + quantitybreak"; $result = DB_query($sql,$db); echo '<table class=selection>'; -echo '<tr><th>' . _('Sales Type') . '</th> +echo '<tr> + <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> <th>' . _('Quantity Break') . '</th> - <th>' . _('Discount Rate') . ' %' . '</th></tr>'; + <th>' . _('Discount Rate') . ' %' . '</th> + </tr>'; $k=0; //row colour counter @@ -170,7 +172,7 @@ <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> </tr>', $myrow['sales_type'], $myrow['discountcategory'], Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIMessageFormat.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -31,13 +31,13 @@ sequenceno, section, linetext) - SELECT '".$PartnerCode."', - 'INVOIC', - sequenceno, - section, - linetext - FROM edimessageformat - WHERE partnercode='DEFAULT' + SELECT '".$PartnerCode."', + 'INVOIC', + sequenceno, + section, + linetext + FROM edimessageformat + WHERE partnercode='DEFAULT' AND messagetype='INVOIC'"; $ErrMsg = _('There was an error inserting the default template invoice message records for') . ' ' . $PartnerCode . ' ' . _('because'); @@ -113,23 +113,23 @@ or deletion of the records*/ $sql = "SELECT id, - section, - sequenceno, - linetext - FROM edimessageformat - WHERE partnercode='" . $PartnerCode . "' - AND messagetype='" . $MessageType . "' - ORDER BY sequenceno"; + section, + sequenceno, + linetext + FROM edimessageformat + WHERE partnercode='" . $PartnerCode . "' + AND messagetype='" . $MessageType . "' + ORDER BY sequenceno"; $result = DB_query($sql,$db); echo '<table class=selection>'; echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; $TableHeader = '<tr> - <th>' . _('Section') . '</th> - <th>' . _('Sequence') . '</th> - <th>' . _('Format String') . '</th> - </tr>'; + <th>' . _('Section') . '</th> + <th>' . _('Sequence') . '</th> + <th>' . _('Format String') . '</th> + </tr>'; echo $TableHeader; $k=0; //row colour counter @@ -145,18 +145,18 @@ printf('<td>%s</td> - <td class=number>%s</td> - <td>%s</td> - <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> - <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow[1], - $myrow[2], - $myrow[3], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0]); + <td class=number>%s</td> + <td>%s</td> + <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> + <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> + </tr>', + $myrow[1], + $myrow[2], + $myrow[3], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0]); } //END WHILE LIST LOOP echo '</table><p>'; Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIProcessOrders.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -1,10 +1,7 @@ <?php -/* $Revision: 1.20 $ */ /* $Id$*/ -//$PageSecurity =11; - include ('includes/session.inc'); $title = _('Process EDI Orders'); @@ -40,7 +37,7 @@ /*Read in the EANCOM Order Segments for the current seg group from the segments table */ -$sql = 'SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs'; +$sql = "SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs"; $OrderSeg = DB_query($sql,$db); $i=0; $Seg = array(); @@ -58,7 +55,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br />$OrderFile"; + echo '<br />' . $OrderFile; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -541,7 +538,7 @@ } else { $mail->setSubject(_('EDI Order Message') . ' ' . $Order->CustRef); - $EDICustServPerson ="'phil' <phil@localhost>"; + $EDICustServPerson = $_SESSION['PurchasingManagerEmail']; $Recipients = array($EDICustServPerson); } @@ -556,7 +553,6 @@ - } /*end of the loop around all the incoming order files in the incoming orders directory */ Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFDeliveryDifferences.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.15 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -27,42 +24,51 @@ echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Delivery Differences Report') . '</p>'; - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . - ":</td><td><input type=text class=date alt='".$_SESSION['DefaultDateFormat']. - "' name='FromDate' maxlength=10 size=10 value='" . - Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('En... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:01:47
|
Revision: 4619 http://web-erp.svn.sourceforge.net/web-erp/?rev=4619&view=rev Author: daintree Date: 2011-07-03 03:01:39 +0000 (Sun, 03 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EDIProcessOrders.php trunk/PDFDeliveryDifferences.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/PDFStockCheckComparison.php trunk/PrintCheque.php trunk/PrintCustStatements.php trunk/WorkOrderCosting.php trunk/doc/Change.log Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/CustWhereAlloc.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -12,7 +12,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $title . '</p>'; -echo '<table class=selection cellpadding=2><tr>'; +echo '<table class="selection" cellpadding=2> + <tr>'; echo '<td>' . _('Type') . ':</td> <td><select tabindex=1 name="TransType"> '; @@ -36,7 +37,9 @@ echo '<td>'._('Transaction Number').':</td> <td><input tabindex=2 type="text" name="TransNo" maxlength=10 size=10 value="'. $_POST['TransNo'] . '"></td>'; -echo '</tr></table><br /> +echo '</tr> + </table> + <br /> <div class="centre"><input tabindex=3 type="submit" name="ShowResults" value="' . _('Show How Allocated') . '"></div>'; if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ @@ -49,9 +52,9 @@ /*First off get the DebtorTransID of the transaction (invoice normally) selected */ $sql = "SELECT id, - ovamount+ovgst AS totamt - FROM debtortrans - WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; + ovamount+ovgst AS totamt + FROM debtortrans + WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; $result = DB_query($sql , $db); @@ -60,25 +63,26 @@ $AllocToID = $myrow['id']; $sql = "SELECT type, - transno, - trandate, - debtortrans.debtorno, - reference, - rate, - ovamount+ovgst+ovfreight+ovdiscount as totalamt, - custallocns.amt - FROM debtortrans - INNER JOIN custallocns ON debtortrans.id=custallocns.transid_allocfrom - WHERE custallocns.transid_allocto='". $AllocToID."'"; + transno, + trandate, + debtortrans.debtorno, + reference, + rate, + ovamount+ovgst+ovfreight+ovdiscount as totalamt, + custallocns.amt + FROM debtortrans + INNER JOIN custallocns + ON debtortrans.id=custallocns.transid_allocfrom + WHERE custallocns.transid_allocto='". $AllocToID."'"; $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); - $TransResult = DB_query($sql, $db, $ErrMsg); if (DB_num_rows($TransResult)==0){ prnMsg(_('There are no allocations made against this transaction'),'info'); } else { - echo '<br /><table cellpadding=2 class=selection>'; + echo '<br /> + <table cellpadding=2 class="selection">'; echo '<tr> <th colspan=6><div class="centre"><font size=3 color=blue><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. number_format($myrow['totamt'],2) . '</font></b></div></th> @@ -91,7 +95,7 @@ <th>' . _('Ex Rate') . '</th> <th>' . _('Amount') . '</th> <th>' . _('Alloc') . '</th> - </tr>'; + </tr>'; echo $tableheader; $RowCounter = 1; Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailyBankTransactions.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -30,7 +30,8 @@ <td><select name="BankAccount">'; if (DB_num_rows($AccountsResults)==0){ - echo '</select></td></tr></table><p>'; + echo '</select></td> + </tr></table>'; prnMsg( _('Bank Accounts have not yet been defined. You must first') . ' <a href="' . $rootpath . '/BankAccounts.php">' . _('define the bank accounts') . '</a> ' . _('and general ledger accounts to be affected'),'warn'); include('includes/footer.inc'); exit; @@ -41,9 +42,9 @@ $_POST['BankAccount']=$myrow['accountcode']; } if ($_POST['BankAccount']==$myrow['accountcode']){ - echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } else { - echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['bankaccountname'] . ' - ' . $myrow['currcode'] . '</option>'; } } echo '</select></td></tr>'; @@ -95,9 +96,9 @@ } else { $BankDetailRow = DB_fetch_array($BankResult); echo '<table class=selection> - <tr> - <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> - </tr>'; + <tr> + <th colspan=7><font size=3 color=blue>' . _('Account Transactions For').' '.$BankDetailRow['bankaccountname'].' '._('Between').' '.$_POST['FromTransDate'] . ' ' . _('and') . ' ' . $_POST['ToTransDate'] . '</font></th> + </tr>'; echo '<tr> <th>' . ('Date') . '</th> <th>'._('Transaction type').'</th> Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -52,7 +52,10 @@ } echo '</select></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex=4 type=submit name="ShowResults" VALUE="' . _('Show Daily Sales For The Selected Month') . '">'; +echo '</tr> + </table> + <br /> + <div class="centre"><input tabindex=4 type=submit name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '">'; echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ @@ -92,13 +95,14 @@ echo '<table cellpadding=2 class=selection>'; echo'<tr> - <th>' . _('Sunday') . '</th> - <th>' . _('Monday') . '</th> - <th>' . _('Tuesday') . '</th> - <th>' . _('Wednesday') . '</th> - <th>' . _('Thursday') . '</th> - <th>' . _('Friday') . '</th> - <th>' . _('Saturday') . '</th></tr>'; + <th>' . _('Sunday') . '</th> + <th>' . _('Monday') . '</th> + <th>' . _('Tuesday') . '</th> + <th>' . _('Wednesday') . '</th> + <th>' . _('Thursday') . '</th> + <th>' . _('Friday') . '</th> + <th>' . _('Saturday') . '</th> + </tr>'; $CumulativeTotalSales = 0; $CumulativeTotalCost = 0; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DebtorsAtPeriodEnd.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -27,28 +27,29 @@ /*Now figure out the aged analysis for the customer range under review */ $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - currencies.currency, - SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, - SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' - AND (debtortrans.type=11 OR debtortrans.type=12) THEN - debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, - SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN - debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END - ) AS fxafterdatetrans - FROM debtorsmaster, - currencies, - debtortrans - WHERE debtorsmaster.currcode = currencies.currabrev - AND debtorsmaster.debtorno = debtortrans.debtorno - AND debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' + debtorsmaster.name, + currencies.currency, + currencies.decimalplaces, + SUM((debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)/debtortrans.rate) AS balance, + SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) AS fxbalance, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount)/debtortrans.rate ELSE 0 END) AS afterdatetrans, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' + AND (debtortrans.type=11 OR debtortrans.type=12) THEN + debtortrans.diffonexch ELSE 0 END) AS afterdatediffonexch, + SUM(CASE WHEN debtortrans.prd > '" . $_POST['PeriodEnd'] . "' THEN + debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount ELSE 0 END + ) AS fxafterdatetrans + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN debtortrans + ON debtorsmaster.debtorno = debtortrans.debtorno + WHERE debtorsmaster.debtorno >= '" . $_POST['FromCriteria'] . "' AND debtorsmaster.debtorno <= '" . $_POST['ToCriteria'] . "' GROUP BY debtorsmaster.debtorno, debtorsmaster.name, - currencies.currency"; + currencies.currency, + currencies.decimalplaces"; $CustomerResult = DB_query($SQL,$db,'','',false,false); @@ -84,8 +85,8 @@ if (abs($Balance)>0.009 OR ABS($FXBalance)>0.009) { - $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],2); - $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],2); + $DisplayBalance = number_format($DebtorBalances['balance'] - $DebtorBalances['afterdatetrans'],$DebtorBalances['decimalplaces']); + $DisplayFXBalance = number_format($DebtorBalances['fxbalance'] - $DebtorBalances['fxafterdatetrans'],$DebtorBalances['decimalplaces']); $TotBal += $Balance; @@ -109,7 +110,7 @@ include('includes/PDFDebtorBalsPageHeader.inc'); } - $DisplayTotBalance = number_format($TotBal,2); + $DisplayTotBalance = number_format($TotBal,$_SESSION['CompanyRecord']['decimalplaces']); $LeftOvers = $pdf->addTextWrap(50,$YPos,160,$FontSize,_('Total balances'),'left'); $LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right'); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -40,7 +40,7 @@ if (isset($_POST['ProcessOrder']) OR isset($_POST['MakeRecurringOrder'])) { /*need to check for input errors in any case before order processed */ - $_POST['Update']='Yes rerun the validation checks'; + $_POST['Update']='Yes rerun the validation checks'; //no need for gettext! /*store the old freight cost before it is recalculated to ensure that there has been no change - test for change after freight recalculated and get user to re-confirm if changed */ @@ -126,22 +126,22 @@ } } $sql = "SELECT custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.phoneno, - custbranch.email, - custbranch.defaultlocation, - custbranch.defaultshipvia, - custbranch.deliverblind, - custbranch.specialinstructions, - custbranch.estdeliverydays - FROM custbranch - WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.phoneno, + custbranch.email, + custbranch.defaultlocation, + custbranch.defaultshipvia, + custbranch.deliverblind, + custbranch.specialinstructions, + custbranch.estdeliverydays + FROM custbranch + WHERE custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was') . ':'; @@ -256,7 +256,7 @@ if(isset($_POST['MakeRecurringOrder']) AND ! $InputErrors){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/RecurringSalesOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'; - prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' ."<a href='" . $rootpath . '/RecurringOrders.php?identifier='.$identifier . "&NewRecurringOrder=Yes'>". _('click here') .'</a> '. _('to continue'),'info'); + prnMsg(_('You should automatically be forwarded to the entry of recurring order details page') . '. ' . _('If this does not happen') . '(' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/RecurringOrders.php?identifier='.$identifier . '&NewRecurringOrder=Yes">'. _('click here') .'</a> '. _('to continue'),'info'); include('includes/footer.inc'); exit; } @@ -569,7 +569,7 @@ if ($_POST['Quotation']==0) { /*then its not a quotation its a real order */ - echo '<br /><table class=selection> + echo '<br /><table class="selection"> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> @@ -591,13 +591,13 @@ echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Landscape)') .'</a></td> </tr> </table>'; echo '<br /><table class=selection> <tr> <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> - <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?' . SID .'identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> + <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> </tr> </table>'; } @@ -639,7 +639,7 @@ $ErrMsg = _('Could not update the contract status'); $DbgMsg = _('The SQL that failed to update the contract status was'); $UpdContractResult=DB_query("UPDATE contracts SET status=2, - wo='" . $WONo . "' + wo='" . $WONo . "' WHERE orderno='" .$_SESSION['ExistingOrder'] . "'", $db,$ErrMsg,$DbgMsg,true); $ErrMsg = _('Could not insert the contract bill of materials'); $InsContractBOM = DB_query("INSERT INTO bom (parent, @@ -653,7 +653,7 @@ workcentreadded, '" . $_SESSION['Items'.$identifier]->Location ."', '" . Date('Y-m-d') . "', - '2037-12-31' + '2099-12-31' FROM contractbom WHERE contractref='" . $ContractRow['contractref'] . "'",$db,$ErrMsg,$DbgMsg); @@ -707,31 +707,30 @@ } //end test to see if the order was a contract quotation being changed to an order - $HeaderSQL = "UPDATE salesorders - SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', - customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', - comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', - ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', - shipvia = '" . $_POST['ShipVia'] . "', - deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', - quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', - confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', - deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', - deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', - deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', - deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', - deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', - deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', - deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', - contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', - contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', - freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', - fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', - printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', - quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', - deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' - WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; + $HeaderSQL = "UPDATE salesorders SET debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "', + customerref = '". DB_escape_string($_SESSION['Items'.$identifier]->CustRef) ."', + comments = '". DB_escape_string($_SESSION['Items'.$identifier]->Comments) ."', + ordertype = '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', + shipvia = '" . $_POST['ShipVia'] . "', + deliverydate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->DeliveryDate)) . "', + quotedate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->QuoteDate)) . "', + confirmeddate = '" . FormatDateForSQL(DB_escape_string($_SESSION['Items'.$identifier]->ConfirmedDate)) . "', + deliverto = '" . DB_escape_string($_SESSION['Items'.$identifier]->DeliverTo) . "', + deladd1 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd1) . "', + deladd2 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd2) . "', + deladd3 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd3) . "', + deladd4 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd4) . "', + deladd5 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd5) . "', + deladd6 = '" . DB_escape_string($_SESSION['Items'.$identifier]->DelAdd6) . "', + contactphone = '" . $_SESSION['Items'.$identifier]->PhoneNo . "', + contactemail = '" . $_SESSION['Items'.$identifier]->Email . "', + freightcost = '" . $_SESSION['Items'.$identifier]->FreightCost ."', + fromstkloc = '" . $_SESSION['Items'.$identifier]->Location ."', + printedpackingslip = '" . $_POST['ReprintPackingSlip'] . "', + quotation = '" . $_SESSION['Items'.$identifier]->Quotation . "', + deliverblind = '" . $_SESSION['Items'.$identifier]->DeliverBlind . "' + WHERE salesorders.orderno='" . $_SESSION['ExistingOrder'] ."'"; $DbgMsg = _('The SQL that was used to update the order and failed was'); $ErrMsg = _('The order cannot be updated because'); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountCategories.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -28,10 +28,10 @@ //first off validate inputs sensible $result = DB_query("SELECT stockid - FROM stockmaster - WHERE mbflag <>'K' - AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + FROM stockmaster + WHERE mbflag <>'K' + AND mbflag<>'D' + AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -59,8 +59,8 @@ echo '<br />'; } elseif (isset($_POST['SubmitCategory'])) { $sql="UPDATE stockmaster - SET discountcategory='".$_POST['DiscountCategory']."' - WHERE categoryid='".$_POST['stockcategory']."'"; + SET discountcategory='".$_POST['DiscountCategory']."' + WHERE categoryid='".$_POST['stockcategory']."'"; $result=DB_query($sql, $db); } @@ -85,7 +85,10 @@ } echo '</select></td>'; - echo '<td><input type="submit" name="select" value="'._('Select').'"></td></tr></table><br />'; + echo '<td><input type="submit" name="select" value="'._('Select').'"></td> + </tr> + </table> + <br />'; } echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; @@ -125,7 +128,8 @@ <td><input type="text" name="PartID" size=10 maxlength=10 value="' . $_POST['PartID'] . '"></td> <td>' . _('Partial description') . ':</td> <td><input type="text" name="PartDesc" size=10 value="' . $_POST['PartDesc'] .'" maxlength=10></td> - <td><input type="submit" name="search" value="' . _('Search') .'"></td></tr>'; + <td><input type="submit" name="search" value="' . _('Search') .'"></td> + </tr>'; echo '</table>'; @@ -212,7 +216,7 @@ printf('<td>%s</td> <td>%s - %s</td> - <td><a href="%s">'. _('Delete') .'</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount category?') . '\');">'. _('Delete') .'</td> </tr>', $myrow['discountcategory'], $myrow['stockid'], Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/DiscountMatrix.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -136,23 +136,25 @@ echo '<div class="centre"><input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"></div><br />'; $sql = "SELECT sales_type, - salestype, - discountcategory, - quantitybreak, - discountrate - FROM discountmatrix INNER JOIN salestypes - ON discountmatrix.salestype=salestypes.typeabbrev - ORDER BY salestype, - discountcategory, - quantitybreak"; + salestype, + discountcategory, + quantitybreak, + discountrate + FROM discountmatrix INNER JOIN salestypes + ON discountmatrix.salestype=salestypes.typeabbrev + ORDER BY salestype, + discountcategory, + quantitybreak"; $result = DB_query($sql,$db); echo '<table class=selection>'; -echo '<tr><th>' . _('Sales Type') . '</th> +echo '<tr> + <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> <th>' . _('Quantity Break') . '</th> - <th>' . _('Discount Rate') . ' %' . '</th></tr>'; + <th>' . _('Discount Rate') . ' %' . '</th> + </tr>'; $k=0; //row colour counter @@ -170,7 +172,7 @@ <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> + <td><a href="%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this discount matrix record?') . '\');">' . _('Delete') . '</td> </tr>', $myrow['sales_type'], $myrow['discountcategory'], Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIMessageFormat.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -31,13 +31,13 @@ sequenceno, section, linetext) - SELECT '".$PartnerCode."', - 'INVOIC', - sequenceno, - section, - linetext - FROM edimessageformat - WHERE partnercode='DEFAULT' + SELECT '".$PartnerCode."', + 'INVOIC', + sequenceno, + section, + linetext + FROM edimessageformat + WHERE partnercode='DEFAULT' AND messagetype='INVOIC'"; $ErrMsg = _('There was an error inserting the default template invoice message records for') . ' ' . $PartnerCode . ' ' . _('because'); @@ -113,23 +113,23 @@ or deletion of the records*/ $sql = "SELECT id, - section, - sequenceno, - linetext - FROM edimessageformat - WHERE partnercode='" . $PartnerCode . "' - AND messagetype='" . $MessageType . "' - ORDER BY sequenceno"; + section, + sequenceno, + linetext + FROM edimessageformat + WHERE partnercode='" . $PartnerCode . "' + AND messagetype='" . $MessageType . "' + ORDER BY sequenceno"; $result = DB_query($sql,$db); echo '<table class=selection>'; echo '<tr><th colspan=5><font size=3>' . _('Definition of') . ' ' . $MessageType . ' ' . _('for') . ' ' . $PartnerCode.'</font></th></tr>'; $TableHeader = '<tr> - <th>' . _('Section') . '</th> - <th>' . _('Sequence') . '</th> - <th>' . _('Format String') . '</th> - </tr>'; + <th>' . _('Section') . '</th> + <th>' . _('Sequence') . '</th> + <th>' . _('Format String') . '</th> + </tr>'; echo $TableHeader; $k=0; //row colour counter @@ -145,18 +145,18 @@ printf('<td>%s</td> - <td class=number>%s</td> - <td>%s</td> - <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> - <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> - </tr>', - $myrow[1], - $myrow[2], - $myrow[3], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0], - $_SERVER['PHP_SELF'] . '?' . SID, - $myrow[0]); + <td class=number>%s</td> + <td>%s</td> + <td><a href="%s&SelectedMessageLine=%s">' . _('Edit') . '</a></td> + <td><a href="%s&delete=%s">' . _('Delete') . '</a></td> + </tr>', + $myrow[1], + $myrow[2], + $myrow[3], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0], + $_SERVER['PHP_SELF'] . '?' . SID, + $myrow[0]); } //END WHILE LIST LOOP echo '</table><p>'; Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/EDIProcessOrders.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -1,10 +1,7 @@ <?php -/* $Revision: 1.20 $ */ /* $Id$*/ -//$PageSecurity =11; - include ('includes/session.inc'); $title = _('Process EDI Orders'); @@ -40,7 +37,7 @@ /*Read in the EANCOM Order Segments for the current seg group from the segments table */ -$sql = 'SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs'; +$sql = "SELECT id, segtag, maxoccur, seggroup FROM edi_orders_segs"; $OrderSeg = DB_query($sql,$db); $i=0; $Seg = array(); @@ -58,7 +55,7 @@ while (false !== ($OrderFile=readdir($dirhandle))){ /*there are files in the incoming orders dir */ $TryNextFile = False; - echo "<br />$OrderFile"; + echo '<br />' . $OrderFile; /*Counter that keeps track of the array pointer for the 1st seg in the current seg group */ $FirstSegInGrp =0; @@ -541,7 +538,7 @@ } else { $mail->setSubject(_('EDI Order Message') . ' ' . $Order->CustRef); - $EDICustServPerson ="'phil' <phil@localhost>"; + $EDICustServPerson = $_SESSION['PurchasingManagerEmail']; $Recipients = array($EDICustServPerson); } @@ -556,7 +553,6 @@ - } /*end of the loop around all the incoming order files in the incoming orders directory */ Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-07-02 23:04:59 UTC (rev 4618) +++ trunk/PDFDeliveryDifferences.php 2011-07-03 03:01:39 UTC (rev 4619) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.15 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -27,42 +24,51 @@ echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('Delivery Differences Report') . '</p>'; - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . - ":</td><td><input type=text class=date alt='".$_SESSION['DefaultDateFormat']. - "' name='FromDate' maxlength=10 size=10 value='" . - Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('En... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:27:58
|
Revision: 4620 http://web-erp.svn.sourceforge.net/web-erp/?rev=4620&view=rev Author: daintree Date: 2011-07-03 03:27:48 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strpos to mb_strpos Modified Paths: -------------- trunk/AccountSections.php trunk/ConfirmDispatch_Invoice.php trunk/Contracts.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DeliveryDetails.php trunk/MRPCreateDemands.php trunk/Numbers/Words.php trunk/PO_PDFPurchOrder.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectCreditItems.php trunk/Stocks.php trunk/SuppPriceList.php trunk/Tax.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/Z_MakeNewCompany.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_poEditLangModule.php trunk/api/api_debtortransactions.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/CHANGELOG.TXT trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/forms/FormsFilter.html trunk/reportwriter/forms/ReportsFilter.html Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/AccountSections.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -86,7 +86,7 @@ $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -800,7 +800,7 @@ /*Test to see if the item being sold is an asset */ if (substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; - $HyphenOccursAt = strpos($OrderLine->StockID,'-',6); + $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ $AssetNumber = intval(substr($OrderLine->StockID,6)); } else { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -224,7 +224,7 @@ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } - if(ContainsIllegalCharacters($_POST['ContractRef']) OR strpos($_POST['ContractRef'],' ')>0){ + if(ContainsIllegalCharacters($_POST['ContractRef']) OR mb_strpos($_POST['ContractRef'],' ')>0){ prnMsg(_('The contract reference cannot contain any spaces, slashes, or inverted commas. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -59,11 +59,11 @@ echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ -if (strpos($EndDateSQL,'/')) { +if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'-')) { +} elseif (mb_strpos ($EndDateSQL,'-')) { $Date_Array = explode('-',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'.')) { +} elseif (mb_strpos ($EndDateSQL,'.')) { $Date_Array = explode('.',$EndDateSQL); } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DeliveryDetails.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -61,7 +61,7 @@ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } -// if (strpos($_POST['BrAdd1'],_('Box'))>0){ +// if (mb_strpos($_POST['BrAdd1'],_('Box'))>0){ // prnMsg(_('You have entered the word') . ' "' . _('Box') . '" ' . _('in the street address') . '. ' . _('Items cannot be delivered to') . ' ' ._('box') . ' ' . _('addresses'),'warn'); // } if (!is_numeric($_POST['FreightCost'])){ Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/MRPCreateDemands.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -83,11 +83,11 @@ // Create array of dates based on DistDate and adding either weeks or months $FormatedDistdate = FormatDateForSQL($_POST['DistDate']); -if (strpos($FormatedDistdate,"/")) { +if (mb_strpos($FormatedDistdate,"/")) { list($yyyy,$mm,$dd) = explode("/",$FormatedDistdate); -} else if (strpos($FormatedDistdate,"-")) { +} else if (mb_strpos($FormatedDistdate,"-")) { list($yyyy,$mm,$dd) = explode("-",$FormatedDistdate); -} else if (strpos($FormatedDistdate,".")) { +} else if (mb_strpos($FormatedDistdate,".")) { list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate); } Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Numbers/Words.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -64,8 +64,8 @@ //Phil mods to ensure correct translation used. if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck - if (strpos($locale,'.utf8')){ - $locale = substr($locale, 0,strpos($locale,'.utf8')); + if (mb_strpos($locale,'.utf8')){ + $locale = substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = substr($locale,0,2); @@ -132,7 +132,7 @@ @$obj =& new $classname; - if (strpos($num, '.') === false) + if (mb_strpos($num, '.') === false) { $ret = trim($obj->toCurrencyWords($int_curr, $num)); } else { Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PO_PDFPurchOrder.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -385,7 +385,7 @@ if (DB_num_rows($ContactsResult)>0){ echo '<tr><td>'. _('Email to') .':</td><td><select name="EmailTo">'; while ($ContactDetails = DB_fetch_array($ContactsResult)){ - if (mb_strlen($ContactDetails['email'])>2 AND strpos($ContactDetails['email'],'@')>0){ + if (mb_strlen($ContactDetails['email'])>2 AND mb_strpos($ContactDetails['email'],'@')>0){ if ($_POST['EmailTo']==$ContactDetails['email']){ echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } else { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcExpensesTypeTab.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -17,7 +17,7 @@ $SelectedType=''; } -if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0)){ +if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){ $InputError = 1; prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error'); } Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcTypeTabs.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ echo prnMsg(_('The tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TypeTabCode'; $i++; - }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR strpos($_POST['TypeTabCode'],' ')>0){ + }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR mb_strpos($_POST['TypeTabCode'],' ')>0){ $InputError = 1; prnMsg(_('The petty cash tab type code cannot contain any of the illegal characters'),'error'); } elseif (mb_strlen($_POST['TypeTabDescription']) >50) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SelectCreditItems.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = substr($_POST['Select'],strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = substr($_POST['Select'],0,strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Stocks.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -102,7 +102,7 @@ $Errors[$i] = 'StockID'; $i++; } - if (ContainsIllegalCharacters($StockID) OR strpos($StockID,' ')) { + if (ContainsIllegalCharacters($StockID) OR mb_strpos($StockID,' ')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); $Errors[$i] = 'StockID'; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SuppPriceList.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -138,11 +138,11 @@ // 4) Height 5) Text 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set to transparent - if (strpos($myrow[3],'-')) { + if (mb_strpos($myrow[3],'-')) { $DateArray=explode('-', $myrow[3]); - } else if (strpos($myrow[3],'/')) { + } else if (mb_strpos($myrow[3],'/')) { $DateArray=explode('/', $myrow[3]); - } else if (strpos($myrow[3],'.')) { + } else if (mb_strpos($myrow[3],'.')) { $DateArray=explode('.', $myrow[3]); } $dateprice=date($_SESSION['DefaultDateFormat'], mktime(0,0,0,$DateArray[1],$DateArray[2],$DateArray[0])); Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Tax.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -127,9 +127,9 @@ /*Now do the inputs from SuppTrans */ /*Only have dates in SuppTrans no periods so need to get the starting date */ - if (strpos($PeriodEnd,'/')) { + if (mb_strpos($PeriodEnd,'/')) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strpos($PeriodEnd,'.')) { + } elseif (mb_strpos($PeriodEnd,'.')) { $Date_Array = explode('.',$PeriodEnd); } if ($_SESSION['DefaultDateFormat']=='d/m/Y'){ Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxCategories.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxCategoryName'],'&')>0 OR strpos($_POST['TaxCategoryName'],"'")>0) { + if (mb_strpos($_POST['TaxCategoryName'],'&')>0 OR mb_strpos($_POST['TaxCategoryName'],"'")>0) { $InputError = 1; prnMsg( _('The tax category name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/TaxProvinces.php =================================================================== --- trunk/TaxProvinces.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxProvinces.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxProvinceName'],'&')>0 OR strpos($_POST['TaxProvinceName'],"'")>0) { + if (mb_strpos($_POST['TaxProvinceName'],'&')>0 OR mb_strpos($_POST['TaxProvinceName'],"'")>0) { $InputError = 1; prnMsg( _('The tax province name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UnitsOfMeasure.php =================================================================== --- trunk/UnitsOfMeasure.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UnitsOfMeasure.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['MeasureName'],'&')>0 OR strpos($_POST['MeasureName'],"'")>0) { + if (mb_strpos($_POST['MeasureName'],'&')>0 OR mb_strpos($_POST['MeasureName'],"'")>0) { $InputError = 1; prnMsg( _('The unit of measure cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UpgradeDatabase.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -159,7 +159,7 @@ if (substr($SQLEntries[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_MakeNewCompany.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -118,7 +118,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_poEditLangModule.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -144,7 +144,7 @@ for ($i=1; $i<=$TotalLines; $i++) { - $b = strpos($AlsoIn[$i], $_POST['module']); + $b = mb_strpos($AlsoIn[$i], $_POST['module']); if ($b === False) { /* skip it */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/api/api_debtortransactions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -20,11 +20,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -53,9 +53,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strpos($TranDate,'/')>0) { + if (mb_strpos($TranDate,'/')>0) { $DateArray = explode('/',$TranDate); - } elseif (strpos($TranDate,'.')>0) { + } elseif (mb_strpos($TranDate,'.')>0) { $DateArray = explode('.',$TranDate); } if ($DateFormat=='d/m/Y') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Change.log 2011-07-03 03:27:48 UTC (rev 4620) @@ -2666,7 +2666,7 @@ 28/8/04 Steve - Minor changes to theme default.css files 28/8/04 Steve - SelectCustomer.php SelectProduct.php SelectSupplier.php all modified to allow paging where a large result set is returned 25/8/04 SelectCreditItems.php now allows text line entries with each line of the credit note -23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use strpos +23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use mb_strpos 14/8/04 Changed ConfirmDispatch_Invoice.php to allow entry of consignment reference also changed PrintCustTrans.php and PDFPrintCustTransPageHeader.inc to print out the narrative on sales order lines and the consignment number 14/8/04 Changed SelectOrderItems.php to allow entry of narrative and update narrative entries also show warning when quick entries not processed. 14/8/04 Changed DefineCartClass.inc to have a Narrative variable in LineItems and a Consignment variable in the header Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ $weberppassword = $myrow[0]; $ServerString = $_SERVER['HTTP_HOST'].$rootpath; -$FirstBitOfURL = substr($ServerString,0,strpos($ServerString,'/doc/Manual')); +$FirstBitOfURL = substr($ServerString,0,mb_strpos($ServerString,'/doc/Manual')); $ServerURL = "http://". $FirstBitOfURL ."/api/api_xml-rpc.php"; Modified: trunk/includes/ConstructSQLForUserDefinedSalesReport.inc =================================================================== --- trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -257,7 +257,7 @@ The first 6 Columns are defined by the group by fields so for eg the first col defined will be col 7 and so on - thats why need to add 6 to the col defined as */ - $length_ColNum = strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); + $length_ColNum = mb_strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); If ($length_ColNum == 0) { @@ -274,9 +274,9 @@ /*find the comma just before the Select Cls statement for the numerator column */ do { - $strt_ColNum = strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; + $strt_ColNum = mb_strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; - } while (strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && mb_strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); /*The length of the element in the select clause defining the column will be from the comma to the @@ -288,7 +288,7 @@ /*The denominator column is also required if the constant is not used so do the same again for the denominator */ - $length_ColDen = strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); + $length_ColDen = mb_strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); If ($length_ColDen == 0){ prnMsg (_('Calculated fields must use columns defined in the report specification') . '. ' . _('The denominator column number entered for this calculation is not defined in the report'),'error',_('Calculation With Undefined Denominator')); Exit; @@ -299,9 +299,9 @@ /*find the comma just before the Select Cls statement for the denominator column */ do { - $strt_ColDen = strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; + $strt_ColDen = mb_strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; - } while (strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && mb_strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); $length_ColDen = $length_ColDen - $strt_ColDen - 1; Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/DateFunctions.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -21,11 +21,11 @@ //echo '<BR>The date entered is ' . $DateEntry; - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -83,11 +83,11 @@ function MonthAndYearFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -101,11 +101,11 @@ function DayOfWeekFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -119,11 +119,11 @@ function DayOfMonthFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -154,11 +154,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } else { prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); @@ -199,11 +199,11 @@ //for MySQL dates are in the format YYYY-mm-dd //EDI format 102 dates are in the format CCYYMMDD - just need to lose the seperator - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -223,11 +223,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -332,11 +332,11 @@ $DateEntry =trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -388,11 +388,11 @@ $DateEntry = trim($DateEntry... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:27:57
|
Revision: 4620 http://web-erp.svn.sourceforge.net/web-erp/?rev=4620&view=rev Author: daintree Date: 2011-07-03 03:27:48 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strpos to mb_strpos Modified Paths: -------------- trunk/AccountSections.php trunk/ConfirmDispatch_Invoice.php trunk/Contracts.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/DeliveryDetails.php trunk/MRPCreateDemands.php trunk/Numbers/Words.php trunk/PO_PDFPurchOrder.php trunk/PcExpensesTypeTab.php trunk/PcTypeTabs.php trunk/SelectCreditItems.php trunk/Stocks.php trunk/SuppPriceList.php trunk/Tax.php trunk/TaxCategories.php trunk/TaxProvinces.php trunk/UnitsOfMeasure.php trunk/UpgradeDatabase.php trunk/Z_MakeNewCompany.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_poEditLangModule.php trunk/api/api_debtortransactions.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/CHANGELOG.TXT trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/install/save.php trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html trunk/reportwriter/forms/FormsFilter.html trunk/reportwriter/forms/ReportsFilter.html Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/AccountSections.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -86,7 +86,7 @@ $Errors[$i] = 'SectionID'; $i++; } - if (isset($_POST['SectionID']) and strpos($_POST['SectionID'],".")>0) { + if (isset($_POST['SectionID']) and mb_strpos($_POST['SectionID'],".")>0) { $InputError = 1; prnMsg( _('The section number must be an integer'),'error'); $Errors[$i] = 'SectionID'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -800,7 +800,7 @@ /*Test to see if the item being sold is an asset */ if (substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; - $HyphenOccursAt = strpos($OrderLine->StockID,'-',6); + $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ $AssetNumber = intval(substr($OrderLine->StockID,6)); } else { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -224,7 +224,7 @@ prnMsg(_('The contract reference is expected to be more than 2 characters long. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } - if(ContainsIllegalCharacters($_POST['ContractRef']) OR strpos($_POST['ContractRef'],' ')>0){ + if(ContainsIllegalCharacters($_POST['ContractRef']) OR mb_strpos($_POST['ContractRef'],' ')>0){ prnMsg(_('The contract reference cannot contain any spaces, slashes, or inverted commas. Please alter the contract reference before proceeding.'),'error'); $InputError = true; } Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ prnMsg( _('The debtor code cannot be empty'),'error'); $Errors[$i] = 'DebtorNo'; $i++; - } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR strpos($_POST['DebtorNo'], ' '))) { + } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) { $InputError = 1; prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'DebtorNo'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -59,11 +59,11 @@ echo '</form></div>'; echo '<br />'; /*Now get and display the sales data returned */ -if (strpos($EndDateSQL,'/')) { +if (mb_strpos($EndDateSQL,'/')) { $Date_Array = explode('/',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'-')) { +} elseif (mb_strpos ($EndDateSQL,'-')) { $Date_Array = explode('-',$EndDateSQL); -} elseif (strpos ($EndDateSQL,'.')) { +} elseif (mb_strpos ($EndDateSQL,'.')) { $Date_Array = explode('.',$EndDateSQL); } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/DeliveryDetails.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -61,7 +61,7 @@ $InputErrors =1; prnMsg(_('You should enter the street address in the box provided') . '. ' . _('Orders cannot be accepted without a valid street address'),'error'); } -// if (strpos($_POST['BrAdd1'],_('Box'))>0){ +// if (mb_strpos($_POST['BrAdd1'],_('Box'))>0){ // prnMsg(_('You have entered the word') . ' "' . _('Box') . '" ' . _('in the street address') . '. ' . _('Items cannot be delivered to') . ' ' ._('box') . ' ' . _('addresses'),'warn'); // } if (!is_numeric($_POST['FreightCost'])){ Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/MRPCreateDemands.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -83,11 +83,11 @@ // Create array of dates based on DistDate and adding either weeks or months $FormatedDistdate = FormatDateForSQL($_POST['DistDate']); -if (strpos($FormatedDistdate,"/")) { +if (mb_strpos($FormatedDistdate,"/")) { list($yyyy,$mm,$dd) = explode("/",$FormatedDistdate); -} else if (strpos($FormatedDistdate,"-")) { +} else if (mb_strpos($FormatedDistdate,"-")) { list($yyyy,$mm,$dd) = explode("-",$FormatedDistdate); -} else if (strpos($FormatedDistdate,".")) { +} else if (mb_strpos($FormatedDistdate,".")) { list($yyyy,$mm,$dd) = explode(".",$FormatedDistdate); } Modified: trunk/Numbers/Words.php =================================================================== --- trunk/Numbers/Words.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Numbers/Words.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -64,8 +64,8 @@ //Phil mods to ensure correct translation used. if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ //try to drop off the .utf8 suffix then recheck - if (strpos($locale,'.utf8')){ - $locale = substr($locale, 0,strpos($locale,'.utf8')); + if (mb_strpos($locale,'.utf8')){ + $locale = substr($locale, 0,mb_strpos($locale,'.utf8')); } if (!file_exists('Numbers/Words/lang.' . $locale . '.php')){ $locale = substr($locale,0,2); @@ -132,7 +132,7 @@ @$obj =& new $classname; - if (strpos($num, '.') === false) + if (mb_strpos($num, '.') === false) { $ret = trim($obj->toCurrencyWords($int_curr, $num)); } else { Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PO_PDFPurchOrder.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -385,7 +385,7 @@ if (DB_num_rows($ContactsResult)>0){ echo '<tr><td>'. _('Email to') .':</td><td><select name="EmailTo">'; while ($ContactDetails = DB_fetch_array($ContactsResult)){ - if (mb_strlen($ContactDetails['email'])>2 AND strpos($ContactDetails['email'],'@')>0){ + if (mb_strlen($ContactDetails['email'])>2 AND mb_strpos($ContactDetails['email'],'@')>0){ if ($_POST['EmailTo']==$ContactDetails['email']){ echo '<option selected value="' . $ContactDetails['email'] . '">' . $ContactDetails['Contact'] . ' - ' . $ContactDetails['email'] . '</option>'; } else { Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcExpensesTypeTab.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -17,7 +17,7 @@ $SelectedType=''; } -if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR strpos($SelectedType,' ')>0)){ +if (!isset($_GET['delete']) and (ContainsIllegalCharacters($SelectedType) OR mb_strpos($SelectedType,' ')>0)){ $InputError = 1; prnMsg(_('The petty cash tab type contain any of the following characters " \' - & or a space'),'error'); } Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/PcTypeTabs.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ echo prnMsg(_('The tab code must be twenty characters or less long'),'error'); $Errors[$i] = 'TypeTabCode'; $i++; - }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR strpos($_POST['TypeTabCode'],' ')>0){ + }elseif (ContainsIllegalCharacters($_POST['TypeTabCode']) OR mb_strpos($_POST['TypeTabCode'],' ')>0){ $InputError = 1; prnMsg(_('The petty cash tab type code cannot contain any of the illegal characters'),'error'); } elseif (mb_strlen($_POST['TypeTabDescription']) >50) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SelectCreditItems.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -116,8 +116,8 @@ /*will only be true if page called from customer selection form parse the $Select string into customer code and branch code */ - $_SESSION['CreditItems']->Branch = substr($_POST['Select'],strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = substr($_POST['Select'],0,strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->Branch = substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); + $_POST['Select'] = substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); /*Now retrieve customer information - name, salestype, currency, terms etc */ Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Stocks.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -102,7 +102,7 @@ $Errors[$i] = 'StockID'; $i++; } - if (ContainsIllegalCharacters($StockID) OR strpos($StockID,' ')) { + if (ContainsIllegalCharacters($StockID) OR mb_strpos($StockID,' ')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); $Errors[$i] = 'StockID'; Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/SuppPriceList.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -138,11 +138,11 @@ // 4) Height 5) Text 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set to transparent - if (strpos($myrow[3],'-')) { + if (mb_strpos($myrow[3],'-')) { $DateArray=explode('-', $myrow[3]); - } else if (strpos($myrow[3],'/')) { + } else if (mb_strpos($myrow[3],'/')) { $DateArray=explode('/', $myrow[3]); - } else if (strpos($myrow[3],'.')) { + } else if (mb_strpos($myrow[3],'.')) { $DateArray=explode('.', $myrow[3]); } $dateprice=date($_SESSION['DefaultDateFormat'], mktime(0,0,0,$DateArray[1],$DateArray[2],$DateArray[0])); Modified: trunk/Tax.php =================================================================== --- trunk/Tax.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Tax.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -127,9 +127,9 @@ /*Now do the inputs from SuppTrans */ /*Only have dates in SuppTrans no periods so need to get the starting date */ - if (strpos($PeriodEnd,'/')) { + if (mb_strpos($PeriodEnd,'/')) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strpos($PeriodEnd,'.')) { + } elseif (mb_strpos($PeriodEnd,'.')) { $Date_Array = explode('.',$PeriodEnd); } if ($_SESSION['DefaultDateFormat']=='d/m/Y'){ Modified: trunk/TaxCategories.php =================================================================== --- trunk/TaxCategories.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxCategories.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxCategoryName'],'&')>0 OR strpos($_POST['TaxCategoryName'],"'")>0) { + if (mb_strpos($_POST['TaxCategoryName'],'&')>0 OR mb_strpos($_POST['TaxCategoryName'],"'")>0) { $InputError = 1; prnMsg( _('The tax category name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/TaxProvinces.php =================================================================== --- trunk/TaxProvinces.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/TaxProvinces.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['TaxProvinceName'],'&')>0 OR strpos($_POST['TaxProvinceName'],"'")>0) { + if (mb_strpos($_POST['TaxProvinceName'],'&')>0 OR mb_strpos($_POST['TaxProvinceName'],"'")>0) { $InputError = 1; prnMsg( _('The tax province name cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UnitsOfMeasure.php =================================================================== --- trunk/UnitsOfMeasure.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UnitsOfMeasure.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -25,7 +25,7 @@ //first off validate inputs sensible - if (strpos($_POST['MeasureName'],'&')>0 OR strpos($_POST['MeasureName'],"'")>0) { + if (mb_strpos($_POST['MeasureName'],'&')>0 OR mb_strpos($_POST['MeasureName'],"'")>0) { $InputError = 1; prnMsg( _('The unit of measure cannot contain the character') . " '&' " . _('or the character') ." '",'error'); } Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/UpgradeDatabase.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -159,7 +159,7 @@ if (substr($SQLEntries[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_MakeNewCompany.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -118,7 +118,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -49,7 +49,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -41,7 +41,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $SQL = substr($SQL,0,mb_strlen($SQL)-1); $result = DB_query($SQL, $db, $ErrMsg); $SQL=''; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -51,7 +51,7 @@ if (substr($SQLScriptFile[$i],0,8) == 'LANGUAGE'){ $InAFunction = false; } - if (strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ + if (mb_strpos($SQLScriptFile[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,mb_strlen($sql)-1); $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); switch (DB_error_no($db)) { Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/Z_poEditLangModule.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -144,7 +144,7 @@ for ($i=1; $i<=$TotalLines; $i++) { - $b = strpos($AlsoIn[$i], $_POST['module']); + $b = mb_strpos($AlsoIn[$i], $_POST['module']); if ($b === False) { /* skip it */ Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/api/api_debtortransactions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -20,11 +20,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -53,9 +53,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strpos($TranDate,'/')>0) { + if (mb_strpos($TranDate,'/')>0) { $DateArray = explode('/',$TranDate); - } elseif (strpos($TranDate,'.')>0) { + } elseif (mb_strpos($TranDate,'.')>0) { $DateArray = explode('.',$TranDate); } if ($DateFormat=='d/m/Y') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Change.log 2011-07-03 03:27:48 UTC (rev 4620) @@ -2666,7 +2666,7 @@ 28/8/04 Steve - Minor changes to theme default.css files 28/8/04 Steve - SelectCustomer.php SelectProduct.php SelectSupplier.php all modified to allow paging where a large result set is returned 25/8/04 SelectCreditItems.php now allows text line entries with each line of the credit note -23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use strpos +23/8/04 SelectOrderItems.php SelectCreditItems.php strrpos works differently in PHP 5 changed to use mb_strpos 14/8/04 Changed ConfirmDispatch_Invoice.php to allow entry of consignment reference also changed PrintCustTrans.php and PDFPrintCustTransPageHeader.inc to print out the narrative on sales order lines and the consignment number 14/8/04 Changed SelectOrderItems.php to allow entry of narrative and update narrative entries also show warning when quick entries not processed. 14/8/04 Changed DefineCartClass.inc to have a Narrative variable in LineItems and a Consignment variable in the header Modified: trunk/doc/Manual/ManualAPIFunctions.php =================================================================== --- trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/doc/Manual/ManualAPIFunctions.php 2011-07-03 03:27:48 UTC (rev 4620) @@ -26,7 +26,7 @@ $weberppassword = $myrow[0]; $ServerString = $_SERVER['HTTP_HOST'].$rootpath; -$FirstBitOfURL = substr($ServerString,0,strpos($ServerString,'/doc/Manual')); +$FirstBitOfURL = substr($ServerString,0,mb_strpos($ServerString,'/doc/Manual')); $ServerURL = "http://". $FirstBitOfURL ."/api/api_xml-rpc.php"; Modified: trunk/includes/ConstructSQLForUserDefinedSalesReport.inc =================================================================== --- trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/ConstructSQLForUserDefinedSalesReport.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -257,7 +257,7 @@ The first 6 Columns are defined by the group by fields so for eg the first col defined will be col 7 and so on - thats why need to add 6 to the col defined as */ - $length_ColNum = strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); + $length_ColNum = mb_strpos($SQLSelectCls, 'AS col' . ($Cols['colnumerator'] + 8) , 7); If ($length_ColNum == 0) { @@ -274,9 +274,9 @@ /*find the comma just before the Select Cls statement for the numerator column */ do { - $strt_ColNum = strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; + $strt_ColNum = mb_strpos( $SQLSelectCls, ',', $strt_ColNum + 1) + 1; - } while (strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColNum) < $length_ColNum && mb_strpos($SQLSelectCls, ',' , $strt_ColNum)!=0); /*The length of the element in the select clause defining the column will be from the comma to the @@ -288,7 +288,7 @@ /*The denominator column is also required if the constant is not used so do the same again for the denominator */ - $length_ColDen = strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); + $length_ColDen = mb_strpos($SQLSelectCls, 'AS col' . (($Cols['coldenominator']) + 8), 7); If ($length_ColDen == 0){ prnMsg (_('Calculated fields must use columns defined in the report specification') . '. ' . _('The denominator column number entered for this calculation is not defined in the report'),'error',_('Calculation With Undefined Denominator')); Exit; @@ -299,9 +299,9 @@ /*find the comma just before the Select Cls statement for the denominator column */ do { - $strt_ColDen = strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; + $strt_ColDen = mb_strpos( $SQLSelectCls, ',', $strt_ColDen +1)+1; - } while (strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); + } while (mb_strpos($SQLSelectCls, ',', $strt_ColDen) < $length_ColDen && mb_strpos($SQLSelectCls, ',' , $strt_ColDen)!=0); $length_ColDen = $length_ColDen - $strt_ColDen - 1; Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-07-03 03:01:39 UTC (rev 4619) +++ trunk/includes/DateFunctions.inc 2011-07-03 03:27:48 UTC (rev 4620) @@ -21,11 +21,11 @@ //echo '<BR>The date entered is ' . $DateEntry; - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -83,11 +83,11 @@ function MonthAndYearFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -101,11 +101,11 @@ function DayOfWeekFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -119,11 +119,11 @@ function DayOfMonthFromSQLDate($DateEntry) { - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -154,11 +154,11 @@ //for MySQL dates are in the format YYYY-mm-dd - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } else { prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); @@ -199,11 +199,11 @@ //for MySQL dates are in the format YYYY-mm-dd //EDI format 102 dates are in the format CCYYMMDD - just need to lose the seperator - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } @@ -223,11 +223,11 @@ $DateEntry = trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -332,11 +332,11 @@ $DateEntry =trim($DateEntry); - if (strpos($DateEntry,'/')) { + if (mb_strpos($DateEntry,'/')) { $Date_Array = explode('/',$DateEntry); - } elseif (strpos ($DateEntry,'-')) { + } elseif (mb_strpos ($DateEntry,'-')) { $Date_Array = explode('-',$DateEntry); - } elseif (strpos ($DateEntry,'.')) { + } elseif (mb_strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); } elseif (mb_strlen($DateEntry)==6) { $Date_Array[0]= substr($DateEntry,0,2); @@ -388,11 +388,11 @@ $DateEntry = trim($DateEntry... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:35:59
|
Revision: 4621 http://web-erp.svn.sourceforge.net/web-erp/?rev=4621&view=rev Author: daintree Date: 2011-07-03 03:35:49 +0000 (Sun, 03 Jul 2011) Log Message: ----------- substr to mb_substr Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CustomerBranches.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/EDIProcessOrders.php trunk/FixedAssetItems.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GetStockImage.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OffersReceived.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Items.php trunk/PageSecurity.php trunk/SalesCategories.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SpecialOrder.php trunk/Stocks.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/Suppliers.php trunk/UpgradeDatabase.php trunk/WorkOrderReceive.php trunk/Z_ImportChartOfAccounts.php trunk/Z_MakeNewCompany.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_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_purchdata.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/config.distrib.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/LanguageSetup.php trunk/includes/MiscFunctions.php trunk/includes/PDFSalesAnalysis.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/header.inc trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/ChangeLog trunk/includes/phplot/NEWS.txt trunk/includes/phplot/contrib/color_range.test1.php trunk/includes/phplot/contrib/prune_labels.test.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/index.php trunk/install/save.php trunk/javascripts/MiscFunctions.js trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -577,7 +577,7 @@ $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); $CheckNegRow = DB_fetch_array($Result); - if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND substr($OrderLine->StockID,0,4)!='ASSET'){ + if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND mb_substr($OrderLine->StockID,0,4)!='ASSET'){ if ($CheckNegRow['quantity'] < $OrderLine->QtyDispatched){ prnMsg( _('Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected.'),'error',$OrderLine->StockID . ' ' . $CheckNegRow['description'] . ' - ' . _('Negative Stock Prohibited')); $NegativesFound = true; @@ -798,13 +798,13 @@ foreach ($_SESSION['Items']->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ - if (substr($OrderLine->StockID,0,6)=='ASSET-'){ + if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ - $AssetNumber = intval(substr($OrderLine->StockID,6)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number beind disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ContractBOM.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -165,8 +165,8 @@ if (isset($_POST['NewItem'])){ /* NewItem is set from the part selection list as the part code selected */ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $ItemCode => $Quantity) { - if (substr($ItemCode, 0, 3)=='Qty') { - $ItemCode=substr($ItemCode, 3, mb_strlen($ItemCode)-3); + if (mb_substr($ItemCode, 0, 3)=='Qty') { + $ItemCode=mb_substr($ItemCode, 3, mb_strlen($ItemCode)-3); $AlreadyOnThisBOM = 0; if (count($_SESSION['Contract'.$identifier]->ContractBOM)!=0){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -36,7 +36,7 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { - $NewItemArray[substr($key,3)] = trim($value); + $NewItemArray[mb_substr($key,3)] = trim($value); } } } Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -443,7 +443,7 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); echo '<div class="page_help_text">'._('No Branches are defined for').' - '.$myrow[0]. '. ' . _('You must have a minimum of one branch for each Customer. Please add a branch now.') .'</div>'; - $_POST['BranchCode'] = substr($DebtorNo,0,10); + $_POST['BranchCode'] = mb_substr($DebtorNo,0,10); $_POST['BrName'] = $myrow[0]; $_POST['BrAddress1'] = $myrow[1]; $_POST['BrAddress2'] = $myrow[2]; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -280,7 +280,7 @@ $ErrMsg = _('This customer could not be added because'); $result = DB_query($sql,$db,$ErrMsg); - $BranchCode = substr($_POST['DebtorNo'],0,4); + $BranchCode = mb_substr($_POST['DebtorNo'],0,4); echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath .'/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '">'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/DailySalesInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -68,7 +68,7 @@ } if (mb_strlen($Date_Array[2])>4) { - $Date_Array[2]= substr($Date_Array[2],0,2); + $Date_Array[2]= mb_substr($Date_Array[2],0,2); } $StartDateSQL = date('Y-m-d', mktime(0,0,0, (int)$Date_Array[1],1,(int)$Date_Array[0])); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/EDIProcessOrders.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,9 +78,9 @@ $LineText = StripTrailingComma($LineText); echo "<br />".$LineText; - if ($SegTag != substr($LineText,0,3)){ + if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; - $SegTag = substr($LineText,0,3); + $SegTag = mb_substr($LineText,0,3); } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ @@ -119,17 +119,17 @@ echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': - $UNH_elements = explode ('+',substr($LineText,4)); + $UNH_elements = explode ('+',mb_substr($LineText,4)); $Order->Comments .= _('Customer EDI Ref') . ': ' . $UNH_elements[0]; $EmailText .= "\n" . _('EDI Message Ref') . ': ' . $UNH_elements[0]; - if (substr($UNH_elements[1],0,6)!='ORDERS'){ + if (mb_substr($UNH_elements[1],0,6)!='ORDERS'){ $EmailText .= "\n" . _('This message is not an order'); $TryNextFile = True; } break; case 'BGM': - $BGM_elements = explode('+',substr($LineText,4)); + $BGM_elements = explode('+',mb_substr($LineText,4)); $BGM_C002 = explode(':',$BGM_elements[0]); switch ($BGM_C002[0]){ case '220': @@ -239,7 +239,7 @@ break; case 'DTM': /*explode into an arrage all items delimited by the : - only after the + */ - $DTM_C507 = explode(':',substr($LineText,4)); + $DTM_C507 = explode(':',mb_substr($LineText,4)); $LocalFormatDate = ConvertEDIDate($DTM_C507[1],$DTM_C507[2]); switch ($DTM_C507[0]){ @@ -294,7 +294,7 @@ break; case 'PAI': /*explode into an array all items delimited by the : - only after the + */ - $PAI_C534 = explode(':',substr($LineText,4)); + $PAI_C534 = explode(':',mb_substr($LineText,4)); if ($PAI_C534[0]=='1'){ $EmailText .= "\n" . _('Payment will be effected by a direct payment for this order'); } elseif($PAI_C534[0]=='OA'){ @@ -318,7 +318,7 @@ } break; case 'ALI': - $ALI = explode('+',substr($LineText,4)); + $ALI = explode('+',mb_substr($LineText,4)); if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } @@ -347,7 +347,7 @@ } break; case 'FTX': - $FTX = explode('+',substr($LineText,4)); + $FTX = explode('+',mb_substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ if (mb_strlen($FTX[3])>5){ @@ -357,7 +357,7 @@ } break; case 'RFF': - $RFF = explode(':',substr($LineText,4)); + $RFF = explode(':',mb_substr($LineText,4)); switch ($RFF[0]){ case 'AE': $MsgText = "\n" . _('Authorisation for expense no') . ' ' . $RFF[1]; @@ -404,7 +404,7 @@ $EmailText .= $MsgText; break; case 'NAD': - $NAD = explode('+',substr($LineText,4)); + $NAD = explode('+',mb_substr($LineText,4)); $NAD_C082 = explode(':', $NAD[1]); $NAD_C058 = explode(':', $NAD[2]); /*Not used according to MIG */ $NAD_C080 = explode(':', $NAD[3]); @@ -561,7 +561,7 @@ function StripTrailingComma ($StringToStrip){ if (strrpos($StringToStrip,"'")){ - Return substr($StringToStrip,0,strrpos($StringToStrip,"'")); + Return mb_substr($StringToStrip,0,strrpos($StringToStrip,"'")); } else { Return $StringToStrip; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetTransfer.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -9,8 +9,8 @@ include('includes/header.inc'); foreach ($_POST as $AssetToMove => $Value) { //Value is not used? - if (substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off - $AssetID=substr($AssetToMove,4); + if (mb_substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off + $AssetID=mb_substr($AssetToMove,4); $sql="UPDATE fixedassets SET assetlocation='".$_POST['Location'.$AssetID] ."' WHERE assetid='". $AssetID . "'"; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FormDesigner.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,8 +78,8 @@ /*First create a simple xml object from the main file */ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; - if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); + if (mb_substr($_POST['PaperSize'],-8)=='Portrait') { + $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -164,8 +164,8 @@ /* Select the paper size/orientation */ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { - if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,mb_strlen($Paper)-9); + if (mb_substr($Paper,-8)=='Portrait') { + $PaperValue=mb_substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,mb_strlen($colorstr)); + $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; if(mb_strlen($colorstr) > 1) { - $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $red = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; if(mb_strlen($colorstr) > 1) { - $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $green = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; if(mb_strlen($colorstr) > 1) { - $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $blue = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if(mb_strlen($colorstr) > 1) { - $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $alpha = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,8 +120,8 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,mb_strlen($stockid))); - $stockid = substr($stockid,0,$i); + $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); + $stockid = mb_substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; } Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.bg.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -311,8 +311,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -446,9 +446,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret_minus = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.cs.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -169,9 +169,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -185,8 +185,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -198,7 +198,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -210,13 +210,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.de.php =================================================================== --- trunk/Numbers/Words/lang.de.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.de.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -158,9 +158,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -174,8 +174,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -187,7 +187,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -199,13 +199,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.dk.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -172,9 +172,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -188,8 +188,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -201,7 +201,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -213,13 +213,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_100.php =================================================================== --- trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -146,9 +146,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -162,8 +162,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -176,7 +176,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -188,13 +188,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -296,9 +296,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -312,8 +312,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -325,7 +325,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -337,13 +337,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr... [truncated message content] |
From: <dai...@us...> - 2011-07-03 03:36:00
|
Revision: 4621 http://web-erp.svn.sourceforge.net/web-erp/?rev=4621&view=rev Author: daintree Date: 2011-07-03 03:35:49 +0000 (Sun, 03 Jul 2011) Log Message: ----------- substr to mb_substr Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/Contracts.php trunk/CounterSales.php trunk/CustomerBranches.php trunk/Customers.php trunk/DailySalesInquiry.php trunk/EDIProcessOrders.php trunk/FixedAssetItems.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/GetStockImage.php trunk/Numbers/Words/lang.bg.php trunk/Numbers/Words/lang.cs.php trunk/Numbers/Words/lang.de.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_100.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.et.php trunk/Numbers/Words/lang.fr.php trunk/Numbers/Words/lang.fr_BE.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.id.php trunk/Numbers/Words/lang.it_IT.php trunk/Numbers/Words/lang.lt.php trunk/Numbers/Words/lang.nl.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/Numbers/Words/lang.sv.php trunk/Numbers/Words.php trunk/OffersReceived.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Items.php trunk/PageSecurity.php trunk/SalesCategories.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SpecialOrder.php trunk/Stocks.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/SupplierTenders.php trunk/Suppliers.php trunk/UpgradeDatabase.php trunk/WorkOrderReceive.php trunk/Z_ImportChartOfAccounts.php trunk/Z_MakeNewCompany.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_poEditLangModule.php trunk/Z_poEditLangRemaining.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/api/api_debtortransactions.php trunk/api/api_glaccounts.php trunk/api/api_glgroups.php trunk/api/api_glsections.php trunk/api/api_locations.php trunk/api/api_purchdata.php trunk/api/api_salesareas.php trunk/api/api_salesman.php trunk/api/api_salesorders.php trunk/api/api_salestypes.php trunk/api/api_stock.php trunk/api/api_stockcategories.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/config.distrib.php trunk/doc/Change.log trunk/doc/Manual/ManualAPIFunctions.php trunk/includes/ConstructSQLForUserDefinedSalesReport.inc trunk/includes/DateFunctions.inc trunk/includes/DefineCartClass.php trunk/includes/EDIVariableSubstitution.inc trunk/includes/EDIconfig.inc trunk/includes/FreightCalculation.inc trunk/includes/LanguageSetup.php trunk/includes/MiscFunctions.php trunk/includes/PDFSalesAnalysis.inc trunk/includes/RFC822.php trunk/includes/class.pdf.php trunk/includes/header.inc trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/php-gettext/gettext.inc trunk/includes/php-gettext/streams.php trunk/includes/phplot/ChangeLog trunk/includes/phplot/NEWS.txt trunk/includes/phplot/contrib/color_range.test1.php trunk/includes/phplot/contrib/prune_labels.test.php trunk/includes/phplot/phplot.php trunk/includes/smtp.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/config/tcpdf_config.php trunk/includes/tcpdf/config/tcpdf_config_alt.php trunk/includes/tcpdf/tcpdf.php trunk/install/index.php trunk/install/save.php trunk/javascripts/MiscFunctions.js trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/RCFunctions.inc trunk/reportwriter/admin/forms/ReportsCritSetup.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ConfirmDispatch_Invoice.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -577,7 +577,7 @@ $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); $CheckNegRow = DB_fetch_array($Result); - if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND substr($OrderLine->StockID,0,4)!='ASSET'){ + if (($CheckNegRow['mbflag']=='B' OR $CheckNegRow['mbflag']=='M') AND mb_substr($OrderLine->StockID,0,4)!='ASSET'){ if ($CheckNegRow['quantity'] < $OrderLine->QtyDispatched){ prnMsg( _('Invoicing the selected order would result in negative stock. The system parameters are set to prohibit negative stocks from occurring. This invoice cannot be created until the stock on hand is corrected.'),'error',$OrderLine->StockID . ' ' . $CheckNegRow['description'] . ' - ' . _('Negative Stock Prohibited')); $NegativesFound = true; @@ -798,13 +798,13 @@ foreach ($_SESSION['Items']->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ - if (substr($OrderLine->StockID,0,6)=='ASSET-'){ + if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ $IsAsset = true; $HyphenOccursAt = mb_strpos($OrderLine->StockID,'-',6); if ($HyphenOccursAt == false){ - $AssetNumber = intval(substr($OrderLine->StockID,6)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6)); } else { - $AssetNumber = intval(substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); + $AssetNumber = intval(mb_substr($OrderLine->StockID,6,mb_strlen($OrderLine->StockID)-$HyphenOccursAt-1)); } prnMsg (_('The asset number beind disposed of is:') . ' ' . $AssetNumber, 'info'); } else { Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/ContractBOM.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -165,8 +165,8 @@ if (isset($_POST['NewItem'])){ /* NewItem is set from the part selection list as the part code selected */ /* take the form entries and enter the data from the form into the PurchOrder class variable */ foreach ($_POST as $ItemCode => $Quantity) { - if (substr($ItemCode, 0, 3)=='Qty') { - $ItemCode=substr($ItemCode, 3, mb_strlen($ItemCode)-3); + if (mb_substr($ItemCode, 0, 3)=='Qty') { + $ItemCode=mb_substr($ItemCode, 3, mb_strlen($ItemCode)-3); $AlreadyOnThisBOM = 0; if (count($_SESSION['Contract'.$identifier]->ContractBOM)!=0){ Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -36,7 +36,7 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { if (strstr($key,'itm')) { - $NewItemArray[substr($key,3)] = trim($value); + $NewItemArray[mb_substr($key,3)] = trim($value); } } } Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -443,7 +443,7 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); echo '<div class="page_help_text">'._('No Branches are defined for').' - '.$myrow[0]. '. ' . _('You must have a minimum of one branch for each Customer. Please add a branch now.') .'</div>'; - $_POST['BranchCode'] = substr($DebtorNo,0,10); + $_POST['BranchCode'] = mb_substr($DebtorNo,0,10); $_POST['BrName'] = $myrow[0]; $_POST['BrAddress1'] = $myrow[1]; $_POST['BrAddress2'] = $myrow[2]; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -280,7 +280,7 @@ $ErrMsg = _('This customer could not be added because'); $result = DB_query($sql,$db,$ErrMsg); - $BranchCode = substr($_POST['DebtorNo'],0,4); + $BranchCode = mb_substr($_POST['DebtorNo'],0,4); echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath .'/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '">'; Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/DailySalesInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -68,7 +68,7 @@ } if (mb_strlen($Date_Array[2])>4) { - $Date_Array[2]= substr($Date_Array[2],0,2); + $Date_Array[2]= mb_substr($Date_Array[2],0,2); } $StartDateSQL = date('Y-m-d', mktime(0,0,0, (int)$Date_Array[1],1,(int)$Date_Array[0])); Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/EDIProcessOrders.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,9 +78,9 @@ $LineText = StripTrailingComma($LineText); echo "<br />".$LineText; - if ($SegTag != substr($LineText,0,3)){ + if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; - $SegTag = substr($LineText,0,3); + $SegTag = mb_substr($LineText,0,3); } else { $SegCounter++; if ($SegCounter > $Seg[$SegID]['MaxOccur']){ @@ -119,17 +119,17 @@ echo '<br />' . _('The segment tag') . ' ' . $SegTag . ' ' . _('is being processed'); switch ($SegTag){ case 'UNH': - $UNH_elements = explode ('+',substr($LineText,4)); + $UNH_elements = explode ('+',mb_substr($LineText,4)); $Order->Comments .= _('Customer EDI Ref') . ': ' . $UNH_elements[0]; $EmailText .= "\n" . _('EDI Message Ref') . ': ' . $UNH_elements[0]; - if (substr($UNH_elements[1],0,6)!='ORDERS'){ + if (mb_substr($UNH_elements[1],0,6)!='ORDERS'){ $EmailText .= "\n" . _('This message is not an order'); $TryNextFile = True; } break; case 'BGM': - $BGM_elements = explode('+',substr($LineText,4)); + $BGM_elements = explode('+',mb_substr($LineText,4)); $BGM_C002 = explode(':',$BGM_elements[0]); switch ($BGM_C002[0]){ case '220': @@ -239,7 +239,7 @@ break; case 'DTM': /*explode into an arrage all items delimited by the : - only after the + */ - $DTM_C507 = explode(':',substr($LineText,4)); + $DTM_C507 = explode(':',mb_substr($LineText,4)); $LocalFormatDate = ConvertEDIDate($DTM_C507[1],$DTM_C507[2]); switch ($DTM_C507[0]){ @@ -294,7 +294,7 @@ break; case 'PAI': /*explode into an array all items delimited by the : - only after the + */ - $PAI_C534 = explode(':',substr($LineText,4)); + $PAI_C534 = explode(':',mb_substr($LineText,4)); if ($PAI_C534[0]=='1'){ $EmailText .= "\n" . _('Payment will be effected by a direct payment for this order'); } elseif($PAI_C534[0]=='OA'){ @@ -318,7 +318,7 @@ } break; case 'ALI': - $ALI = explode('+',substr($LineText,4)); + $ALI = explode('+',mb_substr($LineText,4)); if (mb_strlen($ALI[0])>1){ $EmailText .= "\n" . _('Goods of origin') . ' ' . $ALI[0]; } @@ -347,7 +347,7 @@ } break; case 'FTX': - $FTX = explode('+',substr($LineText,4)); + $FTX = explode('+',mb_substr($LineText,4)); /*agreed coded text is not catered for ... yet only free form text */ if (mb_strlen($FTX[3])>5){ @@ -357,7 +357,7 @@ } break; case 'RFF': - $RFF = explode(':',substr($LineText,4)); + $RFF = explode(':',mb_substr($LineText,4)); switch ($RFF[0]){ case 'AE': $MsgText = "\n" . _('Authorisation for expense no') . ' ' . $RFF[1]; @@ -404,7 +404,7 @@ $EmailText .= $MsgText; break; case 'NAD': - $NAD = explode('+',substr($LineText,4)); + $NAD = explode('+',mb_substr($LineText,4)); $NAD_C082 = explode(':', $NAD[1]); $NAD_C058 = explode(':', $NAD[2]); /*Not used according to MIG */ $NAD_C080 = explode(':', $NAD[3]); @@ -561,7 +561,7 @@ function StripTrailingComma ($StringToStrip){ if (strrpos($StringToStrip,"'")){ - Return substr($StringToStrip,0,strrpos($StringToStrip,"'")); + Return mb_substr($StringToStrip,0,strrpos($StringToStrip,"'")); } else { Return $StringToStrip; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetItems.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FixedAssetTransfer.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -9,8 +9,8 @@ include('includes/header.inc'); foreach ($_POST as $AssetToMove => $Value) { //Value is not used? - if (substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off - $AssetID=substr($AssetToMove,4); + if (mb_substr($AssetToMove,0,4)=='Move') { // the form variable is of the format MoveAssetID so need to strip the move bit off + $AssetID=mb_substr($AssetToMove,4); $sql="UPDATE fixedassets SET assetlocation='".$_POST['Location'.$AssetID] ."' WHERE assetid='". $AssetID . "'"; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/FormDesigner.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -78,8 +78,8 @@ /*First create a simple xml object from the main file */ $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); $FormDesign['name']=$_POST['formname']; - if (substr($_POST['PaperSize'],-8)=='Portrait') { - $_POST['PaperSize']=substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); + if (mb_substr($_POST['PaperSize'],-8)=='Portrait') { + $_POST['PaperSize']=mb_substr($_POST['PaperSize'],0,mb_strlen($_POST['PaperSize'])-9); } $FormDesign->PaperSize=$_POST['PaperSize']; $FormDesign->LineHeight=$_POST['LineHeight']; @@ -164,8 +164,8 @@ /* Select the paper size/orientation */ echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; foreach ($Papers as $Paper) { - if (substr($Paper,-8)=='Portrait') { - $PaperValue=substr($Paper,0,mb_strlen($Paper)-9); + if (mb_substr($Paper,-8)=='Portrait') { + $PaperValue=mb_substr($Paper,0,mb_strlen($Paper)-9); } else { $PaperValue=$Paper; } Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -22,26 +22,26 @@ // Color decode function function DecodeBgColor( $colorstr ) { if ( $colorstr[0] == '#' ) { - $colorstr = substr($colorstr,1,mb_strlen($colorstr)); + $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); } $red = 0; if(mb_strlen($colorstr) > 1) { - $red = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $red = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $green = 0; if(mb_strlen($colorstr) > 1) { - $green = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $green = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } $blue = 0; if(mb_strlen($colorstr) > 1) { - $blue = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $blue = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if(mb_strlen($colorstr) > 1) { - $alpha = hexdec(substr($colorstr,0,2)); - $colorstr = substr($colorstr,2,mb_strlen($colorstr)); + $alpha = hexdec(mb_substr($colorstr,0,2)); + $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); } if ( isset($alpha) ) return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); @@ -120,8 +120,8 @@ if( $i === false ) $type = 'png'; else { - $type = strtolower(substr($stockid,$i+1,mb_strlen($stockid))); - $stockid = substr($stockid,0,$i); + $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); + $stockid = mb_substr($stockid,0,$i); if($blanktext && !isset($text)) $text = ''; } Modified: trunk/Numbers/Words/lang.bg.php =================================================================== --- trunk/Numbers/Words/lang.bg.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.bg.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -311,8 +311,8 @@ if (is_string($num)) { $ret = array(); $mb_strlen = mb_strlen($num); - $first = substr($num, 0, $mb_strlen%3); - preg_match_all('/\d{3}/', substr($num, $mb_strlen%3, $mb_strlen), $m); + $first = mb_substr($num, 0, $mb_strlen%3); + preg_match_all('/\d{3}/', mb_substr($num, $mb_strlen%3, $mb_strlen), $m); $ret =& $m[0]; if ($first) array_unshift($ret, $first); return $ret; @@ -446,9 +446,9 @@ if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret_minus = $this->_minus . $this->_sep; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // if the absolute value is greater than 9.99*10^302, return infinity Modified: trunk/Numbers/Words/lang.cs.php =================================================================== --- trunk/Numbers/Words/lang.cs.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.cs.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -169,9 +169,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -185,8 +185,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -198,7 +198,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -210,13 +210,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.de.php =================================================================== --- trunk/Numbers/Words/lang.de.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.de.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -158,9 +158,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -174,8 +174,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -187,7 +187,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -199,13 +199,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.dk.php =================================================================== --- trunk/Numbers/Words/lang.dk.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.dk.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -172,9 +172,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -188,8 +188,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -201,7 +201,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -213,13 +213,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_100.php =================================================================== --- trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_100.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -146,9 +146,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -162,8 +162,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -176,7 +176,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -188,13 +188,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_GB.php =================================================================== --- trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_GB.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -204,9 +204,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -220,8 +220,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -233,7 +233,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -245,13 +245,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr($num,-3,1); case 2: - $t = (int)substr($num,-2,1); + $t = (int)mb_substr($num,-2,1); case 1: - $d = (int)substr($num,-1,1); + $d = (int)mb_substr($num,-1,1); break; case 0: Modified: trunk/Numbers/Words/lang.en_US.php =================================================================== --- trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:27:48 UTC (rev 4620) +++ trunk/Numbers/Words/lang.en_US.php 2011-07-03 03:35:49 UTC (rev 4621) @@ -296,9 +296,9 @@ $ret = ''; // add a minus sign - if (substr($num, 0, 1) == '-') { + if (mb_substr($num, 0, 1) == '-') { $ret = $this->_sep . $this->_minus; - $num = substr($num, 1); + $num = mb_substr($num, 1); } // strip excessive zero signs and spaces @@ -312,8 +312,8 @@ // check for highest power if (isset($this->_exponent[$p])) { - // send substr from $curp to $p - $snum = substr($num, $maxp - $curp, $curp - $p + 1); + // send mb_substr from $curp to $p + $snum = mb_substr($num, $maxp - $curp, $curp - $p + 1); $snum = preg_replace('/^0+/','',$snum); if ($snum !== '') { $cursuffix = $this->_exponent[$power][count($this->_exponent[$power])-1]; @@ -325,7 +325,7 @@ continue; } } - $num = substr($num, $maxp - $curp, $curp - $p + 1); + $num = mb_substr($num, $maxp - $curp, $curp - $p + 1); if ($num == 0) { return $ret; } @@ -337,13 +337,13 @@ switch(mb_strlen($num)) { case 3: - $h = (int)substr($num,-3,1); + $h = (int)mb_substr... [truncated message content] |
From: <dai...@us...> - 2011-07-03 04:33:28
|
Revision: 4622 http://web-erp.svn.sourceforge.net/web-erp/?rev=4622&view=rev Author: daintree Date: 2011-07-03 04:33:19 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strtoupper to mb_strtoupper Modified Paths: -------------- trunk/AccountGroups.php trunk/Areas.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/Contracts.php trunk/CounterSales.php trunk/Currencies.php trunk/CustomerBranches.php trunk/CustomerTypes.php trunk/Customers.php trunk/DiscountCategories.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/GetStockImage.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/POReport.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/PrintCustStatements.php trunk/PurchData.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WhereUsedInquiry.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_poAddLanguage.php trunk/doc/Change.log trunk/includes/DefineCartClass.php trunk/includes/MiscFunctions.php trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/admin/RCFunctions.inc Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/AccountGroups.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -262,7 +262,7 @@ <td>' . $PandLText . '</td> <td>' . $myrow[4] . '</td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1">' . _('Delete') .'</a></td></tr>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this account group?') . '\');">' . _('Delete') .'</a></td></tr>'; } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Areas.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ if (isset($_GET['SelectedArea'])){ - $SelectedArea = strtoupper($_GET['SelectedArea']); + $SelectedArea = mb_strtoupper($_GET['SelectedArea']); } elseif (isset($_POST['SelectedArea'])){ - $SelectedArea = strtoupper($_POST['SelectedArea']); + $SelectedArea = mb_strtoupper($_POST['SelectedArea']); } if (isset($Errors)) { @@ -30,7 +30,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - $_POST['AreaCode'] = strtoupper($_POST['AreaCode']); + $_POST['AreaCode'] = mb_strtoupper($_POST['AreaCode']); $sql = "SELECT count(areacode) from areas WHERE areacode='".$_POST['AreaCode']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMExtendedQty.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -303,7 +303,7 @@ $YPos -=$line_height; $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('Extended Quantity BOM Listing For ') - . strtoupper($_POST['Part'])); + . mb_strtoupper($_POST['Part'])); $pdf->addTextWrap($Page_Width-$Right_Margin-140,$YPos,160,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left'); $YPos -=$line_height; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndented.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -315,7 +315,7 @@ $YPos =$YPos - (2*$line_height); $pdf->addTextWrap($Left_Margin+1,$YPos,40,$FontSize,_('Assembly:'),'',0); - $pdf->addTextWrap(85,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(85,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(185,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndentedReverse.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -291,7 +291,7 @@ $YPos =$YPos - $line_height; $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,_('Component:'),'',0); - $pdf->addTextWrap(100,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(100,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(200,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMInquiry.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } if (!isset($_POST['StockID'])) { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Contracts.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -611,7 +611,7 @@ } else { if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -630,7 +630,7 @@ } elseif (mb_strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CounterSales.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -223,7 +223,7 @@ } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -256,7 +256,7 @@ } else if (mb_strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -382,7 +382,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Currencies.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -237,7 +237,7 @@ $k++; } // Lets show the country flag - $ImageFile = 'flags/' . strtoupper($myrow[1]) . '.gif'; + $ImageFile = 'flags/' . mb_strtoupper($myrow[1]) . '.gif'; if(!file_exists($ImageFile)){ $ImageFile = 'flags/blank.gif'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerBranches.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['DebtorNo'])) { - $DebtorNo = strtoupper($_GET['DebtorNo']); + $DebtorNo = mb_strtoupper($_GET['DebtorNo']); } else if (isset($_POST['DebtorNo'])){ - $DebtorNo = strtoupper($_POST['DebtorNo']); + $DebtorNo = mb_strtoupper($_POST['DebtorNo']); } if (!isset($DebtorNo)) { @@ -22,9 +22,9 @@ if (isset($_GET['SelectedBranch'])){ - $SelectedBranch = strtoupper($_GET['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_GET['SelectedBranch']); } else if (isset($_POST['SelectedBranch'])){ - $SelectedBranch = strtoupper($_POST['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } if (isset($Errors)) { @@ -44,7 +44,7 @@ //first off validate inputs sensible - $_POST['BranchCode'] = strtoupper($_POST['BranchCode']); + $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { $InputError = 1; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Customers.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -29,7 +29,7 @@ //first off validate inputs sensible - $_POST['DebtorNo'] = strtoupper($_POST['DebtorNo']); + $_POST['DebtorNo'] = mb_strtoupper($_POST['DebtorNo']); $sql="SELECT COUNT(debtorno) FROM debtorsmaster WHERE debtorno='".$_POST['DebtorNo']."'"; $result=DB_query($sql,$db); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/DiscountCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -31,7 +31,7 @@ FROM stockmaster WHERE mbflag <>'K' AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + AND stockid='" . mb_strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -40,9 +40,9 @@ if ($InputError !=1) { $sql = "UPDATE stockmaster SET discountcategory='" . $_POST['DiscountCategory'] . "' - WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; + WHERE stockid='" . mb_strtoupper($_POST['StockID']) . "'"; - $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); + $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . mb_strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); prnMsg(_('The stock master has been updated with this discount category'),'success'); unset($_POST['DiscountCategory']); @@ -53,7 +53,7 @@ } elseif (isset($_GET['Delete']) and $_GET['Delete']=='yes') { /*the link to delete a selected record was clicked instead of the submit button */ - $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; + $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(mb_strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); echo '<br />'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,10 +9,10 @@ include('includes/header.inc'); if (isset($_GET['FactorID'])){ - $FactorID = strtoupper($_GET['FactorID']); + $FactorID = mb_strtoupper($_GET['FactorID']); $_POST['Amend']=True; } elseif (isset($_POST['FactorID'])){ - $FactorID = strtoupper($_POST['FactorID']); + $FactorID = mb_strtoupper($_POST['FactorID']); } else { unset($FactorID); } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -12,9 +12,9 @@ _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_POST['submit'])) { @@ -27,7 +27,7 @@ //first off validate inputs sensible - $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); + $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; @@ -96,13 +96,12 @@ depnact, disposalact, accumdepnact) - VALUES ( - '" . $_POST['CategoryID'] . "', - '" . $_POST['CategoryDescription'] . "', - '" . $_POST['CostAct'] . "', - '" . $_POST['DepnAct'] . "', - '" . $_POST['DisposalAct'] . "', - '" . $_POST['AccumDepnAct'] . "')"; + VALUES ('" . $_POST['CategoryID'] . "', + '" . $_POST['CategoryDescription'] . "', + '" . $_POST['CostAct'] . "', + '" . $_POST['DepnAct'] . "', + '" . $_POST['DisposalAct'] . "', + '" . $_POST['AccumDepnAct'] . "')"; $ErrMsg = _('Could not insert the new fixed asset category') . $_POST['CategoryDescription'] . _('because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('A new fixed asset category record has been added for') . ' ' . $_POST['CategoryDescription'],'success'); @@ -144,22 +143,25 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription, costact, depnact, disposalact, accumdepnact - FROM fixedassetcategories'; + FROM fixedassetcategories"; $result = DB_query($sql,$db); - echo '<br /><table class=selection>'; - echo '<tr><th>' . _('Cat Code') . '</th> + echo '<br /> + <table class="selection">'; + echo '<tr> + <th>' . _('Cat Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Cost GL') . '</th> <th>' . _('P & L Depn GL') . '</th> <th>' . _('Disposal GL') . '</th> - <th>' . _('Accum Depn GL') . '</th></tr>'; + <th>' . _('Accum Depn GL') . '</th> + </tr>'; $k=0; //row colour counter @@ -178,7 +180,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td><a href="%sSelectedCategory=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> + <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '\');">' . _('Delete') . '</td> </tr>', $myrow['categoryid'], $myrow['categorydescription'], @@ -186,9 +188,9 @@ $myrow['depnact'], $myrow['disposalact'], $myrow['accumdepnact'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid']); } //END WHILE LIST LOOP @@ -201,7 +203,7 @@ echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } -echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; +echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { @@ -238,23 +240,21 @@ } //SQL to poulate account selection boxes -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl=0 + ORDER BY accountcode"; $BSAccountsResult = DB_query($sql,$db); -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl!=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl!=0 + ORDER BY accountcode"; $PnLAccountsResult = DB_query($sql,$db); Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetDepreciation.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,13 +9,13 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC',$db); + ORDER BY periods.lastdate_in_period DESC",$db); $LastDepnRun = DB_fetch_row($result); @@ -65,7 +65,7 @@ fixedassetcategories.accumdepnact, fixedassetcategories.depnact, fixedassetcategories.categorydescription -ORDER BY assetcategoryid, assetid"; + ORDER BY assetcategoryid, assetid"; $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -104,11 +104,11 @@ if ($AssetCategoryDescription != $AssetRow['categorydescription'] OR $AssetCategoryDescription =='0'){ if ($AssetCategoryDescription !='0'){ //then print totals echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; } echo '<tr><th colspan=9 align="left">' . $AssetRow['categorydescription'] . '</th></tr>'; @@ -147,12 +147,12 @@ echo '<td>' . $AssetRow['assetid'] . '</td> <td>' . $AssetRow['description'] . '</td> <td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td> - <td class="number">' . number_format($AssetRow['costtotal'],2) . '</td> - <td class="number">' . number_format($AssetRow['depnbfwd'],2) . '</td> - <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],2) . '</td> + <td class="number">' . number_format($AssetRow['costtotal'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td align="center">' . $DepreciationType . '</td> <td class="number">' . $AssetRow['depnrate'] . '</td> - <td class="number">' . number_format($NewDepreciation ,2) . '</td> + <td class="number">' . number_format($NewDepreciation ,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; $TotalCategoryCost +=$AssetRow['costtotal']; $TotalCategoryAccumDepn +=$AssetRow['depnbfwd']; @@ -227,18 +227,18 @@ } //end if Committing the depreciation to DB } //end loop around the assets to calculate depreciation for echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '<tr><th colspan=3 align="right">' . _('GRAND Total') . ' </th> - <th class="number">' . number_format($TotalCost,2) . '</th> - <th class="number">' . number_format($TotalAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalDepn,2) . '</th> + <th class="number">' . number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '</table><hr><p></p>'; @@ -247,11 +247,11 @@ $result = DB_Txn_Commit($db); prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); unset($_POST['ProcessDate']); - echo '<br /><a href="index.php' . '?' . SID . '">' ._('Return to main menu').'</a>'; + echo '<br /><a href="index.php">' ._('Return to main menu').'</a>'; /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post name="form">'; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' method=post name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p></p>'; echo '<table class=selection width=30%><tr></tr><tr>'; Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetItems.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/GetStockImage.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -68,7 +68,7 @@ } $filepath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(strtoupper($_GET['StockID'])); +$stockid = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) $bgcolor = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Locations.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -22,7 +22,7 @@ /* actions to take once the user has clicked the submit button ie the page has called itself with some user input */ - $_POST['LocCode']=strtoupper($_POST['LocCode']); + $_POST['LocCode']=mb_strtoupper($_POST['LocCode']); if( trim($_POST['LocCode']) == '' ) { $InputError = 1; prnMsg( _('The location code may not be empty'), 'error'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPCalendar.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -11,9 +11,9 @@ if (isset($_POST['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_POST['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_POST['ChangeDate'])); } elseif (isset($_GET['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_GET['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_GET['ChangeDate'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPDemandTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ //SelectedDT is the Selected MRPDemandType if (isset($_POST['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_POST['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_POST['SelectedDT'])); } elseif (isset($_GET['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_GET['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_GET['SelectedDT'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -26,8 +26,8 @@ //first off validate inp... [truncated message content] |
From: <dai...@us...> - 2011-07-03 04:33:29
|
Revision: 4622 http://web-erp.svn.sourceforge.net/web-erp/?rev=4622&view=rev Author: daintree Date: 2011-07-03 04:33:19 +0000 (Sun, 03 Jul 2011) Log Message: ----------- strtoupper to mb_strtoupper Modified Paths: -------------- trunk/AccountGroups.php trunk/Areas.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/Contracts.php trunk/CounterSales.php trunk/Currencies.php trunk/CustomerBranches.php trunk/CustomerTypes.php trunk/Customers.php trunk/DiscountCategories.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/GetStockImage.php trunk/Locations.php trunk/MRPCalendar.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPReport.php trunk/Numbers/Words/lang.dk.php trunk/Numbers/Words/lang.en_GB.php trunk/Numbers/Words/lang.en_US.php trunk/Numbers/Words/lang.es_AR.php trunk/Numbers/Words/lang.he.php trunk/Numbers/Words/lang.hu_HU.php trunk/Numbers/Words/lang.pl.php trunk/Numbers/Words/lang.pt_BR.php trunk/Numbers/Words/lang.ru.php trunk/POReport.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/PrintCustStatements.php trunk/PurchData.php trunk/SalesCategories.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTypes.php trunk/SelectAsset.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/SelectWorkOrder.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCostUpdate.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransfer.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockTransfers.php trunk/StockUsage.php trunk/StockUsageGraph.php trunk/Stocks.php trunk/SupplierTypes.php trunk/Suppliers.php trunk/WhereUsedInquiry.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ChangeStockCategory.php trunk/Z_ChangeStockCode.php trunk/Z_ImportFixedAssets.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.php trunk/Z_poAddLanguage.php trunk/doc/Change.log trunk/includes/DefineCartClass.php trunk/includes/MiscFunctions.php trunk/includes/htmlMimeMail.php trunk/includes/mimePart.php trunk/includes/tcpdf/2dbarcodes.php trunk/includes/tcpdf/barcodes.php trunk/includes/tcpdf/tcpdf.php trunk/reportwriter/WriteForm.inc trunk/reportwriter/admin/RCFunctions.inc Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/AccountGroups.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -262,7 +262,7 @@ <td>' . $PandLText . '</td> <td>' . $myrow[4] . '</td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '">' . _('Edit') . '</a></td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1">' . _('Delete') .'</a></td></tr>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?SelectedAccountGroup=' . htmlentities($myrow[0], ENT_QUOTES,'UTF-8') . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this account group?') . '\');">' . _('Delete') .'</a></td></tr>'; } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Areas.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -10,9 +10,9 @@ if (isset($_GET['SelectedArea'])){ - $SelectedArea = strtoupper($_GET['SelectedArea']); + $SelectedArea = mb_strtoupper($_GET['SelectedArea']); } elseif (isset($_POST['SelectedArea'])){ - $SelectedArea = strtoupper($_POST['SelectedArea']); + $SelectedArea = mb_strtoupper($_POST['SelectedArea']); } if (isset($Errors)) { @@ -30,7 +30,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - $_POST['AreaCode'] = strtoupper($_POST['AreaCode']); + $_POST['AreaCode'] = mb_strtoupper($_POST['AreaCode']); $sql = "SELECT count(areacode) from areas WHERE areacode='".$_POST['AreaCode']."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMExtendedQty.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -303,7 +303,7 @@ $YPos -=$line_height; $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,_('Extended Quantity BOM Listing For ') - . strtoupper($_POST['Part'])); + . mb_strtoupper($_POST['Part'])); $pdf->addTextWrap($Page_Width-$Right_Margin-140,$YPos,160,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left'); $YPos -=$line_height; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndented.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -315,7 +315,7 @@ $YPos =$YPos - (2*$line_height); $pdf->addTextWrap($Left_Margin+1,$YPos,40,$FontSize,_('Assembly:'),'',0); - $pdf->addTextWrap(85,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(85,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(185,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMIndentedReverse.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -291,7 +291,7 @@ $YPos =$YPos - $line_height; $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,_('Component:'),'',0); - $pdf->addTextWrap(100,$YPos,100,$FontSize,strtoupper($_POST['Part']),'',0); + $pdf->addTextWrap(100,$YPos,100,$FontSize,mb_strtoupper($_POST['Part']),'',0); $pdf->addTextWrap(200,$YPos,150,$FontSize,$assemblydesc,'',0); $YPos -=(2*$line_height); $Xpos = $Left_Margin+5; Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/BOMInquiry.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['StockID'])){ - $StockID =trim(strtoupper($_GET['StockID'])); + $StockID =trim(mb_strtoupper($_GET['StockID'])); } elseif (isset($_POST['StockID'])){ - $StockID =trim(strtoupper($_POST['StockID'])); + $StockID =trim(mb_strtoupper($_POST['StockID'])); } if (!isset($_POST['StockID'])) { Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Contracts.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -107,7 +107,7 @@ $filename = $_SESSION['part_pics_dir'] . '/' . $_SESSION['Contract'.$identifier]->ContractRef . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['Drawing']['name']),mb_strlen($_FILES['Drawing']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['Drawing']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check @@ -611,7 +611,7 @@ } else { if (mb_strlen($_POST['CustKeywords'])>0) { //insert wildcard characters in spaces - $_POST['CustKeywords'] = strtoupper(trim($_POST['CustKeywords'])); + $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; $SQL = "SELECT custbranch.brname, @@ -630,7 +630,7 @@ } elseif (mb_strlen($_POST['CustCode'])>0){ - $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); + $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); $SQL = "SELECT custbranch.brname, custbranch.contactname, Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CounterSales.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -223,7 +223,7 @@ } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces - $_POST['Keywords'] = strtoupper($_POST['Keywords']); + $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; if ($_POST['StockCat']=='All'){ @@ -256,7 +256,7 @@ } else if (mb_strlen($_POST['StockCode'])>0){ - $_POST['StockCode'] = strtoupper($_POST['StockCode']); + $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); $SearchString = '%' . $_POST['StockCode'] . '%'; if ($_POST['StockCat']=='All'){ @@ -382,7 +382,7 @@ $i++; if (isset($_POST[$QuickEntryCode])) { - $NewItem = strtoupper($_POST[$QuickEntryCode]); + $NewItem = mb_strtoupper($_POST[$QuickEntryCode]); } if (isset($_POST[$QuickEntryQty])) { $NewItemQty = $_POST[$QuickEntryQty]; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Currencies.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -237,7 +237,7 @@ $k++; } // Lets show the country flag - $ImageFile = 'flags/' . strtoupper($myrow[1]) . '.gif'; + $ImageFile = 'flags/' . mb_strtoupper($myrow[1]) . '.gif'; if(!file_exists($ImageFile)){ $ImageFile = 'flags/blank.gif'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerBranches.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_GET['DebtorNo'])) { - $DebtorNo = strtoupper($_GET['DebtorNo']); + $DebtorNo = mb_strtoupper($_GET['DebtorNo']); } else if (isset($_POST['DebtorNo'])){ - $DebtorNo = strtoupper($_POST['DebtorNo']); + $DebtorNo = mb_strtoupper($_POST['DebtorNo']); } if (!isset($DebtorNo)) { @@ -22,9 +22,9 @@ if (isset($_GET['SelectedBranch'])){ - $SelectedBranch = strtoupper($_GET['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_GET['SelectedBranch']); } else if (isset($_POST['SelectedBranch'])){ - $SelectedBranch = strtoupper($_POST['SelectedBranch']); + $SelectedBranch = mb_strtoupper($_POST['SelectedBranch']); } if (isset($Errors)) { @@ -44,7 +44,7 @@ //first off validate inputs sensible - $_POST['BranchCode'] = strtoupper($_POST['BranchCode']); + $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { $InputError = 1; Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/CustomerTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -7,9 +7,9 @@ include('includes/header.inc'); if (isset($_POST['SelectedType'])){ - $SelectedType = strtoupper($_POST['SelectedType']); + $SelectedType = mb_strtoupper($_POST['SelectedType']); } elseif (isset($_GET['SelectedType'])){ - $SelectedType = strtoupper($_GET['SelectedType']); + $SelectedType = mb_strtoupper($_GET['SelectedType']); } if (isset($Errors)) { Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Customers.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -29,7 +29,7 @@ //first off validate inputs sensible - $_POST['DebtorNo'] = strtoupper($_POST['DebtorNo']); + $_POST['DebtorNo'] = mb_strtoupper($_POST['DebtorNo']); $sql="SELECT COUNT(debtorno) FROM debtorsmaster WHERE debtorno='".$_POST['DebtorNo']."'"; $result=DB_query($sql,$db); Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/DiscountCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -31,7 +31,7 @@ FROM stockmaster WHERE mbflag <>'K' AND mbflag<>'D' - AND stockid='" . strtoupper($_POST['StockID']) . "'",$db); + AND stockid='" . mb_strtoupper($_POST['StockID']) . "'",$db); if (DB_num_rows($result)==0){ $InputError = 1; prnMsg(_('The stock item entered must be set up as either a manufactured or purchased or assembly item'),'warn'); @@ -40,9 +40,9 @@ if ($InputError !=1) { $sql = "UPDATE stockmaster SET discountcategory='" . $_POST['DiscountCategory'] . "' - WHERE stockid='" . strtoupper($_POST['StockID']) . "'"; + WHERE stockid='" . mb_strtoupper($_POST['StockID']) . "'"; - $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); + $result = DB_query($sql,$db, _('The discount category') . ' ' . $_POST['DiscountCategory'] . ' ' . _('record for') . ' ' . mb_strtoupper($_POST['StockID']) . ' ' . _('could not be updated because')); prnMsg(_('The stock master has been updated with this discount category'),'success'); unset($_POST['DiscountCategory']); @@ -53,7 +53,7 @@ } elseif (isset($_GET['Delete']) and $_GET['Delete']=='yes') { /*the link to delete a selected record was clicked instead of the submit button */ - $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; + $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(mb_strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); echo '<br />'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,10 +9,10 @@ include('includes/header.inc'); if (isset($_GET['FactorID'])){ - $FactorID = strtoupper($_GET['FactorID']); + $FactorID = mb_strtoupper($_GET['FactorID']); $_POST['Amend']=True; } elseif (isset($_POST['FactorID'])){ - $FactorID = strtoupper($_POST['FactorID']); + $FactorID = mb_strtoupper($_POST['FactorID']); } else { unset($FactorID); } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetCategories.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -12,9 +12,9 @@ _('Fixed Asset Categories') . '" alt="" />' . ' ' . $title . '</p>'; if (isset($_GET['SelectedCategory'])){ - $SelectedCategory = strtoupper($_GET['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_GET['SelectedCategory']); } else if (isset($_POST['SelectedCategory'])){ - $SelectedCategory = strtoupper($_POST['SelectedCategory']); + $SelectedCategory = mb_strtoupper($_POST['SelectedCategory']); } if (isset($_POST['submit'])) { @@ -27,7 +27,7 @@ //first off validate inputs sensible - $_POST['CategoryID'] = strtoupper($_POST['CategoryID']); + $_POST['CategoryID'] = mb_strtoupper($_POST['CategoryID']); if (mb_strlen($_POST['CategoryID']) > 6) { $InputError = 1; @@ -96,13 +96,12 @@ depnact, disposalact, accumdepnact) - VALUES ( - '" . $_POST['CategoryID'] . "', - '" . $_POST['CategoryDescription'] . "', - '" . $_POST['CostAct'] . "', - '" . $_POST['DepnAct'] . "', - '" . $_POST['DisposalAct'] . "', - '" . $_POST['AccumDepnAct'] . "')"; + VALUES ('" . $_POST['CategoryID'] . "', + '" . $_POST['CategoryDescription'] . "', + '" . $_POST['CostAct'] . "', + '" . $_POST['DepnAct'] . "', + '" . $_POST['DisposalAct'] . "', + '" . $_POST['AccumDepnAct'] . "')"; $ErrMsg = _('Could not insert the new fixed asset category') . $_POST['CategoryDescription'] . _('because'); $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('A new fixed asset category record has been added for') . ' ' . $_POST['CategoryDescription'],'success'); @@ -144,22 +143,25 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = 'SELECT categoryid, + $sql = "SELECT categoryid, categorydescription, costact, depnact, disposalact, accumdepnact - FROM fixedassetcategories'; + FROM fixedassetcategories"; $result = DB_query($sql,$db); - echo '<br /><table class=selection>'; - echo '<tr><th>' . _('Cat Code') . '</th> + echo '<br /> + <table class="selection">'; + echo '<tr> + <th>' . _('Cat Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Cost GL') . '</th> <th>' . _('P & L Depn GL') . '</th> <th>' . _('Disposal GL') . '</th> - <th>' . _('Accum Depn GL') . '</th></tr>'; + <th>' . _('Accum Depn GL') . '</th> + </tr>'; $k=0; //row colour counter @@ -178,7 +180,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td><a href="%sSelectedCategory=%s">' . _('Edit') . '</td> - <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm("' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '");">' . _('Delete') . '</td> + <td><a href="%sSelectedCategory=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this fixed asset category? Additional checks will be performed before actual deletion to ensure data integrity is not compromised.') . '\');">' . _('Delete') . '</td> </tr>', $myrow['categoryid'], $myrow['categorydescription'], @@ -186,9 +188,9 @@ $myrow['depnact'], $myrow['disposalact'], $myrow['accumdepnact'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid'], - $_SERVER['PHP_SELF'] . '?' . SID, + $_SERVER['PHP_SELF'] . '?', $myrow['categoryid']); } //END WHILE LIST LOOP @@ -201,7 +203,7 @@ echo '<br /><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '">' ._('Show All Fixed Asset Categories') . '</a></div>'; } -echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; +echo '<form name="CategoryForm" method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($SelectedCategory) and !isset($_POST['submit'])) { @@ -238,23 +240,21 @@ } //SQL to poulate account selection boxes -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl=0 + ORDER BY accountcode"; $BSAccountsResult = DB_query($sql,$db); -$sql = 'SELECT accountcode, +$sql = "SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname and - accountgroups.pandl!=0 - ORDER BY accountcode'; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl!=0 + ORDER BY accountcode"; $PnLAccountsResult = DB_query($sql,$db); Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetDepreciation.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -9,13 +9,13 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC',$db); + ORDER BY periods.lastdate_in_period DESC",$db); $LastDepnRun = DB_fetch_row($result); @@ -65,7 +65,7 @@ fixedassetcategories.accumdepnact, fixedassetcategories.depnact, fixedassetcategories.categorydescription -ORDER BY assetcategoryid, assetid"; + ORDER BY assetcategoryid, assetid"; $AssetsResult=DB_query($sql, $db); $InputError = false; //always hope for the best @@ -104,11 +104,11 @@ if ($AssetCategoryDescription != $AssetRow['categorydescription'] OR $AssetCategoryDescription =='0'){ if ($AssetCategoryDescription !='0'){ //then print totals echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; } echo '<tr><th colspan=9 align="left">' . $AssetRow['categorydescription'] . '</th></tr>'; @@ -147,12 +147,12 @@ echo '<td>' . $AssetRow['assetid'] . '</td> <td>' . $AssetRow['description'] . '</td> <td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td> - <td class="number">' . number_format($AssetRow['costtotal'],2) . '</td> - <td class="number">' . number_format($AssetRow['depnbfwd'],2) . '</td> - <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],2) . '</td> + <td class="number">' . number_format($AssetRow['costtotal'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . number_format($AssetRow['costtotal']-$AssetRow['depnbfwd'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td align="center">' . $DepreciationType . '</td> <td class="number">' . $AssetRow['depnrate'] . '</td> - <td class="number">' . number_format($NewDepreciation ,2) . '</td> + <td class="number">' . number_format($NewDepreciation ,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> </tr>'; $TotalCategoryCost +=$AssetRow['costtotal']; $TotalCategoryAccumDepn +=$AssetRow['depnbfwd']; @@ -227,18 +227,18 @@ } //end if Committing the depreciation to DB } //end loop around the assets to calculate depreciation for echo '<tr><th colspan=3 align="right">' . _('Total for') . ' ' . $AssetCategoryDescription . ' </th> - <th class="number">' . number_format($TotalCategoryCost,2) . '</th> - <th class="number">' . number_format($TotalCategoryAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCategoryCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalCategoryAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCategoryCost-$TotalCategoryAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalCategoryDepn,2) . '</th> + <th class="number">' . number_format($TotalCategoryDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '<tr><th colspan=3 align="right">' . _('GRAND Total') . ' </th> - <th class="number">' . number_format($TotalCost,2) . '</th> - <th class="number">' . number_format($TotalAccumDepn,2) . '</th> - <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),2) . '</th> + <th class="number">' . number_format($TotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format($TotalAccumDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> + <th class="number">' . number_format(($TotalCost-$TotalAccumDepn),$_SESSION['CompanyRecord']['decimalplaces']) . '</th> <th colspan=2></th> - <th class="number">' . number_format($TotalDepn,2) . '</th> + <th class="number">' . number_format($TotalDepn,$_SESSION['CompanyRecord']['decimalplaces']) . '</th> </tr>'; echo '</table><hr><p></p>'; @@ -247,11 +247,11 @@ $result = DB_Txn_Commit($db); prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success'); unset($_POST['ProcessDate']); - echo '<br /><a href="index.php' . '?' . SID . '">' ._('Return to main menu').'</a>'; + echo '<br /><a href="index.php">' ._('Return to main menu').'</a>'; /*And post the journal too */ include ('includes/GLPostings.inc'); } else { - echo '<form action=' . $_SERVER['PHP_SELF'] . '?' . SID . ' method=post name="form">'; + echo '<form action=' . $_SERVER['PHP_SELF'] . ' method=post name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p></p>'; echo '<table class=selection width=30%><tr></tr><tr>'; Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/FixedAssetItems.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -30,7 +30,7 @@ $filename = $_SESSION['part_pics_dir'] . '/ASSET_' . $AssetID . '.jpg'; //But check for the worst - if (strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ + if (mb_strtoupper(mb_substr(trim($_FILES['ItemPicture']['name']),mb_strlen($_FILES['ItemPicture']['name'])-3))!='JPG'){ prnMsg(_('Only jpg files are supported - a file extension of .jpg is expected'),'warn'); $UploadTheFile ='No'; } elseif ( $_FILES['ItemPicture']['size'] > ($_SESSION['MaxImageSize']*1024)) { //File Size Check Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/GetStockImage.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -68,7 +68,7 @@ } $filepath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(strtoupper($_GET['StockID'])); +$stockid = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) $bgcolor = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/Locations.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -22,7 +22,7 @@ /* actions to take once the user has clicked the submit button ie the page has called itself with some user input */ - $_POST['LocCode']=strtoupper($_POST['LocCode']); + $_POST['LocCode']=mb_strtoupper($_POST['LocCode']); if( trim($_POST['LocCode']) == '' ) { $InputError = 1; prnMsg( _('The location code may not be empty'), 'error'); Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPCalendar.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -11,9 +11,9 @@ if (isset($_POST['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_POST['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_POST['ChangeDate'])); } elseif (isset($_GET['ChangeDate'])){ - $ChangeDate =trim(strtoupper($_GET['ChangeDate'])); + $ChangeDate =trim(mb_strtoupper($_GET['ChangeDate'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2011-07-03 03:35:49 UTC (rev 4621) +++ trunk/MRPDemandTypes.php 2011-07-03 04:33:19 UTC (rev 4622) @@ -8,9 +8,9 @@ //SelectedDT is the Selected MRPDemandType if (isset($_POST['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_POST['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_POST['SelectedDT'])); } elseif (isset($_GET['SelectedDT'])){ - $SelectedDT = trim(strtoupper($_GET['SelectedDT'])); + $SelectedDT = trim(mb_strtoupper($_GET['SelectedDT'])); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . @@ -26,8 +26,8 @@ //first off validate inp... [truncated message content] |
From: <dai...@us...> - 2011-07-05 10:27:34
|
Revision: 4623 http://web-erp.svn.sourceforge.net/web-erp/?rev=4623&view=rev Author: daintree Date: 2011-07-05 10:27:25 +0000 (Tue, 05 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetRegister.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/ShipmentCosting.php trunk/TaxAuthorityRates.php trunk/includes/LanguagesArray.php trunk/includes/PDFQuotationPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/includes/RFC822.php trunk/includes/tcpdf/tcpdf.php trunk/sql/mysql/upgrade4.04.4-4.04.5.sql Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDIProcessOrders.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -76,7 +76,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br />".$LineText; + echo '<br />' . $LineText; if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; @@ -140,7 +140,7 @@ $Order->Comments .= "\n" . _('blanket order'); break; case '224': - $EmailText .= "\n\n" . _('This order is URGENT') . "</font>"; + $EmailText .= "\n\n" . _('This order is URGENT') . '</font>'; $Order->Comments .= "\n" . _('URGENT ORDER'); break; case '226': @@ -184,7 +184,7 @@ $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; + echo '<br />echo BGM_elements[2] ' .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -457,22 +457,23 @@ case 'SN': /*Store Number - get the branch details from the store number - snag here too cos need to ensure got the Customer detail first before try looking up its branches */ $BranchResult = DB_query("SELECT branchcode, - brname, - braddress1, - braddress2, - braddress3, - braddress4, - braddress5, - braddress6, - contactname, - defaultlocation, - phoneno, - email - FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); + brname, + braddress1, + braddress2, + braddress3, + braddress4, + braddress5, + braddress6, + contactname, + defaultlocation, + phoneno, + email + FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); if (DB_num_rows($BranchResult)!=1){ $EmailText .= "\n" . _('The Store number was specified as') . ' ' . $NAD_C082[0] . ' ' . _('Unfortunately there are either no branches of customer code') . ' ' . $Order->DebtorNo . ' ' ._('or several that match this store number') . '. ' . _('This order could not be processed further'); $TryNextFile = True; /* Look for other EDI msgs */ - $CreateOrder = False; /*Dont create order in system */ } else { + $CreateOrder = False; /*Dont create order in system */ + } else { $BranchRow = DB_fetch_array($BranchResult); $Order->BranchCode = $BranchRow['branchcode']; $Order->DeliverTo = $BranchRow['brname']; Modified: trunk/EDISendInvoices.php =================================================================== --- trunk/EDISendInvoices.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDISendInvoices.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -8,16 +8,16 @@ include('includes/htmlMimeMail.php'); // need for sending email attachments /*Get the Customers who are enabled for EDI invoicing */ -$sql = 'SELECT debtorno, - edireference, - editransport, - ediaddress, - ediserveruser, - ediserverpwd, - daysbeforedue, - dayinfollowingmonth - FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE ediinvoices=1'; +$sql = "SELECT debtorno, + edireference, + editransport, + ediaddress, + ediserveruser, + ediserverpwd, + daysbeforedue, + dayinfollowingmonth + FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator + WHERE ediinvoices=1"; $EDIInvCusts = DB_query($sql,$db); @@ -30,29 +30,29 @@ /*Figure out if there are any unset invoices or credits for the customer */ $sql = "SELECT debtortrans.id, - transno, - type, - order_, - trandate, - ovgst, - ovamount, - ovfreight, - ovdiscount, - debtortrans.branchcode, - custbranchcode, - invtext, - shipvia, - rate, - brname, - braddress1, - braddress2, - braddress3, - braddress4 - FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno - AND custbranch.branchcode = debtortrans.branchcode - WHERE (type=10 or type=11) - AND edisent=0 - AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; + transno, + type, + order_, + trandate, + ovgst, + ovamount, + ovfreight, + ovdiscount, + debtortrans.branchcode, + custbranchcode, + invtext, + shipvia, + rate, + brname, + braddress1, + braddress2, + braddress3, + braddress4 + FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno + AND custbranch.branchcode = debtortrans.branchcode + WHERE (type=10 or type=11) + AND edisent=0 + AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; $ErrMsg = _('There was a problem retrieving the customer transactions because'); $TransHeaders = DB_query($sql,$db,$ErrMsg); @@ -135,34 +135,34 @@ if ($TransDetail['type']==10){ /*its an invoice */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - -stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } else { /* credit note */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } $TransLinesResult = DB_query($sql,$db); @@ -174,9 +174,9 @@ $StockID = $TransLines['StockID']; $sql = "SELECT partnerstockid FROM ediitemmapping - WHERE supporcust='CUST' - AND partnercode ='" . $CustDetails['debtorno'] . "' - AND stockid='" . $TransLines['stockid'] . "'"; + WHERE supporcust='CUST' + AND partnercode ='" . $CustDetails['debtorno'] . "' + AND stockid='" . $TransLines['stockid'] . "'"; $CustStkResult = DB_query($sql,$db); if (DB_num_rows($CustStkResult)==1){ Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailConfirmation.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,108 +1,144 @@ <?php /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); //Get Out if we have no order number to work with If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ - $title = _('Select Order To Print'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $title = _('Select Order To Print'); + include('includes/header.inc'); + echo '<div class="centre"> + <br /> + <br /> + <br />'; + prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit(); } -$MailTo = $_GET['EMail']; -$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; -$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; +$MailTo = $_GET['EMail']; +$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; +$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; /*retrieve the order details from the database to print */ $ErrMsg = _('There was a problem retrieving the order header details for Order Number') . ' ' . $_GET['TransNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.debtorno, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.deliverblind, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - locations.locationname, - salesorders.deliverydate - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.orderno=" . $_GET['TransNo']; + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.deliverblind, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + locations.locationname, + salesorders.deliverydate + FROM salesorders, + debtorsmaster, + shippers, + locations + WHERE salesorders.debtorno=debtorsmaster.debtorno + AND salesorders.shipvia=shippers.shipper_id + AND salesorders.fromstkloc=locations.loccode + AND salesorders.orderno='" . $_GET['TransNo'] . "'"; $result=DB_query($sql,$db, $ErrMsg); //If there are no rows, there's a problem. if (DB_num_rows($result)==0){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<div class="centre"> + <br /> + <br /> + <br />'; + prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ - $myrow = DB_fetch_array($result); - /* Place the deliver blind variable into a hold variable to used when - producing the packlist */ - $DeliverBlind = $myrow['deliverblind']; - $DeliveryDate = $myrow['salesorders.deliverydate']; - if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<p>'; - prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . - _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . - '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a><p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + $myrow = DB_fetch_array($result); + /* Place the deliver blind variable into a hold variable to used when + producing the packlist */ + $DeliverBlind = $myrow['deliverblind']; + $DeliveryDate = $myrow['salesorders.deliverydate']; + if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . ' ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); + echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' + . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p><p><a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a></p>'; - echo '<br /><br /><br />'; - echo _('Or select another Order Number to Print'); - echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br />'; + echo _('Or select another Order Number to Print'); + echo '<table class="table_index"><tr><td class="menu_group_item"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. - $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " . - $myrow['customerref'] ; + include('includes/footer.inc'); + exit; + }//packing slip has been printed. + $MailSubject = _('Order Confirmation-Sales Order') . ' ' . $_GET['TransNo'] . ' - '. _('Your PO') . ' ' . $myrow['customerref'] ; } /*retrieve the order details from the database to print */ @@ -111,49 +147,52 @@ ) LETS GO */ -$MailMessage = "<html><head><title>Email Confirmation</title></head><body>" . - "<Table cellpadding='2' cellspacing='2'><tr>" . - "<td align='center' colspan='4'><H1>" . $_SESSION['CompanyRecord']['coyname'] . "</H1>" ; -$MailMessage = $MailMessage . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice1'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice4'] . ","; -$MailMessage = $MailMessage . "<b>" . - $_SESSION['CompanyRecord']['regoffice5'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . - $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> - <h2> Order Acknowledgement</h2></td></tr>"; -$MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deliverto'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deladd1'] . "</td></tr>"; -If(mb_strlen(trim($myrow['deladd2']))) -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; +$MailMessage = '<html><head><title>' . _('Email Confirmation') . '</title></head> + <body> + <table cellpadding="2" cellspacing="2"> + <tr> + <td align="center" colspan="4"><h1>' . $_SESSION['CompanyRecord']['coyname'] . '</h1></td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice1'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice4'] . ',<b>' . $_SESSION['CompanyRecord']['regoffice5'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['email'] . '<br /><br /><br /></td> + </tr> + </table> + <table> + <tr><td align="center" colspan="4"> + <h2>' . _('Order Acknowledgement') . '</h2></td> + </tr> + <tr><td align="center" colspan="4"> <b>' . _('Order Number') . ' ' . $_GET['TransNo'] . '</b><br /><br /><br /></td> + </tr> + <tr><td colspan="4"> <b>' . _('Delivered To') . ':</b></td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deliverto'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deladd1'] . '</td> + </tr>'; + +if(mb_strlen(trim($myrow['deladd2']))) { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd2'] . '</td></tr> + <tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. '<br /><br /><br /></td> + </tr>'; +} else { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5'] . '<br /><br /><br /></td> + </tr>'; } -else -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; -} -$MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; +$MailMessage .= '</table> + <table border="1" width="50%"><tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . " <td>PO Line</td>"; + $MailMessage .= '<td>' . _('PO Line') . '</td>'; } - $MailMessage = $MailMessage . "<td>Stock Code</td> - <td>Description</td> - <td>Quantity Ordered</td> - <td>Due Date</td></tr>"; + $MailMessage .= '<td>' . _('Stock Code') . '</td> + <td>' . _('Description') . '</td> + <td>' . _('Quantity Ordered') . '</td> + <td>' . _('Due Date') . '</td> + </tr>'; $sql = "SELECT salesorderdetails.stkcode, @@ -181,33 +220,31 @@ $DscCode[$i] = $myrow2['description']; $QtyCode[$i] = $DisplayQty ; $POLine[$i] = $myrow2['poline']; - If($myrow2['itemdue'] =='') - { + if($myrow2['itemdue'] =='') { $ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate)); - } - else - { + } else { $ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue'])); } - $MailMessage = $MailMessage . "<tr>"; + $MailMessage .= '<tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . "<td align='right'>" . $POLine[$i] . "</td>"; + $MailMessage .= '<td align="right">' . $POLine[$i] . '</td>'; } - $MailMessage = $MailMessage . "<td>" . $myrow2['stkcode'] . - "</td><td>" . - $myrow2['description'] . "</td><td align='right'>" . - $DisplayQty . "</td><td align='center'>" . $ItemDue[$i] . - "</td></tr>"; + $MailMessage .= '<td>' . $myrow2['stkcode'] . '</td><td>' . $myrow2['description'] . '</td> + <td align="right">' . $DisplayQty . '</td> + <td align="center">' . $ItemDue[$i] . '</td> + </tr>'; $i = $i + 1; } //end while there are line items to print out } /*end if there are order details to show on the order*/ -$MailMessage = $MailMessage . "</Table></body></html>"; +$MailMessage .= '</table> + </body> + </html>'; // echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ - echo " The following E-Mail was sent to $MailTo:"; + echo ' ' ._('The following E-Mail was sent to') . ' ' . $MailTo . ' :'; } ?> <html> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailCustTrans.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -47,8 +47,8 @@ FROM custbranch INNER JOIN debtortrans ON custbranch.debtorno= debtortrans.debtorno AND custbranch.branchcode=debtortrans.branchcode - WHERE debtortrans.type='" . $TypeCode . "' - AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; + WHERE debtortrans.type='" . $TypeCode . "' + AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; $ErrMsg = _('There was a problem retrieving the contact details for the customer'); $ContactResult=DB_query($SQL,$db,$ErrMsg); Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/ExchangeRateTrend.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.3 $ */ + /* $Id$*/ -//$PageSecurity = 2; - include('includes/session.inc'); $title = _('View Currency Trends'); @@ -29,33 +27,30 @@ _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; echo '<table>'; // First column - $SQL = 'SELECT * FROM currencies'; + $SQL = "SELECT * FROM currencies"; $result=DB_query($SQL,$db); // CurrencyToShow Currency Picker echo '<tr><td><select name="CurrencyToShow" onChange="ReloadForm(update.submit)">'; - DB_data_seek($result,0); - while ($myrow=DB_fetch_array($result)) { - if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ - if ( $CurrencyToShow==$myrow['currabrev'] ) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } + DB_data_seek($result,0); + while ($myrow=DB_fetch_array($result)) { + if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ + if ( $CurrencyToShow==$myrow['currabrev'] ) { + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; + } else { + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; } } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; echo '</table>'; /*close off the table in the third column */ - - echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; echo '</form>'; - - // ************** // SHOW OUR GRAPH // ************** @@ -66,7 +61,7 @@ echo '<p></div><table class=selection>'; echo '<tr><th><div class="centre"><font size=4 color=BLUE><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>'; - echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable"></td></tr>'; + echo '<tr><td><img src=' . $image . ' alt="' ._('Trend Currently Unavailable') . '"></td></tr>'; echo '</table>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/Factors.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -151,19 +151,19 @@ if (isset($FactorID) and isset($_POST['Amend'])) { $sql = "SELECT id, - coyname, - address1, - address2, - address3, - address4, - address5, - address6, - contact, - telephone, - fax, - email - FROM factorcompanies - WHERE id = '".$FactorID."'"; + coyname, + address1, + address2, + address3, + address4, + address5, + address6, + contact, + telephone, + fax, + email + FROM factorcompanies + WHERE id = '".$FactorID."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -208,7 +208,6 @@ <td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>'; echo '<tr><td>' . _('Address Line 2') . ':</td> ... [truncated message content] |
From: <dai...@us...> - 2011-07-05 10:27:34
|
Revision: 4623 http://web-erp.svn.sourceforge.net/web-erp/?rev=4623&view=rev Author: daintree Date: 2011-07-05 10:27:25 +0000 (Tue, 05 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/EDIProcessOrders.php trunk/EDISendInvoices.php trunk/EmailConfirmation.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetRegister.php trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/ShipmentCosting.php trunk/TaxAuthorityRates.php trunk/includes/LanguagesArray.php trunk/includes/PDFQuotationPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/includes/RFC822.php trunk/includes/tcpdf/tcpdf.php trunk/sql/mysql/upgrade4.04.4-4.04.5.sql Modified: trunk/EDIProcessOrders.php =================================================================== --- trunk/EDIProcessOrders.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDIProcessOrders.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -76,7 +76,7 @@ while ($LineText = fgets($fp) AND $TryNextFile != True){ /* get each line of the order file */ $LineText = StripTrailingComma($LineText); - echo "<br />".$LineText; + echo '<br />' . $LineText; if ($SegTag != mb_substr($LineText,0,3)){ $SegCounter=1; @@ -140,7 +140,7 @@ $Order->Comments .= "\n" . _('blanket order'); break; case '224': - $EmailText .= "\n\n" . _('This order is URGENT') . "</font>"; + $EmailText .= "\n\n" . _('This order is URGENT') . '</font>'; $Order->Comments .= "\n" . _('URGENT ORDER'); break; case '226': @@ -184,7 +184,7 @@ $EmailText .= "\n" . _('Customers order ref') . ': ' . $BGM_C106[0]; } if (isset($BGM_elements[2])){ - echo "<br />echo BGM_elements[2] " .$BGM_elements[2]; + echo '<br />echo BGM_elements[2] ' .$BGM_elements[2]; $BGM_1225 = explode(':',$BGM_elements[2]); $MsgFunction = $BGM_1225[0]; @@ -457,22 +457,23 @@ case 'SN': /*Store Number - get the branch details from the store number - snag here too cos need to ensure got the Customer detail first before try looking up its branches */ $BranchResult = DB_query("SELECT branchcode, - brname, - braddress1, - braddress2, - braddress3, - braddress4, - braddress5, - braddress6, - contactname, - defaultlocation, - phoneno, - email - FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); + brname, + braddress1, + braddress2, + braddress3, + braddress4, + braddress5, + braddress6, + contactname, + defaultlocation, + phoneno, + email + FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno = custbranch.debtorno WHERE custbranchcode='" . $NAD_C082[0] . "' AND custbranch.debtorno='" . $Order->DebtorNo . "' AND debtorsmaster.ediorders=1",$db); if (DB_num_rows($BranchResult)!=1){ $EmailText .= "\n" . _('The Store number was specified as') . ' ' . $NAD_C082[0] . ' ' . _('Unfortunately there are either no branches of customer code') . ' ' . $Order->DebtorNo . ' ' ._('or several that match this store number') . '. ' . _('This order could not be processed further'); $TryNextFile = True; /* Look for other EDI msgs */ - $CreateOrder = False; /*Dont create order in system */ } else { + $CreateOrder = False; /*Dont create order in system */ + } else { $BranchRow = DB_fetch_array($BranchResult); $Order->BranchCode = $BranchRow['branchcode']; $Order->DeliverTo = $BranchRow['brname']; Modified: trunk/EDISendInvoices.php =================================================================== --- trunk/EDISendInvoices.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EDISendInvoices.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -8,16 +8,16 @@ include('includes/htmlMimeMail.php'); // need for sending email attachments /*Get the Customers who are enabled for EDI invoicing */ -$sql = 'SELECT debtorno, - edireference, - editransport, - ediaddress, - ediserveruser, - ediserverpwd, - daysbeforedue, - dayinfollowingmonth - FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator - WHERE ediinvoices=1'; +$sql = "SELECT debtorno, + edireference, + editransport, + ediaddress, + ediserveruser, + ediserverpwd, + daysbeforedue, + dayinfollowingmonth + FROM debtorsmaster INNER JOIN paymentterms ON debtorsmaster.paymentterms=paymentterms.termsindicator + WHERE ediinvoices=1"; $EDIInvCusts = DB_query($sql,$db); @@ -30,29 +30,29 @@ /*Figure out if there are any unset invoices or credits for the customer */ $sql = "SELECT debtortrans.id, - transno, - type, - order_, - trandate, - ovgst, - ovamount, - ovfreight, - ovdiscount, - debtortrans.branchcode, - custbranchcode, - invtext, - shipvia, - rate, - brname, - braddress1, - braddress2, - braddress3, - braddress4 - FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno - AND custbranch.branchcode = debtortrans.branchcode - WHERE (type=10 or type=11) - AND edisent=0 - AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; + transno, + type, + order_, + trandate, + ovgst, + ovamount, + ovfreight, + ovdiscount, + debtortrans.branchcode, + custbranchcode, + invtext, + shipvia, + rate, + brname, + braddress1, + braddress2, + braddress3, + braddress4 + FROM debtortrans INNER JOIN custbranch ON custbranch.debtorno = debtortrans.debtorno + AND custbranch.branchcode = debtortrans.branchcode + WHERE (type=10 or type=11) + AND edisent=0 + AND debtortrans.debtorno='" . $CustDetails['debtorno'] . "'"; $ErrMsg = _('There was a problem retrieving the customer transactions because'); $TransHeaders = DB_query($sql,$db,$ErrMsg); @@ -135,34 +135,34 @@ if ($TransDetail['type']==10){ /*its an invoice */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - -stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } else { /* credit note */ $sql = "SELECT stockmoves.stockid, - stockmaster.description, - stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.taxrate, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) as fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.taxrate, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=11 and stockmoves.transno='" . $TransNo . "' + AND stockmoves.show_on_inv_crds=1"; } $TransLinesResult = DB_query($sql,$db); @@ -174,9 +174,9 @@ $StockID = $TransLines['StockID']; $sql = "SELECT partnerstockid FROM ediitemmapping - WHERE supporcust='CUST' - AND partnercode ='" . $CustDetails['debtorno'] . "' - AND stockid='" . $TransLines['stockid'] . "'"; + WHERE supporcust='CUST' + AND partnercode ='" . $CustDetails['debtorno'] . "' + AND stockid='" . $TransLines['stockid'] . "'"; $CustStkResult = DB_query($sql,$db); if (DB_num_rows($CustStkResult)==1){ Modified: trunk/EmailConfirmation.php =================================================================== --- trunk/EmailConfirmation.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailConfirmation.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,108 +1,144 @@ <?php /* $Id$*/ -//$PageSecurity = 2; include('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); //Get Out if we have no order number to work with If (!isset($_GET['TransNo']) OR $_GET['TransNo']==""){ - $title = _('Select Order To Print'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $title = _('Select Order To Print'); + include('includes/header.inc'); + echo '<div class="centre"> + <br /> + <br /> + <br />'; + prnMsg( _('Select an Order Number to Print before calling this page') , 'error'); + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit(); } -$MailTo = $_GET['EMail']; -$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; -$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; +$MailTo = $_GET['EMail']; +$headers = 'From: Bethany Manufacturing <sa...@be...>' . '\n'; +$headers .= 'MIME-Version: 1.0\n' . 'Content-Type: text/html; charset="utf-8"\n'; /*retrieve the order details from the database to print */ $ErrMsg = _('There was a problem retrieving the order header details for Order Number') . ' ' . $_GET['TransNo'] . ' ' . _('from the database'); $sql = "SELECT salesorders.debtorno, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.deliverblind, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - shippers.shippername, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - locations.locationname, - salesorders.deliverydate - FROM salesorders, - debtorsmaster, - shippers, - locations - WHERE salesorders.debtorno=debtorsmaster.debtorno - AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.orderno=" . $_GET['TransNo']; + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.deliverblind, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + locations.locationname, + salesorders.deliverydate + FROM salesorders, + debtorsmaster, + shippers, + locations + WHERE salesorders.debtorno=debtorsmaster.debtorno + AND salesorders.shipvia=shippers.shipper_id + AND salesorders.fromstkloc=locations.loccode + AND salesorders.orderno='" . $_GET['TransNo'] . "'"; $result=DB_query($sql,$db, $ErrMsg); //If there are no rows, there's a problem. if (DB_num_rows($result)==0){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<div class="centre"><br /><br /><br />'; - prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); - echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; - include('includes/footer.inc'); - exit(); + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + echo '<div class="centre"> + <br /> + <br /> + <br />'; + prnMsg( _('Unable to Locate Order Number') . ' : ' . $_GET['TransNo'] . ' ', 'error'); + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit(); } elseif (DB_num_rows($result)==1){ /*There is only one order header returned - thats good! */ - $myrow = DB_fetch_array($result); - /* Place the deliver blind variable into a hold variable to used when - producing the packlist */ - $DeliverBlind = $myrow['deliverblind']; - $DeliveryDate = $myrow['salesorders.deliverydate']; - if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ - $title = _('Print Packing Slip Error'); - include('includes/header.inc'); - echo '<p>'; - prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . - _('has previously been printed') . '. ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . - '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' - . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a><p>' . - '<a href="' . $rootpath. '/PrintCustOrder_generic.php?' . SID . '&TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a>'; + $myrow = DB_fetch_array($result); + /* Place the deliver blind variable into a hold variable to used when + producing the packlist */ + $DeliverBlind = $myrow['deliverblind']; + $DeliveryDate = $myrow['salesorders.deliverydate']; + if ($myrow['printedpackingslip']==1 AND ($_GET['Reprint']!='OK' OR !isset($_GET['Reprint']))){ + $title = _('Print Packing Slip Error'); + include('includes/header.inc'); + prnMsg( _('The packing slip for order number') . ' ' . $_GET['TransNo'] . ' ' . _('has previously been printed') . ' ' . _('It was printed on'). ' ' . ConvertSQLDate($myrow['datepackingslipprinted']) . '<br />' . _('This check is there to ensure that duplicate packing slips are not produced and dispatched more than once to the customer'), 'warn' ); + echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">' + . _('Do a Re-Print') . ' (' . _('On Pre-Printed Stationery') . ') ' . _('Even Though Previously Printed') . '</a></p><p><a href="' . $rootpath. '/PrintCustOrder_generic.php?TransNo=' . $_GET['TransNo'] . '&Reprint=OK">'. _('Do a Re-Print') . ' (' . _('Plain paper') . ' - ' . _('A4') . ' ' . _('landscape') . ') ' . _('Even Though Previously Printed'). '</a></p>'; - echo '<br /><br /><br />'; - echo _('Or select another Order Number to Print'); - echo '<table class="table_index"><tr><td class="menu_group_item"> - <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'">' . _('Outstanding Sales Orders') . '</a></li> - <li><a href="'. $rootpath . '/SelectCompletedOrder.php?'. SID .'">' . _('Completed Sales Orders') . '</a></li> - </td></tr></table></div><br /><br /><br />'; + echo '<br /> + <br /> + <br />'; + echo _('Or select another Order Number to Print'); + echo '<table class="table_index"><tr><td class="menu_group_item"> + <ul> + <li><a href="'. $rootpath . '/SelectSalesOrder.php">' . _('Outstanding Sales Orders') . '</a></li> + <li><a href="'. $rootpath . '/SelectCompletedOrder.php">' . _('Completed Sales Orders') . '</a></li> + </ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; - include('includes/footer.inc'); - exit; - }//packing slip has been printed. - $MailSubject = "Order Confirmation-Sales Order " . $_GET['TransNo'] . " - Your PO " . - $myrow['customerref'] ; + include('includes/footer.inc'); + exit; + }//packing slip has been printed. + $MailSubject = _('Order Confirmation-Sales Order') . ' ' . $_GET['TransNo'] . ' - '. _('Your PO') . ' ' . $myrow['customerref'] ; } /*retrieve the order details from the database to print */ @@ -111,49 +147,52 @@ ) LETS GO */ -$MailMessage = "<html><head><title>Email Confirmation</title></head><body>" . - "<Table cellpadding='2' cellspacing='2'><tr>" . - "<td align='center' colspan='4'><H1>" . $_SESSION['CompanyRecord']['coyname'] . "</H1>" ; -$MailMessage = $MailMessage . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice1'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['regoffice4'] . ","; -$MailMessage = $MailMessage . "<b>" . - $_SESSION['CompanyRecord']['regoffice5'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . - $_SESSION['CompanyRecord']['fax'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $_SESSION['CompanyRecord']['email'] . "<br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<Table><tr><td align='center' colspan='4'> - <h2> Order Acknowledgement</h2></td></tr>"; -$MailMessage = $MailMessage . "<tr><td align='center' colspan='4'> <b>Order Number " . - $_GET['TransNo'] . "</b><br /><br /><br /></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>Delivered To:</b></td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deliverto'] . "</td></tr>"; -$MailMessage = $MailMessage . "<tr><td colspan='4'> <b>" . - $myrow['deladd1'] . "</td></tr>"; -If(mb_strlen(trim($myrow['deladd2']))) -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd2'] . "</td></tr>"; - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . - ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. "<br /><br /><br /></td></tr>"; +$MailMessage = '<html><head><title>' . _('Email Confirmation') . '</title></head> + <body> + <table cellpadding="2" cellspacing="2"> + <tr> + <td align="center" colspan="4"><h1>' . $_SESSION['CompanyRecord']['coyname'] . '</h1></td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice1'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['regoffice4'] . ',<b>' . $_SESSION['CompanyRecord']['regoffice5'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax'). ': ' . $_SESSION['CompanyRecord']['fax'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $_SESSION['CompanyRecord']['email'] . '<br /><br /><br /></td> + </tr> + </table> + <table> + <tr><td align="center" colspan="4"> + <h2>' . _('Order Acknowledgement') . '</h2></td> + </tr> + <tr><td align="center" colspan="4"> <b>' . _('Order Number') . ' ' . $_GET['TransNo'] . '</b><br /><br /><br /></td> + </tr> + <tr><td colspan="4"> <b>' . _('Delivered To') . ':</b></td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deliverto'] . '</td> + </tr> + <tr><td colspan="4"> <b>' . $myrow['deladd1'] . '</td> + </tr>'; + +if(mb_strlen(trim($myrow['deladd2']))) { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd2'] . '</td></tr> + <tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5']. '<br /><br /><br /></td> + </tr>'; +} else { + $MailMessage .= '<tr><td> <b>' . $myrow['deladd3'] . ' ' . $myrow['deladd4'] . ' ' . $myrow['deladd5'] . '<br /><br /><br /></td> + </tr>'; } -else -{ - $MailMessage = $MailMessage . "<tr><td> <b>" . $myrow['deladd3'] . ' ' . - $myrow['deladd4'] . ' ' . $myrow['deladd5'] . "<br /><br /><br /></td></tr>"; -} -$MailMessage = $MailMessage . "</table><table border='1' width='50%'><tr>"; +$MailMessage .= '</table> + <table border="1" width="50%"><tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . " <td>PO Line</td>"; + $MailMessage .= '<td>' . _('PO Line') . '</td>'; } - $MailMessage = $MailMessage . "<td>Stock Code</td> - <td>Description</td> - <td>Quantity Ordered</td> - <td>Due Date</td></tr>"; + $MailMessage .= '<td>' . _('Stock Code') . '</td> + <td>' . _('Description') . '</td> + <td>' . _('Quantity Ordered') . '</td> + <td>' . _('Due Date') . '</td> + </tr>'; $sql = "SELECT salesorderdetails.stkcode, @@ -181,33 +220,31 @@ $DscCode[$i] = $myrow2['description']; $QtyCode[$i] = $DisplayQty ; $POLine[$i] = $myrow2['poline']; - If($myrow2['itemdue'] =='') - { + if($myrow2['itemdue'] =='') { $ItemDue[$i] = date('M d, Y',strtotime($DeliveryDate)); - } - else - { + } else { $ItemDue[$i] = date('M d, Y',strtotime($myrow2['itemdue'])); } - $MailMessage = $MailMessage . "<tr>"; + $MailMessage .= '<tr>'; if($_REQUEST['POLine'] == 1){ - $MailMessage = $MailMessage . "<td align='right'>" . $POLine[$i] . "</td>"; + $MailMessage .= '<td align="right">' . $POLine[$i] . '</td>'; } - $MailMessage = $MailMessage . "<td>" . $myrow2['stkcode'] . - "</td><td>" . - $myrow2['description'] . "</td><td align='right'>" . - $DisplayQty . "</td><td align='center'>" . $ItemDue[$i] . - "</td></tr>"; + $MailMessage .= '<td>' . $myrow2['stkcode'] . '</td><td>' . $myrow2['description'] . '</td> + <td align="right">' . $DisplayQty . '</td> + <td align="center">' . $ItemDue[$i] . '</td> + </tr>'; $i = $i + 1; } //end while there are line items to print out } /*end if there are order details to show on the order*/ -$MailMessage = $MailMessage . "</Table></body></html>"; +$MailMessage .= '</table> + </body> + </html>'; // echo $MailMessage . "=mailMessage<br />"; IF(mail( $MailTo, $MailSubject, $MailMessage, $headers )){ - echo " The following E-Mail was sent to $MailTo:"; + echo ' ' ._('The following E-Mail was sent to') . ' ' . $MailTo . ' :'; } ?> <html> Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/EmailCustTrans.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -47,8 +47,8 @@ FROM custbranch INNER JOIN debtortrans ON custbranch.debtorno= debtortrans.debtorno AND custbranch.branchcode=debtortrans.branchcode - WHERE debtortrans.type='" . $TypeCode . "' - AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; + WHERE debtortrans.type='" . $TypeCode . "' + AND debtortrans.transno='" .$_GET['FromTransNo'] . "'"; $ErrMsg = _('There was a problem retrieving the contact details for the customer'); $ContactResult=DB_query($SQL,$db,$ErrMsg); Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/ExchangeRateTrend.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.3 $ */ + /* $Id$*/ -//$PageSecurity = 2; - include('includes/session.inc'); $title = _('View Currency Trends'); @@ -29,33 +27,30 @@ _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; echo '<table>'; // First column - $SQL = 'SELECT * FROM currencies'; + $SQL = "SELECT * FROM currencies"; $result=DB_query($SQL,$db); // CurrencyToShow Currency Picker echo '<tr><td><select name="CurrencyToShow" onChange="ReloadForm(update.submit)">'; - DB_data_seek($result,0); - while ($myrow=DB_fetch_array($result)) { - if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ - if ( $CurrencyToShow==$myrow['currabrev'] ) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; - } + DB_data_seek($result,0); + while ($myrow=DB_fetch_array($result)) { + if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){ + if ( $CurrencyToShow==$myrow['currabrev'] ) { + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; + } else { + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>'; } } - echo '</select></td></tr>'; + } + echo '</select></td></tr>'; echo '</table>'; /*close off the table in the third column */ - - echo '<p><div class="centre"><input type=submit name=submit VALUE="' . _('Accept') . '"></div>'; + echo '<p><div class="centre"><input type=submit name=submit value="' . _('Accept') . '"></div>'; echo '</form>'; - - // ************** // SHOW OUR GRAPH // ************** @@ -66,7 +61,7 @@ echo '<p></div><table class=selection>'; echo '<tr><th><div class="centre"><font size=4 color=BLUE><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>'; - echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable"></td></tr>'; + echo '<tr><td><img src=' . $image . ' alt="' ._('Trend Currently Unavailable') . '"></td></tr>'; echo '</table>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2011-07-03 04:33:19 UTC (rev 4622) +++ trunk/Factors.php 2011-07-05 10:27:25 UTC (rev 4623) @@ -151,19 +151,19 @@ if (isset($FactorID) and isset($_POST['Amend'])) { $sql = "SELECT id, - coyname, - address1, - address2, - address3, - address4, - address5, - address6, - contact, - telephone, - fax, - email - FROM factorcompanies - WHERE id = '".$FactorID."'"; + coyname, + address1, + address2, + address3, + address4, + address5, + address6, + contact, + telephone, + fax, + email + FROM factorcompanies + WHERE id = '".$FactorID."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -208,7 +208,6 @@ <td><input tabindex=2 type="text" name="Address1" size=42 maxlength=40 value="' . $_POST['Address1'] .'"></td></tr>'; echo '<tr><td>' . _('Address Line 2') . ':</td> ... [truncated message content] |
From: <dai...@us...> - 2011-07-05 10:36:20
|
Revision: 4624 http://web-erp.svn.sourceforge.net/web-erp/?rev=4624&view=rev Author: daintree Date: 2011-07-05 10:36:13 +0000 (Tue, 05 Jul 2011) Log Message: ----------- </br> changed to <br /> Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/GLBudgets.php trunk/InventoryQuantities.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPReschedules.php trunk/PricesByCost.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/StockTransfers.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMExtendedQty.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -82,7 +82,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter finds there are more components that are used as // assemblies at lower levels @@ -258,7 +258,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td> <td><input type ="text" name="Part" size="20">'; @@ -276,8 +276,8 @@ <option value="no">' . _('Plain Print') . '</option> </select></td></tr>'; echo '</table> - </br> - </br> + <br /> + <br /> <div class="centre"> <br /><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"> </div>'; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndented.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -79,7 +79,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -245,8 +245,8 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br> - </br> + echo '<br /> + <br /> <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndentedReverse.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -234,8 +234,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br> - </br> + echo '<br /> + <br /> <form action=' . $_SERVER['PHP_SELF'] . ' method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/GLBudgets.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -30,7 +30,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; -echo '</br><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' +echo '<br /><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' onChange='ReloadForm(selectaccount.Select)'>"; $SQL = "SELECT accountcode, @@ -68,7 +68,7 @@ echo '<br /><table><tr><td><input type="submit" name="Previous" value="' . _('Prev Account') . '"></td>'; echo '<td><input type="submit" name="Select" value="' . _('Select Account') . '"></td>'; echo '<td><input type="submit" name="Next" value="' . _('Next Account') . '"></td></tr>'; -echo '</table></br>'; +echo '</table><br />'; echo '</form>'; // End of account selection @@ -213,7 +213,7 @@ echo '<input type="hidden" name="SelectedAccount" value='.$SelectedAccount.'>'; echo '<script>defaultControl(document.form.1next);</script>'; - echo '</br><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; + echo '<br /><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/InventoryQuantities.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -146,7 +146,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr><td>'; echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRP.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -13,8 +13,8 @@ } // MRP - Create levels table based on bom - echo '</br>' ._('Start time') . ': ' . date('h:i:s') . '</br>'; - echo '</br>' . _('Initialising tables .....') . '</br>'; + echo '<br />' ._('Start time') . ': ' . date('h:i:s') . '<br />'; + echo '<br />' . _('Initialising tables .....') . '<br />'; flush(); $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); $result = DB_query("DROP TABLE IF EXISTS passbom",$db); @@ -59,7 +59,7 @@ FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $compctr - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -584,7 +584,7 @@ echo '<td><input type="checkbox" name="pansizeflag" value="y" checked></td></tr>'; echo '<tr><td>' ._('Use Shrinkage?') . ':</td>'; echo '<td><input type="checkbox" name="shrinkageflag" value="y" checked></td></tr>'; - echo '</table></td></tr></table><div class="centre"></br></br><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; + echo '</table></td></tr></table><div class="centre"><br /><br /><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; echo '</form>'; } // End of Main program logic ------------------------------------------------------- @@ -594,7 +594,7 @@ // Create an array of mrprequirements and an array of mrpsupplies, then read through // them seeing if all requirements are covered by supplies. Create a planned order // for any unmet requirements. Change dates if necessary for the supplies. - //echo '</br>Part is ' . "$part" . '</br>'; + //echo '<br />Part is ' . "$part" . '<br />'; // Get decimal places from stockmaster for rounding of shrinkage factor $sql = "SELECT decimalplaces FROM stockmaster WHERE stockid = '" . $part . "'"; Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCalendar.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -210,7 +210,7 @@ $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - echo '</br><table class="selection"> + echo '<br /><table class="selection"> <tr bgcolor ="#800000"> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> @@ -231,7 +231,7 @@ } //END WHILE LIST LOOP echo '</table>'; - echo '</br></br>'; + echo '<br /><br />'; unset ($ChangeDate); display($db,$ChangeDate); Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCreateDemands.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -61,7 +61,7 @@ " . $WhereLocation . " " . $WhereCategory . " GROUP BY salesorderdetails.stkcode"; -//echo "</br>$sql</br>"; +//echo "<br />$sql<br />"; $result = DB_query($sql,$db); // To get the quantity per period, get the whole number amount of the total quantity divided // by the number of periods and also get the remainder from that calculation. Put the whole Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPPlannedWorkOrders.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -315,7 +315,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPReschedules.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -124,7 +124,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/PricesByCost.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -227,7 +227,7 @@ } } 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 '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = "SELECT categoryid, categorydescription @@ -280,7 +280,7 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - </br><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; + <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevel.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -161,7 +161,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Inventory Reorder Level Report') . '</p>'; echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevelLocation.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -162,7 +162,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname @@ -203,7 +203,7 @@ echo '<option value="2">'. _('Code') . '</option>'; echo '</select></td></tr>'; - echo '</table></br><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; + echo '</table><br /><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include('includes/footer.inc'); Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/StockTransfers.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -424,7 +424,7 @@ $Result = DB_Txn_Commit($db); prnMsg(_('An inventory transfer of').' ' . $_SESSION['Transfer']->TransferItem[0]->StockID . ' - ' . $_SESSION['Transfer']->TransferItem[0]->ItemDescription . ' '. _('has been created from').' ' . $_SESSION['Transfer']->StockLocationFrom . ' '. _('to') . ' ' . $_SESSION['Transfer']->StockLocationTo . ' '._('for a quantity of').' ' . $_SESSION['Transfer']->TransferItem[0]->Quantity,'success'); - echo '</br><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; + echo '<br /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; unset ($_SESSION['Transfer']); include ('includes/footer.inc'); exit; Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:36:13 UTC (rev 4624) @@ -35232,7 +35232,7 @@ #: includes/DefineLabelClass.php:40 msgid "Max text<br />length" -msgstr "Maximale</br>Textlänge" +msgstr "Maximale<br />Textlänge" #: includes/DefineLabelClass.php:41 msgid "Font size" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-05 10:36:20
|
Revision: 4624 http://web-erp.svn.sourceforge.net/web-erp/?rev=4624&view=rev Author: daintree Date: 2011-07-05 10:36:13 +0000 (Tue, 05 Jul 2011) Log Message: ----------- </br> changed to <br /> Modified Paths: -------------- trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/GLBudgets.php trunk/InventoryQuantities.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPReschedules.php trunk/PricesByCost.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php trunk/StockTransfers.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMExtendedQty.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -82,7 +82,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter finds there are more components that are used as // assemblies at lower levels @@ -258,7 +258,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td> <td><input type ="text" name="Part" size="20">'; @@ -276,8 +276,8 @@ <option value="no">' . _('Plain Print') . '</option> </select></td></tr>'; echo '</table> - </br> - </br> + <br /> + <br /> <div class="centre"> <br /><input type=submit name="PrintPDF" value="' . _('Print PDF') . '"> </div>'; Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndented.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -79,7 +79,7 @@ AND bom.effectiveto >= NOW() AND bom.effectiveafter <= NOW()"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $ComponentCounter - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -245,8 +245,8 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br> - </br> + echo '<br /> + <br /> <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/BOMIndentedReverse.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -234,8 +234,8 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '</br> - </br> + echo '<br /> + <br /> <form action=' . $_SERVER['PHP_SELF'] . ' method="post"> <table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/GLBudgets.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -30,7 +30,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table>'; -echo '</br><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' +echo '<br /><tr><td>'. _('Select GL Account'). ":</td><td><select name='SelectedAccount' onChange='ReloadForm(selectaccount.Select)'>"; $SQL = "SELECT accountcode, @@ -68,7 +68,7 @@ echo '<br /><table><tr><td><input type="submit" name="Previous" value="' . _('Prev Account') . '"></td>'; echo '<td><input type="submit" name="Select" value="' . _('Select Account') . '"></td>'; echo '<td><input type="submit" name="Next" value="' . _('Next Account') . '"></td></tr>'; -echo '</table></br>'; +echo '</table><br />'; echo '</form>'; // End of account selection @@ -213,7 +213,7 @@ echo '<input type="hidden" name="SelectedAccount" value='.$SelectedAccount.'>'; echo '<script>defaultControl(document.form.1next);</script>'; - echo '</br><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; + echo '<br /><div class="centre"><input type="submit" name=update value="' . _('Update') . '"></div></form>'; $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/InventoryQuantities.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -146,7 +146,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr><td>'; echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRP.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -13,8 +13,8 @@ } // MRP - Create levels table based on bom - echo '</br>' ._('Start time') . ': ' . date('h:i:s') . '</br>'; - echo '</br>' . _('Initialising tables .....') . '</br>'; + echo '<br />' ._('Start time') . ': ' . date('h:i:s') . '<br />'; + echo '<br />' . _('Initialising tables .....') . '<br />'; flush(); $result = DB_query("DROP TABLE IF EXISTS tempbom",$db); $result = DB_query("DROP TABLE IF EXISTS passbom",$db); @@ -59,7 +59,7 @@ FROM bom LEFT JOIN bom as bom2 ON bom.parent = bom2.component WHERE bom2.component IS NULL"; $result = DB_query($sql,$db); - //echo "</br>sql is $sql</br>"; + //echo "<br />sql is $sql<br />"; // This while routine finds the other levels as long as $compctr - the // component counter - finds there are more components that are used as // assemblies at lower levels @@ -584,7 +584,7 @@ echo '<td><input type="checkbox" name="pansizeflag" value="y" checked></td></tr>'; echo '<tr><td>' ._('Use Shrinkage?') . ':</td>'; echo '<td><input type="checkbox" name="shrinkageflag" value="y" checked></td></tr>'; - echo '</table></td></tr></table><div class="centre"></br></br><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; + echo '</table></td></tr></table><div class="centre"><br /><br /><input type="submit" name="submit" value="' . _('Run MRP') . '"></div>'; echo '</form>'; } // End of Main program logic ------------------------------------------------------- @@ -594,7 +594,7 @@ // Create an array of mrprequirements and an array of mrpsupplies, then read through // them seeing if all requirements are covered by supplies. Create a planned order // for any unmet requirements. Change dates if necessary for the supplies. - //echo '</br>Part is ' . "$part" . '</br>'; + //echo '<br />Part is ' . "$part" . '<br />'; // Get decimal places from stockmaster for rounding of shrinkage factor $sql = "SELECT decimalplaces FROM stockmaster WHERE stockid = '" . $part . "'"; Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCalendar.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -210,7 +210,7 @@ $ErrMsg = _('The SQL to find the parts selected failed with the message'); $result = DB_query($sql,$db,$ErrMsg); - echo '</br><table class="selection"> + echo '<br /><table class="selection"> <tr bgcolor ="#800000"> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> @@ -231,7 +231,7 @@ } //END WHILE LIST LOOP echo '</table>'; - echo '</br></br>'; + echo '<br /><br />'; unset ($ChangeDate); display($db,$ChangeDate); Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPCreateDemands.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -61,7 +61,7 @@ " . $WhereLocation . " " . $WhereCategory . " GROUP BY salesorderdetails.stkcode"; -//echo "</br>$sql</br>"; +//echo "<br />$sql<br />"; $result = DB_query($sql,$db); // To get the quantity per period, get the whole number amount of the total quantity divided // by the number of periods and also get the remainder from that calculation. Put the whole Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPPlannedWorkOrders.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -315,7 +315,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/MRPReschedules.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -124,7 +124,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/PricesByCost.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -227,7 +227,7 @@ } } 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 '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table class=selection>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = "SELECT categoryid, categorydescription @@ -280,7 +280,7 @@ DB_data_seek($result, 0); echo '</select></td></tr>'; echo '</table> - </br><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; + <br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevel.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -161,7 +161,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Inventory Reorder Level Report') . '</p>'; echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; + echo '<br /><br /><form action=' . $_SERVER['PHP_SELF'] . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/ReorderLevelLocation.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -162,7 +162,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the reorder levels for Inventory items in different categories.') . '</div><br />'; - echo '</br></br><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; + echo '<br /><br /><form action="' . $_SERVER['PHP_SELF'] . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $sql = "SELECT loccode, locationname @@ -203,7 +203,7 @@ echo '<option value="2">'. _('Code') . '</option>'; echo '</select></td></tr>'; - echo '</table></br><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; + echo '</table><br /><p><div class="centre"><input type=submit name="submit" value="' . _('Submit') . '"></div></p>'; } /*end of else not submit */ include('includes/footer.inc'); Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/StockTransfers.php 2011-07-05 10:36:13 UTC (rev 4624) @@ -424,7 +424,7 @@ $Result = DB_Txn_Commit($db); prnMsg(_('An inventory transfer of').' ' . $_SESSION['Transfer']->TransferItem[0]->StockID . ' - ' . $_SESSION['Transfer']->TransferItem[0]->ItemDescription . ' '. _('has been created from').' ' . $_SESSION['Transfer']->StockLocationFrom . ' '. _('to') . ' ' . $_SESSION['Transfer']->StockLocationTo . ' '._('for a quantity of').' ' . $_SESSION['Transfer']->TransferItem[0]->Quantity,'success'); - echo '</br><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; + echo '<br /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>'; unset ($_SESSION['Transfer']); include ('includes/footer.inc'); exit; Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:27:25 UTC (rev 4623) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-05 10:36:13 UTC (rev 4624) @@ -35232,7 +35232,7 @@ #: includes/DefineLabelClass.php:40 msgid "Max text<br />length" -msgstr "Maximale</br>Textlänge" +msgstr "Maximale<br />Textlänge" #: includes/DefineLabelClass.php:41 msgid "Font size" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-06 09:30:53
|
Revision: 4625 http://web-erp.svn.sourceforge.net/web-erp/?rev=4625&view=rev Author: daintree Date: 2011-07-06 09:30:42 +0000 (Wed, 06 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/MRPShortages.php trunk/PDFStockTransfer.php trunk/ShipmentCosting.php trunk/Z_CheckDebtorsControl.php trunk/api/api_session.inc trunk/api/api_xml-rpc.php trunk/doc/Change.log trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php trunk/includes/session.inc trunk/index.php trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/GeocodeSetup.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -29,14 +29,14 @@ //first off validate inputs are sensible $sql="SELECT count(geocodeid) - FROM geocode_param WHERE geocodeid='".$_POST['geocodeid']."'"; + FROM geocode_param WHERE geocodeid='".$_POST['GeoCodeID']."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_row($result); if ($myrow[0]!=0 and !isset($SelectedParam)) { $InputError = 1; prnMsg( _('That geocode ID already exists in the database'),'error'); - $Errors[$i] = 'geocodeid'; + $Errors[$i] = 'GeoCodeID'; $i++; } @@ -46,14 +46,14 @@ /*SelectedParam 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*/ - if (isset($_POST['geocode_key']) and isset($_POST['geocode_key']) ){ + if (isset($_POST['GeoCode_Key']) and isset($_POST['GeoCode_Key']) ){ $sql = "UPDATE geocode_param SET - geocode_key='" . $_POST['geocode_key'] . "', - center_long='" . $_POST['center_long'] . "', - center_lat='" . $_POST['center_lat'] . "', - map_height='" . $_POST['map_height'] . "', - map_width='" . $_POST['map_width'] . "', - map_host='" . $_POST['map_host'] . "' + geocode_key='" . $_POST['GeoCode_Key'] . "', + center_long='" . $_POST['Center_Long'] . "', + center_lat='" . $_POST['Center_Lat'] . "', + map_height='" . $_POST['Map_Height'] . "', + map_width='" . $_POST['Map_Width'] . "', + map_host='" . $_POST['Map_Host'] . "' WHERE geocodeid = '" . $SelectedParam . "'"; } $msg = _('The geocode status record has been updated'); @@ -62,48 +62,42 @@ /*Selected Param is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new status code form */ - if (isset($_POST['geocode_key']) and $_POST['geocode_key']>0){ + if (isset($_POST['GeoCode_Key']) and $_POST['GeoCode_Key']>0){ - $sql = "INSERT INTO geocode_param ( - geocodeid, - geocode_key, - center_long, - center_lat, - map_height, - map_width, - map_host) - VALUES (" . " - '', - '" . $_POST['geocode_key'] . "', - '" . $_POST['center_long'] . "', - '" . $_POST['center_lat'] . "', - '" . $_POST['map_height'] . "', - '" . $_POST['map_width'] . "', - '" . $_POST['map_host'] . "' - )"; + $sql = "INSERT INTO geocode_param (geocodeid, + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host) + VALUES ('', + '" . $_POST['GeoCode_Key'] . "', + '" . $_POST['Center_Long'] . "', + '" . $_POST['Center_Lat'] . "', + '" . $_POST['Map_Height'] . "', + '" . $_POST['Map_Width'] . "', + '" . $_POST['Map_Host'] . "')"; } else { - $sql = "INSERT INTO geocode_param ( - geocodeid, - geocode_key, - center_long, - center_lat, - map_height, - map_width, - map_host) - VALUES ( - '" . $_POST['geocodeid'] . "', - '" . $_POST['geocode_key'] . "', - '" . $_POST['center_long'] . "', - '" . $_POST['center_lat'] . "', - '" . $_POST['map_height'] . "', - '" . $_POST['map_width'] . "', - '" . $_POST['map_host'] . " - ')"; + $sql = "INSERT INTO geocode_param (geocodeid, + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host) + VALUES ('" . $_POST['GeoCodeID'] . "', + '" . $_POST['GeoCode_Key'] . "', + '" . $_POST['Center_Long'] . "', + '" . $_POST['Center_Lat'] . "', + '" . $_POST['Map_Height'] . "', + '" . $_POST['Map_Width'] . "', + '" . $_POST['Map_Host'] . "')"; } $msg = _('A new geocode status record has been inserted'); unset ($SelectedParam); - unset ($_POST['geocode_key']); + unset ($_POST['GeoCode_Key']); } //run the SQL from either of the above possibilites $result = DB_query($sql,$db); @@ -128,7 +122,14 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = "SELECT geocodeid, geocode_key, center_long, center_lat, map_height, map_width, map_host FROM geocode_param"; + $sql = "SELECT geocodeid, + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host + FROM geocode_param"; $result = DB_query($sql, $db); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="" />'. @@ -137,17 +138,19 @@ '<a href="http://code.google.com/apis/maps/signup.html" target="_blank"> http://code.google.com/apis/maps/signup.html</a></b>'; echo '<div class="centre"><p>'. _('Find the lat/long for your map center point at ') . '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></b>'; - echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br />'; + prnMsg(_('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)'),'info'); + echo '</div><br />'; echo '<table border=1>'; echo '<tr> - <th>'. _('Geocode ID') .'</th> - <th>'. _('Geocode Key') .'</th> - <th>'. _('Center Longitude') .'</th> - <th>'. _('Center Latitude') .'</th> - <th>'. _('Map height (px)') .'</th> - <th>'. _('Map width (px)') .'</th> - <th>'. _('Map host') .'</th>'; + <th>'. _('Geocode ID') .'</th> + <th>'. _('Geocode Key') .'</th> + <th>'. _('Center Longitude') . '</th> + <th>'. _('Center Latitude') . '</th> + <th>'. _('Map height (px)') . '</th> + <th>'. _('Map width (px)') . '</th> + <th>'. _('Map host') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow=DB_fetch_row($result)) { @@ -161,27 +164,27 @@ } printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href=\'%s?SelectedParam=%s\'>' . _('Edit') . '</a></td> - <td><a href=\'%s?SelectedParam=%s&delete=%s\'>'. _('Delete') .'</a></td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[6], - $_SERVER['PHP_SELF'], - $myrow[0], - $_SERVER['PHP_SELF'], - $myrow[0], - $myrow[0]); + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href=\'%s?SelectedParam=%s\'>' . _('Edit') . '</a></td> + <td><a href=\'%s?SelectedParam=%s&delete=%s\'>'. _('Delete') .'</a></td> + </tr>', + $myrow[0], + $myrow[1], + $myrow[2], + $myrow[3], + $myrow[4], + $myrow[5], + $myrow[6], + $_SERVER['PHP_SELF'], + $myrow[0], + $_SERVER['PHP_SELF'], + $myrow[0], + $myrow[0]); } //END WHILE LIST LOOP echo '</table>'; @@ -201,70 +204,72 @@ //editing an existing status code $sql = "SELECT geocodeid, - geocode_key, - center_long, - center_lat, - map_height, - map_width, - map_host - FROM geocode_param - WHERE geocodeid='" . $SelectedParam . "'"; + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host + FROM geocode_param + WHERE geocodeid='" . $SelectedParam . "'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); - $_POST['geocodeid'] = $myrow['geocodeid']; - $_POST['geocode_key'] = $myrow['geocode_key']; - $_POST['center_long'] = $myrow['center_long']; - $_POST['center_lat'] = $myrow['center_lat']; - $_POST['map_height'] = $myrow['map_height']; - $_POST['map_width'] = $myrow['map_width']; - $_POST['map_host'] = $myrow['map_host']; + $_POST['GeoCodeID'] = $myrow['geocodeid']; + $_POST['GeoCode_Key'] = $myrow['geocode_key']; + $_POST['Center_Long'] = $myrow['center_long']; + $_POST['Center_Lat'] = $myrow['center_lat']; + $_POST['Map_Height'] = $myrow['map_height']; + $_POST['Map_Width'] = $myrow['map_width']; + $_POST['Map_Host'] = $myrow['map_host']; echo '<input type="hidden" name="SelectedParam" value="' . $SelectedParam . '" />'; - echo '<input type="hidden" name="geocodeid" value="' . $_POST['geocodeid'] . '" />'; + echo '<input type="hidden" name="GeoCodeID" value="' . $_POST['GeoCodeID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="">'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; echo '<table> <tr><td>'. _('Geocode Code') .':</td> - <td>' . $_POST['geocodeid'] . '</td></tr>'; + <td>' . $_POST['GeoCodeID'] . '</td></tr>'; } else { //end of if $SelectedParam only do the else when a new record is being entered - if (!isset($_POST['geocodeid'])) { - $_POST['geocodeid'] = ''; + if (!isset($_POST['GeoCodeID'])) { + $_POST['GeoCodeID'] = ''; } echo '<table>'; // <tr> // <td>'. _('Geocode Code') .":</td> -// <td><input " . (in_array('geocodeid',$Errors) ? 'class="inputerror"' : '' ) . -// " tabindex=1 type='Text' name='geocodeid' VALUE='". $_POST['geocodeid'] ."' size=3 maxlength=2></td> +// <td><input " . (in_array('GeoCodeID',$Errors) ? 'class="inputerror"' : '' ) . +// " tabindex=1 type='Text' name='GeoCodeID' VALUE='". $_POST['GeoCodeID'] ."' size=3 maxlength=2></td> // </tr>"; } - if (!isset($_POST['geocode_key'])) { - $_POST['geocode_key'] = ''; + if (!isset($_POST['GeoCode_Key'])) { + $_POST['GeoCode_Key'] = ''; } echo '<br /><tr> <td>'. _('Geocode Key') .':</td> - <td><input ' . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="geocode_key" VALUE="'. $_POST['geocode_key'] .'" size=28 maxlength=300> + <td><input ' . (in_array('GeoCode_Key',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex=2 type="text" name="GeoCode_Key" value="'. $_POST['GeoCode_Key'] .'" size=28 maxlength=300> </td></tr> <tr><td>'. _('Geocode Center Long') . '</td> - <td><input tabindex=3 type="text" name="center_long" VALUE="'. $_POST['center_long'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=3 type="text" name="Center_Long" value="'. $_POST['Center_Long'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Center Lat') . '</td> - <td><input tabindex=4 type="text" name="center_lat" VALUE="'. $_POST['center_lat'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=4 type="text" name="Center_Lat" value="'. $_POST['Center_Lat'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Map Height') . '</td> - <td><input tabindex=5 type="text" name="map_height" VALUE="'. $_POST['map_height'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=5 type="text" name="Map_Height" value="'. $_POST['Map_Height'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Map Width') . '</td> - <td><input tabindex=6 type="text" name="map_width" VALUE="'. $_POST['map_width'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=6 type="text" name="Map_Width" value="'. $_POST['Map_Width'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Host') . '</td> - <td><input tabindex=7 type="text" name="map_host" VALUE="'. $_POST['map_host'] .'" size=20 maxlength=300></td></tr> + <td><input tabindex=7 type="text" name="Map_Host" value="'. $_POST['Map_Host'] .'" size=20 maxlength=300></td></tr> </table> - <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br /><br /> + <div class="centre"><input tabindex=4 type="submit" name="submit" value="' . _('Enter Information') . '"</div> + <br /> + <br /> </form>'; echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br />'; Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/GetStockImage.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -20,33 +20,33 @@ */ // Color decode function -function DecodeBgColor( $colorstr ) { - if ( $colorstr[0] == '#' ) { - $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); +function DecodeBgColor( $ColourStr ) { + if ( $ColourStr[0] == '#' ) { + $ColourStr = mb_substr($ColourStr,1,mb_strlen($ColourStr)); } - $red = 0; - if(mb_strlen($colorstr) > 1) { - $red = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + $Red = 0; + if(mb_strlen($ColourStr) > 1) { + $Red = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - $green = 0; - if(mb_strlen($colorstr) > 1) { - $green = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + $Green = 0; + if(mb_strlen($ColourStr) > 1) { + $Green = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - $blue = 0; - if(mb_strlen($colorstr) > 1) { - $blue = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + $Blue = 0; + if(mb_strlen($ColourStr) > 1) { + $Blue = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - if(mb_strlen($colorstr) > 1) { - $alpha = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + if(mb_strlen($ColourStr) > 1) { + $Alpha = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - if ( isset($alpha) ) - return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); + if ( isset($Alpha) ) + return array('red' => $Red, 'green' => $Green, 'blue' => $Blue, 'alpha' => $Alpha ); else - return array('red' => $red, 'green' => $green, 'blue' => $blue ); + return array('red' => $Red, 'green' => $Green, 'blue' => $Blue ); } if (!function_exists('imagecreatefrompng')){ @@ -56,7 +56,7 @@ include('includes/footer.inc'); exit; } -$defaultimage = 'webERPsmall.png'; +$DefaultImage = 'webERPsmall.png'; // FOR APACHE if ( $_SERVER['PATH_TRANSLATED'][0] == '/' OR $_SERVER['PATH_TRANSLATED'][0]=='') { @@ -66,13 +66,13 @@ //Windows $pathsep = "\\"; } -$filepath = $_SESSION['part_pics_dir'] . $pathsep; +$FilePath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(mb_strtoupper($_GET['StockID'])); +$StockID = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) - $bgcolor = $_GET['bgcolor']; + $BackgroundColour = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) - $textcolor = $_GET['textcolor']; + $TextColour = $_GET['textcolor']; if( isset($_GET['width']) ) $width = $_GET['width']; if( isset($_GET['height']) ) @@ -89,7 +89,7 @@ } if( isset($_GET['transcolor'])) { $doTrans = true; - $transcolor = $_GET['transcolor']; + $TranspColour = $_GET['transcolor']; } if( isset($_GET['bevel']) ) { $bevel = $_GET['bevel']; @@ -111,17 +111,17 @@ // Extension requirements and Stock ID Isolation -if($stockid == '') { - $stockid = $defaultimage; +if($StockID == '') { + $StockID = $DefaultImage; $blanktext = true; } -$i = strrpos($stockid,'.'); +$i = strrpos($StockID,'.'); if( $i === false ) $type = 'png'; else { - $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); - $stockid = mb_substr($stockid,0,$i); + $type = strtolower(mb_substr($StockID,$i+1,mb_strlen($StockID))); + $StockID = mb_substr($StockID,0,$i); if($blanktext && !isset($text)) $text = ''; } @@ -132,22 +132,22 @@ $functype = 'jpeg'; } -$tmpfilename = $filepath.$stockid; +$tmpFileName = $FilePath.$StockID; // First check for an image this is not the type requested -if ( file_exists($tmpfilename.'.jpg') ) { - $filename = $stockid.'.jpg'; - $isjpeg = true; -} elseif (file_exists($tmpfilename.'.jpeg')) { - $filename = $stockid.'.jpeg'; - $isjpeg = true; -} elseif (file_exists($tmpfilename.'.png')) { - $filename = $stockid.'.png'; - $isjpeg = false; +if ( file_exists($tmpFileName.'.jpg') ) { + $FileName = $StockID.'.jpg'; + $IsJpeg = true; +} elseif (file_exists($tmpFileName.'.jpeg')) { + $FileName = $StockID.'.jpeg'; + $IsJpeg = true; +} elseif (file_exists($tmpFileName.'.png')) { + $FileName = $StockID.'.png'; + $IsJpeg = false; } else { - $filename = $defaultimage; - $isjpeg = $defaultisjpeg; + $FileName = $DefaultImage; + $IsJpeg = $DefaultIsJpeg; } -if( !$automake && !isset($filename) ) { +if( !$automake && !isset($FileName) ) { $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); prnMsg( _('The Image could not be retrieved because it does not exist'), 'error'); @@ -159,9 +159,9 @@ /* $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); - echo 'The image ' . $filename . ' using functype ' . $functype - . '<br /> The tmpfilename = ' . $tmpfilename . '<br /> The temppath = ' . $filepath . '<br />The stockid = ' . $stockid . '<br /> filepath . stockid .jpg = ' . $filepath . $stockid .'.jpg<br /> The result of file_exists($filepath . $stockid .jpg) =' . file_exists($filepath . $stockid .'.jpg') - . '<br />filepath = ' . $filepath + echo 'The image ' . $FileName . ' using functype ' . $functype + . '<br /> The tmpFileName = ' . $tmpFileName . '<br /> The temppath = ' . $FilePath . '<br />The stockid = ' . $StockID . '<br /> filepath . stockid .jpg = ' . $FilePath . $StockID .'.jpg<br /> The result of file_exists($FilePath . $StockID .jpg) =' . file_exists($FilePath . $StockID .'.jpg') + . '<br />filepath = ' . $FilePath . '<br />rootpath = ' . $rootpath; include('includes/footer.inc'); exit; @@ -170,7 +170,7 @@ // See if we need to automake this image -if( $automake && !isset($filename) || $useblank ) { +if( $automake && !isset($FileName) || $useblank ) { // Have we got height and width specs if( !isset($width) ) $width = 64; @@ -178,39 +178,39 @@ $height = 64; // Have we got a background color $im = imagecreate($width, $height); - if( isset($bgcolor) ) - $bgcolor = DecodeBgColor( $bgcolor ); + if( isset($BackgroundColour) ) + $BackgroundColour = DecodeBgColor( $BackgroundColour ); else - $bgcolor = DecodeBgColor( '#7F7F7F' ); - if( !isset($bgcolor['alpha']) ) { + $BackgroundColour = DecodeBgColor( '#7F7F7F' ); + if( !isset($BackgroundColour['alpha']) ) { $ixbgcolor = imagecolorallocate($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue']); } else { $ixbgcolor = imagecolorallocatealpha($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue'],$bgcolor['alpha']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue'],$BackgroundColour['alpha']); } // Have we got a text color - if( isset($textcolor) ) - $textcolor = DecodeBgColor( $textcolor ); + if( isset($TextColour) ) + $TextColour = DecodeBgColor( $TextColour ); else - $textcolor = DecodeBgColor( '#000000' ); - if( !isset($textcolor['alpha']) ) { + $TextColour = DecodeBgColor( '#000000' ); + if( !isset($TextColour['alpha']) ) { $ixtextcolor = imagecolorallocate($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue']); + $TextColour['red'],$TextColour['green'],$TextColour['blue']); } else { $ixtextcolor = imagecolorallocatealpha($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue'],$textcolor['alpha']); + $TextColour['red'],$TextColour['green'],$TextColour['blue'],$TextColour['alpha']); } // Have we got transparency requirements - if( isset($transcolor) ) { - $transcolor = DecodeBgColor( $transcolor ); - if( $transcolor != $bgcolor ) { - if( !isset($textcolor['alpha']) ) { + if( isset($TranspColour) ) { + $TranspColour = DecodeBgColor( $TranspColour ); + if( $TranspColour != $BackgroundColour ) { + if( !isset($TextColour['alpha']) ) { $ixtranscolor = imagecolorallocate($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue']); } else { $ixtranscolor = imagecolorallocatealpha($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue'],$transcolor['alpha']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue'],$TranspColour['alpha']); } } else { $ixtranscolor = $ixbgcolor; @@ -223,7 +223,7 @@ } if(!isset($text)) - $text = $stockid; + $text = $StockID; if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); @@ -237,35 +237,35 @@ } } else { - $tmpfilename = $filepath.$filename; - if( $isjpeg ) { - $im = imagecreatefromjpeg($tmpfilename); + $tmpFileName = $FilePath.$FileName; + if( $IsJpeg ) { + $im = imagecreatefromjpeg($tmpFileName); } else { - $im = imagecreatefrompng($tmpfilename); + $im = imagecreatefrompng($tmpFileName); } // Have we got a background color - if( isset($bgcolor) ) - $bgcolor = DecodeBgColor( $bgcolor ); + if( isset($BackgroundColour) ) + $BackgroundColour = DecodeBgColor( $BackgroundColour ); else - $bgcolor = DecodeBgColor( '#7F7F7F' ); - if( !isset($bgcolor['alpha']) ) { + $BackgroundColour = DecodeBgColor( '#7F7F7F' ); + if( !isset($BackgroundColour['alpha']) ) { $ixbgcolor = imagecolorallocate($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue']); } else { $ixbgcolor = imagecolorallocatealpha($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue'],$bgcolor['alpha']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue'],$BackgroundColour['alpha']); } // Have we got a text color - if( isset($textcolor) ) - $textcolor = DecodeBgColor( $textcolor ); + if( isset($TextColour) ) + $TextColour = DecodeBgColor( $TextColour ); else - $textcolor = DecodeBgColor( '#000000' ); - if( !isset($textcolor['alpha']) ) { + $TextColour = DecodeBgColor( '#000000' ); + if( !isset($TextColour['alpha']) ) { $ixtextcolor = imagecolorallocate($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue']); + $TextColour['red'],$TextColour['green'],$TextColour['blue']); } else { $ixtextcolor = imagecolorallocatealpha($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue'],$textcolor['alpha']); + $TextColour['red'],$TextColour['green'],$TextColour['blue'],$TextColour['alpha']); } $sw = imagesx($im); $sh = imagesy($im); @@ -281,32 +281,32 @@ $im = $tmpim; unset($tmpim); - if( !isset($bgcolor['alpha']) ) { + if( !isset($BackgroundColour['alpha']) ) { $ixbgcolor = imagecolorallocate($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue']); } else { $ixbgcolor = imagecolorallocatealpha($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue'],$bgcolor['alpha']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue'],$BackgroundColour['alpha']); } - if( !isset($textcolor['alpha']) ) { + if( !isset($TextColour['alpha']) ) { $ixtextcolor = imagecolorallocate($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue']); + $TextColour['red'],$TextColour['green'],$TextColour['blue']); } else { $ixtextcolor = imagecolorallocatealpha($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue'],$textcolor['alpha']); + $TextColour['red'],$TextColour['green'],$TextColour['blue'],$TextColour['alpha']); } //imagealphablending ( $im, false); } // Have we got transparency requirements - if( isset($transcolor) ) { - $transcolor = DecodeBgColor( $transcolor ); - if( $transcolor != $bgcolor ) { - if( !isset($textcolor['alpha']) ) { + if( isset($TranspColour) ) { + $TranspColour = DecodeBgColor( $TranspColour ); + if( $TranspColour != $BackgroundColour ) { + if( !isset($TextColour['alpha']) ) { $ixtranscolor = imagecolorallocate($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue']); } else { $ixtranscolor = imagecolorallocatealpha($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue'],$transcolor['alpha']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue'],$TranspColour['alpha']); } } else { $ixtranscolor = $ixbgcolor; @@ -322,7 +322,7 @@ // $ixtextbgcolor = imagecolorallocatealpha($im, // 0,0,0,0); if(!isset($text)) - $text = $stockid; + $text = $StockID; if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); @@ -348,7 +348,7 @@ imageline($im, imagesx($im)-1,0,imagesx($im)-1, imagesy($im)-1, $silver); // right } // Set up headers -header('Content-Disposition: filename='.$stockid.'.'.$type); +header('Content-Disposition: filename='.$StockID.'.'.$type); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-type: image/'.$style); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/MRPShortages.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -260,15 +260,15 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='post'>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Category') . ':</td><td><select name="CategoryID">'; - echo '<option selected value="All">' . _('All Stock Categories'); + echo '<option selected value="All">' . _('All Stock Categories') .'</option>'; $sql = 'SELECT categoryid, - categorydescription - FROM stockcategory'; + categorydescription + FROM stockcategory"; $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription'] . '</option>'; Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/PDFStockTransfer.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -2,6 +2,8 @@ /* $Id$*/ +/* This script is superseded by the PDFStockLocTransfer.php which produces a multiple item stock transfer listing - this was for the old individual stock transfers where there is just single items being transferred */ + include('includes/session.inc'); if (!isset($_GET['TransferNo'])){ Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/ShipmentCosting.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -25,15 +25,15 @@ } $ShipmentHeaderSQL = "SELECT shipments.supplierid, - suppliers.suppname, - shipments.eta, - suppliers.currcode, - shipments.vessel, - shipments.voyageref, - shipments.closed - FROM shipments INNER JOIN suppliers - ON shipments.supplierid = suppliers.supplierid - WHERE shipments.shiptref = '" . $_GET['SelectedShipment'] . "'"; + suppliers.suppname, + shipments.eta, + suppliers.currcode, + shipments.vessel, + shipments.voyageref, + shipments.closed + FROM shipments INNER JOIN suppliers + ON shipments.supplierid = suppliers.supplierid + WHERE shipments.shiptref = '" . $_GET['SelectedShipment'] . "'"; $ErrMsg = _('Shipment').' '. $_GET['SelectedShipment'] . ' ' . _('cannot be retrieved because a database error occurred'); $GetShiptHdrResult = DB_query($ShipmentHeaderSQL,$db, $ErrMsg); @@ -46,7 +46,7 @@ $HeaderData = DB_fetch_array($GetShiptHdrResult); echo '<br />'; -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr><th colspan=4><font size=3 color=navy>'._('Shipment Details').'</font></th></tr>'; echo '<tr> <td><b>'. _('Shipment') .': </td> @@ -140,15 +140,17 @@ echo '<br /><table cellpadding=2 colspan=7 class=selection>'; echo '<tr><th colspan=9><font color=navy size=3>' . _('Items on shipment'). '</font></th></tr>'; - $TableHeader = '<tr> <th>'. _('Item'). '</th> - <th>'. _('Quantity'). '<br />'. _('Invoiced'). '</th> - <th>'. _('Quantity'). '<br />'. _('Received'). '</th> - <th>'. _('Invoiced'). '<br />'. _('Charges'). '</th> - <th>'. _('Shipment'). '<br />'. _('Charges'). '</th> - <th>'. _('Shipment'). '<br />'. _('Cost'). '</th> - <th>'. _('Standard... [truncated message content] |
From: <dai...@us...> - 2011-07-06 09:30:55
|
Revision: 4625 http://web-erp.svn.sourceforge.net/web-erp/?rev=4625&view=rev Author: daintree Date: 2011-07-06 09:30:42 +0000 (Wed, 06 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/GeocodeSetup.php trunk/GetStockImage.php trunk/MRPShortages.php trunk/PDFStockTransfer.php trunk/ShipmentCosting.php trunk/Z_CheckDebtorsControl.php trunk/api/api_session.inc trunk/api/api_xml-rpc.php trunk/doc/Change.log trunk/geo_displaymap_customers.php trunk/geo_displaymap_suppliers.php trunk/includes/session.inc trunk/index.php trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/GeocodeSetup.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -29,14 +29,14 @@ //first off validate inputs are sensible $sql="SELECT count(geocodeid) - FROM geocode_param WHERE geocodeid='".$_POST['geocodeid']."'"; + FROM geocode_param WHERE geocodeid='".$_POST['GeoCodeID']."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_row($result); if ($myrow[0]!=0 and !isset($SelectedParam)) { $InputError = 1; prnMsg( _('That geocode ID already exists in the database'),'error'); - $Errors[$i] = 'geocodeid'; + $Errors[$i] = 'GeoCodeID'; $i++; } @@ -46,14 +46,14 @@ /*SelectedParam 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*/ - if (isset($_POST['geocode_key']) and isset($_POST['geocode_key']) ){ + if (isset($_POST['GeoCode_Key']) and isset($_POST['GeoCode_Key']) ){ $sql = "UPDATE geocode_param SET - geocode_key='" . $_POST['geocode_key'] . "', - center_long='" . $_POST['center_long'] . "', - center_lat='" . $_POST['center_lat'] . "', - map_height='" . $_POST['map_height'] . "', - map_width='" . $_POST['map_width'] . "', - map_host='" . $_POST['map_host'] . "' + geocode_key='" . $_POST['GeoCode_Key'] . "', + center_long='" . $_POST['Center_Long'] . "', + center_lat='" . $_POST['Center_Lat'] . "', + map_height='" . $_POST['Map_Height'] . "', + map_width='" . $_POST['Map_Width'] . "', + map_host='" . $_POST['Map_Host'] . "' WHERE geocodeid = '" . $SelectedParam . "'"; } $msg = _('The geocode status record has been updated'); @@ -62,48 +62,42 @@ /*Selected Param is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new status code form */ - if (isset($_POST['geocode_key']) and $_POST['geocode_key']>0){ + if (isset($_POST['GeoCode_Key']) and $_POST['GeoCode_Key']>0){ - $sql = "INSERT INTO geocode_param ( - geocodeid, - geocode_key, - center_long, - center_lat, - map_height, - map_width, - map_host) - VALUES (" . " - '', - '" . $_POST['geocode_key'] . "', - '" . $_POST['center_long'] . "', - '" . $_POST['center_lat'] . "', - '" . $_POST['map_height'] . "', - '" . $_POST['map_width'] . "', - '" . $_POST['map_host'] . "' - )"; + $sql = "INSERT INTO geocode_param (geocodeid, + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host) + VALUES ('', + '" . $_POST['GeoCode_Key'] . "', + '" . $_POST['Center_Long'] . "', + '" . $_POST['Center_Lat'] . "', + '" . $_POST['Map_Height'] . "', + '" . $_POST['Map_Width'] . "', + '" . $_POST['Map_Host'] . "')"; } else { - $sql = "INSERT INTO geocode_param ( - geocodeid, - geocode_key, - center_long, - center_lat, - map_height, - map_width, - map_host) - VALUES ( - '" . $_POST['geocodeid'] . "', - '" . $_POST['geocode_key'] . "', - '" . $_POST['center_long'] . "', - '" . $_POST['center_lat'] . "', - '" . $_POST['map_height'] . "', - '" . $_POST['map_width'] . "', - '" . $_POST['map_host'] . " - ')"; + $sql = "INSERT INTO geocode_param (geocodeid, + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host) + VALUES ('" . $_POST['GeoCodeID'] . "', + '" . $_POST['GeoCode_Key'] . "', + '" . $_POST['Center_Long'] . "', + '" . $_POST['Center_Lat'] . "', + '" . $_POST['Map_Height'] . "', + '" . $_POST['Map_Width'] . "', + '" . $_POST['Map_Host'] . "')"; } $msg = _('A new geocode status record has been inserted'); unset ($SelectedParam); - unset ($_POST['geocode_key']); + unset ($_POST['GeoCode_Key']); } //run the SQL from either of the above possibilites $result = DB_query($sql,$db); @@ -128,7 +122,14 @@ links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - $sql = "SELECT geocodeid, geocode_key, center_long, center_lat, map_height, map_width, map_host FROM geocode_param"; + $sql = "SELECT geocodeid, + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host + FROM geocode_param"; $result = DB_query($sql, $db); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="" />'. @@ -137,17 +138,19 @@ '<a href="http://code.google.com/apis/maps/signup.html" target="_blank"> http://code.google.com/apis/maps/signup.html</a></b>'; echo '<div class="centre"><p>'. _('Find the lat/long for your map center point at ') . '<a href="http://www.batchgeocode.com/lookup/" target="_blank">http://www.batchgeocode.com/lookup/</a></b>'; - echo '<p>'. _('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)').'</div><br />'; + prnMsg(_('Set the maps centre point using the Center Longitude and Center Latitude. Set the maps screen size using the height and width in pixels (px)'),'info'); + echo '</div><br />'; echo '<table border=1>'; echo '<tr> - <th>'. _('Geocode ID') .'</th> - <th>'. _('Geocode Key') .'</th> - <th>'. _('Center Longitude') .'</th> - <th>'. _('Center Latitude') .'</th> - <th>'. _('Map height (px)') .'</th> - <th>'. _('Map width (px)') .'</th> - <th>'. _('Map host') .'</th>'; + <th>'. _('Geocode ID') .'</th> + <th>'. _('Geocode Key') .'</th> + <th>'. _('Center Longitude') . '</th> + <th>'. _('Center Latitude') . '</th> + <th>'. _('Map height (px)') . '</th> + <th>'. _('Map width (px)') . '</th> + <th>'. _('Map host') . '</th> + </tr>'; $k=0; //row colour counter while ($myrow=DB_fetch_row($result)) { @@ -161,27 +164,27 @@ } printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href=\'%s?SelectedParam=%s\'>' . _('Edit') . '</a></td> - <td><a href=\'%s?SelectedParam=%s&delete=%s\'>'. _('Delete') .'</a></td> - </tr>', - $myrow[0], - $myrow[1], - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[6], - $_SERVER['PHP_SELF'], - $myrow[0], - $_SERVER['PHP_SELF'], - $myrow[0], - $myrow[0]); + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href=\'%s?SelectedParam=%s\'>' . _('Edit') . '</a></td> + <td><a href=\'%s?SelectedParam=%s&delete=%s\'>'. _('Delete') .'</a></td> + </tr>', + $myrow[0], + $myrow[1], + $myrow[2], + $myrow[3], + $myrow[4], + $myrow[5], + $myrow[6], + $_SERVER['PHP_SELF'], + $myrow[0], + $_SERVER['PHP_SELF'], + $myrow[0], + $myrow[0]); } //END WHILE LIST LOOP echo '</table>'; @@ -201,70 +204,72 @@ //editing an existing status code $sql = "SELECT geocodeid, - geocode_key, - center_long, - center_lat, - map_height, - map_width, - map_host - FROM geocode_param - WHERE geocodeid='" . $SelectedParam . "'"; + geocode_key, + center_long, + center_lat, + map_height, + map_width, + map_host + FROM geocode_param + WHERE geocodeid='" . $SelectedParam . "'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); - $_POST['geocodeid'] = $myrow['geocodeid']; - $_POST['geocode_key'] = $myrow['geocode_key']; - $_POST['center_long'] = $myrow['center_long']; - $_POST['center_lat'] = $myrow['center_lat']; - $_POST['map_height'] = $myrow['map_height']; - $_POST['map_width'] = $myrow['map_width']; - $_POST['map_host'] = $myrow['map_host']; + $_POST['GeoCodeID'] = $myrow['geocodeid']; + $_POST['GeoCode_Key'] = $myrow['geocode_key']; + $_POST['Center_Long'] = $myrow['center_long']; + $_POST['Center_Lat'] = $myrow['center_lat']; + $_POST['Map_Height'] = $myrow['map_height']; + $_POST['Map_Width'] = $myrow['map_width']; + $_POST['Map_Host'] = $myrow['map_host']; echo '<input type="hidden" name="SelectedParam" value="' . $SelectedParam . '" />'; - echo '<input type="hidden" name="geocodeid" value="' . $_POST['geocodeid'] . '" />'; + echo '<input type="hidden" name="GeoCodeID" value="' . $_POST['GeoCodeID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="">'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; echo '<table> <tr><td>'. _('Geocode Code') .':</td> - <td>' . $_POST['geocodeid'] . '</td></tr>'; + <td>' . $_POST['GeoCodeID'] . '</td></tr>'; } else { //end of if $SelectedParam only do the else when a new record is being entered - if (!isset($_POST['geocodeid'])) { - $_POST['geocodeid'] = ''; + if (!isset($_POST['GeoCodeID'])) { + $_POST['GeoCodeID'] = ''; } echo '<table>'; // <tr> // <td>'. _('Geocode Code') .":</td> -// <td><input " . (in_array('geocodeid',$Errors) ? 'class="inputerror"' : '' ) . -// " tabindex=1 type='Text' name='geocodeid' VALUE='". $_POST['geocodeid'] ."' size=3 maxlength=2></td> +// <td><input " . (in_array('GeoCodeID',$Errors) ? 'class="inputerror"' : '' ) . +// " tabindex=1 type='Text' name='GeoCodeID' VALUE='". $_POST['GeoCodeID'] ."' size=3 maxlength=2></td> // </tr>"; } - if (!isset($_POST['geocode_key'])) { - $_POST['geocode_key'] = ''; + if (!isset($_POST['GeoCode_Key'])) { + $_POST['GeoCode_Key'] = ''; } echo '<br /><tr> <td>'. _('Geocode Key') .':</td> - <td><input ' . (in_array('geocode_key',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="geocode_key" VALUE="'. $_POST['geocode_key'] .'" size=28 maxlength=300> + <td><input ' . (in_array('GeoCode_Key',$Errors) ? 'class="inputerror"' : '' ) . + ' tabindex=2 type="text" name="GeoCode_Key" value="'. $_POST['GeoCode_Key'] .'" size=28 maxlength=300> </td></tr> <tr><td>'. _('Geocode Center Long') . '</td> - <td><input tabindex=3 type="text" name="center_long" VALUE="'. $_POST['center_long'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=3 type="text" name="Center_Long" value="'. $_POST['Center_Long'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Center Lat') . '</td> - <td><input tabindex=4 type="text" name="center_lat" VALUE="'. $_POST['center_lat'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=4 type="text" name="Center_Lat" value="'. $_POST['Center_Lat'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Map Height') . '</td> - <td><input tabindex=5 type="text" name="map_height" VALUE="'. $_POST['map_height'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=5 type="text" name="Map_Height" value="'. $_POST['Map_Height'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Map Width') . '</td> - <td><input tabindex=6 type="text" name="map_width" VALUE="'. $_POST['map_width'] .'" size=28 maxlength=300></td></tr> + <td><input tabindex=6 type="text" name="Map_Width" value="'. $_POST['Map_Width'] .'" size=28 maxlength=300></td></tr> <tr><td>'. _('Geocode Host') . '</td> - <td><input tabindex=7 type="text" name="map_host" VALUE="'. $_POST['map_host'] .'" size=20 maxlength=300></td></tr> + <td><input tabindex=7 type="text" name="Map_Host" value="'. $_POST['Map_Host'] .'" size=20 maxlength=300></td></tr> </table> - <div class="centre"><input tabindex=4 type="Submit" name="submit" value="' . _('Enter Information') . '"</div><br /><br /> + <div class="centre"><input tabindex=4 type="submit" name="submit" value="' . _('Enter Information') . '"</div> + <br /> + <br /> </form>'; echo '<div class="page_help_text">' . _('When ready, click on the link below to run the GeoCode process. This will Geocode all Branches and Suppliers. This may take some time. Errors will be returned to the screen.') . '</p>'; echo '<p>' . _('Suppliers and Customer Branches are geocoded when being entered/updated. You can rerun the geocode process from this screen at any time.') . '</p></div><br />'; Modified: trunk/GetStockImage.php =================================================================== --- trunk/GetStockImage.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/GetStockImage.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -20,33 +20,33 @@ */ // Color decode function -function DecodeBgColor( $colorstr ) { - if ( $colorstr[0] == '#' ) { - $colorstr = mb_substr($colorstr,1,mb_strlen($colorstr)); +function DecodeBgColor( $ColourStr ) { + if ( $ColourStr[0] == '#' ) { + $ColourStr = mb_substr($ColourStr,1,mb_strlen($ColourStr)); } - $red = 0; - if(mb_strlen($colorstr) > 1) { - $red = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + $Red = 0; + if(mb_strlen($ColourStr) > 1) { + $Red = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - $green = 0; - if(mb_strlen($colorstr) > 1) { - $green = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + $Green = 0; + if(mb_strlen($ColourStr) > 1) { + $Green = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - $blue = 0; - if(mb_strlen($colorstr) > 1) { - $blue = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + $Blue = 0; + if(mb_strlen($ColourStr) > 1) { + $Blue = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - if(mb_strlen($colorstr) > 1) { - $alpha = hexdec(mb_substr($colorstr,0,2)); - $colorstr = mb_substr($colorstr,2,mb_strlen($colorstr)); + if(mb_strlen($ColourStr) > 1) { + $Alpha = hexdec(mb_substr($ColourStr,0,2)); + $ColourStr = mb_substr($ColourStr,2,mb_strlen($ColourStr)); } - if ( isset($alpha) ) - return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha ); + if ( isset($Alpha) ) + return array('red' => $Red, 'green' => $Green, 'blue' => $Blue, 'alpha' => $Alpha ); else - return array('red' => $red, 'green' => $green, 'blue' => $blue ); + return array('red' => $Red, 'green' => $Green, 'blue' => $Blue ); } if (!function_exists('imagecreatefrompng')){ @@ -56,7 +56,7 @@ include('includes/footer.inc'); exit; } -$defaultimage = 'webERPsmall.png'; +$DefaultImage = 'webERPsmall.png'; // FOR APACHE if ( $_SERVER['PATH_TRANSLATED'][0] == '/' OR $_SERVER['PATH_TRANSLATED'][0]=='') { @@ -66,13 +66,13 @@ //Windows $pathsep = "\\"; } -$filepath = $_SESSION['part_pics_dir'] . $pathsep; +$FilePath = $_SESSION['part_pics_dir'] . $pathsep; -$stockid = trim(mb_strtoupper($_GET['StockID'])); +$StockID = trim(mb_strtoupper($_GET['StockID'])); if( isset($_GET['bgcolor']) ) - $bgcolor = $_GET['bgcolor']; + $BackgroundColour = $_GET['bgcolor']; if( isset($_GET['textcolor']) ) - $textcolor = $_GET['textcolor']; + $TextColour = $_GET['textcolor']; if( isset($_GET['width']) ) $width = $_GET['width']; if( isset($_GET['height']) ) @@ -89,7 +89,7 @@ } if( isset($_GET['transcolor'])) { $doTrans = true; - $transcolor = $_GET['transcolor']; + $TranspColour = $_GET['transcolor']; } if( isset($_GET['bevel']) ) { $bevel = $_GET['bevel']; @@ -111,17 +111,17 @@ // Extension requirements and Stock ID Isolation -if($stockid == '') { - $stockid = $defaultimage; +if($StockID == '') { + $StockID = $DefaultImage; $blanktext = true; } -$i = strrpos($stockid,'.'); +$i = strrpos($StockID,'.'); if( $i === false ) $type = 'png'; else { - $type = strtolower(mb_substr($stockid,$i+1,mb_strlen($stockid))); - $stockid = mb_substr($stockid,0,$i); + $type = strtolower(mb_substr($StockID,$i+1,mb_strlen($StockID))); + $StockID = mb_substr($StockID,0,$i); if($blanktext && !isset($text)) $text = ''; } @@ -132,22 +132,22 @@ $functype = 'jpeg'; } -$tmpfilename = $filepath.$stockid; +$tmpFileName = $FilePath.$StockID; // First check for an image this is not the type requested -if ( file_exists($tmpfilename.'.jpg') ) { - $filename = $stockid.'.jpg'; - $isjpeg = true; -} elseif (file_exists($tmpfilename.'.jpeg')) { - $filename = $stockid.'.jpeg'; - $isjpeg = true; -} elseif (file_exists($tmpfilename.'.png')) { - $filename = $stockid.'.png'; - $isjpeg = false; +if ( file_exists($tmpFileName.'.jpg') ) { + $FileName = $StockID.'.jpg'; + $IsJpeg = true; +} elseif (file_exists($tmpFileName.'.jpeg')) { + $FileName = $StockID.'.jpeg'; + $IsJpeg = true; +} elseif (file_exists($tmpFileName.'.png')) { + $FileName = $StockID.'.png'; + $IsJpeg = false; } else { - $filename = $defaultimage; - $isjpeg = $defaultisjpeg; + $FileName = $DefaultImage; + $IsJpeg = $DefaultIsJpeg; } -if( !$automake && !isset($filename) ) { +if( !$automake && !isset($FileName) ) { $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); prnMsg( _('The Image could not be retrieved because it does not exist'), 'error'); @@ -159,9 +159,9 @@ /* $title = _('Stock Image Retrieval ....'); include('includes/header.inc'); - echo 'The image ' . $filename . ' using functype ' . $functype - . '<br /> The tmpfilename = ' . $tmpfilename . '<br /> The temppath = ' . $filepath . '<br />The stockid = ' . $stockid . '<br /> filepath . stockid .jpg = ' . $filepath . $stockid .'.jpg<br /> The result of file_exists($filepath . $stockid .jpg) =' . file_exists($filepath . $stockid .'.jpg') - . '<br />filepath = ' . $filepath + echo 'The image ' . $FileName . ' using functype ' . $functype + . '<br /> The tmpFileName = ' . $tmpFileName . '<br /> The temppath = ' . $FilePath . '<br />The stockid = ' . $StockID . '<br /> filepath . stockid .jpg = ' . $FilePath . $StockID .'.jpg<br /> The result of file_exists($FilePath . $StockID .jpg) =' . file_exists($FilePath . $StockID .'.jpg') + . '<br />filepath = ' . $FilePath . '<br />rootpath = ' . $rootpath; include('includes/footer.inc'); exit; @@ -170,7 +170,7 @@ // See if we need to automake this image -if( $automake && !isset($filename) || $useblank ) { +if( $automake && !isset($FileName) || $useblank ) { // Have we got height and width specs if( !isset($width) ) $width = 64; @@ -178,39 +178,39 @@ $height = 64; // Have we got a background color $im = imagecreate($width, $height); - if( isset($bgcolor) ) - $bgcolor = DecodeBgColor( $bgcolor ); + if( isset($BackgroundColour) ) + $BackgroundColour = DecodeBgColor( $BackgroundColour ); else - $bgcolor = DecodeBgColor( '#7F7F7F' ); - if( !isset($bgcolor['alpha']) ) { + $BackgroundColour = DecodeBgColor( '#7F7F7F' ); + if( !isset($BackgroundColour['alpha']) ) { $ixbgcolor = imagecolorallocate($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue']); } else { $ixbgcolor = imagecolorallocatealpha($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue'],$bgcolor['alpha']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue'],$BackgroundColour['alpha']); } // Have we got a text color - if( isset($textcolor) ) - $textcolor = DecodeBgColor( $textcolor ); + if( isset($TextColour) ) + $TextColour = DecodeBgColor( $TextColour ); else - $textcolor = DecodeBgColor( '#000000' ); - if( !isset($textcolor['alpha']) ) { + $TextColour = DecodeBgColor( '#000000' ); + if( !isset($TextColour['alpha']) ) { $ixtextcolor = imagecolorallocate($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue']); + $TextColour['red'],$TextColour['green'],$TextColour['blue']); } else { $ixtextcolor = imagecolorallocatealpha($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue'],$textcolor['alpha']); + $TextColour['red'],$TextColour['green'],$TextColour['blue'],$TextColour['alpha']); } // Have we got transparency requirements - if( isset($transcolor) ) { - $transcolor = DecodeBgColor( $transcolor ); - if( $transcolor != $bgcolor ) { - if( !isset($textcolor['alpha']) ) { + if( isset($TranspColour) ) { + $TranspColour = DecodeBgColor( $TranspColour ); + if( $TranspColour != $BackgroundColour ) { + if( !isset($TextColour['alpha']) ) { $ixtranscolor = imagecolorallocate($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue']); } else { $ixtranscolor = imagecolorallocatealpha($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue'],$transcolor['alpha']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue'],$TranspColour['alpha']); } } else { $ixtranscolor = $ixbgcolor; @@ -223,7 +223,7 @@ } if(!isset($text)) - $text = $stockid; + $text = $StockID; if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); @@ -237,35 +237,35 @@ } } else { - $tmpfilename = $filepath.$filename; - if( $isjpeg ) { - $im = imagecreatefromjpeg($tmpfilename); + $tmpFileName = $FilePath.$FileName; + if( $IsJpeg ) { + $im = imagecreatefromjpeg($tmpFileName); } else { - $im = imagecreatefrompng($tmpfilename); + $im = imagecreatefrompng($tmpFileName); } // Have we got a background color - if( isset($bgcolor) ) - $bgcolor = DecodeBgColor( $bgcolor ); + if( isset($BackgroundColour) ) + $BackgroundColour = DecodeBgColor( $BackgroundColour ); else - $bgcolor = DecodeBgColor( '#7F7F7F' ); - if( !isset($bgcolor['alpha']) ) { + $BackgroundColour = DecodeBgColor( '#7F7F7F' ); + if( !isset($BackgroundColour['alpha']) ) { $ixbgcolor = imagecolorallocate($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue']); } else { $ixbgcolor = imagecolorallocatealpha($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue'],$bgcolor['alpha']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue'],$BackgroundColour['alpha']); } // Have we got a text color - if( isset($textcolor) ) - $textcolor = DecodeBgColor( $textcolor ); + if( isset($TextColour) ) + $TextColour = DecodeBgColor( $TextColour ); else - $textcolor = DecodeBgColor( '#000000' ); - if( !isset($textcolor['alpha']) ) { + $TextColour = DecodeBgColor( '#000000' ); + if( !isset($TextColour['alpha']) ) { $ixtextcolor = imagecolorallocate($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue']); + $TextColour['red'],$TextColour['green'],$TextColour['blue']); } else { $ixtextcolor = imagecolorallocatealpha($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue'],$textcolor['alpha']); + $TextColour['red'],$TextColour['green'],$TextColour['blue'],$TextColour['alpha']); } $sw = imagesx($im); $sh = imagesy($im); @@ -281,32 +281,32 @@ $im = $tmpim; unset($tmpim); - if( !isset($bgcolor['alpha']) ) { + if( !isset($BackgroundColour['alpha']) ) { $ixbgcolor = imagecolorallocate($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue']); } else { $ixbgcolor = imagecolorallocatealpha($im, - $bgcolor['red'],$bgcolor['green'],$bgcolor['blue'],$bgcolor['alpha']); + $BackgroundColour['red'],$BackgroundColour['green'],$BackgroundColour['blue'],$BackgroundColour['alpha']); } - if( !isset($textcolor['alpha']) ) { + if( !isset($TextColour['alpha']) ) { $ixtextcolor = imagecolorallocate($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue']); + $TextColour['red'],$TextColour['green'],$TextColour['blue']); } else { $ixtextcolor = imagecolorallocatealpha($im, - $textcolor['red'],$textcolor['green'],$textcolor['blue'],$textcolor['alpha']); + $TextColour['red'],$TextColour['green'],$TextColour['blue'],$TextColour['alpha']); } //imagealphablending ( $im, false); } // Have we got transparency requirements - if( isset($transcolor) ) { - $transcolor = DecodeBgColor( $transcolor ); - if( $transcolor != $bgcolor ) { - if( !isset($textcolor['alpha']) ) { + if( isset($TranspColour) ) { + $TranspColour = DecodeBgColor( $TranspColour ); + if( $TranspColour != $BackgroundColour ) { + if( !isset($TextColour['alpha']) ) { $ixtranscolor = imagecolorallocate($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue']); } else { $ixtranscolor = imagecolorallocatealpha($im, - $transcolor['red'],$transcolor['green'],$transcolor['blue'],$transcolor['alpha']); + $TranspColour['red'],$TranspColour['green'],$TranspColour['blue'],$TranspColour['alpha']); } } else { $ixtranscolor = $ixbgcolor; @@ -322,7 +322,7 @@ // $ixtextbgcolor = imagecolorallocatealpha($im, // 0,0,0,0); if(!isset($text)) - $text = $stockid; + $text = $StockID; if(mb_strlen($text) > 0 ) { $fw = imagefontwidth($fontsize); $fh = imagefontheight($fontsize); @@ -348,7 +348,7 @@ imageline($im, imagesx($im)-1,0,imagesx($im)-1, imagesy($im)-1, $silver); // right } // Set up headers -header('Content-Disposition: filename='.$stockid.'.'.$type); +header('Content-Disposition: filename='.$StockID.'.'.$type); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-type: image/'.$style); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/MRPShortages.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -260,15 +260,15 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<form action=' . $_SERVER['PHP_SELF'] . " method='post'>"; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Category') . ':</td><td><select name="CategoryID">'; - echo '<option selected value="All">' . _('All Stock Categories'); + echo '<option selected value="All">' . _('All Stock Categories') .'</option>'; $sql = 'SELECT categoryid, - categorydescription - FROM stockcategory'; + categorydescription + FROM stockcategory"; $result = DB_query($sql,$db); while ($myrow = DB_fetch_array($result)) { echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' .$myrow['categorydescription'] . '</option>'; Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/PDFStockTransfer.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -2,6 +2,8 @@ /* $Id$*/ +/* This script is superseded by the PDFStockLocTransfer.php which produces a multiple item stock transfer listing - this was for the old individual stock transfers where there is just single items being transferred */ + include('includes/session.inc'); if (!isset($_GET['TransferNo'])){ Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2011-07-05 10:36:13 UTC (rev 4624) +++ trunk/ShipmentCosting.php 2011-07-06 09:30:42 UTC (rev 4625) @@ -25,15 +25,15 @@ } $ShipmentHeaderSQL = "SELECT shipments.supplierid, - suppliers.suppname, - shipments.eta, - suppliers.currcode, - shipments.vessel, - shipments.voyageref, - shipments.closed - FROM shipments INNER JOIN suppliers - ON shipments.supplierid = suppliers.supplierid - WHERE shipments.shiptref = '" . $_GET['SelectedShipment'] . "'"; + suppliers.suppname, + shipments.eta, + suppliers.currcode, + shipments.vessel, + shipments.voyageref, + shipments.closed + FROM shipments INNER JOIN suppliers + ON shipments.supplierid = suppliers.supplierid + WHERE shipments.shiptref = '" . $_GET['SelectedShipment'] . "'"; $ErrMsg = _('Shipment').' '. $_GET['SelectedShipment'] . ' ' . _('cannot be retrieved because a database error occurred'); $GetShiptHdrResult = DB_query($ShipmentHeaderSQL,$db, $ErrMsg); @@ -46,7 +46,7 @@ $HeaderData = DB_fetch_array($GetShiptHdrResult); echo '<br />'; -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr><th colspan=4><font size=3 color=navy>'._('Shipment Details').'</font></th></tr>'; echo '<tr> <td><b>'. _('Shipment') .': </td> @@ -140,15 +140,17 @@ echo '<br /><table cellpadding=2 colspan=7 class=selection>'; echo '<tr><th colspan=9><font color=navy size=3>' . _('Items on shipment'). '</font></th></tr>'; - $TableHeader = '<tr> <th>'. _('Item'). '</th> - <th>'. _('Quantity'). '<br />'. _('Invoiced'). '</th> - <th>'. _('Quantity'). '<br />'. _('Received'). '</th> - <th>'. _('Invoiced'). '<br />'. _('Charges'). '</th> - <th>'. _('Shipment'). '<br />'. _('Charges'). '</th> - <th>'. _('Shipment'). '<br />'. _('Cost'). '</th> - <th>'. _('Standard... [truncated message content] |
From: <dai...@us...> - 2011-07-08 10:28:21
|
Revision: 4626 http://web-erp.svn.sourceforge.net/web-erp/?rev=4626&view=rev Author: daintree Date: 2011-07-08 10:28:14 +0000 (Fri, 08 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/PO_Items.php trunk/SelectOrderItems.php trunk/doc/Change.log trunk/includes/MiscFunctions.php trunk/includes/SelectOrderItems_IntoCart.inc Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/PO_Items.php 2011-07-08 10:28:14 UTC (rev 4626) @@ -159,39 +159,38 @@ deliverydate, paymentterms, allowprint) - VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "', - '" . $_SESSION['PO'.$identifier]->SupplierID . "', - '" . $_SESSION['PO'.$identifier]->Comments . "', - '" . Date('Y-m-d') . "', - '" . $_SESSION['PO'.$identifier]->ExRate . "', - '" . $_SESSION['PO'.$identifier]->Initiator . "', - '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', - '" . $_SESSION['PO'.$identifier]->Location . "', - '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', - '" . $_SESSION['PO'.$identifier]->Tel . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', - '" . $_SESSION['PO'.$identifier]->SupplierContact . "', - '" . $_SESSION['PO'.$identifier]->SuppTel. "', - '" . $_SESSION['PO'.$identifier]->Contact . "', - '" . $_SESSION['PO'.$identifier]->Version . "', - '" . Date('Y-m-d') . "', - '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', - '" . $_SESSION['PO'.$identifier]->Status . "', - '" . $StatusComment . "', - '" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', - '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', - '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' - )"; + VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "', + '" . $_SESSION['PO'.$identifier]->SupplierID . "', + '" . $_SESSION['PO'.$identifier]->Comments . "', + '" . Date('Y-m-d') . "', + '" . $_SESSION['PO'.$identifier]->ExRate . "', + '" . $_SESSION['PO'.$identifier]->Initiator . "', + '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', + '" . $_SESSION['PO'.$identifier]->Location . "', + '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->Tel . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->SupplierContact . "', + '" . $_SESSION['PO'.$identifier]->SuppTel. "', + '" . $_SESSION['PO'.$identifier]->Contact . "', + '" . $_SESSION['PO'.$identifier]->Version . "', + '" . Date('Y-m-d') . "', + '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', + '" . $_SESSION['PO'.$identifier]->Status . "', + '" . $StatusComment . "', + '" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', + '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', + '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); @@ -213,20 +212,19 @@ suppliers_partno, assetid, conversionfactor ) - VALUES ( - '" . $_SESSION['PO'.$identifier]->OrderNo . "', - '" . $POLine->StockID . "', - '" . FormatDateForSQL($POLine->ReqDelDate) . "', - '" . $POLine->ItemDescription . "', - '" . $POLine->GLCode . "', - '" . $POLine->Price . "', - '" . $POLine->Quantity . "', - '" . $POLine->ShiptRef . "', - '" . $POLine->JobRef . "', - '" . $POLine->SuppliersUnit . "', - '" . $POLine->Suppliers_PartNo . "', - '" . $POLine->AssetID . "', - '" . $POLine->ConversionFactor . "')"; + VALUES ('" . $_SESSION['PO'.$identifier]->OrderNo . "', + '" . $POLine->StockID . "', + '" . FormatDateForSQL($POLine->ReqDelDate) . "', + '" . $POLine->ItemDescription . "', + '" . $POLine->GLCode . "', + '" . $POLine->Price . "', + '" . $POLine->Quantity . "', + '" . $POLine->ShiptRef . "', + '" . $POLine->JobRef . "', + '" . $POLine->SuppliersUnit . "', + '" . $POLine->Suppliers_PartNo . "', + '" . $POLine->AssetID . "', + '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); @@ -386,7 +384,7 @@ if (isset($_POST['EnterLine'])){ /*Inputs from the form directly without selecting a stock item from the search */ $AllowUpdate = true; /*always assume the best */ - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Qty'])))){ + if (!is_numeric($_POST['Qty'])){ $AllowUpdate = false; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The quantity of the order item must be numeric'),'error'); } @@ -394,7 +392,7 @@ $AllowUpdate = false; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The quantity of the ordered item entered must be a positive amount'),'error'); } - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Price'])))){ + if (!is_numeric($_POST['Price'])){ $AllowUpdate = false; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The price entered must be numeric'),'error'); } @@ -465,8 +463,6 @@ if ($AllowUpdate == true){ //adding the non-stock item - $_POST['Price'] = doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Price'])); - $_POST['Qty'] = doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Qty'])); $_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1, '', @@ -505,10 +501,10 @@ foreach ($_POST as $FormVariableName => $Quantity) { if (mb_substr($FormVariableName, 0, 6)=='NewQty') { //if the form variable represents a Qty to add to the order - + $ItemCode = mb_substr($FormVariableName, 6, mb_strlen($FormVariableName)-6); $AlreadyOnThisOrder = 0; - + if ($_SESSION['PO_AllowSameItemMultipleTimes'] ==false){ if (count($_SESSION['PO'.$identifier]->LineItems)!=0){ @@ -530,11 +526,11 @@ decimalplaces, stockact, accountname - FROM stockmaster INNER JOIN stockcategory - ON stockcategory.categoryid = stockmaster.categoryid - INNER JOIN chartmaster - ON chartmaster.accountcode = stockcategory.stockact - WHERE stockmaster.stockid = '". $ItemCode . "'"; + FROM stockmaster INNER JOIN stockcategory + ON stockcategory.categoryid = stockmaster.categoryid + INNER JOIN chartmaster + ON chartmaster.accountcode = stockcategory.stockact + WHERE stockmaster.stockid = '". $ItemCode . "'"; $ErrMsg = _('The item details for') . ' ' . $ItemCode . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the item details but failed was'); @@ -661,9 +657,9 @@ // Note if the price is greater than 1 use 2 decimal place, if the price is a fraction of 1, use 4 decimal places // This should help display where item-price is a fraction if ($POLine->Price > 1) { - $DisplayPrice = number_format($POLine->Price,$_SESSION['PO'.$identifier]->CurrDecimalPlaces,'.',''); + $DisplayPrice = number_format($POLine->Price,$_SESSION['PO'.$identifier]->CurrDecimalPlaces); } else { - $DisplayPrice = number_format($POLine->Price,4,'.',''); + $DisplayPrice = number_format($POLine->Price,4); } if ($k==1){ @@ -705,7 +701,7 @@ echo '<br /><table class="selection"><tr> <td>' . _('Item Description') . '</td>'; - echo '<td><input type=text name=ItemDescription size=40></td></tr>'; + echo '<td><input type="text" name="ItemDescription" size="40" /></td></tr>'; echo '<tr><td>' . _('General Ledger Code') . '</td>'; echo '<td><select name="GLCode">'; $sql="SELECT accountcode, @@ -759,29 +755,29 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.description " . LIKE . " '" . $SearchString ."' - ORDER BY stockmaster.stockid - LIMIT " .$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.description " . LIKE . " '" . $SearchString ."' + ORDER BY stockmaster.stockid + LIMIT " .$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.description " . LIKE . " '". $SearchString ."' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid - LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.description " . LIKE . " '". $SearchString ."' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid + LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } } elseif ($_POST['StockCode']){ @@ -792,29 +788,29 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' - ORDER BY stockmaster.stockid - LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + ORDER BY stockmaster.stockid + LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - and stockmaster.discontinued<>1 - AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid - LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + and stockmaster.discontinued<>1 + AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid + LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } } else { @@ -822,27 +818,27 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - ORDER BY stockmaster.stockid - LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + ORDER BY stockmaster.stockid + LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid - LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid + LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; } } @@ -865,10 +861,10 @@ if (!isset($_GET['Edit'])) { $sql="SELECT categoryid, categorydescription - FROM stockcategory - WHERE stocktype<>'L' - AND stocktype<>'D' - ORDER BY categorydescription"; + FROM stockcategory + WHERE stocktype<>'L' + AND stocktype<>'D' + ORDER BY categorydescription"; $ErrMsg = _('The supplier category details could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the category details but failed was'); $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -926,13 +922,13 @@ echo '<table cellpadding="1" colspan="7" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Our Units') . '</th> - <th>' . _('Conversion') . '<br />' ._('Factor') . '</th> - <th>' . _('Supplier/Order') . '<br />' . _('Units') . '</th> - <th colspan=2><a href="#end">'._('Go to end of list').'</a></th> - </tr>'; + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Our Units') . '</th> + <th>' . _('Conversion') . '<br />' ._('Factor') . '</th> + <th>' . _('Supplier/Order') . '<br />' . _('Units') . '</th> + <th colspan=2><a href="#end">'._('Go to end of list').'</a></th> + </tr>'; echo $TableHeader; $j = 1; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/SelectOrderItems.php 2011-07-08 10:28:14 UTC (rev 4626) @@ -897,6 +897,7 @@ $ExRate = 1; } + /*Process Quick Entry */ /* If enter is pressed on the quick entry screen, the default button may be Recalculate */ if (isset($_POST['order_items']) @@ -906,8 +907,8 @@ /* get the item details from the database and hold them in the cart object */ /*Discount can only be set later on -- after quick entry -- so default discount to 0 in the first place */ - $Discount = 0; - + $Discount = 0; + $AlreadyWarnedAboutCredit = false; $i=1; while ($i<=$_SESSION['QuickEntries'] and isset($_POST['part_' . $i]) and $_POST['part_' . $i]!='') { $QuickEntryCode = 'part_' . $i; @@ -1053,14 +1054,14 @@ taxcatid, materialcost) VALUES ('" . $AssetStockID . "', - '" . $AssetRow['description'] . "', - '" . $AssetRow['longdescription'] . "', - 'ASSETS', - 'D', - '0', - '0', - '" . $_SESSION['DefaultTaxCategory'] . "', - '". $NBV . "')" , $db); + '" . $AssetRow['description'] . "', + '" . $AssetRow['longdescription'] . "', + 'ASSETS', + 'D', + '0', + '0', + '" . $_SESSION['DefaultTaxCategory'] . "', + '". $NBV . "')" , $db); /*not forgetting the location records too */ $InsertStkLocRecsResult = DB_query("INSERT INTO locstock (loccode, stockid) @@ -1091,7 +1092,9 @@ $_SESSION['Items'.$identifier]->LineItems[$_GET['Delete']]->Quantity = $QuantityAlreadyDelivered; } } - + + $AlreadyWarnedAboutCredit = false; + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ @@ -1142,18 +1145,20 @@ $WithinCreditLimit = true; - if ($_SESSION['CheckCreditLimits'] > 0){ /*Check credit limits is 1 for warn - and 2 for prohibit sales */ + if ($_SESSION['CheckCreditLimits'] > 0 AND $AlreadyWarnedAboutCredit==false){ /*Check credit limits is 1 for warn + breach their credit limit and 2 for prohibit sales */ $DifferenceInOrderValue = ($Quantity*$Price*(1-$DiscountPercentage/100)) - ($OrderLine->Quantity*$OrderLine->Price*(1-$OrderLine->DiscountPercentage)); $_SESSION['Items'.$identifier]->CreditAvailable -= $DifferenceInOrderValue; if ($_SESSION['CheckCreditLimits']==1 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('The customer account will breach their credit limit'),'warn'); + $AlreadyWarnedAboutCredit = true; } elseif ($_SESSION['CheckCreditLimits']==2 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('This change would put the customer over their credit limit and is prohibited'),'warn'); $WithinCreditLimit = false; $_SESSION['Items'.$identifier]->CreditAvailable += $DifferenceInOrderValue; + $AlreadyWarnedAboutCredit = true; } } @@ -1170,8 +1175,39 @@ } //within credit limit so make changes } //there are changes to the order line to process } //page not called from itself - POST variables not set - } - } + } // Loop around all items on the order + + + /* Now Run through each line of the order again to work out the appropriate discount from the discount matrix */ + $DiscCatsDone = array(); + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { + + if ($OrderLine->DiscCat !='' AND ! in_array($OrderLine->DiscCat,$DiscCatsDone)){ + $DiscCatsDone[]=$OrderLine->DiscCat; + $QuantityOfDiscCat = 0; + + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine_2) { + /* add up total quantity of all lines of this DiscCat */ + if ($OrderLine_2->DiscCat==$OrderLine->DiscCat){ + $QuantityOfDiscCat += $OrderLine_2->Quantity; + } + } + $result = DB_query("SELECT MAX(discountrate) AS discount + FROM discountmatrix + WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' + AND discountcategory ='" . $OrderLine->DiscCat . "' + AND quantitybreak <" . $QuantityOfDiscCat,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]!=0){ /* need to update the lines affected */ + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine_2) { + if ($OrderLine_2->DiscCat==$OrderLine->DiscCat){ + $_SESSION['Items'.$identifier]->LineItems[$OrderLine_2->LineNumber]->DiscountPercent = $myrow[0]; + } + } + }//a none zero discount percentage was returned + } + } /* end of discount matrix lookup code */ + } // the order session is started or there is a new item being added if (isset($_POST['DeliveryDetails'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/DeliveryDetails.php?' . SID .'identifier='.$identifier . '">'; prnMsg(_('You should automatically be forwarded to the entry of the delivery details page') . '. ' . _('if this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . @@ -1229,6 +1265,7 @@ if (isset($NewItem_array) AND isset($_POST['order_items'])){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */ /*Now figure out if the item is a kit set - the field MBFlag='K'*/ + $AlreadyWarnedAboutCredit = false; foreach($NewItem_array as $NewItem => $NewItemQty) { if($NewItemQty > 0) { $sql = "SELECT stockmaster.mbflag @@ -1245,11 +1282,11 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + bom.quantity + FROM bom + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -1300,8 +1337,7 @@ $myrow = DB_fetch_row($result); if ($myrow[0]!=0){ /* need to update the lines affected */ foreach ($_SESSION['Items'.$identifier]->LineItems as $StkItems_2) { - /* add up total quantity of all lines of this DiscCat */ - if ($StkItems_2->DiscCat==$OrderLine->DiscCat AND $StkItems_2->DiscountPercent == 0){ + if ($StkItems_2->DiscCat==$OrderLine->DiscCat){ $_SESSION['Items'.$identifier]->LineItems[$StkItems_2->LineNumber]->DiscountPercent = $myrow[0]; } } @@ -1415,12 +1451,13 @@ $DisplayTotal = number_format($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ - $ColSpanNumber = 3; + $ColSpanNumber = 2; } else { $ColSpanNumber = 1; } - echo '<tr class="EvenTableRows"><td class="number" colspan=7><b>' . _('TOTAL Excl Tax/Freight') . '</b></td> - <td colspan="' . $ColSpanNumber . '" class=number>' . $DisplayTotal . '</td></tr></table>'; + echo '<tr class="EvenTableRows"> + <td class="number" colspan=7><b>' . _('TOTAL Excl Tax/Freight') . '</b></td> + <td colspan="' . $ColSpanNumber . '" class=number>' . $DisplayTotal . '</td></tr></table>'; $DisplayVolume = number_format($_SESSION['Items'.$identifier]->totalVolume,2); $DisplayWeight = number_format($_SESSION['Items'.$identifier]->totalWeight,2); @@ -1431,8 +1468,10 @@ </tr></table>'; - echo '<br /><div class="centre"><input type=submit name="Recalculate" Value="' . _('Re-Calculate') . '"> - <input type=submit name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"></div><hr>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '"> + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"></div><hr />'; } # end of if lines /* Now show the stock item selection search stuff below */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/doc/Change.log 2011-07-08 10:28:14 UTC (rev 4626) @@ -1,5 +1,7 @@ webERP Change Log +8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function +8/7/11 Phil: Fix discount matrix calculations on order entry and amendment 5/7/11 Phil: Amend menu to use PDFStockLocTransfer.php to reprint transfer list - as reported by Ron Wong 3/7/11 Phil: changed all strpos to mb_strpos 3/7/11 Phil: changed all strtoupper to mb_strtoupper Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/includes/MiscFunctions.php 2011-07-08 10:28:14 UTC (rev 4626) @@ -112,6 +112,7 @@ if (strstr($CheckVariable,"'") OR strstr($CheckVariable,'+') OR strstr($CheckVariable,'?') + OR strstr($CheckVariable,'.') OR strstr($CheckVariable,"\"") OR strstr($CheckVariable,'&') OR strstr($CheckVariable,"\\") Modified: trunk/includes/SelectOrderItems_IntoCart.inc =================================================================== --- trunk/includes/SelectOrderItems_IntoCart.inc 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/includes/SelectOrderItems_IntoCart.inc 2011-07-08 10:28:14 UTC (rev 4626) @@ -89,7 +89,7 @@ $NewLineNo = -1; /* this is ok b/c CartClass will change to the correct line no */ } - if (isset($StockItem) and $myItemRow['discountcategory'] != "" ){ + if (isset($StockItem) and $myItemRow['discountcategory'] != '' ){ $DiscCatsDone[$Counter]=$StockItem->DiscCat; $QuantityOfDiscCat =0; $result = DB_query("SELECT MAX(discountrate) AS discount @@ -114,15 +114,17 @@ if ($_SESSION['Items'.$identifier]->SpecialInstructions) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } - if ($_SESSION['CheckCreditLimits'] > 0){ /*Check credit limits is 1 for warn + if ($_SESSION['CheckCreditLimits'] > 0 AND $AlreadyWarnedAboutCredit==false){ /*Check credit limits is 1 for warn and 2 for prohibit sales */ $_SESSION['Items'.$identifier]->CreditAvailable -= round(($NewItemQty * $Price * (1- $Discount)),2); if ($_SESSION['CheckCreditLimits']==1 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('The customer account will breach their credit limit'),'warn'); + $AlreadyWarnedAboutCredit = true; } elseif ($_SESSION['CheckCreditLimits']==2 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('No more lines can be added to this order the customer account is currently at or over their credit limit'),'warn'); $WithinCreditLimit = false; + $AlreadyWarnedAboutCredit = true; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-08 10:28:21
|
Revision: 4626 http://web-erp.svn.sourceforge.net/web-erp/?rev=4626&view=rev Author: daintree Date: 2011-07-08 10:28:14 +0000 (Fri, 08 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/PO_Items.php trunk/SelectOrderItems.php trunk/doc/Change.log trunk/includes/MiscFunctions.php trunk/includes/SelectOrderItems_IntoCart.inc Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/PO_Items.php 2011-07-08 10:28:14 UTC (rev 4626) @@ -159,39 +159,38 @@ deliverydate, paymentterms, allowprint) - VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "', - '" . $_SESSION['PO'.$identifier]->SupplierID . "', - '" . $_SESSION['PO'.$identifier]->Comments . "', - '" . Date('Y-m-d') . "', - '" . $_SESSION['PO'.$identifier]->ExRate . "', - '" . $_SESSION['PO'.$identifier]->Initiator . "', - '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', - '" . $_SESSION['PO'.$identifier]->Location . "', - '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', - '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', - '" . $_SESSION['PO'.$identifier]->Tel . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', - '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', - '" . $_SESSION['PO'.$identifier]->SupplierContact . "', - '" . $_SESSION['PO'.$identifier]->SuppTel. "', - '" . $_SESSION['PO'.$identifier]->Contact . "', - '" . $_SESSION['PO'.$identifier]->Version . "', - '" . Date('Y-m-d') . "', - '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', - '" . $_SESSION['PO'.$identifier]->Status . "', - '" . $StatusComment . "', - '" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', - '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', - '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' - )"; + VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "', + '" . $_SESSION['PO'.$identifier]->SupplierID . "', + '" . $_SESSION['PO'.$identifier]->Comments . "', + '" . Date('Y-m-d') . "', + '" . $_SESSION['PO'.$identifier]->ExRate . "', + '" . $_SESSION['PO'.$identifier]->Initiator . "', + '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', + '" . $_SESSION['PO'.$identifier]->Location . "', + '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->Tel . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->SupplierContact . "', + '" . $_SESSION['PO'.$identifier]->SuppTel. "', + '" . $_SESSION['PO'.$identifier]->Contact . "', + '" . $_SESSION['PO'.$identifier]->Version . "', + '" . Date('Y-m-d') . "', + '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', + '" . $_SESSION['PO'.$identifier]->Status . "', + '" . $StatusComment . "', + '" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', + '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', + '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); @@ -213,20 +212,19 @@ suppliers_partno, assetid, conversionfactor ) - VALUES ( - '" . $_SESSION['PO'.$identifier]->OrderNo . "', - '" . $POLine->StockID . "', - '" . FormatDateForSQL($POLine->ReqDelDate) . "', - '" . $POLine->ItemDescription . "', - '" . $POLine->GLCode . "', - '" . $POLine->Price . "', - '" . $POLine->Quantity . "', - '" . $POLine->ShiptRef . "', - '" . $POLine->JobRef . "', - '" . $POLine->SuppliersUnit . "', - '" . $POLine->Suppliers_PartNo . "', - '" . $POLine->AssetID . "', - '" . $POLine->ConversionFactor . "')"; + VALUES ('" . $_SESSION['PO'.$identifier]->OrderNo . "', + '" . $POLine->StockID . "', + '" . FormatDateForSQL($POLine->ReqDelDate) . "', + '" . $POLine->ItemDescription . "', + '" . $POLine->GLCode . "', + '" . $POLine->Price . "', + '" . $POLine->Quantity . "', + '" . $POLine->ShiptRef . "', + '" . $POLine->JobRef . "', + '" . $POLine->SuppliersUnit . "', + '" . $POLine->Suppliers_PartNo . "', + '" . $POLine->AssetID . "', + '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); @@ -386,7 +384,7 @@ if (isset($_POST['EnterLine'])){ /*Inputs from the form directly without selecting a stock item from the search */ $AllowUpdate = true; /*always assume the best */ - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Qty'])))){ + if (!is_numeric($_POST['Qty'])){ $AllowUpdate = false; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The quantity of the order item must be numeric'),'error'); } @@ -394,7 +392,7 @@ $AllowUpdate = false; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The quantity of the ordered item entered must be a positive amount'),'error'); } - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Price'])))){ + if (!is_numeric($_POST['Price'])){ $AllowUpdate = false; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The price entered must be numeric'),'error'); } @@ -465,8 +463,6 @@ if ($AllowUpdate == true){ //adding the non-stock item - $_POST['Price'] = doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Price'])); - $_POST['Qty'] = doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['Qty'])); $_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1, '', @@ -505,10 +501,10 @@ foreach ($_POST as $FormVariableName => $Quantity) { if (mb_substr($FormVariableName, 0, 6)=='NewQty') { //if the form variable represents a Qty to add to the order - + $ItemCode = mb_substr($FormVariableName, 6, mb_strlen($FormVariableName)-6); $AlreadyOnThisOrder = 0; - + if ($_SESSION['PO_AllowSameItemMultipleTimes'] ==false){ if (count($_SESSION['PO'.$identifier]->LineItems)!=0){ @@ -530,11 +526,11 @@ decimalplaces, stockact, accountname - FROM stockmaster INNER JOIN stockcategory - ON stockcategory.categoryid = stockmaster.categoryid - INNER JOIN chartmaster - ON chartmaster.accountcode = stockcategory.stockact - WHERE stockmaster.stockid = '". $ItemCode . "'"; + FROM stockmaster INNER JOIN stockcategory + ON stockcategory.categoryid = stockmaster.categoryid + INNER JOIN chartmaster + ON chartmaster.accountcode = stockcategory.stockact + WHERE stockmaster.stockid = '". $ItemCode . "'"; $ErrMsg = _('The item details for') . ' ' . $ItemCode . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the item details but failed was'); @@ -661,9 +657,9 @@ // Note if the price is greater than 1 use 2 decimal place, if the price is a fraction of 1, use 4 decimal places // This should help display where item-price is a fraction if ($POLine->Price > 1) { - $DisplayPrice = number_format($POLine->Price,$_SESSION['PO'.$identifier]->CurrDecimalPlaces,'.',''); + $DisplayPrice = number_format($POLine->Price,$_SESSION['PO'.$identifier]->CurrDecimalPlaces); } else { - $DisplayPrice = number_format($POLine->Price,4,'.',''); + $DisplayPrice = number_format($POLine->Price,4); } if ($k==1){ @@ -705,7 +701,7 @@ echo '<br /><table class="selection"><tr> <td>' . _('Item Description') . '</td>'; - echo '<td><input type=text name=ItemDescription size=40></td></tr>'; + echo '<td><input type="text" name="ItemDescription" size="40" /></td></tr>'; echo '<tr><td>' . _('General Ledger Code') . '</td>'; echo '<td><select name="GLCode">'; $sql="SELECT accountcode, @@ -759,29 +755,29 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.description " . LIKE . " '" . $SearchString ."' - ORDER BY stockmaster.stockid - LIMIT " .$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.description " . LIKE . " '" . $SearchString ."' + ORDER BY stockmaster.stockid + LIMIT " .$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.description " . LIKE . " '". $SearchString ."' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid - LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.description " . LIKE . " '". $SearchString ."' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid + LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } } elseif ($_POST['StockCode']){ @@ -792,29 +788,29 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' - ORDER BY stockmaster.stockid - LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + ORDER BY stockmaster.stockid + LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - and stockmaster.discontinued<>1 - AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid - LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + and stockmaster.discontinued<>1 + AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid + LIMIT ".$_SESSION['DefaultDisplayRecordsMax']; } } else { @@ -822,27 +818,27 @@ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - ORDER BY stockmaster.stockid - LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + ORDER BY stockmaster.stockid + LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; } else { $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE stockmaster.mbflag<>'D' - AND stockmaster.mbflag<>'K' - AND stockmaster.mbflag<>'G' - AND stockmaster.discontinued<>1 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid - LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE stockmaster.mbflag<>'D' + AND stockmaster.mbflag<>'K' + AND stockmaster.mbflag<>'G' + AND stockmaster.discontinued<>1 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid + LIMIT " . $_SESSION['DefaultDisplayRecordsMax']; } } @@ -865,10 +861,10 @@ if (!isset($_GET['Edit'])) { $sql="SELECT categoryid, categorydescription - FROM stockcategory - WHERE stocktype<>'L' - AND stocktype<>'D' - ORDER BY categorydescription"; + FROM stockcategory + WHERE stocktype<>'L' + AND stocktype<>'D' + ORDER BY categorydescription"; $ErrMsg = _('The supplier category details could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the category details but failed was'); $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -926,13 +922,13 @@ echo '<table cellpadding="1" colspan="7" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Our Units') . '</th> - <th>' . _('Conversion') . '<br />' ._('Factor') . '</th> - <th>' . _('Supplier/Order') . '<br />' . _('Units') . '</th> - <th colspan=2><a href="#end">'._('Go to end of list').'</a></th> - </tr>'; + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Our Units') . '</th> + <th>' . _('Conversion') . '<br />' ._('Factor') . '</th> + <th>' . _('Supplier/Order') . '<br />' . _('Units') . '</th> + <th colspan=2><a href="#end">'._('Go to end of list').'</a></th> + </tr>'; echo $TableHeader; $j = 1; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/SelectOrderItems.php 2011-07-08 10:28:14 UTC (rev 4626) @@ -897,6 +897,7 @@ $ExRate = 1; } + /*Process Quick Entry */ /* If enter is pressed on the quick entry screen, the default button may be Recalculate */ if (isset($_POST['order_items']) @@ -906,8 +907,8 @@ /* get the item details from the database and hold them in the cart object */ /*Discount can only be set later on -- after quick entry -- so default discount to 0 in the first place */ - $Discount = 0; - + $Discount = 0; + $AlreadyWarnedAboutCredit = false; $i=1; while ($i<=$_SESSION['QuickEntries'] and isset($_POST['part_' . $i]) and $_POST['part_' . $i]!='') { $QuickEntryCode = 'part_' . $i; @@ -1053,14 +1054,14 @@ taxcatid, materialcost) VALUES ('" . $AssetStockID . "', - '" . $AssetRow['description'] . "', - '" . $AssetRow['longdescription'] . "', - 'ASSETS', - 'D', - '0', - '0', - '" . $_SESSION['DefaultTaxCategory'] . "', - '". $NBV . "')" , $db); + '" . $AssetRow['description'] . "', + '" . $AssetRow['longdescription'] . "', + 'ASSETS', + 'D', + '0', + '0', + '" . $_SESSION['DefaultTaxCategory'] . "', + '". $NBV . "')" , $db); /*not forgetting the location records too */ $InsertStkLocRecsResult = DB_query("INSERT INTO locstock (loccode, stockid) @@ -1091,7 +1092,9 @@ $_SESSION['Items'.$identifier]->LineItems[$_GET['Delete']]->Quantity = $QuantityAlreadyDelivered; } } - + + $AlreadyWarnedAboutCredit = false; + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ @@ -1142,18 +1145,20 @@ $WithinCreditLimit = true; - if ($_SESSION['CheckCreditLimits'] > 0){ /*Check credit limits is 1 for warn - and 2 for prohibit sales */ + if ($_SESSION['CheckCreditLimits'] > 0 AND $AlreadyWarnedAboutCredit==false){ /*Check credit limits is 1 for warn + breach their credit limit and 2 for prohibit sales */ $DifferenceInOrderValue = ($Quantity*$Price*(1-$DiscountPercentage/100)) - ($OrderLine->Quantity*$OrderLine->Price*(1-$OrderLine->DiscountPercentage)); $_SESSION['Items'.$identifier]->CreditAvailable -= $DifferenceInOrderValue; if ($_SESSION['CheckCreditLimits']==1 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('The customer account will breach their credit limit'),'warn'); + $AlreadyWarnedAboutCredit = true; } elseif ($_SESSION['CheckCreditLimits']==2 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('This change would put the customer over their credit limit and is prohibited'),'warn'); $WithinCreditLimit = false; $_SESSION['Items'.$identifier]->CreditAvailable += $DifferenceInOrderValue; + $AlreadyWarnedAboutCredit = true; } } @@ -1170,8 +1175,39 @@ } //within credit limit so make changes } //there are changes to the order line to process } //page not called from itself - POST variables not set - } - } + } // Loop around all items on the order + + + /* Now Run through each line of the order again to work out the appropriate discount from the discount matrix */ + $DiscCatsDone = array(); + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { + + if ($OrderLine->DiscCat !='' AND ! in_array($OrderLine->DiscCat,$DiscCatsDone)){ + $DiscCatsDone[]=$OrderLine->DiscCat; + $QuantityOfDiscCat = 0; + + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine_2) { + /* add up total quantity of all lines of this DiscCat */ + if ($OrderLine_2->DiscCat==$OrderLine->DiscCat){ + $QuantityOfDiscCat += $OrderLine_2->Quantity; + } + } + $result = DB_query("SELECT MAX(discountrate) AS discount + FROM discountmatrix + WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' + AND discountcategory ='" . $OrderLine->DiscCat . "' + AND quantitybreak <" . $QuantityOfDiscCat,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]!=0){ /* need to update the lines affected */ + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine_2) { + if ($OrderLine_2->DiscCat==$OrderLine->DiscCat){ + $_SESSION['Items'.$identifier]->LineItems[$OrderLine_2->LineNumber]->DiscountPercent = $myrow[0]; + } + } + }//a none zero discount percentage was returned + } + } /* end of discount matrix lookup code */ + } // the order session is started or there is a new item being added if (isset($_POST['DeliveryDetails'])){ echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/DeliveryDetails.php?' . SID .'identifier='.$identifier . '">'; prnMsg(_('You should automatically be forwarded to the entry of the delivery details page') . '. ' . _('if this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . @@ -1229,6 +1265,7 @@ if (isset($NewItem_array) AND isset($_POST['order_items'])){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */ /*Now figure out if the item is a kit set - the field MBFlag='K'*/ + $AlreadyWarnedAboutCredit = false; foreach($NewItem_array as $NewItem => $NewItemQty) { if($NewItemQty > 0) { $sql = "SELECT stockmaster.mbflag @@ -1245,11 +1282,11 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + bom.quantity + FROM bom + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -1300,8 +1337,7 @@ $myrow = DB_fetch_row($result); if ($myrow[0]!=0){ /* need to update the lines affected */ foreach ($_SESSION['Items'.$identifier]->LineItems as $StkItems_2) { - /* add up total quantity of all lines of this DiscCat */ - if ($StkItems_2->DiscCat==$OrderLine->DiscCat AND $StkItems_2->DiscountPercent == 0){ + if ($StkItems_2->DiscCat==$OrderLine->DiscCat){ $_SESSION['Items'.$identifier]->LineItems[$StkItems_2->LineNumber]->DiscountPercent = $myrow[0]; } } @@ -1415,12 +1451,13 @@ $DisplayTotal = number_format($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ - $ColSpanNumber = 3; + $ColSpanNumber = 2; } else { $ColSpanNumber = 1; } - echo '<tr class="EvenTableRows"><td class="number" colspan=7><b>' . _('TOTAL Excl Tax/Freight') . '</b></td> - <td colspan="' . $ColSpanNumber . '" class=number>' . $DisplayTotal . '</td></tr></table>'; + echo '<tr class="EvenTableRows"> + <td class="number" colspan=7><b>' . _('TOTAL Excl Tax/Freight') . '</b></td> + <td colspan="' . $ColSpanNumber . '" class=number>' . $DisplayTotal . '</td></tr></table>'; $DisplayVolume = number_format($_SESSION['Items'.$identifier]->totalVolume,2); $DisplayWeight = number_format($_SESSION['Items'.$identifier]->totalWeight,2); @@ -1431,8 +1468,10 @@ </tr></table>'; - echo '<br /><div class="centre"><input type=submit name="Recalculate" Value="' . _('Re-Calculate') . '"> - <input type=submit name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"></div><hr>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '"> + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"></div><hr />'; } # end of if lines /* Now show the stock item selection search stuff below */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/doc/Change.log 2011-07-08 10:28:14 UTC (rev 4626) @@ -1,5 +1,7 @@ webERP Change Log +8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function +8/7/11 Phil: Fix discount matrix calculations on order entry and amendment 5/7/11 Phil: Amend menu to use PDFStockLocTransfer.php to reprint transfer list - as reported by Ron Wong 3/7/11 Phil: changed all strpos to mb_strpos 3/7/11 Phil: changed all strtoupper to mb_strtoupper Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/includes/MiscFunctions.php 2011-07-08 10:28:14 UTC (rev 4626) @@ -112,6 +112,7 @@ if (strstr($CheckVariable,"'") OR strstr($CheckVariable,'+') OR strstr($CheckVariable,'?') + OR strstr($CheckVariable,'.') OR strstr($CheckVariable,"\"") OR strstr($CheckVariable,'&') OR strstr($CheckVariable,"\\") Modified: trunk/includes/SelectOrderItems_IntoCart.inc =================================================================== --- trunk/includes/SelectOrderItems_IntoCart.inc 2011-07-06 09:30:42 UTC (rev 4625) +++ trunk/includes/SelectOrderItems_IntoCart.inc 2011-07-08 10:28:14 UTC (rev 4626) @@ -89,7 +89,7 @@ $NewLineNo = -1; /* this is ok b/c CartClass will change to the correct line no */ } - if (isset($StockItem) and $myItemRow['discountcategory'] != "" ){ + if (isset($StockItem) and $myItemRow['discountcategory'] != '' ){ $DiscCatsDone[$Counter]=$StockItem->DiscCat; $QuantityOfDiscCat =0; $result = DB_query("SELECT MAX(discountrate) AS discount @@ -114,15 +114,17 @@ if ($_SESSION['Items'.$identifier]->SpecialInstructions) { prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } - if ($_SESSION['CheckCreditLimits'] > 0){ /*Check credit limits is 1 for warn + if ($_SESSION['CheckCreditLimits'] > 0 AND $AlreadyWarnedAboutCredit==false){ /*Check credit limits is 1 for warn and 2 for prohibit sales */ $_SESSION['Items'.$identifier]->CreditAvailable -= round(($NewItemQty * $Price * (1- $Discount)),2); if ($_SESSION['CheckCreditLimits']==1 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('The customer account will breach their credit limit'),'warn'); + $AlreadyWarnedAboutCredit = true; } elseif ($_SESSION['CheckCreditLimits']==2 AND $_SESSION['Items'.$identifier]->CreditAvailable <=0){ prnMsg(_('No more lines can be added to this order the customer account is currently at or over their credit limit'),'warn'); $WithinCreditLimit = false; + $AlreadyWarnedAboutCredit = true; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-08 10:30:48
|
Revision: 4627 http://web-erp.svn.sourceforge.net/web-erp/?rev=4627&view=rev Author: daintree Date: 2011-07-08 10:30:40 +0000 (Fri, 08 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/CounterSales.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/SelectOrderItems.php trunk/StockSerialItemResearch.php trunk/SuppLoginSetup.php trunk/SystemParameters.php trunk/UpgradeDatabase.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/Z_ChangeBranchCode.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.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/api/api_debtortransactions.php trunk/api/api_salesorders.php trunk/api/api_stock.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/doc/Change.log trunk/includes/MiscFunctions.php trunk/install/save.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CounterSales.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -35,7 +35,7 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { - if (strstr($key,'itm')) { + if (mb_strstr($key,'itm')) { $NewItemArray[mb_substr($key,3)] = trim($value); } } Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Currencies.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -100,7 +100,7 @@ $InputError = 1; prnMsg(_('The functional currency cannot be modified or deleted'),'error'); } - if (strstr($_POST['Abbreviation'],"'") OR strstr($_POST['Abbreviation'],'+') OR strstr($_POST['Abbreviation'],"\"") OR strstr($_POST['Abbreviation'],'&') OR strstr($_POST['Abbreviation'],' ') OR strstr($_POST['Abbreviation'],"\\") OR strstr($_POST['Abbreviation'],'.') OR strstr($_POST['Abbreviation'],'"')) { + if (mb_strstr($_POST['Abbreviation'],"'") OR mb_strstr($_POST['Abbreviation'],'+') OR mb_strstr($_POST['Abbreviation'],"\"") OR mb_strstr($_POST['Abbreviation'],'&') OR mb_strstr($_POST['Abbreviation'],' ') OR mb_strstr($_POST['Abbreviation'],"\\") OR mb_strstr($_POST['Abbreviation'],'.') OR mb_strstr($_POST['Abbreviation'],'"')) { $InputError = 1; prnMsg( _('The currency code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'Abbreviation'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CustEDISetup.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -26,7 +26,7 @@ //first off validate inputs sensible if (ContainsIllegalCharacters($_POST['EDIReference']) - OR strstr($_POST['EDIReference'],' ')) { + OR mb_strstr($_POST['EDIReference'],' ')) { $InputError = 1; prnMsg(_('The customers EDI reference code cannot contain any of the following characters') .' - \' & + \" ' . _('or a space'),'warn'); } Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CustLoginSetup.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -40,7 +40,7 @@ if (mb_strlen($_POST['UserID'])<3){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); - } elseif (ContainsIllegalCharacters($_POST['UserID']) OR strstr($_POST['UserID'],' ')) { + } elseif (ContainsIllegalCharacters($_POST['UserID']) OR mb_strstr($_POST['UserID'],' ')) { $InputError = 1; prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); } elseif (mb_strlen($_POST['Password'])<5){ @@ -48,7 +48,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CustomerBranches.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -46,7 +46,7 @@ $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); - if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { + if (ContainsIllegalCharacters($_POST['BranchCode']) OR mb_strstr($_POST['BranchCode'],' ')) { $InputError = 1; prnMsg(_('The Branch code cannot contain any of the following characters')." - & \'",'error'); $Errors[$i] = 'BranchCode'; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/SelectOrderItems.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -24,7 +24,7 @@ if (isset($_POST['order_items'])){ foreach ($_POST as $key => $value) { - if (strstr($key,'itm')) { + if (mb_strstr($key,'itm')) { $NewItem_array[mb_substr($key,3)] = trim($value); } } Modified: trunk/StockSerialItemResearch.php =================================================================== --- trunk/StockSerialItemResearch.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/StockSerialItemResearch.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -38,8 +38,8 @@ if ($SN!='') { //the point here is to allow a semi fuzzy search, but still keep someone from killing the db server - if (strstr($SN,'%')){ - while(strstr($SN,'%%')) { + if (mb_strstr($SN,'%')){ + while(mb_strstr($SN,'%%')) { $SN = str_replace('%%','%',$SN); } if (mb_strlen($SN) < 11){ Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/SuppLoginSetup.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -82,7 +82,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/SystemParameters.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -33,7 +33,7 @@ } elseif (mb_strlen($_POST['X_DefaultCreditLimit']) > 12 || !is_numeric($_POST['X_DefaultCreditLimit']) ) { $InputError = 1; prnMsg(_('Default Credit Limit must be a number'),'error'); - } elseif (strstr($_POST['X_RomalpaClause'], "'") || mb_strlen($_POST['X_RomalpaClause']) > 5000) { + } elseif (mb_strstr($_POST['X_RomalpaClause'], "'") || mb_strlen($_POST['X_RomalpaClause']) > 5000) { $InputError = 1; prnMsg(_('The Romalpa Clause may not contain single quotes and may not be longer than 5000 chars'),'error'); } elseif (mb_strlen($_POST['X_QuickEntries']) > 2 || !is_numeric($_POST['X_QuickEntries']) || Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/UpgradeDatabase.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -146,7 +146,7 @@ if (mb_substr($SQLEntries[$i], 0, 2) != '--' AND mb_substr($SQLEntries[$i], 0, 3) != 'USE' - AND strstr($SQLEntries[$i],'/*')==FALSE + AND mb_strstr($SQLEntries[$i],'/*')==FALSE AND mb_strlen($SQLEntries[$i])>1){ $sql .= ' ' . $SQLEntries[$i]; Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/WWW_Users.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -70,7 +70,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { Modified: trunk/WorkCentres.php =================================================================== --- trunk/WorkCentres.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/WorkCentres.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -30,7 +30,7 @@ $InputError = 1; prnMsg(_('The Work Centre description must be at least 3 characters long'),'error'); } - if (strstr($_POST['Code'],' ') OR ContainsIllegalCharacters($_POST['Code']) ) { + if (mb_strstr($_POST['Code'],' ') OR ContainsIllegalCharacters($_POST['Code']) ) { $InputError = 1; prnMsg(_('The work centre code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); } Modified: trunk/Z_ChangeBranchCode.php =================================================================== --- trunk/Z_ChangeBranchCode.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_ChangeBranchCode.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -26,7 +26,7 @@ include('includes/footer.inc'); exit; } - if (strstr($_POST['NewBranchCode'],".")>0 OR strstr($_POST['NewBranchCode'],"&") OR strstr($_POST['NewBranchCode'],"-") OR strstr($_POST['NewBranchCode']," ")){ + if (mb_strstr($_POST['NewBranchCode'],".")>0 OR mb_strstr($_POST['NewBranchCode'],"&") OR mb_strstr($_POST['NewBranchCode'],"-") OR mb_strstr($_POST['NewBranchCode']," ")){ prnMsg(_('The new customer branch code cannot contain') . ' - & . ' . _('or a space'),'error'); include('includes/footer.inc'); exit; Modified: trunk/Z_ImportStocks.php =================================================================== --- trunk/Z_ImportStocks.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_ImportStocks.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -120,7 +120,7 @@ $InputError = 1; prnMsg (_('The Stock Item code cannot be empty'),'error'); } - if (strstr($StockID,' ') OR strstr($StockID,"'") OR strstr($StockID,'+') OR strstr($StockID,"\\") OR strstr($StockID,"\"") OR strstr($StockID,'&') OR strstr($StockID,'"')) { + if (mb_strstr($StockID,' ') OR mb_strstr($StockID,"'") OR mb_strstr($StockID,'+') OR mb_strstr($StockID,"\\") OR mb_strstr($StockID,"\"") OR mb_strstr($StockID,'&') OR mb_strstr($StockID,'"')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " ' & + \" \\ " . _('or a space'). " (". $StockID. ")",'error'); $StockID=''; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_MakeNewCompany.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -105,7 +105,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -36,7 +36,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -38,7 +38,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $sql .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -38,7 +38,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $sql .= ' ' . $SQLScriptFile[$i]; Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_debtortransactions.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -87,9 +87,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_salesorders.php =================================================================== --- trunk/api/api_salesorders.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_salesorders.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -43,9 +43,9 @@ $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr($orddate,"/")) { + if (mb_strstr($orddate,"/")) { $DateArray = explode('/',$orddate); - } elseif (strstr($orddate,".")) { + } elseif (mb_strstr($orddate,".")) { $DateArray = explode('.',$orddate); } if ($DateFormat=='d/m/Y') { @@ -121,9 +121,9 @@ $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr($deliverydate,'/')) { + if (mb_strstr($deliverydate,'/')) { $DateArray = explode('/',$deliverydate); - } elseif (strstr($PeriodEnd,'.')) { + } elseif (mb_strstr($PeriodEnd,'.')) { $DateArray = explode('.',$deliverydate); } if ($DateFormat=='d/m/Y') { @@ -231,9 +231,9 @@ $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr($itemdue,'/')) { + if (mb_strstr($itemdue,'/')) { $DateArray = explode('/',$itemdue); - } elseif (strstr($itemdue,'.')) { + } elseif (mb_strstr($itemdue,'.')) { $DateArray = explode('.',$itemdue); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_stock.php =================================================================== --- trunk/api/api_stock.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_stock.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -79,9 +79,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_suppliers.php =================================================================== --- trunk/api/api_suppliers.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_suppliers.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -51,9 +51,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_workorders.php =================================================================== --- trunk/api/api_workorders.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_workorders.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -48,9 +48,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { @@ -81,9 +81,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/doc/Change.log 2011-07-08 10:30:40 UTC (rev 4627) @@ -1,5 +1,6 @@ webERP Change Log +8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment 5/7/11 Phil: Amend menu to use PDFStockLocTransfer.php to reprint transfer list - as reported by Ron Wong Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/includes/MiscFunctions.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -109,16 +109,16 @@ function ContainsIllegalCharacters ($CheckVariable) { - if (strstr($CheckVariable,"'") - OR strstr($CheckVariable,'+') - OR strstr($CheckVariable,'?') - OR strstr($CheckVariable,'.') - OR strstr($CheckVariable,"\"") - OR strstr($CheckVariable,'&') - OR strstr($CheckVariable,"\\") - OR strstr($CheckVariable,'"') - OR strstr($CheckVariable,'>') - OR strstr($CheckVariable,'<')){ + if (mb_strstr($CheckVariable,"'") + OR mb_strstr($CheckVariable,'+') + OR mb_strstr($CheckVariable,'?') + OR mb_strstr($CheckVariable,'.') + OR mb_strstr($CheckVariable,"\"") + OR mb_strstr($CheckVariable,'&') + OR mb_strstr($CheckVariable,"\\") + OR mb_strstr($CheckVariable,'"') + OR mb_strstr($CheckVariable,'>') + OR mb_strstr($CheckVariable,'<')){ return true; } else { Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/install/save.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -348,7 +348,7 @@ $SQLScriptFile[$i] = trim($SQLScriptFile[$i]); //ignore lines that start with -- or USE or /* if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-08 10:30:48
|
Revision: 4627 http://web-erp.svn.sourceforge.net/web-erp/?rev=4627&view=rev Author: daintree Date: 2011-07-08 10:30:40 +0000 (Fri, 08 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/CounterSales.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/SelectOrderItems.php trunk/StockSerialItemResearch.php trunk/SuppLoginSetup.php trunk/SystemParameters.php trunk/UpgradeDatabase.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/Z_ChangeBranchCode.php trunk/Z_ImportStocks.php trunk/Z_MakeNewCompany.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/api/api_debtortransactions.php trunk/api/api_salesorders.php trunk/api/api_stock.php trunk/api/api_suppliers.php trunk/api/api_workorders.php trunk/doc/Change.log trunk/includes/MiscFunctions.php trunk/install/save.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CounterSales.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -35,7 +35,7 @@ if (isset($_POST['OrderItems'])){ foreach ($_POST as $key => $value) { - if (strstr($key,'itm')) { + if (mb_strstr($key,'itm')) { $NewItemArray[mb_substr($key,3)] = trim($value); } } Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Currencies.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -100,7 +100,7 @@ $InputError = 1; prnMsg(_('The functional currency cannot be modified or deleted'),'error'); } - if (strstr($_POST['Abbreviation'],"'") OR strstr($_POST['Abbreviation'],'+') OR strstr($_POST['Abbreviation'],"\"") OR strstr($_POST['Abbreviation'],'&') OR strstr($_POST['Abbreviation'],' ') OR strstr($_POST['Abbreviation'],"\\") OR strstr($_POST['Abbreviation'],'.') OR strstr($_POST['Abbreviation'],'"')) { + if (mb_strstr($_POST['Abbreviation'],"'") OR mb_strstr($_POST['Abbreviation'],'+') OR mb_strstr($_POST['Abbreviation'],"\"") OR mb_strstr($_POST['Abbreviation'],'&') OR mb_strstr($_POST['Abbreviation'],' ') OR mb_strstr($_POST['Abbreviation'],"\\") OR mb_strstr($_POST['Abbreviation'],'.') OR mb_strstr($_POST['Abbreviation'],'"')) { $InputError = 1; prnMsg( _('The currency code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'Abbreviation'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CustEDISetup.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -26,7 +26,7 @@ //first off validate inputs sensible if (ContainsIllegalCharacters($_POST['EDIReference']) - OR strstr($_POST['EDIReference'],' ')) { + OR mb_strstr($_POST['EDIReference'],' ')) { $InputError = 1; prnMsg(_('The customers EDI reference code cannot contain any of the following characters') .' - \' & + \" ' . _('or a space'),'warn'); } Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CustLoginSetup.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -40,7 +40,7 @@ if (mb_strlen($_POST['UserID'])<3){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); - } elseif (ContainsIllegalCharacters($_POST['UserID']) OR strstr($_POST['UserID'],' ')) { + } elseif (ContainsIllegalCharacters($_POST['UserID']) OR mb_strstr($_POST['UserID'],' ')) { $InputError = 1; prnMsg(_('User names cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); } elseif (mb_strlen($_POST['Password'])<5){ @@ -48,7 +48,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/CustomerBranches.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -46,7 +46,7 @@ $_POST['BranchCode'] = mb_strtoupper($_POST['BranchCode']); - if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) { + if (ContainsIllegalCharacters($_POST['BranchCode']) OR mb_strstr($_POST['BranchCode'],' ')) { $InputError = 1; prnMsg(_('The Branch code cannot contain any of the following characters')." - & \'",'error'); $Errors[$i] = 'BranchCode'; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/SelectOrderItems.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -24,7 +24,7 @@ if (isset($_POST['order_items'])){ foreach ($_POST as $key => $value) { - if (strstr($key,'itm')) { + if (mb_strstr($key,'itm')) { $NewItem_array[mb_substr($key,3)] = trim($value); } } Modified: trunk/StockSerialItemResearch.php =================================================================== --- trunk/StockSerialItemResearch.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/StockSerialItemResearch.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -38,8 +38,8 @@ if ($SN!='') { //the point here is to allow a semi fuzzy search, but still keep someone from killing the db server - if (strstr($SN,'%')){ - while(strstr($SN,'%%')) { + if (mb_strstr($SN,'%')){ + while(mb_strstr($SN,'%%')) { $SN = str_replace('%%','%',$SN); } if (mb_strlen($SN) < 11){ Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/SuppLoginSetup.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -82,7 +82,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/SystemParameters.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -33,7 +33,7 @@ } elseif (mb_strlen($_POST['X_DefaultCreditLimit']) > 12 || !is_numeric($_POST['X_DefaultCreditLimit']) ) { $InputError = 1; prnMsg(_('Default Credit Limit must be a number'),'error'); - } elseif (strstr($_POST['X_RomalpaClause'], "'") || mb_strlen($_POST['X_RomalpaClause']) > 5000) { + } elseif (mb_strstr($_POST['X_RomalpaClause'], "'") || mb_strlen($_POST['X_RomalpaClause']) > 5000) { $InputError = 1; prnMsg(_('The Romalpa Clause may not contain single quotes and may not be longer than 5000 chars'),'error'); } elseif (mb_strlen($_POST['X_QuickEntries']) > 2 || !is_numeric($_POST['X_QuickEntries']) || Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/UpgradeDatabase.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -146,7 +146,7 @@ if (mb_substr($SQLEntries[$i], 0, 2) != '--' AND mb_substr($SQLEntries[$i], 0, 3) != 'USE' - AND strstr($SQLEntries[$i],'/*')==FALSE + AND mb_strstr($SQLEntries[$i],'/*')==FALSE AND mb_strlen($SQLEntries[$i])>1){ $sql .= ' ' . $SQLEntries[$i]; Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/WWW_Users.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -70,7 +70,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { Modified: trunk/WorkCentres.php =================================================================== --- trunk/WorkCentres.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/WorkCentres.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -30,7 +30,7 @@ $InputError = 1; prnMsg(_('The Work Centre description must be at least 3 characters long'),'error'); } - if (strstr($_POST['Code'],' ') OR ContainsIllegalCharacters($_POST['Code']) ) { + if (mb_strstr($_POST['Code'],' ') OR ContainsIllegalCharacters($_POST['Code']) ) { $InputError = 1; prnMsg(_('The work centre code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error'); } Modified: trunk/Z_ChangeBranchCode.php =================================================================== --- trunk/Z_ChangeBranchCode.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_ChangeBranchCode.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -26,7 +26,7 @@ include('includes/footer.inc'); exit; } - if (strstr($_POST['NewBranchCode'],".")>0 OR strstr($_POST['NewBranchCode'],"&") OR strstr($_POST['NewBranchCode'],"-") OR strstr($_POST['NewBranchCode']," ")){ + if (mb_strstr($_POST['NewBranchCode'],".")>0 OR mb_strstr($_POST['NewBranchCode'],"&") OR mb_strstr($_POST['NewBranchCode'],"-") OR mb_strstr($_POST['NewBranchCode']," ")){ prnMsg(_('The new customer branch code cannot contain') . ' - & . ' . _('or a space'),'error'); include('includes/footer.inc'); exit; Modified: trunk/Z_ImportStocks.php =================================================================== --- trunk/Z_ImportStocks.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_ImportStocks.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -120,7 +120,7 @@ $InputError = 1; prnMsg (_('The Stock Item code cannot be empty'),'error'); } - if (strstr($StockID,' ') OR strstr($StockID,"'") OR strstr($StockID,'+') OR strstr($StockID,"\\") OR strstr($StockID,"\"") OR strstr($StockID,'&') OR strstr($StockID,'"')) { + if (mb_strstr($StockID,' ') OR mb_strstr($StockID,"'") OR mb_strstr($StockID,'+') OR mb_strstr($StockID,"\\") OR mb_strstr($StockID,"\"") OR mb_strstr($StockID,'&') OR mb_strstr($StockID,'"')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " ' & + \" \\ " . _('or a space'). " (". $StockID. ")",'error'); $StockID=''; Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_MakeNewCompany.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -105,7 +105,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.04-3.05.php =================================================================== --- trunk/Z_Upgrade_3.04-3.05.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.04-3.05.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -36,7 +36,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.05-3.06.php =================================================================== --- trunk/Z_Upgrade_3.05-3.06.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.05-3.06.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.07-3.08.php =================================================================== --- trunk/Z_Upgrade_3.07-3.08.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.07-3.08.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.08-3.09.php =================================================================== --- trunk/Z_Upgrade_3.08-3.09.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.08-3.09.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.09-3.10.php =================================================================== --- trunk/Z_Upgrade_3.09-3.10.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.09-3.10.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -28,7 +28,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.10-3.11.php =================================================================== --- trunk/Z_Upgrade_3.10-3.11.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.10-3.11.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -38,7 +38,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $sql .= ' ' . $SQLScriptFile[$i]; Modified: trunk/Z_Upgrade_3.11-4.00.php =================================================================== --- trunk/Z_Upgrade_3.11-4.00.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/Z_Upgrade_3.11-4.00.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -38,7 +38,7 @@ if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' AND mb_substr($SQLScriptFile[$i], 0, 3) != 'USE' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $sql .= ' ' . $SQLScriptFile[$i]; Modified: trunk/api/api_debtortransactions.php =================================================================== --- trunk/api/api_debtortransactions.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_debtortransactions.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -87,9 +87,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_salesorders.php =================================================================== --- trunk/api/api_salesorders.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_salesorders.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -43,9 +43,9 @@ $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr($orddate,"/")) { + if (mb_strstr($orddate,"/")) { $DateArray = explode('/',$orddate); - } elseif (strstr($orddate,".")) { + } elseif (mb_strstr($orddate,".")) { $DateArray = explode('.',$orddate); } if ($DateFormat=='d/m/Y') { @@ -121,9 +121,9 @@ $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr($deliverydate,'/')) { + if (mb_strstr($deliverydate,'/')) { $DateArray = explode('/',$deliverydate); - } elseif (strstr($PeriodEnd,'.')) { + } elseif (mb_strstr($PeriodEnd,'.')) { $DateArray = explode('.',$deliverydate); } if ($DateFormat=='d/m/Y') { @@ -231,9 +231,9 @@ $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr($itemdue,'/')) { + if (mb_strstr($itemdue,'/')) { $DateArray = explode('/',$itemdue); - } elseif (strstr($itemdue,'.')) { + } elseif (mb_strstr($itemdue,'.')) { $DateArray = explode('.',$itemdue); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_stock.php =================================================================== --- trunk/api/api_stock.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_stock.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -79,9 +79,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_suppliers.php =================================================================== --- trunk/api/api_suppliers.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_suppliers.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -51,9 +51,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/api/api_workorders.php =================================================================== --- trunk/api/api_workorders.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/api/api_workorders.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -48,9 +48,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { @@ -81,9 +81,9 @@ $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (strstr('/',$PeriodEnd)) { + if (mb_strstr('/',$PeriodEnd)) { $Date_Array = explode('/',$PeriodEnd); - } elseif (strstr('.',$PeriodEnd)) { + } elseif (mb_strstr('.',$PeriodEnd)) { $Date_Array = explode('.',$PeriodEnd); } if ($DateFormat=='d/m/Y') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/doc/Change.log 2011-07-08 10:30:40 UTC (rev 4627) @@ -1,5 +1,6 @@ webERP Change Log +8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment 5/7/11 Phil: Amend menu to use PDFStockLocTransfer.php to reprint transfer list - as reported by Ron Wong Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/includes/MiscFunctions.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -109,16 +109,16 @@ function ContainsIllegalCharacters ($CheckVariable) { - if (strstr($CheckVariable,"'") - OR strstr($CheckVariable,'+') - OR strstr($CheckVariable,'?') - OR strstr($CheckVariable,'.') - OR strstr($CheckVariable,"\"") - OR strstr($CheckVariable,'&') - OR strstr($CheckVariable,"\\") - OR strstr($CheckVariable,'"') - OR strstr($CheckVariable,'>') - OR strstr($CheckVariable,'<')){ + if (mb_strstr($CheckVariable,"'") + OR mb_strstr($CheckVariable,'+') + OR mb_strstr($CheckVariable,'?') + OR mb_strstr($CheckVariable,'.') + OR mb_strstr($CheckVariable,"\"") + OR mb_strstr($CheckVariable,'&') + OR mb_strstr($CheckVariable,"\\") + OR mb_strstr($CheckVariable,'"') + OR mb_strstr($CheckVariable,'>') + OR mb_strstr($CheckVariable,'<')){ return true; } else { Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-08 10:28:14 UTC (rev 4626) +++ trunk/install/save.php 2011-07-08 10:30:40 UTC (rev 4627) @@ -348,7 +348,7 @@ $SQLScriptFile[$i] = trim($SQLScriptFile[$i]); //ignore lines that start with -- or USE or /* if (mb_substr($SQLScriptFile[$i], 0, 2) != '--' - AND strstr($SQLScriptFile[$i],'/*')==FALSE + AND mb_strstr($SQLScriptFile[$i],'/*')==FALSE AND mb_strlen($SQLScriptFile[$i])>1){ $SQL .= ' ' . $SQLScriptFile[$i]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-08 10:43:15
|
Revision: 4628 http://web-erp.svn.sourceforge.net/web-erp/?rev=4628&view=rev Author: daintree Date: 2011-07-08 10:43:09 +0000 (Fri, 08 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/Currencies.php trunk/Z_ChangeBranchCode.php trunk/Z_ImportStocks.php trunk/doc/Change.log Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/Currencies.php 2011-07-08 10:43:09 UTC (rev 4628) @@ -100,7 +100,7 @@ $InputError = 1; prnMsg(_('The functional currency cannot be modified or deleted'),'error'); } - if (mb_strstr($_POST['Abbreviation'],"'") OR mb_strstr($_POST['Abbreviation'],'+') OR mb_strstr($_POST['Abbreviation'],"\"") OR mb_strstr($_POST['Abbreviation'],'&') OR mb_strstr($_POST['Abbreviation'],' ') OR mb_strstr($_POST['Abbreviation'],"\\") OR mb_strstr($_POST['Abbreviation'],'.') OR mb_strstr($_POST['Abbreviation'],'"')) { + if (ContainsIllegalCharacters($_POST['Abbreviation'])) { $InputError = 1; prnMsg( _('The currency code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'Abbreviation'; Modified: trunk/Z_ChangeBranchCode.php =================================================================== --- trunk/Z_ChangeBranchCode.php 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/Z_ChangeBranchCode.php 2011-07-08 10:43:09 UTC (rev 4628) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -/*Script to Delete all sales transactions*/ -//$PageSecurity=15; include ('includes/session.inc'); $title = _('UTILITY PAGE To Changes A Customer Branch Code In All Tables'); include('includes/header.inc'); @@ -11,29 +9,28 @@ /*First check the customer code exists */ $result=DB_query("SELECT debtorno, - branchcode - FROM custbranch - WHERE debtorno='" . $_POST['DebtorNo'] . "' - AND branchcode='" . $_POST['OldBranchCode'] . "'",$db); + branchcode + FROM custbranch + WHERE debtorno='" . $_POST['DebtorNo'] . "' + AND branchcode='" . $_POST['OldBranchCode'] . "'",$db); if (DB_num_rows($result)==0){ prnMsg (_('The customer branch code') . ': ' . $_POST['DebtorNo'] . ' - ' . $_POST['OldBranchCode'] . ' ' . _('does not currently exist as a customer branch code in the system'),'error'); include('includes/footer.inc'); exit; } - if ($_POST['NewBranchCode']==""){ + if ($_POST['NewBranchCode']==''){ prnMsg(_('The new customer branch code to change the old code to must be entered as well'),'error'); include('includes/footer.inc'); exit; } - if (mb_strstr($_POST['NewBranchCode'],".")>0 OR mb_strstr($_POST['NewBranchCode'],"&") OR mb_strstr($_POST['NewBranchCode'],"-") OR mb_strstr($_POST['NewBranchCode']," ")){ + if (ContainsIllegalCharacters($_POST['NewBranchCode']) OR mb_strstr($_POST['NewBranchCode'],' ')){ prnMsg(_('The new customer branch code cannot contain') . ' - & . ' . _('or a space'),'error'); include('includes/footer.inc'); exit; } - /*Now check that the new code doesn't already exist */ $result=DB_query("SELECT debtorno FROM custbranch WHERE debtorno='" . $_POST['DebtorNo'] . "' AND branchcode ='" . $_POST['NewBranchCode'] . "'",$db); if (DB_num_rows($result)!=0){ Modified: trunk/Z_ImportStocks.php =================================================================== --- trunk/Z_ImportStocks.php 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/Z_ImportStocks.php 2011-07-08 10:43:09 UTC (rev 4628) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -/* Script to make stock locations for all parts that do not have stock location records set up*/ -//$PageSecurity = 15; include('includes/session.inc'); $title = _('Import Items'); include('includes/header.inc'); @@ -120,7 +118,7 @@ $InputError = 1; prnMsg (_('The Stock Item code cannot be empty'),'error'); } - if (mb_strstr($StockID,' ') OR mb_strstr($StockID,"'") OR mb_strstr($StockID,'+') OR mb_strstr($StockID,"\\") OR mb_strstr($StockID,"\"") OR mb_strstr($StockID,'&') OR mb_strstr($StockID,'"')) { + if (ContainsIllegalCharacters($StockID) OR mb_strstr($StockID,' ')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " ' & + \" \\ " . _('or a space'). " (". $StockID. ")",'error'); $StockID=''; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/doc/Change.log 2011-07-08 10:43:09 UTC (rev 4628) @@ -1,5 +1,6 @@ webERP Change Log +8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts 8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-08 10:43:15
|
Revision: 4628 http://web-erp.svn.sourceforge.net/web-erp/?rev=4628&view=rev Author: daintree Date: 2011-07-08 10:43:09 +0000 (Fri, 08 Jul 2011) Log Message: ----------- various Modified Paths: -------------- trunk/Currencies.php trunk/Z_ChangeBranchCode.php trunk/Z_ImportStocks.php trunk/doc/Change.log Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/Currencies.php 2011-07-08 10:43:09 UTC (rev 4628) @@ -100,7 +100,7 @@ $InputError = 1; prnMsg(_('The functional currency cannot be modified or deleted'),'error'); } - if (mb_strstr($_POST['Abbreviation'],"'") OR mb_strstr($_POST['Abbreviation'],'+') OR mb_strstr($_POST['Abbreviation'],"\"") OR mb_strstr($_POST['Abbreviation'],'&') OR mb_strstr($_POST['Abbreviation'],' ') OR mb_strstr($_POST['Abbreviation'],"\\") OR mb_strstr($_POST['Abbreviation'],'.') OR mb_strstr($_POST['Abbreviation'],'"')) { + if (ContainsIllegalCharacters($_POST['Abbreviation'])) { $InputError = 1; prnMsg( _('The currency code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); $Errors[$i] = 'Abbreviation'; Modified: trunk/Z_ChangeBranchCode.php =================================================================== --- trunk/Z_ChangeBranchCode.php 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/Z_ChangeBranchCode.php 2011-07-08 10:43:09 UTC (rev 4628) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -/*Script to Delete all sales transactions*/ -//$PageSecurity=15; include ('includes/session.inc'); $title = _('UTILITY PAGE To Changes A Customer Branch Code In All Tables'); include('includes/header.inc'); @@ -11,29 +9,28 @@ /*First check the customer code exists */ $result=DB_query("SELECT debtorno, - branchcode - FROM custbranch - WHERE debtorno='" . $_POST['DebtorNo'] . "' - AND branchcode='" . $_POST['OldBranchCode'] . "'",$db); + branchcode + FROM custbranch + WHERE debtorno='" . $_POST['DebtorNo'] . "' + AND branchcode='" . $_POST['OldBranchCode'] . "'",$db); if (DB_num_rows($result)==0){ prnMsg (_('The customer branch code') . ': ' . $_POST['DebtorNo'] . ' - ' . $_POST['OldBranchCode'] . ' ' . _('does not currently exist as a customer branch code in the system'),'error'); include('includes/footer.inc'); exit; } - if ($_POST['NewBranchCode']==""){ + if ($_POST['NewBranchCode']==''){ prnMsg(_('The new customer branch code to change the old code to must be entered as well'),'error'); include('includes/footer.inc'); exit; } - if (mb_strstr($_POST['NewBranchCode'],".")>0 OR mb_strstr($_POST['NewBranchCode'],"&") OR mb_strstr($_POST['NewBranchCode'],"-") OR mb_strstr($_POST['NewBranchCode']," ")){ + if (ContainsIllegalCharacters($_POST['NewBranchCode']) OR mb_strstr($_POST['NewBranchCode'],' ')){ prnMsg(_('The new customer branch code cannot contain') . ' - & . ' . _('or a space'),'error'); include('includes/footer.inc'); exit; } - /*Now check that the new code doesn't already exist */ $result=DB_query("SELECT debtorno FROM custbranch WHERE debtorno='" . $_POST['DebtorNo'] . "' AND branchcode ='" . $_POST['NewBranchCode'] . "'",$db); if (DB_num_rows($result)!=0){ Modified: trunk/Z_ImportStocks.php =================================================================== --- trunk/Z_ImportStocks.php 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/Z_ImportStocks.php 2011-07-08 10:43:09 UTC (rev 4628) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -/* Script to make stock locations for all parts that do not have stock location records set up*/ -//$PageSecurity = 15; include('includes/session.inc'); $title = _('Import Items'); include('includes/header.inc'); @@ -120,7 +118,7 @@ $InputError = 1; prnMsg (_('The Stock Item code cannot be empty'),'error'); } - if (mb_strstr($StockID,' ') OR mb_strstr($StockID,"'") OR mb_strstr($StockID,'+') OR mb_strstr($StockID,"\\") OR mb_strstr($StockID,"\"") OR mb_strstr($StockID,'&') OR mb_strstr($StockID,'"')) { + if (ContainsIllegalCharacters($StockID) OR mb_strstr($StockID,' ')) { $InputError = 1; prnMsg(_('The stock item code cannot contain any of the following characters') . " ' & + \" \\ " . _('or a space'). " (". $StockID. ")",'error'); $StockID=''; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:30:40 UTC (rev 4627) +++ trunk/doc/Change.log 2011-07-08 10:43:09 UTC (rev 4628) @@ -1,5 +1,6 @@ webERP Change Log +8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts 8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-09 08:23:06
|
Revision: 4629 http://web-erp.svn.sourceforge.net/web-erp/?rev=4629&view=rev Author: daintree Date: 2011-07-09 08:22:59 +0000 (Sat, 09 Jul 2011) Log Message: ----------- wrapping text on quotation comments Modified Paths: -------------- trunk/GLAccounts.php trunk/PDFQuotation.php trunk/doc/Change.log Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/GLAccounts.php 2011-07-09 08:22:59 UTC (rev 4629) @@ -37,7 +37,7 @@ $sql = "UPDATE chartmaster SET accountname='" . $_POST['AccountName'] . "', group_='" . $_POST['Group'] . "' - WHERE accountcode ='" . $SelectedAccount . "'"; + WHERE accountcode ='" . $SelectedAccount . "'"; $ErrMsg = _('Could not update the account because'); $result = DB_query($sql,$db,$ErrMsg); @@ -52,8 +52,7 @@ group_) VALUES ('" . $_POST['AccountCode'] . "', '" . $_POST['AccountName'] . "', - '" . $_POST['Group'] . "' - )"; + '" . $_POST['Group'] . "')"; $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('The new general ledger account has been added'),'success'); @@ -69,9 +68,10 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'ChartDetails' - - - $sql= "SELECT COUNT(*) FROM chartdetails WHERE chartdetails.accountcode ='" . $SelectedAccount . "' AND chartdetails.actual <>0"; + $sql= "SELECT COUNT(*) + FROM chartdetails + WHERE chartdetails.accountcode ='" . $SelectedAccount . "' + AND chartdetails.actual <>0"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { @@ -81,7 +81,9 @@ } else { // PREVENT DELETES IF DEPENDENT RECORDS IN 'GLTrans' - $sql= "SELECT COUNT(*) FROM gltrans WHERE gltrans.account ='" . $SelectedAccount . "'"; + $sql= "SELECT COUNT(*) + FROM gltrans + WHERE gltrans.account ='" . $SelectedAccount . "'"; $ErrMsg = _('Could not test for existing transactions because'); @@ -96,14 +98,14 @@ } else { //PREVENT DELETES IF Company default accounts set up to this account $sql= "SELECT COUNT(*) FROM companies - WHERE debtorsact='" . $SelectedAccount ."' - OR pytdiscountact='" . $SelectedAccount ."' - OR creditorsact='" . $SelectedAccount ."' - OR payrollact='" . $SelectedAccount ."' - OR grnact='" . $SelectedAccount ."' - OR exchangediffact='" . $SelectedAccount ."' - OR purchasesexchangediffact='" . $SelectedAccount ."' - OR retainedearnings='" . $SelectedAccount ."'"; + WHERE debtorsact='" . $SelectedAccount ."' + OR pytdiscountact='" . $SelectedAccount ."' + OR creditorsact='" . $SelectedAccount ."' + OR payrollact='" . $SelectedAccount ."' + OR grnact='" . $SelectedAccount ."' + OR exchangediffact='" . $SelectedAccount ."' + OR purchasesexchangediffact='" . $SelectedAccount ."' + OR retainedearnings='" . $SelectedAccount ."'"; $ErrMsg = _('Could not test for default company GL codes because'); @@ -144,7 +146,9 @@ prnMsg( _('Cannot delete this account because it is used by one of the sales GL posting interface records'),'warn'); } else { //PREVENT DELETES IF COGS POSTINGS USE THE GL ACCOUNT - $sql= "SELECT COUNT(*) FROM cogsglpostings WHERE glcode='" . $SelectedAccount ."'"; + $sql= "SELECT COUNT(*) + FROM cogsglpostings + WHERE glcode='" . $SelectedAccount ."'"; $ErrMsg = _('Could not test for existing cost of sales interface codes because'); @@ -158,11 +162,11 @@ } else { //PREVENT DELETES IF STOCK POSTINGS USE THE GL ACCOUNT $sql= "SELECT COUNT(*) FROM stockcategory - WHERE stockact='" . $SelectedAccount ."' - OR adjglact='" . $SelectedAccount ."' - OR purchpricevaract='" . $SelectedAccount ."' - OR materialuseagevarac='" . $SelectedAccount ."' - OR wipact='" . $SelectedAccount ."'"; + WHERE stockact='" . $SelectedAccount ."' + OR adjglact='" . $SelectedAccount ."' + OR purchpricevaract='" . $SelectedAccount ."' + OR materialuseagevarac='" . $SelectedAccount ."' + OR wipact='" . $SelectedAccount ."'"; $Errmsg = _('Could not test for existing stock GL codes because'); Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/PDFQuotation.php 2011-07-09 08:22:59 UTC (rev 4629) @@ -186,10 +186,10 @@ $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); if (mb_strlen($myrow2['narrative'])>1){ $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$myrow2['narrative']); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$myrow2['narrative']); if (mb_strlen($LeftOvers) >1){ $YPos -= 11; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$LeftOvers); } } $QuotationTotal +=$LineTotal; @@ -209,35 +209,36 @@ include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); - $LeftOvers = $pdf->addText($XPos,$YPos-95,10,$myrow['comments']); - + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($TaxTotal,2),'right'); + $YPos -= 12; + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotalEx,2),'right'); + $YPos -= 12; + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); + + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,20,10,_('Notes:')); + $LeftOvers = $pdf->addTextWrap($XPos+28,$YPos,800,10,$myrow['comments']); + if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,10,$FontSize,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); } } } } - $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($TaxTotal,2),'right'); - $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotalEx,2),'right'); - $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); - } /*end if there are line details to show on the quotation*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/doc/Change.log 2011-07-09 08:22:59 UTC (rev 4629) @@ -1,6 +1,7 @@ webERP Change Log -8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts +9/7/11 Phil/Beth Lesko: Comments not wrapping correctly on quotations - fixed landscape quotation +8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts Z_ChangeBranchCode.php and Z_ImportStockCodes.php 8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-09 08:23:06
|
Revision: 4629 http://web-erp.svn.sourceforge.net/web-erp/?rev=4629&view=rev Author: daintree Date: 2011-07-09 08:22:59 +0000 (Sat, 09 Jul 2011) Log Message: ----------- wrapping text on quotation comments Modified Paths: -------------- trunk/GLAccounts.php trunk/PDFQuotation.php trunk/doc/Change.log Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/GLAccounts.php 2011-07-09 08:22:59 UTC (rev 4629) @@ -37,7 +37,7 @@ $sql = "UPDATE chartmaster SET accountname='" . $_POST['AccountName'] . "', group_='" . $_POST['Group'] . "' - WHERE accountcode ='" . $SelectedAccount . "'"; + WHERE accountcode ='" . $SelectedAccount . "'"; $ErrMsg = _('Could not update the account because'); $result = DB_query($sql,$db,$ErrMsg); @@ -52,8 +52,7 @@ group_) VALUES ('" . $_POST['AccountCode'] . "', '" . $_POST['AccountName'] . "', - '" . $_POST['Group'] . "' - )"; + '" . $_POST['Group'] . "')"; $result = DB_query($sql,$db,$ErrMsg); prnMsg(_('The new general ledger account has been added'),'success'); @@ -69,9 +68,10 @@ // PREVENT DELETES IF DEPENDENT RECORDS IN 'ChartDetails' - - - $sql= "SELECT COUNT(*) FROM chartdetails WHERE chartdetails.accountcode ='" . $SelectedAccount . "' AND chartdetails.actual <>0"; + $sql= "SELECT COUNT(*) + FROM chartdetails + WHERE chartdetails.accountcode ='" . $SelectedAccount . "' + AND chartdetails.actual <>0"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { @@ -81,7 +81,9 @@ } else { // PREVENT DELETES IF DEPENDENT RECORDS IN 'GLTrans' - $sql= "SELECT COUNT(*) FROM gltrans WHERE gltrans.account ='" . $SelectedAccount . "'"; + $sql= "SELECT COUNT(*) + FROM gltrans + WHERE gltrans.account ='" . $SelectedAccount . "'"; $ErrMsg = _('Could not test for existing transactions because'); @@ -96,14 +98,14 @@ } else { //PREVENT DELETES IF Company default accounts set up to this account $sql= "SELECT COUNT(*) FROM companies - WHERE debtorsact='" . $SelectedAccount ."' - OR pytdiscountact='" . $SelectedAccount ."' - OR creditorsact='" . $SelectedAccount ."' - OR payrollact='" . $SelectedAccount ."' - OR grnact='" . $SelectedAccount ."' - OR exchangediffact='" . $SelectedAccount ."' - OR purchasesexchangediffact='" . $SelectedAccount ."' - OR retainedearnings='" . $SelectedAccount ."'"; + WHERE debtorsact='" . $SelectedAccount ."' + OR pytdiscountact='" . $SelectedAccount ."' + OR creditorsact='" . $SelectedAccount ."' + OR payrollact='" . $SelectedAccount ."' + OR grnact='" . $SelectedAccount ."' + OR exchangediffact='" . $SelectedAccount ."' + OR purchasesexchangediffact='" . $SelectedAccount ."' + OR retainedearnings='" . $SelectedAccount ."'"; $ErrMsg = _('Could not test for default company GL codes because'); @@ -144,7 +146,9 @@ prnMsg( _('Cannot delete this account because it is used by one of the sales GL posting interface records'),'warn'); } else { //PREVENT DELETES IF COGS POSTINGS USE THE GL ACCOUNT - $sql= "SELECT COUNT(*) FROM cogsglpostings WHERE glcode='" . $SelectedAccount ."'"; + $sql= "SELECT COUNT(*) + FROM cogsglpostings + WHERE glcode='" . $SelectedAccount ."'"; $ErrMsg = _('Could not test for existing cost of sales interface codes because'); @@ -158,11 +162,11 @@ } else { //PREVENT DELETES IF STOCK POSTINGS USE THE GL ACCOUNT $sql= "SELECT COUNT(*) FROM stockcategory - WHERE stockact='" . $SelectedAccount ."' - OR adjglact='" . $SelectedAccount ."' - OR purchpricevaract='" . $SelectedAccount ."' - OR materialuseagevarac='" . $SelectedAccount ."' - OR wipact='" . $SelectedAccount ."'"; + WHERE stockact='" . $SelectedAccount ."' + OR adjglact='" . $SelectedAccount ."' + OR purchpricevaract='" . $SelectedAccount ."' + OR materialuseagevarac='" . $SelectedAccount ."' + OR wipact='" . $SelectedAccount ."'"; $Errmsg = _('Could not test for existing stock GL codes because'); Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/PDFQuotation.php 2011-07-09 08:22:59 UTC (rev 4629) @@ -186,10 +186,10 @@ $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); if (mb_strlen($myrow2['narrative'])>1){ $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$myrow2['narrative']); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$myrow2['narrative']); if (mb_strlen($LeftOvers) >1){ $YPos -= 11; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$LeftOvers); } } $QuotationTotal +=$LineTotal; @@ -209,35 +209,36 @@ include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up - $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); - $LeftOvers = $pdf->addText($XPos,$YPos-95,10,$myrow['comments']); - + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($TaxTotal,2),'right'); + $YPos -= 12; + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotalEx,2),'right'); + $YPos -= 12; + $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); + $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); + + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,20,10,_('Notes:')); + $LeftOvers = $pdf->addTextWrap($XPos+28,$YPos,800,10,$myrow['comments']); + if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,700,10,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); if (mb_strlen($LeftOvers)>1){ $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,10,$FontSize,$LeftOvers); + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,850,10,$LeftOvers); } } } } - $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($TaxTotal,2),'right'); - $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotalEx,2),'right'); - $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); - } /*end if there are line details to show on the quotation*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-08 10:43:09 UTC (rev 4628) +++ trunk/doc/Change.log 2011-07-09 08:22:59 UTC (rev 4629) @@ -1,6 +1,7 @@ webERP Change Log -8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts +9/7/11 Phil/Beth Lesko: Comments not wrapping correctly on quotations - fixed landscape quotation +8/7/11 Phil: Remove duplication of checking for illegal characters - use the same function in MiscFunctions.php ContainsIllegalCharacters in Currencies and the utility scripts Z_ChangeBranchCode.php and Z_ImportStockCodes.php 8/7/11 Phil: Change all strstr occurrences to use multi-byte function mb_strstr 8/7/11 Phil: Trap codes with decimal point "." in them in the IllegalCharacters function 8/7/11 Phil: Fix discount matrix calculations on order entry and amendment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-14 10:27:37
|
Revision: 4630 http://web-erp.svn.sourceforge.net/web-erp/?rev=4630&view=rev Author: daintree Date: 2011-07-14 10:27:29 +0000 (Thu, 14 Jul 2011) Log Message: ----------- consistency review Modified Paths: -------------- trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/GLTrialBalance_csv.php trunk/GetStockImage.php trunk/GoodsReceived.php trunk/Stocks.php trunk/includes/session.inc Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLAccountCSV.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -43,7 +43,7 @@ echo '</select></td>'; echo '<td>'._('For Period range').':</td> - <td><select Name=Period[] multiple>'; + <td><select name="Period[]" multiple>'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); $id=0; @@ -139,30 +139,30 @@ gltrans.periodno, gltrans.tag FROM gltrans, systypes - WHERE gltrans.account = '$SelectedAccount' + WHERE gltrans.account = '" . $SelectedAccount . "' AND systypes.typeid=gltrans.type AND posted=1 - AND periodno>='$FirstPeriodSelected' - AND periodno<='$LastPeriodSelected' + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' ORDER BY periodno, gltrans.trandate, counterindex"; } else { $sql= "SELECT gltrans.type, - gltrans.typename, - gltrans.typeno, - gltrans.trandate, - gltrans.narrative, - gltrans.amount, - gltrans.periodno, - gltrans.tag - FROM gltrans, systypes - WHERE gltrans.account = '$SelectedAccount' - AND systypes.typeid=gltrans.type - AND posted=1 - AND periodno>='$FirstPeriodSelected' - AND periodno<='$LastPeriodSelected' - AND tag='".$_POST['tag']."' - ORDER BY periodno, gltrans.trandate, counterindex"; + gltrans.typename, + gltrans.typeno, + gltrans.trandate, + gltrans.narrative, + gltrans.amount, + gltrans.periodno, + gltrans.tag + FROM gltrans, systypes + WHERE gltrans.account = '" . $SelectedAccount . "' + AND systypes.typeid=gltrans.type + AND posted=1 + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' + AND tag='".$_POST['tag']."' + ORDER BY periodno, gltrans.trandate, counterindex"; } $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; @@ -176,7 +176,7 @@ actual, period FROM chartdetails - WHERE chartdetails.accountcode= '$SelectedAccount' + WHERE chartdetails.accountcode= '" . $SelectedAccount . "' AND chartdetails.period='" . $FirstPeriodSelected . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); @@ -202,11 +202,11 @@ if ($PeriodNo!=-9999){ //ie its not the first time around /*Get the ChartDetails balance b/fwd and the actual movement in the account for the period as recorded in the chart details - need to ensure integrity of transactions to the chart detail movements. Also, for a balance sheet account it is the balance carried forward that is important, not just the transactions*/ $sql = "SELECT bfwd, - actual, - period - FROM chartdetails - WHERE chartdetails.accountcode= '$SelectedAccount' - AND chartdetails.period='" . $PeriodNo . "'"; + actual, + period + FROM chartdetails + WHERE chartdetails.accountcode= '" . $SelectedAccount . "' + AND chartdetails.period='" . $PeriodNo . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLAccountInquiry.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -1,9 +1,7 @@ <?php /* $Id$*/ -/* $Revision: 1.28 $ */ -//$PageSecurity = 8; include ('includes/session.inc'); $title = _('General Ledger Account Inquiry'); include('includes/header.inc'); Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLAccountReport.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -1,9 +1,6 @@ <?php +/* $Id: GLAccountReport.php 4618 2011-07-02 23:04:59Z daintree $*/ -/* $Id: $*/ -/* $Revision: 1.00 $ */ - -//$PageSecurity = 8; include ('includes/session.inc'); if (isset($_POST['Period'])){ @@ -39,10 +36,10 @@ foreach ($_POST['Account'] as $SelectedAccount){ /*Is the account a balance sheet or a profit and loss account */ $result = DB_query("SELECT chartmaster.accountname, - accountgroups.pandl - FROM accountgroups - INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ - WHERE chartmaster.accountcode=$SelectedAccount",$db); + accountgroups.pandl + FROM accountgroups + INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ + WHERE chartmaster.accountcode='" . $SelectedAccount . "'",$db); $AccountDetailRow = DB_fetch_row($result); $AccountName = $AccountDetailRow[0]; if ($AccountDetailRow[1]==1){ @@ -56,38 +53,42 @@ if ($_POST['tag']==0) { $sql= "SELECT type, - typename, - gltrans.typeno, - gltrans.trandate, - gltrans.narrative, - gltrans.amount, - gltrans.periodno, - gltrans.tag - FROM gltrans, systypes - WHERE gltrans.account = $SelectedAccount - AND systypes.typeid=gltrans.type - AND posted=1 - AND periodno>=$FirstPeriodSelected - AND periodno<=$LastPeriodSelected - ORDER BY periodno, gltrans.trandate, counterindex"; + typename, + gltrans.typeno, + gltrans.trandate, + gltrans.narrative, + gltrans.amount, + gltrans.periodno, + gltrans.tag + FROM gltrans INNER JOIN systypes + ON gltrans.type=systypes.typeid + WHERE gltrans.account = '" . $SelectedAccount . "' + AND posted=1 + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' + ORDER BY periodno, + gltrans.trandate, + counterindex"; } else { $sql= "SELECT gltrans.type, - gltrans.typename, - gltrans.typeno, - gltrans.trandate, - gltrans.narrative, - gltrans.amount, - gltrans.periodno, - gltrans.tag - FROM gltrans, systypes - WHERE gltrans.account = $SelectedAccount - AND systypes.typeid=gltrans.type - AND posted=1 - AND periodno>=$FirstPeriodSelected - AND periodno<=$LastPeriodSelected - AND tag='".$_POST['tag']."' - ORDER BY periodno, gltrans.trandate, counterindex"; + gltrans.typename, + gltrans.typeno, + gltrans.trandate, + gltrans.narrative, + gltrans.amount, + gltrans.periodno, + gltrans.tag + FROM gltrans INNER JOIN systypes + ON gltrans.type=systypes.typeid + WHERE gltrans.account = '" . $SelectedAccount . "' + AND posted=1 + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' + AND tag='" . $_POST['tag'] . "' + ORDER BY periodno, + gltrans.trandate, + counterindex"; } $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; @@ -105,11 +106,11 @@ $RunningTotal = 0; } else { $sql = "SELECT bfwd, - actual, - period - FROM chartdetails - WHERE chartdetails.accountcode='" . $SelectedAccount . - "' AND chartdetails.period='" . $FirstPeriodSelected . "'"; + actual, + period + FROM chartdetails + WHERE chartdetails.accountcode='" . $SelectedAccount . "' + AND chartdetails.period='" . $FirstPeriodSelected . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); @@ -137,11 +138,11 @@ if ($PeriodNo!=-9999){ //ie its not the first time around /*Get the ChartDetails balance b/fwd and the actual movement in the account for the period as recorded in the chart details - need to ensure integrity of transactions to the chart detail movements. Also, for a balance sheet account it is the balance carried forward that is important, not just the transactions*/ $sql = "SELECT bfwd, - actual, - period - FROM chartdetails - WHERE chartdetails.accountcode='" . $SelectedAccount . - "' AND chartdetails.period='" . $PeriodNo . "'"; + actual, + period + FROM chartdetails + WHERE chartdetails.accountcode='" . $SelectedAccount . "' + AND chartdetails.period='" . $PeriodNo . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); @@ -149,9 +150,9 @@ $YPos -=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Period Total')); if ($PeriodTotal < 0 ){ //its a credit balance b/fwd - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$PeriodTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } else { //its a debit balance b/fwd - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($PeriodTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } } $PeriodNo = $myrow['periodno']; @@ -162,10 +163,10 @@ $PeriodTotal += $myrow['amount']; if($myrow['amount']>=0){ - $DebitAmount = number_format($myrow['amount'],2); + $DebitAmount = number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); $CreditAmount = ''; } elseif ($myrow['amount']<0){ - $CreditAmount = number_format(-$myrow['amount'],2); + $CreditAmount = number_format(-$myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); $DebitAmount = ''; } @@ -201,9 +202,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Balance C/Fwd')); } if ($RunningTotal < 0){ - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$RunningTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } else { //its a debit balance b/fwd - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($RunningTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } $YPos -=$line_height; //draw a line under each account printed @@ -218,28 +219,6 @@ } else { //print the report - /* - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); - - if ($len<=20){ - $title = _('Print GL Accounts Report Error'); - include('includes/header.inc'); - prnMsg (_('There were no accounts to print out'),'error'); - echo "<br /><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=GL_Accounts_' . date('Y-m-d') . '.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('GL_Accounts_' . date('Y-m-d') . '.pdf', 'I'); - } - */ $pdf->OutputD($_SESSION['DatabaseName'] . '_GL_Accounts_' . date('Y-m-d') . '.pdf'); $pdf->__destruct(); } //end if the report has some output @@ -253,7 +232,7 @@ echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; - echo "<form method='POST' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*Dates in SQL format for the last day of last month*/ @@ -269,10 +248,10 @@ $i=0; while ($myrow=DB_fetch_array($AccountsResult,$db)){ if(isset($_POST['Account'][$i]) AND $myrow['accountcode'] == $_POST['Account'][$i]){ - echo '<option selected VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; $i++; } else { - echo '<option VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; } } echo '</select></td>'; @@ -285,29 +264,31 @@ while ($myrow=DB_fetch_array($Periods,$db)){ if (isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option selected value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; $id++; } else { - echo '<option VALUE=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; } } echo '</select></td></tr>'; //Select the tag - echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; + echo '<tr> + <td>' . _('Select Tag') . ':</td> + <td><select name="tag">'; $SQL = "SELECT tagref, - tagdescription - FROM tags - ORDER BY tagref"; + tagdescription + FROM tags + ORDER BY tagref"; $result=DB_query($SQL,$db); - echo '<option value=0>0 - '._('All tags'); + echo '<option value=0>0 - '._('All tags') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ - echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -315,7 +296,7 @@ echo '</table><p> <div class="centre"> - <input type=submit name="RunReport" VALUE="' ._('Run Report'). '"></div> + <input type=submit name="RunReport" value="' ._('Run Report'). '"></div> </form>'; include ('includes/footer.inc'); @@ -323,7 +304,6 @@ } - function NewPageHeader () { global $PageNumber, $pdf, Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLProfit_Loss.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -21,7 +21,7 @@ . _('The purpose of the income statement is to show whether the company made or lost money during the period being reported.') . '<br />' . _('The P&L represents a period of time. This contrasts with the Balance Sheet, which represents a single moment in time.') . '<br />' . _('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="' . $_SERVER['PHP_SELF'] . '">'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (Date('m') > $_SESSION['YearEnd']){ @@ -39,22 +39,25 @@ <tr><td>' . _('Select Period From') . ':</td> <td><select Name="FromPeriod">'; - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC'; + $sql = "SELECT periodno, + lastdate_in_period + FROM periods + ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!=''){ if( $_POST['FromPeriod']== $myrow['periodno']){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option selected value=' . $myrow['periodno'] . '>' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } else { if($myrow['lastdate_in_period']==$DefaultFromDate){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option selected value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } } @@ -71,29 +74,34 @@ $DefaultToPeriod = $_POST['ToPeriod']; } - echo '<tr><td>' . _('Select Period To') . ':</td><td><select Name="ToPeriod">'; + echo '<tr> + <td>' . _('Select Period To') . ':</td> + <td><select Name="ToPeriod">'; $RetResult = DB_data_seek($Periods,0); while ($myrow=DB_fetch_array($Periods,$db)){ if($myrow['periodno']==$DefaultToPeriod){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option selected value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; - echo '<tr><td>'._('Detail Or Summary').":</td><td><select Name='Detail'>"; - echo '<option selected VALUE="Summary">'._('Summary') . '</option>'; - echo '<option selected VALUE="Detailed">'._('All Accounts') . '</option>'; - echo '</select></td></tr>'; + echo '<tr><td>'._('Detail Or Summary').':</td> + <td><select name="Detail"> + <option selected value="Summary">'._('Summary') . '</option> + <option selected value="Detailed">'._('All Accounts') . '</option> + </select> + </td> + </tr>'; echo '</table>'; - echo "<br /><div class='centre'><input type=submit Name='ShowPL' Value='"._('Show on Screen (HTML)')."'></div>"; - echo "<br /><div class='centre'><input type=submit Name='PrintPDF' Value='"._('Produce PDF Report')."'></div>"; + echo '<br /><div class="centre"><input type="submit" name="ShowPL" value="' ._('Show on Screen (HTML)') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="PrintPDF" value="'._('Produce PDF Report').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ @@ -126,30 +134,30 @@ $SQL = "SELECT accountgroups.sectioninaccounts, - accountgroups.groupname, - accountgroups.parentgroupname, - chartdetails.accountcode , - chartmaster.accountname, - Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwd, - Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwdbudget ELSE 0 END) AS firstprdbudgetbfwd, - Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, - Sum(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS lyfirstprdbfwd, - Sum(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lylastprdcfwd, - Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode - WHERE accountgroups.pandl=1 - GROUP BY accountgroups.sectioninaccounts, - accountgroups.groupname, - accountgroups.parentgroupname, - chartdetails.accountcode, - chartmaster.accountname, - accountgroups.sequenceintb - ORDER BY accountgroups.sectioninaccounts, - accountgroups.sequenceintb, - accountgroups.groupname, - chartdetails.accountcode"; + accountgroups.groupname, + accountgroups.parentgroupname, + chartdetails.accountcode , + chartmaster.accountname, + Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwd, + Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwdbudget ELSE 0 END) AS firstprdbudgetbfwd, + Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, + Sum(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS lyfirstprdbfwd, + Sum(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lylastprdcfwd, + Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails + ON chartmaster.accountcode= chartdetails.accountcode + WHERE accountgroups.pandl=1 + GROUP BY accountgroups.sectioninaccounts, + accountgroups.groupname, + accountgroups.parentgroupname, + chartdetails.accountcode, + chartmaster.accountname, + accountgroups.sequenceintb + ORDER BY accountgroups.sectioninaccounts, + accountgroups.sequenceintb, + accountgroups.groupname, + chartdetails.accountcode"; $AccountsResult = DB_query($SQL,$db); @@ -157,7 +165,7 @@ $title = _('Profit and Loss') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; if ($debug == 1){ echo '<br />'. $SQL; } @@ -167,9 +175,9 @@ if (DB_num_rows($AccountsResult)==0){ $title = _('Print Profit and Loss Error'); include('includes/header.inc'); - echo '<p>'; + echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified'),'warn' ); - echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -213,15 +221,15 @@ } if ($Section == 1){ /*Income */ $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } else { /*Costs */ $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } $GrpPrdLY[$Level] = 0; @@ -241,15 +249,15 @@ $ActGrpLabel = $ParentGroups[$Level]; } if ($Section == 1){ /*Income */ - $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } else { /*Costs */ $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } $GrpPrdLY[$Level] = 0; @@ -274,9 +282,9 @@ if ($Section == 1) { /*Income*/ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$Section]); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$SectionPrdActual),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$SectionPrdBudget),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$SectionPrdLY),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$SectionPrdBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$SectionPrdLY,$_SESSION['CompanyRecord']['decimalplaces']),'r... [truncated message content] |
From: <dai...@us...> - 2011-07-14 10:27:37
|
Revision: 4630 http://web-erp.svn.sourceforge.net/web-erp/?rev=4630&view=rev Author: daintree Date: 2011-07-14 10:27:29 +0000 (Thu, 14 Jul 2011) Log Message: ----------- consistency review Modified Paths: -------------- trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/GLTrialBalance_csv.php trunk/GetStockImage.php trunk/GoodsReceived.php trunk/Stocks.php trunk/includes/session.inc Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLAccountCSV.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -43,7 +43,7 @@ echo '</select></td>'; echo '<td>'._('For Period range').':</td> - <td><select Name=Period[] multiple>'; + <td><select name="Period[]" multiple>'; $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); $id=0; @@ -139,30 +139,30 @@ gltrans.periodno, gltrans.tag FROM gltrans, systypes - WHERE gltrans.account = '$SelectedAccount' + WHERE gltrans.account = '" . $SelectedAccount . "' AND systypes.typeid=gltrans.type AND posted=1 - AND periodno>='$FirstPeriodSelected' - AND periodno<='$LastPeriodSelected' + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' ORDER BY periodno, gltrans.trandate, counterindex"; } else { $sql= "SELECT gltrans.type, - gltrans.typename, - gltrans.typeno, - gltrans.trandate, - gltrans.narrative, - gltrans.amount, - gltrans.periodno, - gltrans.tag - FROM gltrans, systypes - WHERE gltrans.account = '$SelectedAccount' - AND systypes.typeid=gltrans.type - AND posted=1 - AND periodno>='$FirstPeriodSelected' - AND periodno<='$LastPeriodSelected' - AND tag='".$_POST['tag']."' - ORDER BY periodno, gltrans.trandate, counterindex"; + gltrans.typename, + gltrans.typeno, + gltrans.trandate, + gltrans.narrative, + gltrans.amount, + gltrans.periodno, + gltrans.tag + FROM gltrans, systypes + WHERE gltrans.account = '" . $SelectedAccount . "' + AND systypes.typeid=gltrans.type + AND posted=1 + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' + AND tag='".$_POST['tag']."' + ORDER BY periodno, gltrans.trandate, counterindex"; } $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; @@ -176,7 +176,7 @@ actual, period FROM chartdetails - WHERE chartdetails.accountcode= '$SelectedAccount' + WHERE chartdetails.accountcode= '" . $SelectedAccount . "' AND chartdetails.period='" . $FirstPeriodSelected . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); @@ -202,11 +202,11 @@ if ($PeriodNo!=-9999){ //ie its not the first time around /*Get the ChartDetails balance b/fwd and the actual movement in the account for the period as recorded in the chart details - need to ensure integrity of transactions to the chart detail movements. Also, for a balance sheet account it is the balance carried forward that is important, not just the transactions*/ $sql = "SELECT bfwd, - actual, - period - FROM chartdetails - WHERE chartdetails.accountcode= '$SelectedAccount' - AND chartdetails.period='" . $PeriodNo . "'"; + actual, + period + FROM chartdetails + WHERE chartdetails.accountcode= '" . $SelectedAccount . "' + AND chartdetails.period='" . $PeriodNo . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLAccountInquiry.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -1,9 +1,7 @@ <?php /* $Id$*/ -/* $Revision: 1.28 $ */ -//$PageSecurity = 8; include ('includes/session.inc'); $title = _('General Ledger Account Inquiry'); include('includes/header.inc'); Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLAccountReport.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -1,9 +1,6 @@ <?php +/* $Id: GLAccountReport.php 4618 2011-07-02 23:04:59Z daintree $*/ -/* $Id: $*/ -/* $Revision: 1.00 $ */ - -//$PageSecurity = 8; include ('includes/session.inc'); if (isset($_POST['Period'])){ @@ -39,10 +36,10 @@ foreach ($_POST['Account'] as $SelectedAccount){ /*Is the account a balance sheet or a profit and loss account */ $result = DB_query("SELECT chartmaster.accountname, - accountgroups.pandl - FROM accountgroups - INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ - WHERE chartmaster.accountcode=$SelectedAccount",$db); + accountgroups.pandl + FROM accountgroups + INNER JOIN chartmaster ON accountgroups.groupname=chartmaster.group_ + WHERE chartmaster.accountcode='" . $SelectedAccount . "'",$db); $AccountDetailRow = DB_fetch_row($result); $AccountName = $AccountDetailRow[0]; if ($AccountDetailRow[1]==1){ @@ -56,38 +53,42 @@ if ($_POST['tag']==0) { $sql= "SELECT type, - typename, - gltrans.typeno, - gltrans.trandate, - gltrans.narrative, - gltrans.amount, - gltrans.periodno, - gltrans.tag - FROM gltrans, systypes - WHERE gltrans.account = $SelectedAccount - AND systypes.typeid=gltrans.type - AND posted=1 - AND periodno>=$FirstPeriodSelected - AND periodno<=$LastPeriodSelected - ORDER BY periodno, gltrans.trandate, counterindex"; + typename, + gltrans.typeno, + gltrans.trandate, + gltrans.narrative, + gltrans.amount, + gltrans.periodno, + gltrans.tag + FROM gltrans INNER JOIN systypes + ON gltrans.type=systypes.typeid + WHERE gltrans.account = '" . $SelectedAccount . "' + AND posted=1 + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' + ORDER BY periodno, + gltrans.trandate, + counterindex"; } else { $sql= "SELECT gltrans.type, - gltrans.typename, - gltrans.typeno, - gltrans.trandate, - gltrans.narrative, - gltrans.amount, - gltrans.periodno, - gltrans.tag - FROM gltrans, systypes - WHERE gltrans.account = $SelectedAccount - AND systypes.typeid=gltrans.type - AND posted=1 - AND periodno>=$FirstPeriodSelected - AND periodno<=$LastPeriodSelected - AND tag='".$_POST['tag']."' - ORDER BY periodno, gltrans.trandate, counterindex"; + gltrans.typename, + gltrans.typeno, + gltrans.trandate, + gltrans.narrative, + gltrans.amount, + gltrans.periodno, + gltrans.tag + FROM gltrans INNER JOIN systypes + ON gltrans.type=systypes.typeid + WHERE gltrans.account = '" . $SelectedAccount . "' + AND posted=1 + AND periodno>='" . $FirstPeriodSelected . "' + AND periodno<='" . $LastPeriodSelected . "' + AND tag='" . $_POST['tag'] . "' + ORDER BY periodno, + gltrans.trandate, + counterindex"; } $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; @@ -105,11 +106,11 @@ $RunningTotal = 0; } else { $sql = "SELECT bfwd, - actual, - period - FROM chartdetails - WHERE chartdetails.accountcode='" . $SelectedAccount . - "' AND chartdetails.period='" . $FirstPeriodSelected . "'"; + actual, + period + FROM chartdetails + WHERE chartdetails.accountcode='" . $SelectedAccount . "' + AND chartdetails.period='" . $FirstPeriodSelected . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); @@ -137,11 +138,11 @@ if ($PeriodNo!=-9999){ //ie its not the first time around /*Get the ChartDetails balance b/fwd and the actual movement in the account for the period as recorded in the chart details - need to ensure integrity of transactions to the chart detail movements. Also, for a balance sheet account it is the balance carried forward that is important, not just the transactions*/ $sql = "SELECT bfwd, - actual, - period - FROM chartdetails - WHERE chartdetails.accountcode='" . $SelectedAccount . - "' AND chartdetails.period='" . $PeriodNo . "'"; + actual, + period + FROM chartdetails + WHERE chartdetails.accountcode='" . $SelectedAccount . "' + AND chartdetails.period='" . $PeriodNo . "'"; $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); @@ -149,9 +150,9 @@ $YPos -=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Period Total')); if ($PeriodTotal < 0 ){ //its a credit balance b/fwd - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$PeriodTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } else { //its a debit balance b/fwd - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($PeriodTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } } $PeriodNo = $myrow['periodno']; @@ -162,10 +163,10 @@ $PeriodTotal += $myrow['amount']; if($myrow['amount']>=0){ - $DebitAmount = number_format($myrow['amount'],2); + $DebitAmount = number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); $CreditAmount = ''; } elseif ($myrow['amount']<0){ - $CreditAmount = number_format(-$myrow['amount'],2); + $CreditAmount = number_format(-$myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']); $DebitAmount = ''; } @@ -201,9 +202,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Balance C/Fwd')); } if ($RunningTotal < 0){ - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$RunningTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } else { //its a debit balance b/fwd - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($RunningTotal,2) , 'right'); + $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right'); } $YPos -=$line_height; //draw a line under each account printed @@ -218,28 +219,6 @@ } else { //print the report - /* - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); - - if ($len<=20){ - $title = _('Print GL Accounts Report Error'); - include('includes/header.inc'); - prnMsg (_('There were no accounts to print out'),'error'); - echo "<br /><a href='$rootpath/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; - include('includes/footer.inc'); - exit; - } else { - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=GL_Accounts_' . date('Y-m-d') . '.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Output('GL_Accounts_' . date('Y-m-d') . '.pdf', 'I'); - } - */ $pdf->OutputD($_SESSION['DatabaseName'] . '_GL_Accounts_' . date('Y-m-d') . '.pdf'); $pdf->__destruct(); } //end if the report has some output @@ -253,7 +232,7 @@ echo '<div class="page_help_text">' . _('Use the keyboard Shift key to select multiple accounts and periods') . '</div><br />'; - echo "<form method='POST' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*Dates in SQL format for the last day of last month*/ @@ -269,10 +248,10 @@ $i=0; while ($myrow=DB_fetch_array($AccountsResult,$db)){ if(isset($_POST['Account'][$i]) AND $myrow['accountcode'] == $_POST['Account'][$i]){ - echo '<option selected VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; $i++; } else { - echo '<option VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' ' . $myrow['accountname']; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' ' . $myrow['accountname'] . '</option>'; } } echo '</select></td>'; @@ -285,29 +264,31 @@ while ($myrow=DB_fetch_array($Periods,$db)){ if (isset($SelectedPeriod[$id]) and $myrow['periodno'] == $SelectedPeriod[$id]){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option selected value="' . $myrow['periodno'] . '">' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; $id++; } else { - echo '<option VALUE=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])); + echo '<option value=' . $myrow['periodno'] . '>' . _(MonthAndYearFromSQLDate($myrow['lastdate_in_period'])) . '</option>'; } } echo '</select></td></tr>'; //Select the tag - echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; + echo '<tr> + <td>' . _('Select Tag') . ':</td> + <td><select name="tag">'; $SQL = "SELECT tagref, - tagdescription - FROM tags - ORDER BY tagref"; + tagdescription + FROM tags + ORDER BY tagref"; $result=DB_query($SQL,$db); - echo '<option value=0>0 - '._('All tags'); + echo '<option value=0>0 - '._('All tags') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow['tagref']){ - echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -315,7 +296,7 @@ echo '</table><p> <div class="centre"> - <input type=submit name="RunReport" VALUE="' ._('Run Report'). '"></div> + <input type=submit name="RunReport" value="' ._('Run Report'). '"></div> </form>'; include ('includes/footer.inc'); @@ -323,7 +304,6 @@ } - function NewPageHeader () { global $PageNumber, $pdf, Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2011-07-09 08:22:59 UTC (rev 4629) +++ trunk/GLProfit_Loss.php 2011-07-14 10:27:29 UTC (rev 4630) @@ -21,7 +21,7 @@ . _('The purpose of the income statement is to show whether the company made or lost money during the period being reported.') . '<br />' . _('The P&L represents a period of time. This contrasts with the Balance Sheet, which represents a single moment in time.') . '<br />' . _('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="' . $_SERVER['PHP_SELF'] . '">'; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (Date('m') > $_SESSION['YearEnd']){ @@ -39,22 +39,25 @@ <tr><td>' . _('Select Period From') . ':</td> <td><select Name="FromPeriod">'; - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno DESC'; + $sql = "SELECT periodno, + lastdate_in_period + FROM periods + ORDER BY periodno DESC"; $Periods = DB_query($sql,$db); while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!=''){ if( $_POST['FromPeriod']== $myrow['periodno']){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option selected value=' . $myrow['periodno'] . '>' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } else { if($myrow['lastdate_in_period']==$DefaultFromDate){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option selected value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } } @@ -71,29 +74,34 @@ $DefaultToPeriod = $_POST['ToPeriod']; } - echo '<tr><td>' . _('Select Period To') . ':</td><td><select Name="ToPeriod">'; + echo '<tr> + <td>' . _('Select Period To') . ':</td> + <td><select Name="ToPeriod">'; $RetResult = DB_data_seek($Periods,0); while ($myrow=DB_fetch_array($Periods,$db)){ if($myrow['periodno']==$DefaultToPeriod){ - echo '<option selected VALUE=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option selected value=' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; + echo '<option value =' . $myrow['periodno'] . '>' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; - echo '<tr><td>'._('Detail Or Summary').":</td><td><select Name='Detail'>"; - echo '<option selected VALUE="Summary">'._('Summary') . '</option>'; - echo '<option selected VALUE="Detailed">'._('All Accounts') . '</option>'; - echo '</select></td></tr>'; + echo '<tr><td>'._('Detail Or Summary').':</td> + <td><select name="Detail"> + <option selected value="Summary">'._('Summary') . '</option> + <option selected value="Detailed">'._('All Accounts') . '</option> + </select> + </td> + </tr>'; echo '</table>'; - echo "<br /><div class='centre'><input type=submit Name='ShowPL' Value='"._('Show on Screen (HTML)')."'></div>"; - echo "<br /><div class='centre'><input type=submit Name='PrintPDF' Value='"._('Produce PDF Report')."'></div>"; + echo '<br /><div class="centre"><input type="submit" name="ShowPL" value="' ._('Show on Screen (HTML)') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="PrintPDF" value="'._('Produce PDF Report').'"></div>'; /*Now do the posting while the user is thinking about the period to select */ @@ -126,30 +134,30 @@ $SQL = "SELECT accountgroups.sectioninaccounts, - accountgroups.groupname, - accountgroups.parentgroupname, - chartdetails.accountcode , - chartmaster.accountname, - Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwd, - Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwdbudget ELSE 0 END) AS firstprdbudgetbfwd, - Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, - Sum(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS lyfirstprdbfwd, - Sum(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lylastprdcfwd, - Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode - WHERE accountgroups.pandl=1 - GROUP BY accountgroups.sectioninaccounts, - accountgroups.groupname, - accountgroups.parentgroupname, - chartdetails.accountcode, - chartmaster.accountname, - accountgroups.sequenceintb - ORDER BY accountgroups.sectioninaccounts, - accountgroups.sequenceintb, - accountgroups.groupname, - chartdetails.accountcode"; + accountgroups.groupname, + accountgroups.parentgroupname, + chartdetails.accountcode , + chartmaster.accountname, + Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwd, + Sum(CASE WHEN chartdetails.period='" . $_POST['FromPeriod'] . "' THEN chartdetails.bfwdbudget ELSE 0 END) AS firstprdbudgetbfwd, + Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, + Sum(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS lyfirstprdbfwd, + Sum(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lylastprdcfwd, + Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails + ON chartmaster.accountcode= chartdetails.accountcode + WHERE accountgroups.pandl=1 + GROUP BY accountgroups.sectioninaccounts, + accountgroups.groupname, + accountgroups.parentgroupname, + chartdetails.accountcode, + chartmaster.accountname, + accountgroups.sequenceintb + ORDER BY accountgroups.sectioninaccounts, + accountgroups.sequenceintb, + accountgroups.groupname, + chartdetails.accountcode"; $AccountsResult = DB_query($SQL,$db); @@ -157,7 +165,7 @@ $title = _('Profit and Loss') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) ); - echo '<br /><a href="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; if ($debug == 1){ echo '<br />'. $SQL; } @@ -167,9 +175,9 @@ if (DB_num_rows($AccountsResult)==0){ $title = _('Print Profit and Loss Error'); include('includes/header.inc'); - echo '<p>'; + echo '<br />'; prnMsg( _('There were no entries to print out for the selections specified'),'warn' ); - echo '<br /><a href="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</a>'; + echo '<br /><a href="'. $rootpath.'/index.php">'. _('Back to the menu'). '</a>'; include('includes/footer.inc'); exit; } @@ -213,15 +221,15 @@ } if ($Section == 1){ /*Income */ $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } else { /*Costs */ $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } $GrpPrdLY[$Level] = 0; @@ -241,15 +249,15 @@ $ActGrpLabel = $ParentGroups[$Level]; } if ($Section == 1){ /*Income */ - $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } else { /*Costs */ $LeftOvers = $pdf->addTextWrap($Left_Margin +($Level*10),$YPos,200 -($Level*10),$FontSize,$ActGrpLabel); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level]),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level]),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format($GrpPrdActual[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format($GrpPrdBudget[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format($GrpPrdLY[$Level],$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); } $GrpPrdLY[$Level] = 0; @@ -274,9 +282,9 @@ if ($Section == 1) { /*Income*/ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$Section]); - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$SectionPrdActual),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$SectionPrdBudget),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$SectionPrdLY),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,number_format(-$SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,number_format(-$SectionPrdBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,number_format(-$SectionPrdLY,$_SESSION['CompanyRecord']['decimalplaces']),'r... [truncated message content] |