Author: Shahrzad Jahangirian
Language: Java (using Java 6) Download Java 6 and Download Java Runtime 6(JRE)
Date Added: February 5, 2016
Licence: All source codes are for showing my skills in Software Development to get me a Job as an Application Developer. You are not allowed to sell this Application or use my codes to develop an application for Sale or apply my codes to develop software for commercial use and profit. You can offer me a price to buy the Application for mass production or buy my codes to develop your application for profit. Also you may offer me a price to buy this Application for your Business and ask me to update the codes to match your Business Requirements.
I am available to be employed full time, part time, contract, or casual by a Company or a Business in Melbourne and its Suburbs in Australia. Please see and download my Resume and Qualifications.
Description: In part 1 of Cash Receipt Application you can Create a Cash Receipt document, Display it, Save the receipt in a MySql database and Print it.
In part 2, you can find details of a saved receipt by using a receipt number to view and print, also you have a report that displays all saved receipts.
I assume everyone know what a Cssh Receipt is, however the simple Cash Receipt definition is as follow: Cash Receipt is similar to an Invoice but less formal. When you buy a product from an individual and pay for it you need a document for this paid transaction for future reference and proof of payment, this document can be an Invoice or a Cash Receipt.
How to Run: I tested all codes on Windows 7 Command Prompt with Download Java(TM) SE Runtime Environment 6 on my computer.(you may download it by visiting the link). Also to run this application you have to have MySql installed in your computer and know what is your MySql Username and Password. I used MySql 5.6.15 for this Application. In the time of writting of this page February 5, 2016 you can download MySQL Installer 5.7.10 (371.7M) from http://dev.mysql.com/downloads/windows/installer/
The Application will run in Windows 95, 98, NT, ME, 2000, Vista, XP, Windows 7, Windows 8 as long as you have the Java Runtime Environment 6 and MySql in your Computer
Then you need to create all files and save it in a folder in your computer such as C:\javacodes and compile and run at command prompt as below, you may also download all source code files from Download Source Files. I assumed you saved all files at C:\javacodes
For this Application first you need to run MetaData.java class successfuly with your MySql usename and password placed at jdbc:mysql://localhost?user=YourMysqlUsername&password=YourMysqlPassword for creating TRANSACTION Database and RECEIPT Table as follows:
C:\javacodes> javac MetaData.java "This is to compile"
C:\javacodes> Java MetaData "This is to run"
Obviousley you should not have any error messages and also make sure TRANSACTION Database and RECEIPT Table have been created by visiting your own MySql Database in your computer.
Then use a .bat file or compile following files on command prompt in exact following orders
C:\javacodes> javac Helper.java -d c:\javacodes
C:\javacodes> javac FormatUI.java -d c:\javacodes
C:\javacodes> javac ConnectionDB.java -d c:\javacodes
C:\javacodes> javac ReceiptDetails.java -d c:\javacodes
C:\javacodes> javac ReceiptDB.java -d c:\javacodes
C:\javacodes> javac Receipt.java -d c:\javacodes
C:\javacodes> javac ReceiptView.java -d c:\javacodes
C:\javacodes> javac ReportUI.java -d c:\javacodes
C:\javacodes> javac ReceiptUI.java -d c:\javacodes
C:\javacodes> javac ReceiptMain.java "compiles the ReceiptMain class"
C:\javacodes> Java ReceiptMain "and finally with this statement runs this Application"