[Vtigercrm-commits] [vtiger-commits] r7620 - /vtigercrm/trunk/modules/Invoice/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 28 06:41:01 EDT 2006
Author: saraj
Date: Wed Jun 28 04:40:57 2006
New Revision: 7620
Log:
changes made to fix the issue in trac id:1142
Modified:
vtigercrm/trunk/modules/Invoice/EditView.php
Modified: vtigercrm/trunk/modules/Invoice/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/EditView.php (original)
+++ vtigercrm/trunk/modules/Invoice/EditView.php Wed Jun 28 04:40:57 2006
@@ -31,11 +31,13 @@
require_once('include/utils/utils.php');
require_once('include/FormValidationUtil.php');
-global $app_strings,$mod_strings,$currentModule,$log;
+global $app_strings,$mod_strings,$currentModule,$log,$current_user;
$focus = new Invoice();
$smarty = new vtigerCRM_Smarty();
-
+$currencyid=fetchCurrency($current_user->id);
+$rate_symbol = getCurrencySymbolandCRate($currencyid);
+$rate = $rate_symbol['rate'];
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '')
{
if(isset($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'quotetoinvoice')
@@ -53,10 +55,10 @@
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $quote_focus->mode);
- $smarty->assign("TAXVALUE", $txtTax);
- $smarty->assign("ADJUSTMENTVALUE", $txtAdj);
- $smarty->assign("SUBTOTAL", $quote_focus->column_fields['hdnSubTotal']);
- $smarty->assign("GRANDTOTAL", $quote_focus->column_fields['hdnGrandTotal']);
+ $smarty->assign("TAXVALUE", convertFromDollar($txtTax,$rate));
+ $smarty->assign("ADJUSTMENTVALUE", convertFromDollar($txtAdj,$rate));
+ $smarty->assign("SUBTOTAL", convertFromDollar($quote_focus->column_fields['hdnSubTotal'],$rate));
+ $smarty->assign("GRANDTOTAL", convertFromDollar($quote_focus->column_fields['hdnGrandTotal'],$rate));
$smarty->assign("AVAILABLE_PRODUCTS", 'true');
}
elseif(isset($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'sotoinvoice')
@@ -74,10 +76,10 @@
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $so_focus->mode);
- $smarty->assign("TAXVALUE", $txtTax);
- $smarty->assign("ADJUSTMENTVALUE", $txtAdj);
- $smarty->assign("SUBTOTAL", $so_focus->column_fields['hdnSubTotal']);
- $smarty->assign("GRANDTOTAL", $so_focus->column_fields['hdnGrandTotal']);
+ $smarty->assign("TAXVALUE", convertFromDollar($txtTax,$rate));
+ $smarty->assign("ADJUSTMENTVALUE", convertFromDollar($txtAdj,$rate));
+ $smarty->assign("SUBTOTAL", convertFromDollar($so_focus->column_fields['hdnSubTotal'],$rate));
+ $smarty->assign("GRANDTOTAL", convertFromDollar($so_focus->column_fields['hdnGrandTotal'],$rate));
$smarty->assign("AVAILABLE_PRODUCTS", 'true');
}
@@ -251,10 +253,10 @@
$associated_prod = getAssociatedProducts("Invoice",$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')
{
@@ -265,6 +267,7 @@
$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