VAT Sales Receipt Calculator in Java

0
83

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.

  1. //calculate 12% vat
  2. double vat12 = ((Double.parseDouble(jTextField1.getText()) / 1.12) * .12);
  3. jTextField3.setText(String.valueOf(vat12));
  4. //calculate vatable sales
  5. double vatsales = (Double.parseDouble(jTextField1.getText()) - vat12);
  6. jTextField2.setText(String.valueOf(vatsales));

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.

Facebook Comments
(Visited 93 times, 2 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here