Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Calculate VAT and Service Tax in C#
WhatsApp
Pintoo Yadav
Jan 19
2015
15.4
k
0
2
public
void
vat()
{
decimal
pri = Convert.ToDecimal(txt_AMT.Text);
decimal
Vat = Convert.ToDecimal(txt_Vat.Text);
decimal
stax = Convert.ToDecimal(txt_stax.Text);
decimal
servicetaxpay = pri * (stax / 100);
//only stax
decimal
totalp = pri + servicetaxpay;
//
decimal
vatpay = pri * (Vat / 100);
decimal
totalPI = pri + vatpay;
decimal
totalPIs = pri + servicetaxpay;
lblvatAmt.Text =
" % "
+
" ="
+ vatpay;
// ("Vat@" + vatpay);
lblstaxamount.Text =
" % "
+
" ="
+ servicetaxpay;
// ("S.Tax@" + servicetaxpay);
decimal
result1 = vatpay;
decimal
result2 = servicetaxpay;
lblsvtax.Text = (result1 + result2).ToString();
txttotalamt.Text = pri+result1+result2 +
"Rs."
;
////+"stax="+stax+"%"//add
////+ "StaxPay=" + servicetaxpay//add
//+ "Stax=" + servicetaxpay
//+ " vatpay =" + vatpay
//+ "Total(Include Vat Amount) =" + totalPI);
}
C#
Up Next
How to Calculate VAT and Service Tax in C#