[Vtigercrm-commits] [vtiger-commits] r7613 - /vtigercrm/trunk/include/utils/EditViewUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 28 06:07:57 EDT 2006


Author: saraj
Date: Wed Jun 28 04:07:53 2006
New Revision: 7613

Log:
changes made to fix the issue in trac id:1142

Modified:
    vtigercrm/trunk/include/utils/EditViewUtils.php

Modified: vtigercrm/trunk/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/EditViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/EditViewUtils.php Wed Jun 28 04:07:53 2006
@@ -58,6 +58,11 @@
 	$custfld = '';
 	$ui_type[]= $uitype;
 	$editview_fldname[] = $fieldname;
+
+	$currencyid=fetchCurrency($current_user->id);
+	$rate_symbol = getCurrencySymbolandCRate($currencyid);
+	$rate = $rate_symbol['rate'];
+	$currency= $rate_symbol['symbol'];
 
 	if($generatedtype == 2)
 		$mod_strings[$fieldlabel] = $fieldlabel;
@@ -953,10 +958,6 @@
 	
 	elseif($uitype == 71 || $uitype == 72)
 	{
-		$currencyid=fetchCurrency($current_user->id);
-		$rate_symbol = getCurrencySymbolandCRate($currencyid);
-		$rate = $rate_symbol['rate'];
-		$currency= $rate_symbol['symbol'];
 		$editview_label[]=$mod_strings[$fieldlabel].': ('.$currency.')';
 		if($value!='')
 		        $fieldvalue[] = convertFromDollar($value,$rate);
@@ -1155,7 +1156,12 @@
 			$value = $_REQUEST['mg_subject'];
 		}
 		$editview_label[]=$mod_strings[$fieldlabel];
-		$fieldvalue[] = $value;
+		if($uitype == 1 && ($fieldname=='expectedrevenue' || $fieldname=='budgetcost' || $fieldname=='actualcost' || $fieldname=='expectedroi' || $fieldname=='actualroi' ) && ($module_name=='Campaigns'))
+		{
+			$fieldvalue[] = convertFromDollar($value,$rate);
+		}
+		else
+			$fieldvalue[] = $value;
 	}
 
 	// Mike Crowe Mod --------------------------------------------------------force numerics right justified.
@@ -1305,7 +1311,10 @@
 	$log->debug("Entering getAssociatedProducts(".$module.",".$focus.",".$seid=''.") method ...");
 	global $adb;
 	$output = '';
-	global $theme;
+	global $theme,$current_user;
+	$currencyid=fetchCurrency($current_user->id);
+	$rate_symbol = getCurrencySymbolandCRate($currencyid);
+	$rate = $rate_symbol['rate'];
 	$theme_path="themes/".$theme."/";
 	$image_path=$theme_path."images/";
 	$product_Detail = Array();
@@ -1370,6 +1379,9 @@
 		{
 			$product_Detail[$i]['qtyInStock'.$i]=$qtyinstock;
 		}
+		$unitprice=convertFromDollar($unitprice,$rate);
+		$listprice=convertFromDollar($listprice,$rate);
+		$total_with_tax =convertFromDollar($total_with_tax,$rate);
 		$product_Detail[$i]['txtQty'.$i]=$qty;
 		$product_Detail[$i]['unitPrice'.$i]=$unitprice;
 		$product_Detail[$i]['txtListPrice'.$i]=$listprice;





More information about the vtigercrm-commits mailing list