[Vtigercrm-commits] [vtiger-commits] r5352 - /vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50Alpha.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 25 09:30:27 EDT 2006


Author: saraj
Date: Tue Apr 25 07:30:23 2006
New Revision: 5352

Log:
* Added code to get the conversion rate to convert the currency values and some issues fixed

Modified:
    vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50Alpha.php

Modified: vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50Alpha.php
==============================================================================
--- vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50Alpha.php (original)
+++ vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50Alpha.php Tue Apr 25 07:30:23 2006
@@ -1761,7 +1761,7 @@
 $query_array = Array(
 
 "ALTER TABLE `accountgrouprelation` DROP INDEX `fk_accountgrouprelation2`",
-"ALTER TABLE `accountscf` DROP COLUMN `cf_356`",
+//"ALTER TABLE `accountscf` DROP COLUMN `cf_356`",
 "ALTER TABLE `activity` DROP INDEX `status`",
 "ALTER TABLE `attachments` DROP INDEX `attachmentsid`",
 "ALTER TABLE `carrier` DROP INDEX `carrier_UK0`",
@@ -1781,9 +1781,9 @@
 "ALTER TABLE `freetagged_objects` DROP INDEX `object_id_index`",
 "ALTER TABLE `groups` DROP INDEX `groupname`",
 "ALTER TABLE `invoicegrouprelation` DROP INDEX `fk_invoicegrouprelation2`",
-"ALTER TABLE `leadscf` DROP COLUMN `cf_354`",
-"ALTER TABLE `leadscf` DROP COLUMN `cf_358`",
-"ALTER TABLE `leadscf` DROP COLUMN `cf_360`",
+//"ALTER TABLE `leadscf` DROP COLUMN `cf_354`",
+//"ALTER TABLE `leadscf` DROP COLUMN `cf_358`",
+//"ALTER TABLE `leadscf` DROP COLUMN `cf_360`",
 "ALTER TABLE `pogrouprelation` DROP INDEX `fk_productgrouprelation2`",
 "ALTER TABLE `potential` DROP INDEX `potentialid`",
 "ALTER TABLE `potentialgrouprelation` DROP INDEX `fk_potentialgrouprelation2`",
@@ -2616,7 +2616,42 @@
 
 }
 
-
+$update_query3 = "update currency_info set conversion_rate=1, currency_status='Active', defaultid='-11' where id=1";
+Execute($update_query3);
+
+//Added to get the conversion rate and update for all records
+//include("modules/Migration/ModifyDatabase/updateCurrency.php");
+?>
+<script>
+	function ajaxSaveResponse(response)
+	{
+		//alert(response.responseText);
+		alert("Currency Changes has been made Successfully");
+	}
+
+	if(!confirm("Are you using Dollar $ as Currency?"))
+	{
+		getConversionRate('');
+	}
+
+	function getConversionRate(err)
+	{
+		var crate = prompt(err+"\nPlease enter the conversion rate of your currency");
+
+		if(crate != 0 && crate > 0)
+		{
+			var ajaxObj = new Ajax(ajaxSaveResponse);
+			url = 'module=Migration&action=updateCurrency&ajax=1&crate='+crate;
+			ajaxObj.process("index.php?",url);
+		}
+		else
+		{
+			//alert("Please give valid conversion rate ( > 0)");
+			getConversionRate("Please give valid conversion rate ( > 0)");
+		}
+	}
+</script>
+<?php
 
 
 





More information about the vtigercrm-commits mailing list