Subversion Repositories SmartDukaan

Rev

Rev 6946 | Rev 13459 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6946 Rev 8946
Line 86... Line 86...
86
		jQuery(this).find('input').attr("checked", "checked").trigger("change");
86
		jQuery(this).find('input').attr("checked", "checked").trigger("change");
87
	}
87
	}
88
});
88
});
89
jQuery("#emi-options").find('input').live('change', function(){
89
jQuery("#emi-options").find('input').live('change', function(){
90
	var tRow = jQuery(this).closest('tr');
90
	var tRow = jQuery(this).closest('tr');
91
	showAmount(tRow);
91
	//showAmount(tRow);
92
	label = jQuery("#bank-name input:checked").closest("li").attr("title") + "-" + tRow.find("td").eq(1).html();
92
	label = jQuery("#bank-name input:checked").closest("li").attr("title") + "-" + tRow.find("td").eq(1).html();
93
	trackEventWithGA('EMI', "Plan Selection", label);
93
	trackEventWithGA('EMI', "Plan Selection", label);
94
});
94
});
95
 
95
 
96
 
96
 
Line 139... Line 139...
139
			first = false;
139
			first = false;
140
		} else {
140
		} else {
141
			tbodyEle.push('<td><input id="tenure_' + id + '" type="radio" name="payment_option" value="' + id + '"/></td>');
141
			tbodyEle.push('<td><input id="tenure_' + id + '" type="radio" name="payment_option" value="' + id + '"/></td>');
142
		}
142
		}
143
		tbodyEle.push('<td>' + bankTenure.tenureDescription + '</td>');
143
		tbodyEle.push('<td>' + bankTenure.tenureDescription + '</td>');
144
		if (id in EMI.discounts){
144
		/*if (id in EMI.discounts){
145
			emiProcessingCharge = bankTenure.emiProcessingCharge - EMI.discounts[id];
145
			emiProcessingCharge = bankTenure.emiProcessingCharge - EMI.discounts[id];
146
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon" style="text-decoration:line-through">' + bankTenure.emiProcessingCharge + '</span>&nbsp;<span class="red">' +bankTenure.discountedEmiProcessingCharge+'</span></td>');
146
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon" style="text-decoration:line-through">' + bankTenure.emiProcessingCharge + '</span>&nbsp;<span class="red">' +bankTenure.discountedEmiProcessingCharge+'</span></td>');
147
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon" style="text-decoration:line-through">' + bankTenure.monthlyEmi + '</span>&nbsp;<span class="red">' +bankTenure.discountedMonthlyEmi+'</span></td>');
147
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon" style="text-decoration:line-through">' + bankTenure.monthlyEmi + '</span>&nbsp;<span class="red">' +bankTenure.discountedMonthlyEmi+'</span></td>');
148
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon" style="text-decoration:line-through">' + bankTenure.totalAmount + '</span>&nbsp;<span class="red">' +bankTenure.discountedTotalAmount+'</span></td>');
148
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon" style="text-decoration:line-through">' + bankTenure.totalAmount + '</span>&nbsp;<span class="red">' +bankTenure.discountedTotalAmount+'</span></td>');
149
		} else {
149
		} else {*/
150
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.emiProcessingCharge + '</span></td>');
150
			tbodyEle.push('<td class="emi-amount"><span>' + bankTenure.interestRate + '%</span></td>');
151
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.monthlyEmi + '</span></td>');
151
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.totalInterest + '</span></td>');
152
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.totalAmount + '</span></td>');
152
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.totalAmount + '</span></td>');
-
 
153
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.installment + '</span></td>');
153
		}
154
		//}
154
		tbodyEle.push('</tr>');
155
		tbodyEle.push('</tr>');
155
	});
156
	});
156
	emiTableEle.find('tbody').html(tbodyEle.join(''));
157
	emiTableEle.find('tbody').html(tbodyEle.join(''));
157
	//emiTableEle.find("tbody>tr:first").trigger("click");
158
	//emiTableEle.find("tbody>tr:first").trigger("click");
158
	showAmount(emiTableEle.find("tbody>tr:first")[0]);
159
	//showAmount(emiTableEle.find("tbody>tr:first")[0]);
159
}
160
}
160
 
161
 
161
function showAmount(htmlRow){
162
function showAmount(htmlRow){
162
	$('span.mk_total_amount').html($(htmlRow).find('td:last').html());
163
	$('span.mk_total_amount').html($(htmlRow).find('td:last').html());
163
}
164
}
164
165