From: <dai...@us...> - 2013-09-04 08:08:05
|
Revision: 6324 http://sourceforge.net/p/web-erp/reponame/6324 Author: daintree Date: 2013-09-04 08:08:02 +0000 (Wed, 04 Sep 2013) Log Message: ----------- change name coa to country_sql Modified Paths: -------------- trunk/Z_MakeNewCompany.php trunk/build/make_release.sh trunk/doc/INSTALL.txt trunk/install/index.php trunk/javascripts/MiscFunctions.js Added Paths: ----------- trunk/sql/mysql/country_sql/ Removed Paths: ------------- trunk/sql/mysql/coa/ Property Changed: ---------------- trunk/ Index: trunk =================================================================== --- trunk 2013-09-04 01:46:43 UTC (rev 6323) +++ trunk 2013-09-04 08:08:02 UTC (rev 6324) Property changes on: trunk ___________________________________________________________________ Modified: svn:externals ## -1 +1 ## -xmlrpc https://phpxmlrpc.svn.sourceforge.net/svnroot/phpxmlrpc/trunk/xmlrpc +xmlrpc http://svn.code.sf.net/p/phpxmlrpc/code/trunk/xmlrpc Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2013-09-04 01:46:43 UTC (rev 6323) +++ trunk/Z_MakeNewCompany.php 2013-09-04 08:08:02 UTC (rev 6324) @@ -81,14 +81,14 @@ } } $db = pg_connect( $PgConnStr ); - $SQLScriptFile = file('./sql/pg/coa/weberp-new.psql'); + $SQLScriptFile = file('./sql/pg/country_sql/weberp-new.psql'); } elseif ($DBType =='mysql') { //its a mysql db < 4.1 mysql_select_db($_POST['NewDatabase'],$db); - $SQLScriptFile = file('./sql/mysql/coa/weberp-new.sql'); + $SQLScriptFile = file('./sql/mysql/country_sql/default.sql'); } elseif ($DBType =='mysqli') { //its a mysql db using the >4.1 library functions mysqli_select_db($db,$_POST['NewDatabase']); - $SQLScriptFile = file('./sql/mysql/coa/weberp-new.sql'); + $SQLScriptFile = file('./sql/mysql/country_sql/default.sql'); } $ScriptFileEntries = sizeof($SQLScriptFile); Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2013-09-04 01:46:43 UTC (rev 6323) +++ trunk/build/make_release.sh 2013-09-04 08:08:02 UTC (rev 6324) @@ -75,9 +75,9 @@ mysql -u$MYSQL_USER -p$MYSQL_PWD < $BASE_DIR/build/TruncateAuditTrail.sql -echo "SET FOREIGN_KEY_CHECKS = 0;" > $BASE_DIR/sql/mysql/coa/weberp-new.sql +echo "SET FOREIGN_KEY_CHECKS = 0;" > $BASE_DIR/sql/mysql/country_sql/default.sql -mysqldump -u$MYSQL_USER -p$MYSQL_PWD --skip-opt --create-options --skip-set-charset --ignore-table=weberpdemo.mrpsupplies --ignore-table=weberpdemo.mrpplanedorders --ignore-table=weberpdemo.mrpparameters --ignore-table=weberpdemo.levels --ignore-table=weberpdemo.mrprequirements --ignore-table=weberpdemo.buckets --no-data weberpdemo >> $BASE_DIR/sql/mysql/coa/weberp-new.sql +mysqldump -u$MYSQL_USER -p$MYSQL_PWD --skip-opt --create-options --skip-set-charset --ignore-table=weberpdemo.mrpsupplies --ignore-table=weberpdemo.mrpplanedorders --ignore-table=weberpdemo.mrpparameters --ignore-table=weberpdemo.levels --ignore-table=weberpdemo.mrprequirements --ignore-table=weberpdemo.buckets --no-data weberpdemo >> $BASE_DIR/sql/mysql/country_sql/default.sql mysqldump -u$MYSQL_USER -p$MYSQL_PWD --skip-opt --skip-set-charset --quick --no-create-info weberpdemo \ accountgroups \ @@ -108,26 +108,26 @@ securitytokens \ securityroles \ accountsection \ - > $BASE_DIR/sql/mysql/coa/weberp-base.sql + > $BASE_DIR/sql/mysql/country_sql/weberp-base.sql -mysqldump -u$MYSQL_USER -p$MYSQL_PWD --skip-opt --skip-set-charset --quick --ignore-table=weberpdemo.mrpsupplies --ignore-table=weberpdemo.mrpplanedorders --ignore-table=weberpdemo.mrpparameters --ignore-table=weberpdemo.levels --ignore-table=weberpdemo.mrprequirements --no-create-info weberpdemo > $BASE_DIR/sql/mysql/coa/weberp-demo_data.sql +mysqldump -u$MYSQL_USER -p$MYSQL_PWD --skip-opt --skip-set-charset --quick --ignore-table=weberpdemo.mrpsupplies --ignore-table=weberpdemo.mrpplanedorders --ignore-table=weberpdemo.mrpparameters --ignore-table=weberpdemo.levels --ignore-table=weberpdemo.mrprequirements --no-create-info weberpdemo > $BASE_DIR/sql/mysql/country_sql/weberp-demo_data.sql -rm $BASE_DIR/sql/mysql/coa/weberp-demo.sql -echo "CREATE DATABASE IF NOT EXISTS weberpdemo;" > $BASE_DIR/sql/mysql/coa/weberp-demo.sql -echo "USE weberpdemo;" >> $BASE_DIR/sql/mysql/coa/weberp-demo.sql +rm $BASE_DIR/sql/mysql/country_sql/demo.sql +echo "CREATE DATABASE IF NOT EXISTS weberpdemo;" > $BASE_DIR/sql/mysql/country_sql/demo.sql +echo "USE weberpdemo;" >> $BASE_DIR/sql/mysql/country_sql/demo.sql -cat $BASE_DIR/sql/mysql/coa/weberp-new.sql >> $BASE_DIR/sql/mysql/coa/weberp-demo.sql +cat $BASE_DIR/sql/mysql/country_sql/default.sql >> $BASE_DIR/sql/mysql/country_sql/demo.sql -cat $BASE_DIR/sql/mysql/coa/weberp-base.sql >> $BASE_DIR/sql/mysql/coa/weberp-new.sql -cat $BASE_DIR/sql/mysql/coa/weberp-demo_data.sql >> $BASE_DIR/sql/mysql/coa/weberp-demo.sql -rm $BASE_DIR/sql/mysql/coa/weberp-demo_data.sql -rm $BASE_DIR/sql/mysql/coa/weberp-base.sql +cat $BASE_DIR/sql/mysql/country_sql/weberp-base.sql >> $BASE_DIR/sql/mysql/country_sql/default.sql +cat $BASE_DIR/sql/mysql/country_sql/weberp-demo_data.sql >> $BASE_DIR/sql/mysql/country_sql/demo.sql +rm $BASE_DIR/sql/mysql/country_sql/weberp-demo_data.sql +rm $BASE_DIR/sql/mysql/country_sql/weberp-base.sql -echo "SET FOREIGN_KEY_CHECKS = 1;" >> $BASE_DIR/sql/mysql/coa/weberp-new.sql -echo "UPDATE systypes SET typeno=0;" >> $BASE_DIR/sql/mysql/coa/weberp-new.sql -echo "INSERT INTO shippers VALUES (1,'Default Shipper',0);" >> $BASE_DIR/sql/mysql/coa/weberp-new.sql -echo "UPDATE config SET confvalue='1' WHERE confname='Default_Shipper';" >> $BASE_DIR/sql/mysql/coa/weberp-new.sql -echo "SET FOREIGN_KEY_CHECKS = 1;" >> $BASE_DIR/sql/mysql/coa/weberp-demo.sql +echo "SET FOREIGN_KEY_CHECKS = 1;" >> $BASE_DIR/sql/mysql/country_sql/default.sql +echo "UPDATE systypes SET typeno=0;" >> $BASE_DIR/sql/mysql/country_sql/default.sql +echo "INSERT INTO shippers VALUES (1,'Default Shipper',0);" >> $BASE_DIR/sql/mysql/country_sql/default.sql +echo "UPDATE config SET confvalue='1' WHERE confname='Default_Shipper';" >> $BASE_DIR/sql/mysql/country_sql/default.sql +echo "SET FOREIGN_KEY_CHECKS = 1;" >> $BASE_DIR/sql/mysql/country_sql/demo.sql rm $OUTPUT_DIR/webERP.zip Modified: trunk/doc/INSTALL.txt =================================================================== --- trunk/doc/INSTALL.txt 2013-09-04 01:46:43 UTC (rev 6323) +++ trunk/doc/INSTALL.txt 2013-09-04 08:08:02 UTC (rev 6324) @@ -194,10 +194,10 @@ WebERP expects each company that it manages to have a separate database. For example, if you have a company called MyCompany, then it will expect a database called mycompany (note that it must all be lower case). Before you start, ensure that you have no such database on your system, if you do then you will either have to remove it, rename it, or choose a different name for your company for the purposes of WebERP. The simplest tool is webmin, or you could use phpMyAdmin. -Once you have confirmed that you are ready to create a database you are now ready to go ahead, two scripts are provided to ease the database creation. +Once you have confirmed that you are ready to create a database you are now ready to go ahead, two scripts are provided to ease the database creation under the directory sql/mysql/country_sql: -1. weberp-demo.sql This has a minimal amount of demonstration data in a bogus company set up so that transactions can be tried to see how the system works. -2. weberp-new.sql This script has only the basic data necessary to start a new company system off. If you wish to set up your company on webERP then this is the script to use. weberp-new.sql you will need to create a database first (using phpMyAdmin for example) or add the following sql commands to this script +1. demo.sql This has a minimal amount of demonstration data in a bogus company set up so that transactions can be tried to see how the system works. +2. default.sql This script has only the basic data necessary to start a new company system off. If you wish to set up your company on webERP then this is the script to use. weberp-new.sql you will need to create a database first (using phpMyAdmin for example) or add the following sql commands to this script CREATE DATABASE mycompanyname DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci; USE mycompanyname @@ -205,13 +205,12 @@ Instead of mycompanyname use the name of your company. Note that the name of the database must all be in lower case. This creates a weberp database and populates it with only the very basic data to start off. -The files weberp-demo.sql and weberp-new.sql should be in webERP/sql/mysql directory. -shell > mysql --user=weberp_db_user -p mysql < /path_to_the_sql_script/weberp-demo.sql +shell > mysql --user=weberp_db_user -p mysql < /path_to_the_sql_script/demo.sql or -shell > mysql --user=weberp_db_user --p mysql < /path_to_the_sql_script/weberp-new.sql +shell > mysql --user=weberp_db_user --p mysql < /path_to_the_sql_script/default.sql as required. You will be prompted for the mysql password that you created earlier. @@ -358,4 +357,4 @@ A copy of the GNU General Public License is included in the doc directory along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -Copyright weberp.org 2010 - Contact: in...@we... +Copyright weberp.org 2003-2013 - Contact: in...@we... Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2013-09-04 01:46:43 UTC (rev 6323) +++ trunk/install/index.php 2013-09-04 08:08:02 UTC (rev 6324) @@ -280,16 +280,16 @@ } } - if(!empty($_POST['COA'])){ - if(preg_match('/[a-zA-Z_-]+(\.sql)/',$_POST['COA'])){ - $COA = $_POST['COA']; + if(!empty($_POST['CountrySQL'])){ + if(preg_match('/[a-zA-Z_-]+(\.sql)/',$_POST['CountrySQL'])){ + $CountrySQL = $_POST['CountrySQL']; }else{ $InputError = 1; - prnMsg(_('The COA file name must only contain letters,"-","_"'),'error'); + prnMsg(_('The country SQL file name must only contain letters,"-","_"'),'error'); } }else{ $InputError = 1; - prnMsg(_('There is no COA file selected. Please select a file.'),'error'); + prnMsg(_('There is no country SQL file selected. Please select a file.'),'error'); } if($InputError == 1){//return to the company configuration stage @@ -403,7 +403,7 @@ fclose($zp); } //Now it is the time to create the mysql data - //Just get the data from $COA and read data from this file + //Just get the data from $CountrySQL and read data from this file //At the mean time, we should check the user need demo database or not if($DBConnectType == 'mysqli'){ $Db = mysqli_connect($HostName,$UserName,$Password); @@ -416,8 +416,8 @@ prnMsg(_('Failed to connect the database, the error is ').mysql_connect_error(),'error'); } } - $NewSQLFile = $Path_To_Root.'/sql/mysql/coa/'.$COA; - $DemoSQLFile = $Path_To_Root.'/sql/mysql/coa/weberp-demo.sql'; + $NewSQLFile = $Path_To_Root.'/sql/mysql/country_sql/'.$CountrySQL; + $DemoSQLFile = $Path_To_Root.'/sql/mysql/country_sql/demo.sql'; if(!empty($DualCompany) and $DualCompany == 1){ //we should install the production data and demo data $sql = 'CREATE DATABASE IF NOT EXISTS `'.$DatabaseName.'`'; @@ -1020,13 +1020,13 @@ <span><?php echo _('The name of your company'); ?></span> </li> <li> - <label for="COA"><?php echo _("Chart of Accounts"); ?>: </label> - <select name="COA"> + <label for="CountrySQL"><?php echo _("Chart of Accounts"); ?>: </label> + <select name="CountrySQL"> <?php - $COAs = scandir('../sql/mysql/coa'); - $COAs = array_diff($COAs,array('.','..')); - if(!empty($COAs)){ - foreach($COAs as $Value){ + $CountrySQLs = scandir('../sql/mysql/coa'); + $CountrySQLs = array_diff($CountrySQLs,array('.','..')); + if(!empty($CountrySQLs)){ + foreach($CountrySQLs as $Value){ if($Value == 'weberp-new.sql'){ echo '<option value="'.$Value.'" selected="true">' . $Value . '</option>'; }elseif($Value != 'weberp-demo.sql'){// the demo sql selection is not necessary so not allowed @@ -1110,7 +1110,7 @@ <?php } -//@para $NewSQL is the weberp new sql file which contains the COA file +//@para $NewSQL is the weberp new sql file which contains the CountrySQL file //@para $Demo is the weberp demo sql file //@para $db refer to the database connection reference //@para $DBType refer to the database connection type mysqli or mysql Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2013-09-04 01:46:43 UTC (rev 6323) +++ trunk/javascripts/MiscFunctions.js 2013-09-04 08:08:02 UTC (rev 6324) @@ -325,7 +325,11 @@ ds[i].origonchange=ds[i].onchange; ds[i].newonchange=rLocaleNumber; - ds[i].onchange=function(){if(this.origonchange) this.origonchange();this.newonchange();}; + ds[i].onchange=function(){ + if(this.origonchange) + this.origonchange(); + this.newonchange(); + }; } } |