code updated
This commit is contained in:
@@ -19,7 +19,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
// -- total gross income --
|
||||
var gross_total = gross_total_income + disallowance_37 + disallowance_14a
|
||||
// console.log("gross_total income:: " + gross_total)
|
||||
setValue("gti_as_per_ao", gross_total);
|
||||
|
||||
// --- DEDUCTIONS ---
|
||||
var d80_business = getValue("deduction_80ia_business");
|
||||
@@ -35,62 +35,70 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
var net_taxable_income = gross_total - deduction - deduction_80g;
|
||||
setValue("net_taxable_income", net_taxable_income);
|
||||
|
||||
// --- TAX 30% ---
|
||||
var tax30 = net_taxable_income * 0.30;
|
||||
// ----------------------- TAX A% ---------------------
|
||||
var per_a = getValue("per_a");
|
||||
var tax30 = net_taxable_income * (per_a / 100);
|
||||
setValue("tax_30_percent", tax30);
|
||||
|
||||
// --- TAX PAYABLE (18.5%) ---
|
||||
var per_surcharge_a = getValue("per_surcharge_a");
|
||||
var surcharge_a = tax30 * (per_surcharge_a / 100);
|
||||
setValue("surcharge_a", surcharge_a);
|
||||
|
||||
var per_cess_a = getValue("per_cess_a");
|
||||
var edu_cess_a = (tax30 + surcharge_a) * (per_cess_a / 100);
|
||||
setValue("edu_cess_a", edu_cess_a);
|
||||
|
||||
var sum_of_a = tax30 + surcharge_a + edu_cess_a;
|
||||
setValue("sum_of_a", sum_of_a);
|
||||
|
||||
|
||||
// -------------------- TAX PAYABLE B% (18.5%) ---------------------------
|
||||
var tax185 = getValue("tax_book_profit_18_5");
|
||||
|
||||
// --- Education Cess 3% ---
|
||||
var per_surcharge_b = getValue("per_surcharge_b");
|
||||
var surcharge_b = tax185 * (per_surcharge_b / 100);
|
||||
setValue("surcharge_b", surcharge_b);
|
||||
|
||||
var per_cess_b = getValue("per_cess_b");
|
||||
var edu_cess_b = (tax185 + surcharge_b) * (per_cess_b / 100);
|
||||
setValue("edu_cess_b", edu_cess_b);
|
||||
|
||||
var sum_of_b = tax185 + surcharge_b + edu_cess_b;
|
||||
setValue("sum_of_b", sum_of_b);
|
||||
|
||||
|
||||
// --- Tax Payable (Higher of A or B): ---
|
||||
var tax_payable = (tax30 > tax185) ? tax30 : tax185;
|
||||
setValue("tax_payable", tax_payable);
|
||||
|
||||
// --- SURCHARGE ---
|
||||
var percent = getValue("persentage");
|
||||
var surcharge = tax_payable * (percent / 100);
|
||||
setValue("surcharge", surcharge);
|
||||
|
||||
// --- EDUCATION CESS ---
|
||||
var per_cess = getValue("persentage_cess");
|
||||
var edu_cess = (tax_payable + surcharge) * (per_cess / 100);
|
||||
setValue("edu_cess", edu_cess);
|
||||
|
||||
// --- total tax payable ---
|
||||
var total_tax_payable = tax_payable + surcharge + edu_cess;
|
||||
// ---- total_tax_payable ----
|
||||
var total_tax_payable = (tax30 > tax185) ? sum_of_a : sum_of_b;
|
||||
setValue("total_tax_payable", total_tax_payable);
|
||||
|
||||
|
||||
// --- mat_credit_created --- new
|
||||
// setValue("mat_credit_created", Math.max(tax185 - total_tax_payable, 0));
|
||||
// // --- mat credit_utilized --- new
|
||||
// setValue("mat_credit_utilized", Math.max(total_tax_payable - tax185, 0));
|
||||
|
||||
// --- mat credit_utilized ---
|
||||
var a = tax185
|
||||
var b = total_tax_payable
|
||||
var a = sum_of_a
|
||||
var b = sum_of_b
|
||||
var result = 0
|
||||
if (a > b) {
|
||||
result = a - b
|
||||
setValue("mat_credit_created", result);
|
||||
}
|
||||
else {
|
||||
setValue("mat_credit_created", result);
|
||||
}
|
||||
|
||||
if (b > a) {
|
||||
if (a < b) {
|
||||
result = b - a
|
||||
setValue("mat_credit_utilized", result);
|
||||
setValue("mat_credit_created", result);
|
||||
}
|
||||
else {
|
||||
result = a - b
|
||||
setValue("mat_credit_utilized", result);
|
||||
}
|
||||
|
||||
// --- FINAL TAX ---
|
||||
var mat_credit = getValue("mat_credit_utilized");
|
||||
var mat_credit_utilized = getValue("mat_credit_utilized");
|
||||
var interest_234c = getValue("interest_234c");
|
||||
|
||||
// var total_tax = total_tax_payable + mat_credit + interest_234c;
|
||||
var total_tax = total_tax_payable + interest_234c;
|
||||
var total_tax = total_tax_payable + interest_234c - mat_credit_utilized;
|
||||
setValue("total_tax", total_tax);
|
||||
|
||||
// --- ASSESSMENT ---
|
||||
|
||||
Reference in New Issue
Block a user