Monday, May 24, 2010

What is the Visual Basic code for a sales receipt?

this is our project in our programming class and i dont know how to make it. We are going to provide a printout of the interface into a receipt using VB code.

What is the Visual Basic code for a sales receipt?
Think of how a Cash register works...





As Items are (Scanned) entered a description is printed with a value.





Your code will need to let an Item be entered by a user along with a value. When a button is pressed the Item and value is added to a list box and a running total is created.





As items are entered the list grows longer and the sub total vale is incremented.





At some point you will need to check out so create a button to do this function.





Checking out disables and further entries to the list a tax is calculated based upon the sub total and a grand total is calculated . As the sale is completed by the customer paying via cash/credit etc the sales receipt is printed.





On the receipt is a list of items purchased and their values, the sub total , tax and grand total.








So just print every item in your list followed by the values.





To get this data on paper you will have to use a PrintDocument object or use a MSWord object.





Either way you pragmatically create a document page and type text via code onto this virtual document. The document is then printed.





You can use a template from MS Word and add text to it via code or you can code the entire document from scratch within your app.





Or you can creat a text file then print the text file


No comments:

Post a Comment