Subversion Repositories SmartDukaan

Rev

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

Rev 6440 Rev 6736
Line 135... Line 135...
135
	jQuery.each(bank.emis, function(id, bankTenure) {
135
	jQuery.each(bank.emis, function(id, bankTenure) {
136
		tbodyEle.push('<tr>');
136
		tbodyEle.push('<tr>');
137
		if(first) {
137
		if(first) {
138
			tbodyEle.push('<td><input id="tenure_' + id + '" type="radio" name="payment_option" value="' + id + '" checked="checked"/></td>');
138
			tbodyEle.push('<td><input id="tenure_' + id + '" type="radio" name="payment_option" value="' + id + '" checked="checked"/></td>');
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){
-
 
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>');
-
 
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>');
-
 
149
		} else {
144
		tbodyEle.push('<td style="text-align:center"><span class="rupee-icon">' + bankTenure.emiProcessingCharge + '</span></td>');
150
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.emiProcessingCharge + '</span></td>');
145
		tbodyEle.push('<td style="text-align:center"><span class="rupee-icon">' + bankTenure.monthlyEmi + '</span></td>');
151
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.monthlyEmi + '</span></td>');
146
		tbodyEle.push('<td style="text-align:center"><span class="rupee-icon">' + bankTenure.totalAmount + '</span></td>');
152
			tbodyEle.push('<td class="emi-amount"><span class="rupee-icon">' + bankTenure.totalAmount + '</span></td>');
-
 
153
		}
147
		tbodyEle.push('</tr>');
154
		tbodyEle.push('</tr>');
148
	});
155
	});
149
	emiTableEle.find('tbody').html(tbodyEle.join(''));
156
	emiTableEle.find('tbody').html(tbodyEle.join(''));
150
	//emiTableEle.find("tbody>tr:first").trigger("click");
157
	//emiTableEle.find("tbody>tr:first").trigger("click");
151
	showAmount(emiTableEle.find("tbody>tr:first")[0]);
158
	showAmount(emiTableEle.find("tbody>tr:first")[0]);
152
}
159
}
153
 
160
 
154
function showAmount(htmlRow){
161
function showAmount(htmlRow){
155
	$('span.mk_total_amount').html($(htmlRow).find('span:last').html());
162
	$('span.mk_total_amount').html($(htmlRow).find('td:last').html());
156
}
163
}
157
164