[Vtigercrm-commits] [vtiger-commits] r9138 - in /vtigercrm/trunk: install/2setConfig.php install/3confirmConfig.php install/4createConfigFile.php install/5createTables.inc.php install/5createTables.php modules/Users/DefaultDataPopulator.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Aug 25 14:49:59 EDT 2006
Author: saraj
Date: Fri Aug 25 12:49:50 2006
New Revision: 9138
Log:
Selecting Master currency option provided
Modified:
vtigercrm/trunk/install/2setConfig.php
vtigercrm/trunk/install/3confirmConfig.php
vtigercrm/trunk/install/4createConfigFile.php
vtigercrm/trunk/install/5createTables.inc.php
vtigercrm/trunk/install/5createTables.php
vtigercrm/trunk/modules/Users/DefaultDataPopulator.php
Modified: vtigercrm/trunk/install/2setConfig.php
==============================================================================
--- vtigercrm/trunk/install/2setConfig.php (original)
+++ vtigercrm/trunk/install/2setConfig.php Fri Aug 25 12:49:50 2006
@@ -130,6 +130,10 @@
if (isset($_REQUEST['admin_password']))
$admin_password = $_REQUEST['admin_password'];
+
+ if (isset($_REQUEST['currency']))
+ $currency = $_REQUEST['currency'];
+
}
else {
!isset($_REQUEST['db_hostname']) ? $db_hostname = $hostname: $db_hostname = $_REQUEST['db_hostname'];
@@ -424,7 +428,40 @@
<tr>
<td bgcolor="#F5F5F5" nowrap><strong>Email</strong><sup><font color=red>*</font></sup></td>
<td bgcolor="white" align="left"><input class="dataInput" type="text" name="admin_email" value="<?php if (isset($admin_email)) echo "$admin_email"; else echo "admin at your-domain.com"; ?>"></td>
+ </tr>
+ <tr>
+ <td bgcolor="#F5F5F5" nowrap><strong>Master Currency</strong><sup><font color=red>*</font></sup></td>
+ <td bgcolor="white" align="left"><select name="currency" id="master">
+ <option>EURO</option>
+ <option>United States Dollar</option>
+ <option>United Kingdom Pounds</option>
+ <option>Canada Dollars</option>
+ <option>Australia Dollars</option>
+ <option>Japan Yen</option>
+ <option>Indian Rupee</option>
+ <option>New Zealand Dollars</option>
+ <option>South Africa Rand</option>
+ </select></td>
</tr>
+ <?
+ if(isset($currency) && $currency !='')
+ {
+ ?>
+ <script language="javascript">
+ var curr_combo = document.getElementById('master');
+ var curr_value = "<?echo $currency;?>";
+ for(i=0;i<curr_combo.length;i++)
+ {
+ if( curr_value == curr_combo.options[i].value)
+ {
+ curr_combo.selectedIndex = i;
+ }
+ }
+ </script>
+ <?
+ }
+ ?>
+
<tr>
<td colspan="2" bgcolor="white"><font color=blue> <b>Note:</b> The default password is 'admin'. You can change the password if necessary now or else you can change it later after logging-in.</font></td>
</tr>
Modified: vtigercrm/trunk/install/3confirmConfig.php
==============================================================================
--- vtigercrm/trunk/install/3confirmConfig.php (original)
+++ vtigercrm/trunk/install/3confirmConfig.php Fri Aug 25 12:49:50 2006
@@ -25,7 +25,7 @@
if (isset($_REQUEST['site_URL'])) $site_URL= $_REQUEST['site_URL'];
if (isset($_REQUEST['admin_email'])) $admin_email= $_REQUEST['admin_email'];
if (isset($_REQUEST['admin_password'])) $admin_password = $_REQUEST['admin_password'];
-if (isset($_REQUEST['admin_email'])) $admin_email = $_REQUEST['admin_email'];
+if (isset($_REQUEST['currency'])) $currency = $_REQUEST['currency'];
if (isset($_REQUEST['cache_dir'])) $cache_dir= $_REQUEST['cache_dir'];
if (isset($_REQUEST['mail_server'])) $mail_server= $_REQUEST['mail_server'];
if (isset($_REQUEST['mail_server_username'])) $mail_server_username= $_REQUEST['mail_server_username'];
@@ -234,6 +234,10 @@
<td bgcolor="#F5F5F5" width="40%">Admin Password</td>
<td align="left"> <font class="dataInput"><?php if (isset($admin_password)) echo ereg_replace('.', '*', $admin_password); ?></font></td>
</tr>
+ <tr bgcolor="White">
+ <td bgcolor="#F5F5F5" width="40%">Master Currency</td>
+ <td align="left"><font class="dataInput"><?php if (isset($currency)) echo $currency;?></font></td>
+ </tr>
</table>
<br><br>
@@ -252,6 +256,7 @@
<input type="hidden" class="dataInput" name="root_directory" value="<?php if (isset($root_directory)) echo "$root_directory"; ?>" />
<input type="hidden" class="dataInput" name="admin_email" value="<?php if (isset($admin_email)) echo "$admin_email"; ?>" />
<input type="hidden" class="dataInput" name="admin_password" value="<?php if (isset($admin_password)) echo "$admin_password"; ?>" />
+ <input type="hidden" class="dataInput" name="currency" value="<?php if (isset($currency)) echo "$currency"; ?>" />
<input type="hidden" class="dataInput" name="cache_dir" value="<?php if (isset($cache_dir)) echo $cache_dir; ?>" />
<input type="hidden" class="dataInput" name="mail_server" value="<?php if (isset($maill_server)) echo $mail_server; ?>" />
<input type="hidden" class="dataInput" name="mail_server_username" value="<?php if (isset($maill_server_username)) echo $mail_server_username; ?>" />
@@ -286,6 +291,7 @@
<input type="hidden" class="dataInput" name="root_directory" value="<?php if (isset($root_directory)) echo "$root_directory"; ?>" />
<input type="hidden" class="dataInput" name="admin_email" value="<?php if (isset($admin_email)) echo "$admin_email"; ?>" />
<input type="hidden" class="dataInput" name="admin_password" value="<?php if (isset($admin_password)) echo "$admin_password"; ?>" />
+ <input type="hidden" class="dataInput" name="currency" value="<?php if (isset($currency)) echo "$currency"; ?>" />
<input type="hidden" class="dataInput" name="cache_dir" value="<?php if (isset($cache_dir)) echo $cache_dir; ?>" />
<input type="hidden" class="dataInput" name="mail_server" value="<?php if (isset($mail_server)) echo $mail_server; ?>" />
<input type="hidden" class="dataInput" name="mail_server_username" value="<?php if (isset($mail_server_username)) echo $mail_server_username; ?>" />
Modified: vtigercrm/trunk/install/4createConfigFile.php
==============================================================================
--- vtigercrm/trunk/install/4createConfigFile.php (original)
+++ vtigercrm/trunk/install/4createConfigFile.php Fri Aug 25 12:49:50 2006
@@ -80,6 +80,8 @@
if (isset($_REQUEST['admin_email'])) $admin_email = $_REQUEST['admin_email'];
if (isset($_REQUEST['admin_password'])) $admin_password = $_REQUEST['admin_password'];
+
+if (isset($_REQUEST['currency'])) $currency = $_REQUEST['currency'];
if (isset($_REQUEST['mail_server'])) $mail_server = $_REQUEST['mail_server'];
@@ -438,6 +440,7 @@
<input type="hidden" class="dataInput" name="db_populate" value="<?php if (isset($db_populate)) echo "$db_populate"; ?>" />
<input type="hidden" class="dataInput" name="admin_email" value="<?php if (isset($admin_email)) echo "$admin_email"; ?>" />
<input type="hidden" class="dataInput" name="admin_password" value="<?php if (isset($admin_password)) echo "$admin_password"; ?>" />
+ <input type="hidden" class="dataInput" name="currency" value="<?php if (isset($currency)) echo "$currency"; ?>" />
<input type="image" name="next" value="Next" id="next_btn" src="include/install/images/cwBtnNext.gif" onClick="window.location=('install.php');createtablejs();" />
</form>
Modified: vtigercrm/trunk/install/5createTables.inc.php
==============================================================================
--- vtigercrm/trunk/install/5createTables.inc.php (original)
+++ vtigercrm/trunk/install/5createTables.inc.php Fri Aug 25 12:49:50 2006
@@ -198,6 +198,24 @@
$db->getUniqueID("vtiger_seactivityrel");
$db->getUniqueID("vtiger_freetags");
+//Master currency population
+$currencies = array('Euro'=>array('name'=>'Euro','symbol'=>'&euro','code'=>'EUR'),
+ 'United States Dollar'=>array('name'=>'United States Dollar','symbol'=>'$','code'=>'USD'),
+ 'United Kingdom Pounds'=>array('name'=>'United Kingdom Pounds','symbol'=>'£','code'=>'GBP'),
+ 'Canada Dollars'=>array('name'=>'Canada Dollars','symbol'=>'$','code'=>'CAD'),
+ 'Australia Dollars'=>array('name'=>'Australia Dollars','symbol'=>'$','code'=>'AUD'),
+ 'Japan Yen'=>array('name'=>'Japan Yen','symbol'=>'¥','code'=>'JPY'),
+ 'Indian Rupee'=>array('name'=>'Indian Rupee','symbol'=>'₨','code'=>'INR'),
+ 'New Zealand Dollars'=>array('name'=>'New Zealand Dollars','symbol'=>'$','code'=>''),
+ 'South Africa Rand'=>array('name'=>'South Africa Rand','symbol'=>'R','code'=>'ZAR'),
+ );
+
+$symbol = $currencies[$sel_currency]['symbol'];
+$code = $currencies[$sel_currency]['code'];
+
+//Insert into vtiger_currency vtiger_table
+ $db->query("insert into vtiger_currency_info values(".$db->getUniqueID("vtiger_currency_info").",'$sel_currency','$code','$symbol',1,'Active','-11')");
+
// populate the db with seed data
if ($db_populate) {
//eecho ("Populate seed data into $db_name");
Modified: vtigercrm/trunk/install/5createTables.php
==============================================================================
--- vtigercrm/trunk/install/5createTables.php (original)
+++ vtigercrm/trunk/install/5createTables.php Fri Aug 25 12:49:50 2006
@@ -24,6 +24,7 @@
if (isset($_REQUEST['db_populate'])) $db_populate = $_REQUEST['db_populate'];
if (isset($_REQUEST['admin_email'])) $admin_email = $_REQUEST['admin_email'];
if (isset($_REQUEST['admin_password'])) $admin_password = $_REQUEST['admin_password'];
+if (isset($_REQUEST['currency'])) $sel_currency = $_REQUEST['currency'];
?>
Modified: vtigercrm/trunk/modules/Users/DefaultDataPopulator.php
==============================================================================
--- vtigercrm/trunk/modules/Users/DefaultDataPopulator.php (original)
+++ vtigercrm/trunk/modules/Users/DefaultDataPopulator.php Fri Aug 25 12:49:50 2006
@@ -1893,12 +1893,6 @@
$this->db->query("insert into vtiger_inventorynotification(notificationid,notificationname,notificationsubject,notificationbody,label) values (".$this->db->getUniqueID("vtiger_inventorynotification").",'SalesOrderNotification','Sales Order generated for {PRODUCTNAME}','".$so_body." ','SalesOrderNotificationDescription')");
- //Insert into vtiger_currency vtiger_table
- $this->db->query("insert into vtiger_currency_info values(".$this->db->getUniqueID("vtiger_currency_info").",'U.S Dollar','USD','$',1,'Active','-11')");
-
-
-
-
//insert into email template vtiger_table
$body='
More information about the vtigercrm-commits
mailing list