20mis0353 VL2021220500513 Pe003
20mis0353 VL2021220500513 Pe003
SLOT – A2+TA2
J-COMPONENT
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.
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
CREATE BILL
MEDICINE (STOCK) INFORMATION
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 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
STOCK DB:
3.4. SCREENSHOTS OF THE SYSTEM:
LOGIN PAGE:
ADMIN LOGIN:
CASHIER LOGIN
MAIN FRAME:
CREATE BILL:
CASHIER DETAILS:
DATA INSERTED (DIALOGUE BOX):
SEARCH BILL:
MEDICINE INFO:
STOCK:
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEve
nt);
}
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
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");
jLabel3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/grpimage/GRP pic.PNG"))); //
NOI18N
jLabel3.setPreferredSize(new java.awt.Dimension(235, 223));
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))))
);
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>
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));
jCheckBox1.setText("Show Password");
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBox1ActionPerformed(evt);
}
});
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");
at1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
at1ActionPerformed(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)))
);
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>
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);
}
}
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));
desktop.setLayer(jButton6,
javax.swing.JLayeredPane.DEFAULT_LAYER);
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));
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>
ac.setVisible(true);
}
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: -
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
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
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
Take a Screenshot
S
CASHIER DETAILS:
5)Email-ID
6)Password
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
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
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.