[Vtigercrm-commits] [vtiger-commits] r7615 - /vtigercrm/trunk/modules/SalesOrder/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 28 06:26:27 EDT 2006
Author: saraj
Date: Wed Jun 28 04:26:24 2006
New Revision: 7615
Log:
changes made to fix the issue in trac id:1142
Modified:
vtigercrm/trunk/modules/SalesOrder/EditView.php
Modified: vtigercrm/trunk/modules/SalesOrder/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/EditView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/EditView.php Wed Jun 28 04:26:24 2006
@@ -29,14 +29,16 @@
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 Sales Order EditView");
$focus = new SalesOrder();
$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'] == 'quotetoso')
@@ -52,10 +54,10 @@
$associated_prod = getAssociatedProducts("Quotes",$quote_focus);
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $quote_focus->mode);
- $smarty->assign("TAXVALUE", $quote_focus->column_fields['txtTax']);
- $smarty->assign("ADJUSTMENTVALUE", $quote_focus->column_fields['txtAdjustment']);
- $smarty->assign("SUBTOTAL", $quote_focus->column_fields['hdnSubTotal']);
- $smarty->assign("GRANDTOTAL", $quote_focus->column_fields['hdnGrandTotal']);
+ $smarty->assign("TAXVALUE", convertFromDollar($quote_focus->column_fields['txtTax'],$rate));
+ $smarty->assign("ADJUSTMENTVALUE", convertFromDollar($quote_focus->column_fields['txtAdjustment'],$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');
}
@@ -133,10 +135,10 @@
$smarty->assign("QUOTE_ID", $focus->column_fields['quote_id']);
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $quote_focus->mode);
- $smarty->assign("TAXVALUE", $quote_focus->column_fields['txtTax']);
- $smarty->assign("ADJUSTMENTVALUE", $quote_focus->column_fields['txtAdjustment']);
- $smarty->assign("SUBTOTAL", $quote_focus->column_fields['hdnSubTotal']);
- $smarty->assign("GRANDTOTAL", $quote_focus->column_fields['hdnGrandTotal']);
+ $smarty->assign("TAXVALUE", convertFromDollar($quote_focus->column_fields['txtTax'],$rate));
+ $smarty->assign("ADJUSTMENTVALUE", convertFromDollar($quote_focus->column_fields['txtAdjustment'],$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');
}
}
@@ -235,10 +237,10 @@
$associated_prod = getAssociatedProducts("Quotes",$quote_focus);
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $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));
}
elseif($focus->mode == 'edit')
{
@@ -248,25 +250,26 @@
$associated_prod = getAssociatedProducts("SalesOrder",$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