public void vatcalculation() { valueentry(); if (Convert.ToString(Taxtype) == "Taxable") { if (Convert.ToString(onmrp) == "Y" && Convert.ToString(taxinex) == "N") { if (Convert.ToString(onsurcharge) == "VatAmount") { TAmount = Convert.ToDouble(txt_Tamount.Text.ToString()); double v1 = (Vatper / 100) + 1; double App = ((quantity + free) * MRP) / v1; VatAmt = (App * Vatper) / 100; double surchargeamt = (VatAmt * surpercent) / 100; double totalamount = VatAmt + TAmount + surchargeamt; txt_surcharge.Text = surchargeamt.ToString(); txt_Vat_Amount.Text = VatAmt.ToString(); txt_Tamount.Text = totalamount.ToString(); Discount(); Disamt(); price(); } else if (Convert.ToString(onsurcharge) == "taxableAmt") { } } else if (Convert.ToString(onmrp) == "Y" && Convert.ToString(taxinex) == "Y") { TAmount = Convert.ToDouble(txt_Tamount.Text.ToString()); VatAmt = ((quantity + free) * MRP * Vatper) / 100; double surchargeamt = (VatAmt * surpercent) / 100; double totalamount = VatAmt + TAmount + surchargeamt; txt_surcharge.Text = surchargeamt.ToString(); txt_Vat_Amount.Text = VatAmt.ToString(); txt_Tamount.Text = totalamount.ToString(); Discount(); Disamt(); } } else if (Convert.ToString(Taxtype) == "Taxfree") { double v1 = (Vatper / 100) + 1; // taxfree double app = (quantity * MRP) / v1; VatAmt = (app * Vatper) / 100; txt_Vat_Amount.Text = VatAmt.ToString(); } } protected void ddl_Batch_No_SelectedIndexChanged(object sender, EventArgs e) { valueentry(); //price(); int j = Convert.ToInt32(ddl_Batch_No.SelectedItem.Value); var dd = from t in ae.Vats where t.Vat_Id == j select t; var ee = dd.First(); Vatper = Convert.ToDouble(ee.Vat_Per); surpercent = Convert.ToDouble(ee.Surcharge_Per); onsurcharge = Convert.ToDouble(ee.On_Surcharge);// error vatcalculation();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)