[Vtigercrm-commits] [vtiger-commits] r10616 - /vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 10 10:53:28 EDT 2007
Author: richie
Date: Tue Apr 10 08:53:23 2007
New Revision: 10616
Log:
* Fixed the issue in PO/SO/Quotes/Invoice editview - NAN error when we don't have values for discount, Fixed #3486
Modified:
vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php
Modified: vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php Tue Apr 10 08:53:23 2007
@@ -1482,6 +1482,11 @@
$discount_amount=$adb->query_result($result,$i-1,'discount_amount');
$discountTotal = '0.00';
//Based on the discount percent or amount we will show the discount details
+
+ //To avoid NaN javascript error, here we assign 0 initially to' %of price' and 'Direct Price reduction'(for Each Product)
+ $product_Detail[$i]['discount_percent'.$i] = 0;
+ $product_Detail[$i]['discount_amount'.$i] = 0;
+
if($discount_percent != 'NULL' && $discount_percent != '')
{
$product_Detail[$i]['discount_type'.$i] = "percentage";
@@ -1567,6 +1572,10 @@
$discountPercent = ($focus->column_fields['hdnDiscountPercent'] != '')?$focus->column_fields['hdnDiscountPercent']:'0.00';
$discountAmount = ($focus->column_fields['hdnDiscountAmount'] != '')?$focus->column_fields['hdnDiscountAmount']:'0.00';
+
+//To avoid NaN javascript error, here we assign 0 initially to' %of price' and 'Direct Price reduction'(For Final Discount)
+ $product_Detail[1]['final_details']['discount_percentage_final'] = 0;
+ $product_Detail[1]['final_details']['discount_amount_final'] = 0;
if($focus->column_fields['hdnDiscountPercent'] != '')
{
More information about the vtigercrm-commits
mailing list