VAT Sales Receipt Calculator in Java

0
2864

This tutorial entitled “ VAT Sales Receipt Calculator Using Java ” will teach you on how your 12% VAT is calculated based from your total amount purchase. Please follow all the steps to complete this tutorial.

Value Added Tax known as VAT is very important to us, especially to our fellow Filipino. 12% Vat is automatically deducted to our consumables and other products. Usually, it is stated in our receipt if we purchase an item from any department store and retail store.

VAT Sales Receipt Calculator Steps

  1. Add/Insert an new JFrame Form.

2. Design your JFrame Form just look like the image below

3. Double click your calculate button and insert the codes below.

[java]//calculate 12% vat
double vat12 = ((Double.parseDouble(jTextField1.getText()) / 1.12) * .12);
jTextField3.setText(String.valueOf(vat12));
//calculate vatable sales
double vatsales = (Double.parseDouble(jTextField1.getText()) – vat12);
jTextField2.setText(String.valueOf(vatsales));[/java]

4. Run your program and the output should look like the image below.

VAT Sales Receipt Calculator Using Java Output

If you have any questions or suggestion about VAT Sales Receipt Calculator Using Java, please feel free to contact us at our contact page.

Looking for more source code? Type your keyword here here!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.