0% found this document useful (0 votes)
22 views61 pages

20mis0353 VL2021220500513 Pe003

Uploaded by

arunekambaram173
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views61 pages

20mis0353 VL2021220500513 Pe003

Uploaded by

arunekambaram173
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

SCHOOL OF INFORMATION TECHNOLOGY AND ENGINEERING

SWE1007 – JAVA PROGRAMING Winter Semester 2021 – 2022

SLOT – A2+TA2

J-COMPONENT

FACULTY: Prof. M. Nirmala

TOPIC: INVENTORY AND BILLING SYSTEM FOR PHARMACY

Submitted by
K.D.KEERTHANAPRIYA – 20MIS0319
G.RAMANKISHORE – 20MIS035
ABSTRACT
Inventory and Billing System for pharmacy is designed to focus on the medical
store to help them in their billing management with taking care of other details
like stock and accounting. As of today, in the country most of the medical stores
are manual only which means they maintain their record of the person buying
drugs and the quantity of it in the paper files, registers and binders. The Inventory
and Billing System ease the medical shops and the salesperson by providing the
fully computerized data storage facility which helps them to generate the bill and
update the stock at the same time without any extra manual work. This also helps
the owner to search any record at any point of time to generate the report like how
many people are buying what kind of medicines, which kind of drugs’ sales is
going down, as database is storing all data at one place over the hardware which
is globally present. As the system is online it makes the process of billing faster
than before as the staff do not have to check the register for each medicine that it
is available in their stock or not, he/she has to just search in system for the drug
and it will show the stock detail which makes the billing less time taking process.
If the owner wants to know from where it has bought a particular drug it can
search in system with just click as seller record is also well maintained and kept
related to the medicine it sold

1. INTRODUCTION: -
1.1. MOTIVATION:
The "Medical Shop Billing System" has been developed to override the
problems prevailing in the practicing manual system. This software is supported
to eliminate and, in some cases, reduce the hardships faced by this existing
system. Moreover, this system is designed for the particular need of the company
to carry out operations in a smooth and effective manner.
1.2. AIM OF THE PROPOSED WORK:
The aim is to automate its existing manual system by the help of
computerized equipment and full-fledged computer software, fulfilling their
requirements, so that their valuable data/information can be stored for a longer
period with easy accessing and manipulation of the same. Basically, the project
describes how to manage for good performance and better services for the clients.
1.3. OBJECTIVE(S) OF THE PROPOSED WORK:
The main objective of the Project on Medical Shop Billing System is to
manage the details of Bills, Payment, Receipt, Biller. It manages all the
information about Bills, Customer, Biller. The project is totally built at
administrative end and thus only the administrator is guaranteed the access. The
purpose of the project is to build an application program to reduce the manual
work for managing the Bills, Customer, Payment. It tracks all the details about
the Receipt and Biller.

2. ANALYSIS & DESIGN OF PROPOSED WORK: -

2.1. PROBLEM STATEMENT:


Pharmaceutical practices have evolved over time to become fully
encompassed in all aspects of pharmacy itself. Such practices include: dispensing
of drugs, consultation, drug regulation, and the sale of these drugs.
The community pharmacies and hospital pharmacies have key roles to play
in the pharmaceutical practices. For the community pharmacies in Sub-Saharan
Africa, a strict approach to the sale and dispensation of drugs is not normally the
case, due to the fact that laws governing pharmaceutical practices have not been
fully enforced. On the part of the hospital pharmacies, there is a more controlled
approach to the dispensing of drugs, as the prescriptions are readily available from
the in-house doctors. There is a need for these practices to be fully enforced, and
a management system introduced to the fray. With software such as the
Pharmaceutical Management System, which provides a platform has been
provided to help with drug regulation, as well as providing ease to all parties
involved. The methodology used in the implementation of the software is the
Incremental Model of System Development Life Cycle, which allows room for
scalability as time goes on.
Creating a Pharmaceutical Management System would help in
pharmaceutical practices for all parties involved. It is eminent that the system
provides a safe, secure and verified platform for all parties which help to bridge
the communication gap and provide legitimate drugs. Therefore, if all
recommendations are strictly adhered to, there will be strict monitoring and
regulation of how drugs are circulated and a decrease in the spread of fake drugs.
This project is designed to focus on the medical store to help them in their
billing management with taking care of other details like stock and accounting.
The medical store billing system ease the medical shops and the salesperson by
providing the fully computerized data storage facility which help them to generate
the bill and update the stock at the same time without any extra manual work.
This also helps the owner to search any record at any point of time to generate the
report like how many people are buying what kind of medicines, which kind of
drugs’ sales is going down, as database is storing all data at one place over the
hardware which is globally present. As the system is online it makes the process
of billing faster than before as the staff do not have to check the register for each
medicine that it is available in their stock or not, he/she has to just search in system
for the drug and it will show the stock detail which makes the billing less time
taking process. If the owner wants to know from where it has bought a particular
drug it can search in system with just click as seller record is also well maintained
and kept related to the medicine it sold.

2.2. STAKEHOLDER IDENTIFICATION:


1.Patients
2.Administrators
3.Cashiers
4.Manufactures
5.Customers
2.3. CLASSES IDENTIFICATION USING CRC AND NOUN PHRASE
APPROACH:
NOUN PHRASE APPROACH:
Login class
Public Void login()
Pharmacy class
Public Void add pharmacy()
Public Void edit pharmacy()
Public Void delete pharmacy()
Public Void update pharmacy()
Public Void save pharmacy()
Public Void Search pharmacy()
Medicine class
Public Void add medicines()
Public Void edit medicines()
Public Void delete medicines ()
Public Void update medicines ()
Public Void save medicines ()
Stock class
Public Void add stocks ()
Public Void edit stocks()
Public Void delete stocks ()
Public Void update stocks ()
Public Void save stocks ()
Public Void Search stocks ()
From the noun phrase approach we get, a)
SET OF CLASSES
• Login class
• Create_Bill class
• Stock_maintenance class
• Medicine_Info class
• Search_bill class
b) METHODS
LOGIN CLASS
• public void username()
• public void password()
• public void login()
CREATE_BILL CLASS
• public void bill_id()
• public void customer_name()
• public void medicine_id()
• public void medicine_name()
• public void quantity()
STOCK_MAINTENANCE CLASS
• public void product_details()
• public void quantity_details()
MEDICINE_INFO CLASS
• public void product_details()
SEARCH_BILL CLASS
• public void bill_details() 2.4. GAPS IDENTIFIED:

Existing system:
Currently, the medical works are based on the manual process, and each
work is maintained in the paper. The details of purchasing medicines, audits, sell
reports maintained on the paper while anyone can enter into the system and can
make changes in these reports, so it is not a safe method to keep the information
on the paper. The pharmacist faces problem in searching the products from the
self as it is not an easy method to remember about the place of each medicine.
There no Pharmacy Management System which can alert the pharmacist about
the details of the medicines.

Proposed system:
The design of the pharmacy management system is based on the computer
which will simplify the maintenance of the information, accessible and efficient.
Every data is going to be stored in the database which will be used to get instance
details. The pharmacist and nurses will get more accurate results at the time sell,
about the details of the use of medicines and the dosages so that the system will
become more reliable to use than the present system. The records of each work
will be secure as to access the information the user must have to provide the ID
and password in the system. we also include the mechanism of printing the bills.
2.5. SYSTEM ARCHITECTURE OR FLOW DIAGRAM:
FLOW DIAGRAM:
ZERO LEVEL DFD

FIRST LEVEL DFD


SECOND LEVEL DFD

2.6. INTERFACE OF THE PROPOSED WORK (DONE DURING


REVIEW-1):
HOME PAGE
ADMIN LOGIN

CREATE BILL
MEDICINE (STOCK) INFORMATION

2.7. MODULE DESCRIPTION:


1. LOGIN SELECTION MODULE:
This specifies the login sub module which the user wants to access the database.
When the user selects admin login, he/ she can get the complete functionality of
the system. Whereas Employee Module only allows few functionalities.
2. ADMIN LOGIN MODULE:
Login Module is used to get/use a particular functionality. This allows the users
to control the data that has been stored. It gives the user those who logged in some
special features in which we can alter the database our system/organization. In
this medical billing system, we have considered having 1 owner and 2 peers
where owner can control the complete system in which he/she can add/remove
peers and also give access to them and view their profile. Whereas Peers have
only limited Functionalities by just looking the database and updating/altering it
with a certain extent.
Functionalities of
1) Owner- Controlling Stocks, Peers, Check Bills.
2) Peers- Controlling Stocks, Store and Check Bills.
We are going to use a separate table for users and save their profile user ID
and its password in that table so that users can log in to their account. We are
going to use GRANT Function in Mysql workbench which is a Transaction
Control Language to give/specify user’s control over the data.

3.CASHIER MODULE:
The admin should add the cashier details and set their passwords. Then only they
can able to access the portal. The cashier can handle bills details, stock updates
and medicine information. But he can’t update or view the cashier details.
4.CASHIER DETAILS MODULE:
This is a separate functionality of the admin. When he clicks the EMPLOYEE
DETAILS Button he gets this interface, which lets him to see the Employees in
his organization. He also can add/remove the employee from the system
5.BILLING MODULE:
Billing Module is the main module in this system. It creates invoices of the
customer’s medicine which contains their name, phone number, doctor name and
also order number with date and time mentioned. It is even stored in the database
for future references later on. The Invoice is converted into an XPS/PDF
Document which is printed later on. The table “Bill” is used to store the details of
the Invoice which may contain order number, Name of the customer, phone
number, doctor name, date and time of the purchase.
Using the Order ID which is unique it is used to identify the products that
are bought by that particular customer. This all can be viewed by Owner
(Complete Authority) but the peers can only see those orders which they put in
their own system. This is user defined constraint which can be
overridden/changed by owner/administrator later.
6.STOCK MODULE:
This Stock Module lets admin to add up new Stock or Delete Stock from their
database and also can update the database by changing the cost of each product.
They can also view remaining stock so that he/she can update it.
3. Implementation
3.1. SOFTWARES USED WITH VERSION:
• Front end: Apache netbeans 12.3
• Back end: Mysql workbench 8.0 CE
• Jar file: mysql-connector-java-8.0.24
• Operating system: windows10 3.2. JAVA CONCEPTS
USED:
• AWT
• SWING
• JFRAME
JDBC (JAVA DATABASE CONNECTIVITY):
● Driver Manager
● Connections
● Prepared Statements
● ResultSet
● Statements
● Queries etc.,
3.3. DATABASE DESIGN:

DATABASE: MySql Workbench 8.0 CE

DATABASE URL:
jdbc:mysql://localhost:3306/good?zeroDateTimeBehavior=CONVERT_TO_NU
LL [root on Default schema]

TABLE:
ADMIN:
Field Type Null Default
username Varchar(15) YES NULL
password Varchar(15) YES NULL

CASH:
Field Type Null Key Default Extra
id Int(15) NO PRI NULL Auto-increment
name Varchar(15) YES NULL
mno Varchar(15) YES NULL
address Varchar(15) YES NULL
email Varchar(15) YES NULL
password Varchar(15) YES NULL

STOCK:
Field Type Null Key
id Int(15) NO PRI
pname Varchar(15) YES
available Int(15) YES
mrp Int(15) YES

BILL:
Field Type Null Key
bno Int(15) NO PRI
cname Varchar(15) YES
amt Int(15) YES
pdate Date YES

3.3.1. TABLES WITH VALUES: ADMIN DB:


BILL DB:
CASH DB:

STOCK DB:
3.4. SCREENSHOTS OF THE SYSTEM:

LOGIN PAGE:

ADMIN LOGIN:
CASHIER LOGIN

MAIN FRAME:
CREATE BILL:

PRINTING (DIALOGUE BOX):

CASHIER DETAILS:
DATA INSERTED (DIALOGUE BOX):

SEARCH BILL:

MEDICINE INFO:
STOCK:

3.5. SAMPLE SOURCE CODE:


Quickbill.java: import
java.awt.event.*; import
java.awt.*;
public class Quickbill extends javax.swing.JFrame {
public Quickbill() { initComponents();
this.setLocation(300,100);
}
public void close(){
WindowEvent winClosingEvent=new
WindowEvent(this,WindowEvent.WINDOW_CLOSING);

Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEve
nt);
}
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jPanel1 = new javax.swing.JPanel();


jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

javax.swing.GroupLayout jPanel1Layout = new


javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGap(0, 100, Short.MAX_VALUE)
);

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLO
SE);
setTitle("Quick Bill");

jPanel2.setBackground(new java.awt.Color(153, 102, 255));


jPanel2.setCursor(new
java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel1.setForeground(new java.awt.Color(51, 51, 51));
jLabel1.setText("PHARMACY MANAGEMENT SYSTEM");
jLabel1.setVerticalAlignment(javax.swing.SwingConstants.TOP);

jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jButton1.setText("Cashier Login"); jButton1.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jButton2.setText("Admin Login");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jLabel3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/grpimage/GRP pic.PNG"))); //
NOI18N
jLabel3.setPreferredSize(new java.awt.Dimension(235, 223));

javax.swing.GroupLayout jPanel2Layout = new


javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jLabel1)
.addGap(126, 126, 126))
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 522,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(46, 46, 46)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 186,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 186,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(59, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 48,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
56, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.TRAILING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 540,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 49,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(89, 89, 89)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 49,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(209, 209, 209))))
);

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);

pack();
}// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


close();
AdminLogin al=new AdminLogin();
al.setVisible(true);
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
close();
CashLogin cash=new CashLogin();
cash.setVisible(true);// TODO add your handling code here:
}
public static void main(String args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
try { for
(javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(Quickbill.class.getName()).log(java.util.log
ging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Quickbill.class.getName()).log(java.util.log
ging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Quickbill.class.getName()).log(java.util.log
ging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Quickbill.class.getName()).log(java.util.log
ging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Quickbill().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2; }
CashLogin.java:
import java.awt.Toolkit; import
java.awt.event.WindowEvent;
import java.sql.*; import
java.util.logging.Level; import
java.util.logging.Logger; import
javax.swing.JOptionPane;
public class CashLogin extends javax.swing.JFrame {
public CashLogin() {
initComponents();
this.setLocation(300,100);
}
public void close(){
WindowEvent winClosingEvent=new
WindowEvent(this,WindowEvent.WINDOW_CLOSING);

Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEve
nt);
}
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() { jPanel1 = new
javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel(); jLabel3 = new
javax.swing.JLabel(); jTextField1 = new
javax.swing.JTextField(); jPasswordField1 = new
javax.swing.JPasswordField(); jButton1 = new
javax.swing.JButton(); jCheckBox1 = new
javax.swing.JCheckBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLO
SE);
setTitle("Cashier Login");
setBackground(new java.awt.Color(204, 204, 255));

jPanel1.setBackground(new java.awt.Color(204, 255, 102));

jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N


jLabel1.setText(" Cashier Login");
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel2.setText("Password");

jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N


jLabel3.setText("Email ID");

jTextField1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

jPasswordField1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

jButton1.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N


jButton1.setText("Login"); jButton1.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jCheckBox1.setText("Show Password");
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBox1ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new


javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addGap(82, 82, 82)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 100,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 114,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
75, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jCheckBox1,
javax.swing.GroupLayout.PREFERRED_SIZE, 124,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addComponent(jTextField1,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 184,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPasswordField1,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 184,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(75, 75, 75))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 216,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(149, 149, 149))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 130,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(185, 185, 185))))
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(67, 67, 67)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(52, 52, 52)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 27,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(39, 39, 39)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 27,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPasswordField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jCheckBox1)
.addGap(50, 50, 50)
.addComponent(jButton1)
.addContainerGap(58, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
close();
Connection con;
PreparedStatement ps;
try {
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/l2_3?zeroDat
eTimeBehavior=CONVERT_TO_NULL", "root", "Nattynaveen07");
ps=con.prepareStatement("SELECT `email`,`password` FROM `cash` WHERE
`email`=? AND `password`=?;");
ps.setString(1,jTextField1.getText());
ps.setString(2, String.valueOf(jPasswordField1.getPassword()));
ResultSet rs=ps.executeQuery();
if(rs.next())
{
CashMain ca=new CashMain();
ca.setVisible(true);
}else
{
JOptionPane.showMessageDialog(null, "Invalid Username or
Password");
}
} catch (SQLException ex) {
Logger.getLogger(AdminLogin.class.getName()).log(Level.SEVERE,
null, ex);
}
}
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {
if(jCheckBox1.isSelected())
{
jPasswordField1.setEchoChar((char)0);
}
else{
jPasswordField1.setEchoChar('*');
}
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
try { for
(javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(CashLogin.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(CashLogin.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(CashLogin.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(CashLogin.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new CashLogin().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JLabel jLabel1; private
javax.swing.JLabel jLabel2; private
javax.swing.JLabel jLabel3; private
javax.swing.JPanel jPanel1;
private javax.swing.JPasswordField jPasswordField1;
private javax.swing.JTextField jTextField1; }
AdminLogin.java:
import java.awt.event.*; import
java.awt.*; import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
public class AdminLogin extends javax.swing.JFrame {
public AdminLogin() { initComponents();
this.setLocation(400,90);
}
public void close(){
WindowEvent winClosingEvent=new
WindowEvent(this,WindowEvent.WINDOW_CLOSING);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEve
nt);
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() { jPanel1 = new
javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel();
al2 = new javax.swing.JLabel(); al1 = new
javax.swing.JLabel(); at1 = new javax.swing.JTextField();
at2 = new javax.swing.JPasswordField(); abtn = new
javax.swing.JButton();
jCheckBox1 = new javax.swing.JCheckBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLO
SE);
setTitle("Admin Login");

jPanel1.setBackground(new java.awt.Color(255, 102, 102));

jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N


jLabel1.setText(" ADMIN LOGIN");

al2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N


al2.setText("Password");

al1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N


al1.setText("Admin Id");

at1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
at1ActionPerformed(evt);
}
});

abtn.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N


abtn.setText("Login"); abtn.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
abtnActionPerformed(evt);
}
});

jCheckBox1.setText("Show Password");
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBox1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new
javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addGap(100, 100, 100)
.addComponent(al2, javax.swing.GroupLayout.PREFERRED_SIZE,
112, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
87, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING, false)
.addComponent(at1,
javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)
.addComponent(at2))
.addComponent(jCheckBox1,
javax.swing.GroupLayout.PREFERRED_SIZE, 124,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(86, 86, 86))
.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(145, 145, 145)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 192,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(192, 192, 192)
.addComponent(abtn,
javax.swing.GroupLayout.PREFERRED_SIZE, 130,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(102, 102, 102)
.addComponent(al1,
javax.swing.GroupLayout.PREFERRED_SIZE, 112,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(308, Short.MAX_VALUE)))
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(56, 56, 56)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 42,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(53, 53, 53)
.addComponent(at1, javax.swing.GroupLayout.PREFERRED_SIZE,
28, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.BASELINE)
.addComponent(al2,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(at2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATE
D)
.addComponent(jCheckBox1)
.addGap(36, 36, 36)
.addComponent(abtn)
.addContainerGap(105, Short.MAX_VALUE))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align
ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(151, 151, 151)
.addComponent(al1,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(252, Short.MAX_VALUE)))
);

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

pack();
}// </editor-fold>

private void at1ActionPerformed(java.awt.event.ActionEvent evt) {


}

private void abtnActionPerformed(java.awt.event.ActionEvent evt) {


close();
Connection con;
PreparedStatement ps;
try {

con=DriverManager.getConnection("jdbc:mysql://localhost:3306/l2_3?zeroDat
eTimeBehavior=CONVERT_TO_NULL", "root", "Nattynaveen07");
ps=con.prepareStatement("SELECT `username`,`password` FROM
`admin` WHERE `username`=? AND `password`=?;");
ps.setString(1,at1.getText());
ps.setString(2, String.valueOf(at2.getPassword()));
ResultSet rs=ps.executeQuery();
if(rs.next())
{
MainFrame main=new MainFrame();
main.setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null, "Invalid Username or
Password");
}
} catch (SQLException ex) {
Logger.getLogger(AdminLogin.class.getName()).log(Level.SEVERE,
null, ex);
}
}

private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {


if(jCheckBox1.isSelected())
{
at2.setEchoChar((char)0);
} else{
at2.setEchoChar('*');
}
public static void main(String args[]) {
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
try { for
(javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(AdminLogin.class.getName()).log(java.util.
logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(AdminLogin.class.getName()).log(java.util.
logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(AdminLogin.class.getName()).log(java.util.
logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(AdminLogin.class.getName()).log(java.util.
logging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AdminLogin().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton abtn; private
javax.swing.JLabel al1; private
javax.swing.JLabel al2; private
javax.swing.JTextField at1; private
javax.swing.JPasswordField at2; private
javax.swing.JCheckBox jCheckBox1; private
javax.swing.JLabel jLabel1; private
javax.swing.JPanel jPanel1;
// End of variables declaration }
MainFrame.java:
import MyFrames.AddCash;
import MyFrames.PerPro; import
MyFrames.PerDay; import
MyFrames.CreateBill; import
MyFrames.Transaction; import
MyFrames.UpdateStock; import
MyFrames.ViewCashier; import
MyFrames.ViewStock; import
MyFrames.SearchBill; import
MyFrames.ProInfo;
public class MainFrame extends javax.swing.JFrame {
public MainFrame() {
initComponents();
}
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() { jMenuBar2 = new
javax.swing.JMenuBar(); jMenu4 = new
javax.swing.JMenu(); jMenu5 = new javax.swing.JMenu();
desktop = new javax.swing.JDesktopPane(); jButton6 = new
javax.swing.JButton(); Cashview = new
javax.swing.JButton(); jButton1 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton(); jButton4 = new
javax.swing.JButton(); jButton5 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel(); jLabel1 = new
javax.swing.JLabel();

jMenu4.setText("File");
jMenuBar2.add(jMenu4);

jMenu5.setText("Edit");
jMenuBar2.add(jMenu5);

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLO
SE);
setTitle("Quick Bill");

setBackground(javax.swing.UIManager.getDefaults().getColor("Button.darkSh
adow")); getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());
desktop.setBackground(new java.awt.Color(153, 153, 153));

jButton6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jButton6.setForeground(new java.awt.Color(255, 255, 255));
jButton6.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/exit.png"))); // NOI18N
jButton6.setText("Exit"); jButton6.setContentAreaFilled(false);
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});

desktop.setLayer(jButton6,
javax.swing.JLayeredPane.DEFAULT_LAYER);

javax.swing.GroupLayout desktopLayout = new


javax.swing.GroupLayout(desktop);
desktop.setLayout(desktopLayout);
desktopLayout.setHorizontalGroup(

desktopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
desktopLayout.createSequentialGroup()
.addContainerGap(1218, Short.MAX_VALUE)
.addComponent(jButton6,
javax.swing.GroupLayout.PREFERRED_SIZE, 120,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
desktopLayout.setVerticalGroup(

desktopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
desktopLayout.createSequentialGroup()
.addContainerGap(610, Short.MAX_VALUE)
.addComponent(jButton6,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(60, 60, 60))
);

getContentPane().add(desktop, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 62, 1350, 710));
Cashview.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
Cashview.setForeground(new java.awt.Color(0, 0, 102));
Cashview.setText("Cashier Details");
Cashview.setBorder(null);
Cashview.setContentAreaFilled(false);
Cashview.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CashviewActionPerformed(evt);
}
});
getContentPane().add(Cashview, new
org.netbeans.lib.awtextra.AbsoluteConstraints(271, 10, 130, 40));

jButton1.setBackground(new java.awt.Color(255, 255, 153));


jButton1.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
jButton1.setText("Create Bill"); jButton1.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
getContentPane().add(jButton1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(170, 20, -1, -1));

jButton3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jButton3.setForeground(new java.awt.Color(0, 0, 102));
jButton3.setText("Medicine Info");
jButton3.setContentAreaFilled(false); jButton3.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
getContentPane().add(jButton3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(540, 10, -1, 40));
jButton4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jButton4.setForeground(new java.awt.Color(0, 0, 102));
jButton4.setText("Stock"); jButton4.setContentAreaFilled(false);
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
getContentPane().add(jButton4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(680, 10, -1, 40));
jButton5.setBackground(javax.swing.UIManager.getDefaults().getColor("Butto
n.disabledShadow")); jButton5.setFont(new java.awt.Font("Tahoma", 1,
14)); // NOI18N jButton5.setForeground(new java.awt.Color(0, 0, 102));
jButton5.setText("Search Bill"); jButton5.setContentAreaFilled(false);
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
getContentPane().add(jButton5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(420, 10, -1, 40));

jLabel2.setIcon(new
javax.swing.ImageIcon("C:\\Users\\sindhu\\Downloads\\Webp.net-resizeimage
(3).jpg")); // NOI18N
getContentPane().add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(90, 20, 40, 20));

jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/bk.jpg"))); // NOI18N
getContentPane().add(jLabel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1350, 60));

pack();
}// </editor-fold>

private void CashviewActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:


AddCash ac=new AddCash();
this.desktop.add(ac);

ac.setVisible(true);
}

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {


System.exit(0); // TODO add your handling code here:
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {


UpdateStock us=new UpdateStock();
this.desktop.add(us);

us.setVisible(true); // stock add TODO add your handling code here:


}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


CreateBill biill=new CreateBill(); this.desktop.add(biill);
biill.setVisible(true); // TODO add your handling code here:
}

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {


SearchBill ssm=new SearchBill(); this.desktop.add(ssm);
ssm.setVisible(true);// TODO add your handling code here:
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {


ProInfo pro=new ProInfo(); this.desktop.add(pro);
pro.setVisible(true); // TODO add your handling code here:
}
public static void main(String args[]) { try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(() -> {
new MainFrame().setVisible(true);

});
}
private javax.swing.JButton Cashview;
private javax.swing.JDesktopPane desktop;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JLabel jLabel1; private
javax.swing.JLabel jLabel2; private
javax.swing.JMenu jMenu4; private
javax.swing.JMenu jMenu5; private
javax.swing.JMenuBar jMenuBar2;
}
4. TESTING: -

4.1. TESTCASES (FOR ALL MODULES)

LOGIN MODULE:
Objective: Step Test Description Expected Result Actual Result Key
The No Verification
objective of
this test
case is to
verify user
is able to
login the
application
Prerequisite
: User
having the
access to
the
application
Data
Prerequisite
:
NA
1 Launch the application Application As per expected NA
by clicking run Opened result
2 Click on Admin Login Navigated to As per expected Screenshot
button Admin Login result
Verify system is
navigated to ADMIN
LOGIN page
Take a Screenshot
3 Enter the Admin Id Navigated to As per expected Screenshot
<admin> Main Menu result
Enter the Password
<admin>
Click on Login button
Verify system is
navigated to Main
Menu page.
Take a Screenshot

ADMIN MODULE:

Objective: The Step Test Description Expected Result Actual Result Key
objective of this No Verification
test case is to
verify elements
present in the
main menu page
Pre-requisite:
User having the
access to the
application
Data
Prerequisite:
NA

1 Launch the Application As per expected NA


application by Opened result
clicking run
2 Click on Admin Login Navigated to As per expected Screenshot
button Admin Login result
Verify system is
navigated to ADMIN
LOGIN page
Take a Screenshot
3 Enter the Admin Id Navigated to Main As per expected Screenshot
<>admin Menu result
Enter the Password
<admin>
Click on Login button
Verify system is
navigated to Main
Menu page.
Take a Screenshot
4 Verify below Elements are As per expected Screenshot
elements are present result
displayed in top of
the Main Menu page:
1) Create Bill
2)Cashier details
3) Search Bill
4) Medicine
Information
5) Sales

Take a Screenshot

CREATE BILL:
Objective: Step Test Description Expected Result Actual Key
The No Result Verification
objective of
this test case
is to verify
user is able
to login the
application
Prerequisite:
User having
the access to
the
application
Data
Prerequisite:
NA

1 Launch the application Application As per NA


by clicking run Opened expected
result
2 Click on Admin Login Navigated to As per Screenshot
button Admin Login expected
Verify system is result
navigated to ADMIN
LOGIN page
Take a Screenshot
3 Enter the Admin Id Navigated to Main As per Screenshot
<admin> Menu expected
Enter the Password result
<admin>
Click on Login button
Verify system is
navigated to Main
Menu page.
Take a Screenshot
4 Click on Create Bill in Application As per Screenshot
top of Main Menu Page. navigated to expected
Verify system is Create Bill page result
navigated to Create Bill
page.
Take a Screenshot
5 Enter values in below Printed As per Screenshot
fields: Successfully expected
Bill No -<1> result
Customer Name -
<AAAA>
Medicine ID - <1>
Name - <paracetamol>
Mrp - <5>
Quantity - <2>
Discount - <10>

Click on Add button.


Verify values are added
under below columns:
1) Quantity
2) Name
3) Mrp
4) Price

Verify value is displayed


in Total textbox.
Take a Screenshot Click
on Print button. Verify
data are printed
successfully

CASHIER LOGIN:
Objective: Step Test Description Expected Result Actual Result Key
The No Verification
objective of
this test
case is to
verify
elements
present in
the main
menu page
Prerequisite
: User
having the
access to
the
application
Data
Prerequisite
: NA

1 Launch the application by Application As per expected NA


clicking run Opened result
2 Click on Cashier Login button Navigated to As per expected
Verify system is navigated to Cashier Login result creenshot
CASHIER LOGIN page
Take a Screenshot
3 Enter the Email Id Navigated to Main As per expected
<[email protected]> Menu result creenshot
Enter the Password <abc>
Click on Login button
Verify system is navigated to
Main Menu page.
Take a Screenshot
4 Verify below elements are Elements are As per expected creenshot
displayed in top of the Main present result
Menu page :
1) Create Bill
2) Search Bill
3) Medicine Information
4) Sales

Take a Screenshot

S
CASHIER DETAILS:

Objective: Step Test Description Expected Result Actual Result Key


The No Verification
objective of
this test case
is to verify
user
is able to
update the
cashier
details in the
application
Prerequisite:
User having
the access to
the
application
Data
Prerequisite:
NA
1 Launch the application by Application Opened As per NA
clicking run expected
result

2 Click on Admin Login Navigated to Admin Login As per Screenshot


button expected
Verify system is navigated result
to ADMIN LOGIN page
Take a Screenshot
3 Enter the Admin Id Navigated to Main Menu As per Screenshot
<admin> expected
Enter the Password result
<admin>
Click on Login button
Verify system is navigated
to Main Menu page. Take
a Screenshot
4 Click on Cashier details in Application navigated to As per Screenshot
top of Main Menu Page. Cashier details expected
Verify system is navigated result
to Cashier details page.
Take a Screenshot

5 Enter values in below Printed Successfully As per NA


fields : expected
Cashier ID-<1> result
Cashier Name - <abc>
Mobile Number -
<9876543219>
Address - <kjhgfd> Email-
ID-
<[email protected]>
Password - <abc>
6 Click on Add button. Verify Added Successfully As per Screenshot
values are added under expected
below columns: result
1) ID
2) Name
3) Mno
4) Address
5)Email-ID
6)Password
7 Click on Update button. Updated Successfully As per Screenshot
Verify values are updated expected
under below columns: result
1) ID
2) Name
3) Mno
4) Address

5)Email-ID
6)Password

8 Click on Delete button. Deleted Successfully As per NA


Verify values are added expected
under below columns: result
1) ID
2) Name
3) Mno
4) Address
5)Email-ID
6)Password
9 Verify value is displayed Printed Successfully As per Screenshot
in Total textbox. expected
Take a Screenshot Click result
on Print button. Verify
datas are printed
successfully
SEARCH BILL:
Objective: Step Test Description Expected Result Actual Key
The No Result Verification
objective of
this test case
is to verify
user is able
to
search the
bill details in
application.
Prerequisite:
User having
the access to
the
application
Data
Prerequisite:
NA

1 Launch the Application Opened As per NA


application by expected
clicking run result
2 Click on Admin Login Navigated to Admin As per Screenshot
button Login expected
Verify system is result
navigated to ADMIN
LOGIN page
Take a Screenshot

3 Enter the Admin Id Navigated to Main As per Screenshot


<admin> Menu expected
Enter the Password result
<admin>
Click on Login button
Verify system is
navigated to Main
Menu page.
Take a Screenshot

4 Click on Search bill in Application navigated to As per Screenshot


top of Main Menu Search Bill page expected
Page. result
Verify system is
navigated to Search
Bill page.
Take a Screenshot
5 Enter values in below Displayed Successfully As per Screenshot
fields: expected
Bill No -<1> result

Click on Find button.


Verify details are
displayed under
below columns:
1) Billno
2) customer name
3) amount
4) date

Take a Screenshot.

MEDICINE INFO:
Objective: Step Test Description Expected Result Actual Result Key
The No Verification
objective of
this test case
is to verify
user is able
to view the
medicine
stock
information
in the
application.
Prerequisite:
User having
the access to
the
application
Data
Prerequisite:
NA

1 Launch the Application Opened As per expected NA


application by clicking result
run
2 Click on Admin Login Navigated to Admin As per expected Screenshot
button Login result
Verify system is
navigated to ADMIN
LOGIN page
Take a Screenshot

3 Enter the Admin Id Navigated to Main As per expected Screenshot


<admin> Menu result
Enter the Password
<admin>
Click on Login button
Verify system is
navigated to Main
Menu page.
Take a Screenshot
4 Click on Medicine info Application As per expected Screenshot
in top of Main Menu navigated to result
Page. Medicine
Verify system is information page
navigated to Medicine
information page.
Take a Screenshot
Screenshot

5 Enter values in below Displayed As per expected


fields: Successfully result
Product_id -<1>

Click on Find button.


Verify details are
displayed under
below columns: 1)
Product_id
2) Product_name
3) availability
4) mrp

Take a Screenshot.

STOCK:
Objective: Step Test Description Expected Result Actual Result Key
The No Verification
objective of
this test case
is to verify
user
is able to
update the
stock in the
application.
Prerequisite:
User having
the access to
the
application
Data
Prerequisite:
NA

1 Launch the application Application Opened As per NA


by clicking run expected
result
2 Click on Admin Login Navigated to Admin As per Screenshot
button Login expected
Verify system is result
navigated to ADMIN
LOGIN page
Take a Screenshot
Screenshot

3 Enter the Admin Id Navigated to Main As per


<admin> Menu expected
Enter the Password result
<admin>
Click on Login button Verify
system is navigated to Main
Menu page.
Take a Screenshot

4 Click on Medicine info in top Application As per Screenshot


of Main Menu Page. navigated to expected
Verify system is navigated to Medicine result
Medicine information page. information page
Take a Screenshot

5 Enter values in below fields: Added Successfully As per Screenshot


Product_id -<1> expected
Product_name<paracetamol> result
Quantity_available-
<150>
Quantity_added-<50> mrp-
<5>
Click on New button. Verify
details are displayed under
below columns: 1)
Product_id
2) Product_name
3) availability
4) mrp

Take a Screenshot.
5 Enter values in below fields: Changed and As per
Product_id -<1> updated expected
Product_name<paracetamol> Successfully result
Quantity_available-
<200>
Quantity_added-<30> mrp-
<5> Click on Change
button.
Verify details are displayed
under below columns: 1)
Product_id
2) Product_name
3) availability
4) mrp

Take a Screenshot.

5. CONCLUSION: -
Finally, we complete our project with suitable database and design. It helps the
users to keep their records safe and remain the administrator about the stock
balance. Everything is going to be recorded and maintained correctly through this
pharmacy management billing and stock maintenance system.

6. REFERENCES: -
• https://en.wikipedia.org/wiki/Pharmacy_management_system#:
~:text=The%20pharmacy%20management%20system%2C%20
also,medication%20use%20process%20within%20pharmacies.

• https://mocdoc.in/blog/5-mandatory-features-for-a-
pharmacymanagement-system

• https://www.sciencedirect.com/science/article/abs/pii/S0010482
515003790#:~:text=Stock%20management%20is%20one%20of
,of%20constraints%20to%20be%20considered.

You might also like