|
From: <dai...@us...> - 2011-03-18 05:45:28
|
Revision: 4512
http://web-erp.svn.sourceforge.net/web-erp/?rev=4512&view=rev
Author: daintree
Date: 2011-03-18 05:45:21 +0000 (Fri, 18 Mar 2011)
Log Message:
-----------
Marcos Change Supplier code
Modified Paths:
--------------
trunk/CustomerBranches.php
trunk/Customers.php
trunk/DailyBankTransactions.php
trunk/Stocks.php
trunk/UserSettings.php
trunk/Z_index.php
trunk/doc/Change.log.html
trunk/includes/ConnectDB.inc
trunk/sql/mysql/upgrade3.11.1-4.00.sql
Modified: trunk/CustomerBranches.php
===================================================================
--- trunk/CustomerBranches.php 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/CustomerBranches.php 2011-03-18 05:45:21 UTC (rev 4512)
@@ -52,7 +52,7 @@
$_POST['BranchCode'] = strtoupper($_POST['BranchCode']);
- if (strstr($_POST['BranchCode'],"'") OR strstr($_POST['BranchCode'],'"') OR strstr($_POST['BranchCode'],'&')) {
+ if (ContainsIllegalCharacters($_POST['BranchCode']) OR strstr($_POST['BranchCode'],' ')) {
$InputError = 1;
prnMsg(_('The Branch code cannot contain any of the following characters')." - & \'",'error');
$Errors[$i] = 'BranchCode';
Modified: trunk/Customers.php
===================================================================
--- trunk/Customers.php 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/Customers.php 2011-03-18 05:45:21 UTC (rev 4512)
@@ -41,7 +41,7 @@
prnMsg( _('The customer number already exists in the database'),'error');
$Errors[$i] = 'DebtorNo';
$i++;
- } elseif (strlen($_POST['CustName']) > 40 OR strlen($_POST['CustName'])==0) {
+ }elseif (strlen($_POST['CustName']) > 40 OR strlen($_POST['CustName'])==0) {
$InputError = 1;
prnMsg( _('The customer name must be entered and be forty characters or less long'),'error');
$Errors[$i] = 'CustName';
@@ -51,7 +51,7 @@
prnMsg( _('The debtor code cannot be empty'),'error');
$Errors[$i] = 'DebtorNo';
$i++;
- } elseif ($_SESSION['AutoDebtorNo']==0 AND ContainsIllegalCharacters($_POST['DebtorNo'])) {
+ } elseif ($_SESSION['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR 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/DailyBankTransactions.php
===================================================================
--- trunk/DailyBankTransactions.php 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/DailyBankTransactions.php 2011-03-18 05:45:21 UTC (rev 4512)
@@ -82,7 +82,8 @@
ON banktrans.type=systypes.typeid
WHERE bankact='".$_POST['BankAccount']."'
AND transdate>='" . FormatDateForSQL($_POST['FromTransDate']) . "'
- AND transdate<='" . FormatDateForSQL($_POST['ToTransDate']) . "'";
+ AND transdate<='" . FormatDateForSQL($_POST['ToTransDate']) . "'
+ ORDER BY banktrans.transdate";
$result = DB_query($sql, $db);
if (DB_num_rows($result)==0) {
prnMsg(_('There are no transactions for this account in the date range selected'), 'info');
Modified: trunk/Stocks.php
===================================================================
--- trunk/Stocks.php 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/Stocks.php 2011-03-18 05:45:21 UTC (rev 4512)
@@ -100,7 +100,7 @@
$Errors[$i] = 'StockID';
$i++;
}
- if (ContainsIllegalCharacters($StockID)) {
+ if (ContainsIllegalCharacters($StockID) OR strstr($StockID,' ')) {
$InputError = 1;
prnMsg(_('The stock item code cannot contain any of the following characters') . " - ' & + \" \\ " . _('or a space'),'error');
$Errors[$i] = 'StockID';
Modified: trunk/UserSettings.php
===================================================================
--- trunk/UserSettings.php 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/UserSettings.php 2011-03-18 05:45:21 UTC (rev 4512)
@@ -10,8 +10,8 @@
_('User Settings') . '" alt="" />' . ' ' . _('User Settings') . '</p>';
$PDFLanguages = array(_('Latin Western Languages'),
- _('Eastern European Russian Japanese Korean Hebrew Arabic Thai'),
- _('Chinese'));
+ _('Eastern European Russian Japanese Korean Hebrew Arabic Thai'),
+ _('Chinese'));
if (isset($_POST['Modify'])) {
Modified: trunk/Z_index.php
===================================================================
--- trunk/Z_index.php 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/Z_index.php 2011-03-18 05:45:21 UTC (rev 4512)
@@ -13,6 +13,7 @@
echo "<p><a href='$rootpath/Z_ChangeCustomerCode.php?" . SID . "'>". _('Change A Customer Code') . '</a>';
echo "<p><a href='$rootpath/Z_ChangeBranchCode.php?" . SID . "'>" . _('Change A Customer Branch Code') . '</a>';
echo "<p><a href='$rootpath/Z_ChangeStockCode.php?" . SID . "'>" . _('Change An Inventory Item Code') . '</a>';
+ echo "<p><a href='$rootpath/Z_ChangeSupplierCode.php?" . SID . "'>" . _('Change A Supplier Code') . '</a>';
echo "<p><a href='$rootpath/Z_PriceChanges.php?" . SID . "'>" . _('Bulk Change Customer Pricing') . '</a>';
echo "<p><a href='$rootpath/Z_BottomUpCosts.php?" . SID . "'>" . _('Update costs for all BOM items, from the bottom up') . '</a>';
Modified: trunk/doc/Change.log.html
===================================================================
--- trunk/doc/Change.log.html 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/doc/Change.log.html 2011-03-18 05:45:21 UTC (rev 4512)
@@ -1,5 +1,8 @@
<p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p>
<p>
+<p>18/3/11: Marcos Garcia Trejo Added Z_ChangeSupplierCode.php
+<p>18/3/11: Ricard add orderby transdate to DailyBankTransactions.php
+<p>18/3/11: Phil check for Customers.php CustomerBranches.php and Stocks.php now traps codes containing spaces - as well as other illegal characters</p>
<p>15/3/11: Phil PricesByCost.php - made it update prices where there is already a price starting on today's date</p>
<p>15/3/11: Phil SelectOrderItems.php customer selection now done using a hidden $_POST rather than parsing debtorno hyphen branchcode.</p>
<p>15/3/11: Phil Locations.php new field for CounterSales branch code - instead of parsing it from a single field with a hyphen in it. CounterSales.php now uses the new field for customer branch</p>
Modified: trunk/includes/ConnectDB.inc
===================================================================
--- trunk/includes/ConnectDB.inc 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/includes/ConnectDB.inc 2011-03-18 05:45:21 UTC (rev 4512)
@@ -4,7 +4,7 @@
* this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run
* if VersionNumber is < $Version then the DB update script is run */
-$Version='4.03.2'; //must update manually every time there is a DB change
+$Version='4.03.4'; //must update manually every time there is a DB change
require_once ($PathPrefix .'includes/MiscFunctions.php');
Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql
===================================================================
--- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-03-15 09:33:07 UTC (rev 4511)
+++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-03-18 05:45:21 UTC (rev 4512)
@@ -833,4 +833,6 @@
UPDATE config SET confvalue='4.03.2' WHERE confname='VersionNumber';
ALTER TABLE locations ADD cashsalebranch varchar(10) DEFAULT '';
ALTER TABLE `locations` CHANGE `cashsalecustomer` `cashsalecustomer` VARCHAR( 10 ) DEFAULT '';
-UPDATE config SET confvalue='4.03.3' WHERE confname='VersionNumber';
\ No newline at end of file
+UPDATE config SET confvalue='4.03.3' WHERE confname='VersionNumber';
+INSERT INTO `weberpdemo`.`scripts` (`script`, `pagesecurity`, `description`) VALUES ('Z_ChangeSupplierCode.php', '15', 'Script to change a supplier code accross all tables necessary');
+UPDATE config SET confvalue='4.03.4' WHERE confname='VersionNumber';
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|