[Vtigercrm-commits] [vtiger-commits] r6668 - in /vtigercrm/trunk/modules: Invoice/EditView.php SalesOrder/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 29 06:52:03 EDT 2006
Author: saraj
Date: Mon May 29 04:51:57 2006
New Revision: 6668
Log:
* Modified to set the tax and adjustment values as 0 if the column_field value of the object is empty
Modified:
vtigercrm/trunk/modules/Invoice/EditView.php
vtigercrm/trunk/modules/SalesOrder/EditView.php
Modified: vtigercrm/trunk/modules/Invoice/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/EditView.php (original)
+++ vtigercrm/trunk/modules/Invoice/EditView.php Mon May 29 04:51:57 2006
@@ -49,10 +49,13 @@
//Added to display the Quote's associated products -- when we create invoice from Quotes DetailView
$associated_prod = getAssociatedProducts("Quotes",$quote_focus);
+ $txtTax = (($quote_focus->column_fields['txtTax'] != '')?$quote_focus->column_fields['txtTax']:'0.000');
+ $txtAdj = (($quote_focus->column_fields['txtAdjustment'] != '')?$quote_focus->column_fields['txtAdjustment']:'0.000');
+
$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("TAXVALUE", $txtTax);
+ $smarty->assign("ADJUSTMENTVALUE", $txtAdj);
$smarty->assign("SUBTOTAL", $quote_focus->column_fields['hdnSubTotal']);
$smarty->assign("GRANDTOTAL", $quote_focus->column_fields['hdnGrandTotal']);
$smarty->assign("AVAILABLE_PRODUCTS", 'true');
@@ -67,10 +70,13 @@
//Added to display the SalesOrder's associated products -- when we create invoice from SO DetailView
$associated_prod = getAssociatedProducts("SalesOrder",$so_focus);
+ $txtTax = (($so_focus->column_fields['txtTax'] != '')?$so_focus->column_fields['txtTax']:'0.000');
+ $txtAdj = (($so_focus->column_fields['txtAdjustment'] != '')?$so_focus->column_fields['txtAdjustment']:'0.000');
+
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $so_focus->mode);
- $smarty->assign("TAXVALUE", $so_focus->column_fields['txtTax']);
- $smarty->assign("ADJUSTMENTVALUE", $so_focus->column_fields['txtAdjustment']);
+ $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("AVAILABLE_PRODUCTS", 'true');
Modified: vtigercrm/trunk/modules/SalesOrder/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/EditView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/EditView.php Mon May 29 04:51:57 2006
@@ -226,12 +226,15 @@
if(isset($_REQUEST['convertmode']) && ($_REQUEST['convertmode'] == 'quotetoso' || $_REQUEST['convertmode'] == 'update_quote_val'))
{
$num_of_products = getNoOfAssocProducts("Quotes",$quote_focus);
+ $txtTax = (($quote_focus->column_fields['txtTax'] != '')?$quote_focus->column_fields['txtTax']:'0.000');
+ $txtAdj = (($quote_focus->column_fields['txtAdjustment'] != '')?$quote_focus->column_fields['txtAdjustment']:'0.000');
+
$smarty->assign("ROWCOUNT", $num_of_products);
$associated_prod = getAssociatedProducts("Quotes",$quote_focus);
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
$smarty->assign("MODE", $focus->mode);
- $smarty->assign("TAXVALUE", $quote_focus->column_fields['txtTax']);
- $smarty->assign("ADJUSTMENTVALUE", $quote_focus->column_fields['txtAdjustment']);
+ $smarty->assign("TAXVALUE", $txtTax);
+ $smarty->assign("ADJUSTMENTVALUE", $txtAdj);
$smarty->assign("SUBTOTAL", $quote_focus->column_fields['hdnSubTotal']);
$smarty->assign("GRANDTOTAL", $quote_focus->column_fields['hdnGrandTotal']);
}
More information about the vtigercrm-commits
mailing list