[Vtigercrm-commits] [vtiger-commits] r7618 - /vtigercrm/trunk/modules/Quotes/EditView.php

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


Author: saraj
Date: Wed Jun 28 04:34:53 2006
New Revision: 7618

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

Modified:
    vtigercrm/trunk/modules/Quotes/EditView.php

Modified: vtigercrm/trunk/modules/Quotes/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/EditView.php (original)
+++ vtigercrm/trunk/modules/Quotes/EditView.php Wed Jun 28 04:34:53 2006
@@ -28,13 +28,15 @@
 require_once('include/utils/utils.php');
 require_once('include/FormValidationUtil.php');
 
-global $app_strings,$mod_strings,$log,$theme,$currentModule;
+global $app_strings,$mod_strings,$log,$theme,$currentModule,$current_user;
 
 $log->debug("Inside Quote EditView");
 
 $focus = new Quote();
 $smarty = new vtigerCRM_Smarty;
-
+$currencyid=fetchCurrency($current_user->id);
+$rate_symbol = getCurrencySymbolandCRate($currencyid);
+$rate = $rate_symbol['rate'];
 
 if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') 
 {
@@ -141,26 +143,27 @@
 	$associated_prod = getAssociatedProducts("Quotes",$focus);//getProductDetailsBlockInfo('edit','Quotes',$focus); 
 	$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
 	$smarty->assign("MODE", $focus->mode);
-	$smarty->assign("TAXVALUE", $focus->column_fields['txtTax']);
-	$smarty->assign("ADJUSTMENTVALUE", $focus->column_fields['txtAdjustment']);
-	$smarty->assign("SUBTOTAL", $focus->column_fields['hdnSubTotal']);
-	$smarty->assign("GRANDTOTAL", $focus->column_fields['hdnGrandTotal']);
+	$smarty->assign("TAXVALUE", convertFromDollar($focus->column_fields['txtTax'],$rate));
+	$smarty->assign("ADJUSTMENTVALUE", convertFromDollar($focus->column_fields['txtAdjustment'],$rate));
+	$smarty->assign("SUBTOTAL", convertFromDollar($focus->column_fields['hdnSubTotal'],$rate));
+	$smarty->assign("GRANDTOTAL", convertFromDollar($focus->column_fields['hdnGrandTotal'],$rate));
 
 }
 elseif(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
         $smarty->assign("ROWCOUNT", $num_of_products);
         $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
         $smarty->assign("MODE", $focus->mode);
-        $smarty->assign("TAXVALUE", $focus->column_fields['txtTax']);
-        $smarty->assign("ADJUSTMENTVALUE", $focus->column_fields['txtAdjustment']);
-        $smarty->assign("SUBTOTAL", $focus->column_fields['hdnSubTotal']);
-        $smarty->assign("GRANDTOTAL", $focus->column_fields['hdnGrandTotal']);
+	$smarty->assign("TAXVALUE", convertFromDollar($focus->column_fields['txtTax'],$rate));
+	$smarty->assign("ADJUSTMENTVALUE", convertFromDollar($focus->column_fields['txtAdjustment'],$rate));
+	$smarty->assign("SUBTOTAL", convertFromDollar($focus->column_fields['hdnSubTotal'],$rate));
+	$smarty->assign("GRANDTOTAL", convertFromDollar($focus->column_fields['hdnGrandTotal'],$rate));
 
 }
 elseif((isset($_REQUEST['potential_id']) && $_REQUEST['potential_id'] != '') || (isset($_REQUEST['product_id']) && $_REQUEST['product_id'] != '')) {
         $smarty->assign("ROWCOUNT", $num_of_products);
         $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
 	$InvTotal = getInventoryTotal($_REQUEST['return_module'],$_REQUEST['return_id']);
+	$InvTotal = convertFromDollar($InvTotal,$rate);
         $smarty->assign("MODE", $focus->mode);
         $smarty->assign("TAXVALUE", "0.000");
         $smarty->assign("ADJUSTMENTVALUE", "0.000");





More information about the vtigercrm-commits mailing list