mmmmm

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 89

A Project Report on

Submitted in partial fulfilment of the requirement for the awards of the degree in

BACHELOR OF COMPUTER APPLICATIONS


By
MANJUNATHA BV (U18FR21S0035)
THARUN KUMAR M(U18FR21S0082)

Under the Guidance of


Mrs. SARITHA M

Department of Computer Science and Applications


RJS First Grade College
(Affiliated to Bangalore City University, Recognised by Government of Karnataka )

Mahayogi Vemana Road, 16th Main Road , 3rd Block ,Koramangala, Bengaluru -560034.
A Project Report on

Submitted in partial fulfilment of the requirement for the awards of the degree in

BACHELOR OF COMPUTER APPLICATIONS


By
MANJUNATHA BV(U18FR21S0035)
THARUN KUMAR M(U18FR21S0082)

Under the Guidance of


Mrs. SARITHA M

Department of Computer Science and Applications


RJS First Grade College
(Affiliated to Bangalore City University, Recognised by Government of Karnataka)

Mahayogi Vemana Road, 16th Main Road , 3rd Block ,Koramangala,Bengaluru560034.


RJS FIRST GRADE COLLEGE
(Affiliated to Bengaluru City University, Recognised by Government of Karnataka)

CERTIFICATE
This is certify that the Project work entitled

DAIRY MANAGEMENT
Submitted in partial fulfilment of the requirement for the award of the degree of

Bachelor of Computer Applications


From Bengaluru City University, Bengaluru is a

result of the bonafide work carried out by

MANJUNATHA BV(U18FR21S0035)

THARUN KUMAR M(U18FR21S0082)


During the academic year 2022-2023

Signature of the Guide Signature of the HOD


Mrs. Saritha M Mrs. Chakradhari P
(Dept of BCA) (Dept of BCA)
RJSFGC RJSFGC
DECLARATION

We, MANJUNATHA BV and THARUN KUMAR M student of 6th sem BCA, RJS First
Grade College, bearing Register Number U18FR21S0035 and U18FR21S0082 hereby
declare that
out by me under the guidance of Mrs.Saritha M, Department of Computer Science &
Applications, RJS First Grade College, Bengaluru and submitted in partial fulfilment of
the requirement for the award of the degree of Bachelor of Computer Applications by the
Bengaluru City University during the academic year 2023-2024. This report has not
submitted to any other Organization /University for any award of degree or certificate.

Date: Name:

Place: Signature:
ACKNOWLEDGEMENT
and who has given blessings, strength, and stayed with me throughout the
successful completion of the project.

I wish to place my heartfelt gratitude to Mrs. Saritha M, an Internal guide.


Department of Computer Science and Applications, RJS First Grade College
for providing the necessary guidance, support, and valuable suggestion during
the course of the project.

I would like to assert my acknowledgment to Mrs.Chakradhari P, HOD of


Computer Science and Applications Department, RJS First Grade College for
providing an opportunity to complete the project under the company with all
the support.

I would like to express sincere thanks Dr. P Nagabhushana Reddy, Principal of


RJS First Grade College for supporting and making me be a part of the project.

Finally, I thank all the staffs of BCA department who have been a source of
inspiration for accomplishing the project successfully.

Name:
Register Number:
Contents

1 INTRODUCATION 1-2

3-6

REQUIREMENT ANALYSIS

7-7

REQUIREMENTS SPECIFICATION

8-9

DESIGN AND IMPLEMENTATION

10-13

TESTING

14-16

DATABASE DESIGN

17-27

SNAPSHOTS
28-29

CONCLUSION

BIBLIOGRAPHY 30-30

APPENDIX 31-77
DAIRY FARM SHOP MANAGEMENT

Chapter 1
INTRODUCTION

The Dairy Farm Shop Management System (DFSMS) is a web based application that can
be accessed over the web. This system can be used to automate the workflow of dairy shop and
their invoices.
The project has been planned to be having the view of distributed architecture, with centralized
storage of the database. The application for the storage of the data has been planned. Using the
constructs of MySQL Server and all the user interfaces has been designed using the PHP

methodology. The standards of security and data protective mechanism have been given a big
choice for proper usage. The application takes care of different modules and their associated
reports, which are produced as per the applicable strategies and standards that are put forwarded
by the administrative staff.
DFSMS is a web-based application which manages the products of dairy shop. It has one module
i.e. admin who manages all the functions of the dairy shop.
1.1 Admin Features:

Dashboard: In this section, admin can see all detail in brief like Total listed categories, companies,
products and also see the sales.

Category: In this section, admin can add new categories and edit, delete old categories.

Company: In this section, admin can add new companies and edit, delete old companies.

Product: In this section, admin can add new products and edit old products.

Search: In this section, admin can search for a product then add the product into the cart and
generate invoice /receipt.

Invoices: In this section, admin can view all generated invoices/receipts.

Dept. of BCA, RJSFGC 2023-2024 Page 1


DAIRY FARM SHOP MANAGEMENT

Reports: In this section, admin can generate two reports, one is B/w date and another one is for
sales.

Admin can also update his profile, change the password and recover the password.

Dept. of BCA, RJSFGC 2023-2024 Page 2


DAIRY FARM SHOP MANAGEMENT

Chapter 2

REQUIREMENT ANALYSIS

2.1 Tool and Technology Used

Introduction to HTML

Hypertext Markup Language (HTML) is the standard markup language for creating web
pages and web applications. With Cascading Style Sheets (CSS) and JavaScript, it forms a triad of
cornerstone technologies for the World Wide Web. Web browsers receive HTML documents from a
web server or from local storage and render the documents into multimedia web pages. HTML
describes the structure of a web page semantically and originally included cues for the appearance of
the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images
and other objects such as interactive forms may be embedded into the rendered page. HTML provides
a means to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written using
angle brackets. Tags such as <img /> and <input /> directly introduce content into the page. Other tags
such as <p>...</p> surround and provide information about document text and may include other tags
as sub-elements. Browsers do not display the HTML tags, but use them to interpret the content of the
page.
HTML can embed programs written in a scripting language such as JavaScript which affects
the behavior and content of web pages. Inclusion of CSS defines the look and layout of content.
The World Wide Web Consortium (W3C), maintainer of both the HTML and the CSS standards,
has encouraged the use of CSS over explicit presentational HTML since 1997.

Introduction To CSS:

Dept. of BCA, RJSFGC 2023-2024 Page 3


DAIRY FARM SHOP MANAGEMENT

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation
of a document written in a markup language. Although most often used to set the visual style of web
pages and user interfaces written in HTML and XHTML, the language can be applied to any XML
document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on
other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most
websites to create visually engaging WebPages, user interfaces for web applications, and user
interfaces for many mobile applications.

CSS is designed primarily to enable the separation of presentation and content, including
aspects such as the layout, colors, and fonts. This separation can improve content accessibility,
provide more flexibility and control in the specification of presentation characteristics, enable
multiple HTML pages to share formatting by specifying the relevant CSS in a separate .css file, and
reduce complexity and repetition in the structural content. Separation of formatting and content
makes it possible to present the same markup page in different styles for different rendering methods,
such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-
based tactile devices. It can also display the web page differently depending on the screen size or
viewing device. Readers can also specify a different style sheet, such as a CSS file stored on their
own computer, to override the one the author specified.
Introduction to PHP:

PHP (Hypertext Preprocessor)is a widely-used open source general-purpose scripting


language that is especially suited for web development and can be embedded into HTML. The best
things in using PHP are that it is extremely simple for a new comer, but offers many advanced features
for a professional programmer, be afraid reading the long list of PHP's features, You can jump
in a short time and start writing simple scripts in a few hours. PHP is an acronym for"PHP: Hypertext
Preprocessor", PHP is a widely-used, open source scripting language,PHP scripts are executed on the
server.PHP is free to download and use.

PHP File

Dept. of BCA, RJSFGC 2023-2024 Page 4


DAIRY FARM SHOP MANAGEMENT
PHP files can contain text, HTML, CSS, JavaScript, and PHPcode.PHP code are executed on
the server, and the result is returned to the browser as plain HTML, PHP files have extension".php"

PHP can generate dynamic page content.PHP can create, open,read,write,delete,and close files on the
server.PHP can collect form data,PHP can send and receive cookies.PHP can add,delete,modify data
in your database,PHP can be used to control user-access.

PHP can encrypt data. With PHP you are not limited to output HTML; you can output
images, PDF files, and even flash movies. You can also output any text, such as XHTML and
XML.PHP runs on various platforms (Windows, Linux, UNIX, Mac OS X, etc.)PHP is compatible
with almost all servers used today (Apache, IIS, etc.)PHP supports a wide range of databases.PHP is
free. Download it from the official PHP resource: www.php.net.PHP is easy to learn and runs
efficiently on the server side.

APACHE SERVER:

The Apache HTTP Server, called Apache, is a free and open-source cross .platform
web server, released under the terms of Apache License 2.0. Apache is developed and maintained
by an open community of developers under the auspices of the Apache Software Foundation. The
Apache HTTP Server is cross-platform; as of 1 June 2017 92%of Apache HTTPS Server copies
run on Linux distributions. Version 2.0 improved support for non- UNIX operating systems such
as Windows and os/2.16l Old versions of Apache were ported to run on OpenVMS and NetWare.

Originally based on the NCSA HTTP server, development of Apache began in early
1995 after work on the NCSA code stalled. Apache played a key role in the initial growth of the
World Wide Web, quickly overtaking NCSA HTTP as the dominant HTTP server, and has
remained most popular since April 1996.In 2009, it became the first web server software to serve
more than 100 million websites. As of July 2016, it was estimated to serve 46%of all active
websites and 43% of the top million websites.

XAMPP:

Dept. of BCA, RJSFGC 2023-2024 Page 5


DAIRY FARM SHOP MANAGEMENT

It is a free and open source cross-platform web server solution stack package developed by
ApacheFriends,2 consisting mainly of the Apache HTTP Server, Maria DB database ,and interpreters
for scripts written in the PHP and programming languages.L3I4 XAMPP stands for Cross-
Platform(X),Apache(A),Maria DB(M),PHP(P)and Perl(P). Xampp is a simple, lightweight
Apache distribution that makes it extremely easy for developers to create a local web server for
Everything needed to set up a web server application (Apache), database (Maria DB), and scripting
language (PHP)-is included in an extractable file. XAMPP is also cross-platform, which means it
works equally well on Linux, Mac and Windows. Since most actual web server deployments use
the same components as XAMPP, xampp makes transitioning from a local test server to a live server
extremely easy as well.

Dept. of BCA, RJSFGC 2023-2024 Page 6


DAIRY FARM SHOP MANAGEMENT
Chapter 3
REQUIREMENTS SPECIFICATION

3.1 Hardware Requirements

Processor Intel(R) Pentium(R) CPU N3700 @ 1.60 GHz

RAM 4 GB

System type 64-bit Operating System, x64 based processor

Output device Monitor (1366*768 Resolution)

Input device Keyboard, Mouse

3.2 Software Requirements

Language Used PHP

Database My SQL

User Interface Design HTML, AJAX, JQUERY, JAVASCRIPT

Web Browser Mozilla, Google Chrome, IE8, OPERA

Software XAMPP Server


Chapter 4
DESIGN AND IMPLEMENTATION

4.1 ER Diagram

Dept. of BCA, RJSFGC 2023-2024 Page 7


DAIRY FARM SHOP MANAGEMENT

Fig. 4.1: ER diagram of Dairy Farm Shop Management System

4.2 UML Diagram

Dept. of BCA, RJSFGC 2023-2024 Page 8


DAIRY FARM SHOP MANAGEMENT

Fig 4.2 UML Diagram for dairy farm shop management system

A UML diagram is a diagram based on the UML (Unified Modeling Language) with the purpose
of visually representing a system along with its main actors, roles, actions, artifacts or classes, in
order to better understand, alter, maintain, or document information about the system.

Chapter 5
TESTING

Dept. of BCA, RJSFGC 2023-2024 Page 9


DAIRY FARM SHOP MANAGEMENT

INTRODUCTION

Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding. In fact, testing is the one step in the software
engineering process that could be viewed as destructive rather than constructive.

A strategy for software testing integrates software test case design methods into a well-planned
series of steps that result in the successful construction of software. Testing is the set of activities
that can be planned in advance and conducted systematically. The underlying motivation of
program testing is to affirm software quality with methods that can economically and effectively
apply to both strategic to both large and small-scale systems.

STRATEGIC APPROACH TO SOFTWARE TESTING


The software engineering process can be viewed as a spiral. Initially system engineering defines
the role of software and leads to software requirement analysis where the information domain,
functions, behavior, performance, constraints and validation criteria for software are established.
Moving inward along the spiral, we come to design and finally to coding. To develop computer
software, we spiral in along streamlines that decrease the level of abstraction on each turn.

A strategy for software testing may also be viewed in the context of the spiral. Unit testing begins
at the vertex of the spiral and concentrates on each unit of the software as implemented in source
code. Testing progress by moving outward along the spiral to integration testing, where the focus
is on the design and the construction of the software architecture. Talking another turn on outward
on the spiral we encounter validation testing where requirements established as part of software
requirements analysis are validated against the software that has been constructed.
Finally we arrive at system testing, where the software and other system elements are tested as a
whole.

Dept. of BCA, RJSFGC 2023-2024 Page 10


DAIRY FARM SHOP MANAGEMENT

5.1 Unit Testing

Unit testing focuses verification effort on the smallest unit of software design, the module. The
unit testing we have is white box oriented and some modules the steps are conducted in parallel.

1. WHITE BOX TESTING


This type of testing ensures that
All independent paths have been exercised at least once
All logical decisions have been exercised on their true and false sides
All loops are executed at their boundaries and within their operational bounds All
internal data structures have been exercised to assure their validity.

Dept. of BCA, RJSFGC 2023-2024 Page 11


DAIRY FARM SHOP MANAGEMENT

To follow the concept of white box testing we have tested each form .we have created
independently to verify that Data flow is correct, All conditions are exercised to check their
validity, All loops are executed on their boundaries.

5.2. BASIC PATH TESTING


Established technique of flow graph with Cyclomatic complexity was used to derive test cases for
all the functions. The main steps in deriving test cases were:
Use the design of the code and draw correspondent flow graph.
Determine the Cyclomatic complexity of resultant flow graph, using formula:
V (G) =E-N+2 or
V (G) =P+1 or
V (G) =Number of Regions
Where V (G) is Cyclomatic complexity,
E is the number of edges,
N is the number of flow graph nodes, P
is the number of predicate nodes.
Determine the basis of set of linearly independent paths.

5.3. CONDITIONAL TESTING


In this part of the testing each of the conditions were tested to both true and false aspects. And all
the resulting paths were tested. So that each path that may be generate on particular condition is
traced to uncover any possible errors.

5.4. DATA FLOW TESTING


This type of testing selects the path of the program according to the location of definition and use
of variables. This kind of testing was used only when some local variable were declared. The
definition-use chain method was used in this type of testing. These were particularly useful in
nested statements.

5.5. LOOP TESTING


In this type of testing all the loops are tested to all the limits possible. The following exercise was
adopted for all loops:

Dept. of BCA, RJSFGC 2023-2024 Page 12


DAIRY FARM SHOP MANAGEMENT
All the loops were tested at their limits, just above them and just below them.
All the loops were skipped at least once.
For nested loops test the inner most loop first and then work outwards.

For concatenated loops the values of dependent loops were set with the help of connected loop.
Unstructured loops were resolved into nested loops or concatenated loops and tested as above.

Dept. of BCA, RJSFGC 2023-2024 Page 13


DAIRY FARM SHOP MANAGEMENT

Chapter 6 DATABASE DESIGN


The data in the system has to be stored and retrieved from database. Designing the database is part
of system design. Data elements and data structures to be stored have been identified at analysis
stage. They are structured and put together to design the data storage and retrieval system.
A database is a collection of interrelated data stored with minimum redundancy to serve many
users quickly and efficiently. The general objective is to make database access easy, quick,
inexpensive and flexible for the user. Relationships are established between the data items and
unnecessary data items are removed. Normalization is done to get an internal consistency of data
and to have minimum redundancy and maximum stability. This ensures minimizing data storage
required, minimizing chances of data inconsistencies and optimizing for updates. The MS Access
database has been chosen for developing the relevant databases.

Dairy Farm Shop Management System (DFSMS) contains 5 MySQL tables:

Tbladmin: This table stores admin login details

Table 6.1: Admin table

Tblcategory: This table stores category details

Dept. of BCA, RJSFGC 2023-2024 Page 14


DAIRY FARM SHOP MANAGEMENT
Table 6.2: Category table

Tblcompany: This table stores company details

Table 6.3: Company table

Tblorders: This table stores invoice details of dairy products.

Table 6.4: Orders table Tblproducts:

This table store dairy product details.

Table 6.5: Products table

Dept. of BCA, RJSFGC 2023-2024 Page 15


DAIRY FARM SHOP MANAGEMENT

MySQL Tables Relationship

Dept. of BCA, RJSFGC 2023-2024 Page 16


DAIRY FARM SHOP MANAGEMENT
Chapter 7
SNAPSHOTS

A screenshot is a digital image of what should be visible on a monitor, TV, or other visual output
device. A common screenshot is created by the operating system or software running on the device.
A screenshot capture may also be created by taking a photo of the screen.

Login Page

Fig. 7.1: Login page

Dashboard

Dept. of BCA, RJSFGC 2023-2024 Page 17


DAIRY FARM SHOP MANAGEMENT

Fig. 7.2: Dashboard page


Admin Profile

Fig. 7.3: Admin profile page Change Password

Fig. 7.4: Change password page

Dept. of BCA, RJSFGC 2023-2024 Page 18


DAIRY FARM SHOP MANAGEMENT
Add Category

Fig.7.5: Add category page

Manage Category

Fig.7.6: Manage category page

Dept. of BCA, RJSFGC 2023-2024 Page 19


DAIRY FARM SHOP MANAGEMENT

Update Category

Fig. 7.7: Update category page

Add Company

Fig. 7.8: Add company page

Dept. of BCA, RJSFGC 2023-2024 Page 20


DAIRY FARM SHOP MANAGEMENT
Manage Company

Fig.7.9: Manage company page

Update Company

Fig.7.10: Update company page

Dept. of BCA, RJSFGC 2023-2024 Page 21


DAIRY FARM SHOP MANAGEMENT

Add Product

Fig.7.11: Add product page

Manage Product

Dept. of BCA, RJSFGC 2023-2024 Page 22


DAIRY FARM SHOP MANAGEMENT
Fig.7.12: Manage product page
Update Product

Fig.7.13: Update product page

Search Product

Dept. of BCA, RJSFGC 2023-2024 Page 23


DAIRY FARM SHOP MANAGEMENT

Fig.7.14: Search product page


Search Product with product

Fig.7.15: Search product with product page

Product Add to Cart

Fig.7.16: Product add to cart page

Dept. of BCA, RJSFGC 2023-2024 Page 24


DAIRY FARM SHOP MANAGEMENT
View Invoice

Fig.7.17: View invoice page

Between Date Report

Fig.7.18: Report between page

Dept. of BCA, RJSFGC 2023-2024 Page 25


DAIRY FARM SHOP MANAGEMENT

Detail of Between Date Report

Fig.7.19: Detail of between date report page

Sales Report

Fig.7.20: Sales report page

Dept. of BCA, RJSFGC 2023-2024 Page 26


DAIRY FARM SHOP MANAGEMENT

Detail of Sales Report

Fig.7.21: Detail of sales report page

Dept. of BCA, RJSFGC 2023-2024 Page 27


DAIRY FARM SHOP MANAGEMENT

Chapter 8 CONCLUSION
It has been a great pleasure for me to work on this exciting and challenging project. This
project proved good for me as it provided practical knowledge of not only programming in PHP
and MySQL web based application. It also provides knowledge about the latest technology used
in developing web enabled application and client server technology that will be great demand in
future. This will provide better opportunities and guidance in future in developing projects
independently.

BENEFITS:

The project is identified by the merits of the system offered to the user. The merits of this project

are as follows: - a web-enabled project.

This project offers user to enter the data through simple and interactive forms. This is very
helpful for the client to enter the desired information through so much simplicity.
The user is mainly more concerned about the validity of the data, whatever he is entering. There
are checks on every stages of any new creation, data entry or updation so that the user cannot
enter the invalid data, which can create problems at later date.
Sometimes the user finds in the later stages of using project that he needs to update some of the
information that he entered earlier. There are options for him by which he can update the
records. Moreover there is restriction for his that he cannot change the primary data field.
This keeps the validity of the data to longer extent.
User is provided the option of monitoring the records he entered earlier. He can see the desired
records with the variety of options provided by him.
From every part of the project the user is provided with the links through framing so that he can
go from one option of the project to other as per the requirement. This is bound to be simple
and very friendly as per the user is concerned. That is, we can say that the project is user
friendly which is one of the primary concerns of any good project.

Dept. of BCA, RJSFGC 2023-2024 Page 28


DAIRY FARM SHOP MANAGEMENT
Data storage and retrieval will become faster and easier to maintain because data is stored in a
systematic manner and in a single database.
Decision making process would be greatly enhanced because of faster processing of information
since data collection from information available on computer takes much less time then manual
system.
Allocating of sample results becomes much faster because at a time the user can see the records
of last years.
Easier and faster data transfer through latest technology associated with the computer and
communication.
Through these features it will increase the efficiency, accuracy and transparency,

LIMITATIONS:

The size of the database increases day-by-day, increasing the load on the database back up and
data maintenance activity.
Training for simple computer operations is necessary for the users working on the system.

Dept. of BCA, RJSFGC 2023-2024 Page 29


DAIRY FARM SHOP MANAGEMENT

BIBLIOGRAPHY

For PHP
https://www.w3schools.com/php/default.asp
https://www.sitepoint.com/php/
https://www.php.net/

For MySQL

https://www.mysql.com/
http://www.mysqltutorial.org

For XAMPP
https://www.apachefriends.org/download.html

Dept. of BCA, RJSFGC 2023-2024 Page 30


DAIRY FARM SHOP MANAGEMENT

APPENDIX

<?php
session_start();
//error_reporting(0);
include('includes/config.php'); if
(strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add Category Code
If (isset ($_POST['submit']))
{
//Getting Post Values
$catname=$_POST['category'];
$catcode=$_POST['categorycode'];
$query=mysqli_query($con,"insert into
tblcategory(CategoryName,CategoryCode) values('$catname','$catcode')");
if($query){ echo "<script>alert('Category added successfully.');</script>"; echo
"<script>window.location.href='add-category.php'</script>";
} else{ echo "<script>alert('Something went wrong. Please try
again.');</script>"; echo "<script>window.location.href='add-
category.php'</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">

Dept. of BCA, RJSFGC 2023-2024 Page 31


DAIRY FARM SHOP MANAGEMENT

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0,
user-scalable=no" />
<title>Add Product</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet" type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css" rel="stylesheet"
type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php'); include_once('includes/sidebar.php');
?>

<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>


<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">

Dept. of BCA, RJSFGC 2023-2024 Page 32


DAIRY FARM SHOP MANAGEMENT
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Product</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span class="feather-icon"><i
data-feather="external-link"></i></span></span>Add Product</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>

<div class="form-row">
<div class="col-md-6 mb-10">

Dept. of BCA, RJSFGC 2023-2024 Page 33


DAIRY FARM SHOP MANAGEMENT

<label for="validationCustom03">Category</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Category"
name="category" required>

<div class="invalid-feedback">Please provide a valid category name.</div>


</div>
</div>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category Code</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Category Code"
name="categorycode" required>
<div class="invalid-feedback">Please provide a valid category code.</div>
</div>
</div>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
</div>
</div>

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

Dept. of BCA, RJSFGC 2023-2024 Page 34


DAIRY FARM SHOP MANAGEMENT

</div>
<!-- /Main Content -->
</div>

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>

</body>
</html>
<?php } ?>

<?php
session_start();
//error_reporting(0);
include('includes/config.php'); if
(strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{

Dept. of BCA, RJSFGC 2023-2024 Page 35


DAIRY FARM SHOP MANAGEMENT

// Add Category Code


if(isset($_POST['update']))
{
$cid=substr(base64_decode($_GET['catid']),0,-5);
//Getting Post Values
$catname=$_POST['category'];
$catcode=$_POST['categorycode'];
$query=mysqli_query($con,"update tblcategory set
CategoryName='$catname',CategoryCode='$catcode' where
id='$cid'"); echo "<script>alert('Category updated
successfully.');</script>"; echo
"<script>window.location.href='manage-categories.php'</script>"; }
?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0,
user-scalable=no" />
<title>Edit Category</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet" type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css" rel="stylesheet"
type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

Dept. of BCA, RJSFGC 2023-2024 Page 36


DAIRY FARM SHOP MANAGEMENT
<!-- HK Wrapper -->
<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php'); include_once('includes/sidebar.php');
?>
<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>
<!-- /Vertical Nav -->
<!-- Main Content -->
<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Category</a></li>
<li class="breadcrumb-item active" aria-current="page">Edit</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span class="feather-icon"><i
data-feather="external-link"></i></span></span>Edit Category</h4>
</div>
<!-- /Title -->

<!-- Row -->

Dept. of BCA, RJSFGC 2023-2024 Page 37


DAIRY FARM SHOP MANAGEMENT

<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>
<?php
$cid=substr(base64_decode($_GET['catid']),0,-5);
$ret=mysqli_query($con,"select * from tblcategory where ID='$cid'");
$cnt=1; while
($row=mysqli_fetch_array($ret)) {
?>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category</label>
<input type="text" class="form-control" id="validationCustom03" value="<?php echo
$row['CategoryName'];?>" name="category" required>
<div class="invalid-feedback">Please provide a valid category name.</div>
</div>
</div>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category Code</label>
<input type="text" class="form-control" id="validationCustom03" value="<?php echo
$row['CategoryCode'];?>" name="categorycode" required>
<div class="invalid-feedback">Please provide a valid category code.</div>
</div>
</div>

Dept. of BCA, RJSFGC 2023-2024 Page 38


DAIRY FARM SHOP MANAGEMENT
<?php } ?>
<button class="btn btn-primary" type="submit" name="update">Update</button>
</form>
</div>
</div>
</section>
</div>
</div>
</div>
<!-- Footer -->
<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>

</body>
</html>
<?php } ?>

Dept. of BCA, RJSFGC 2023-2024 Page 39


DAIRY FARM SHOP MANAGEMENT

<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add Category Code
if(isset($_POST['submit']))
{
//Getting Post Values
$catname=$_POST['category'];
$catcode=$_POST['categorycode'];
$query=mysqli_query($con,"insert into tblcategory(CategoryName,CategoryCode)
values('$catname','$catcode')");
if($query){
echo "<script>alert('Category added successfully.');</script>";
echo "<script>window.location.href='add-category.php'</script>";
} else{
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href='add-category.php'</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />
<title>Add Product</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->

Dept. of BCA, RJSFGC 2023-2024 Page 40


DAIRY FARM SHOP MANAGEMENT
<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>

<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>


<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Product</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>Add
Product</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>

Dept. of BCA, RJSFGC 2023-2024 Page 41


DAIRY FARM SHOP MANAGEMENT

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category</label>
<input type="text" class="form-control" id="validationCustom03"
placeholder="Category" name="category" required>
<div class="invalid-feedback">Please provide a valid category name.</div>
</div>
</div>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category Code</label>
<input type="text" class="form-control" id="validationCustom03"
placeholder="Category Code" name="categorycode" required>
<div class="invalid-feedback">Please provide a valid category code.</div>
</div>
</div>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
</div>
</div>

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</div>
<!-- /Main Content -->

</div>

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-
bootstrap.min.js"></script>

Dept. of BCA, RJSFGC 2023-2024 Page 42


DAIRY FARM SHOP MANAGEMENT
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>

</body>
</html>
<?php } ?>

<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add company Code
if(isset($_POST['submit']))
{
//Getting Post Values
$cname=$_POST['companyname'];
$query=mysqli_query($con,"insert into tblcompany(CompanyName) values('$cname')");
if($query){
echo "<script>alert('Company added successfully.');</script>";
echo "<script>window.location.href='add-company.php'</script>";
} else{
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href='add-company.php'</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />

Dept. of BCA, RJSFGC 2023-2024 Page 43


DAIRY FARM SHOP MANAGEMENT

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-


scale=1.0, user-scalable=no" />
<title>Add Company</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>

<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>


<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Company</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">

Dept. of BCA, RJSFGC 2023-2024 Page 44


DAIRY FARM SHOP MANAGEMENT
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>Add
Company</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Company Name</label>
<input type="text" class="form-control" id="validationCustom03"
placeholder="Company Name" name="companyname" required>
<div class="invalid-feedback">Please provide a valid Company name.</div>
</div>
</div>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
</div>
</div>

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</div>
<!-- /Main Content -->

Dept. of BCA, RJSFGC 2023-2024 Page 45


DAIRY FARM SHOP MANAGEMENT

</div>

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-
bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>

</body>
</html>
<?php } ?>

<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add product Code
if(isset($_POST['submit']))
{
//Getting Post Values
$catname=$_POST['category'];
$company=$_POST['company'];
$pname=$_POST['productname'];
$pprice=$_POST['productprice'];
$query=mysqli_query($con,"insert into
tblproducts(CategoryName,CompanyName,ProductName,ProductPrice)
values('$catname','$company','$pname','$pprice')");
if($query){
echo "<script>alert('Product added successfully.');</script>";
echo "<script>window.location.href='add-product.php'</script>";
} else{
echo "<script>alert('Something went wrong. Please try again.');</script>";

Dept. of BCA, RJSFGC 2023-2024 Page 46


DAIRY FARM SHOP MANAGEMENT
echo "<script>window.location.href='add-product.php'</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />
<title>Add Product</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>

<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>


<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">

Dept. of BCA, RJSFGC 2023-2024 Page 47


DAIRY FARM SHOP MANAGEMENT

<li class="breadcrumb-item"><a href="#">Product</a></li>


<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>Add
Product</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category</label>
<select class="form-control custom-select" name="category" required>
<option value="">Select category</option>
<?php
$ret=mysqli_query($con,"select CategoryName from tblcategory");
while($row=mysqli_fetch_array($ret))
{?>
<option value="<?php echo $row['CategoryName'];?>"><?php echo
$row['CategoryName'];?></option>
<?php } ?>
</select>
<div class="invalid-feedback">Please select a category.</div>
</div>
</div>

<div class="form-row">
<div class="col-md-6 mb-10">

Dept. of BCA, RJSFGC 2023-2024 Page 48


DAIRY FARM SHOP MANAGEMENT
<label for="validationCustom03">Company</label>
<select class="form-control custom-select" name="company" required>
<option value="">Select Company</option>
<?php
$ret=mysqli_query($con,"select CompanyName from tblcompany");
while($row=mysqli_fetch_array($ret))
{?>
<option value="<?php echo $row['CompanyName'];?>"><?php echo
$row['CompanyName'];?></option>
<?php } ?>
</select>
<div class="invalid-feedback">Please select a company.</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Product Name</label>
<input type="text" class="form-control" id="validationCustom03"
placeholder="Product Name" name="productname" required>
<div class="invalid-feedback">Please provide a valid product name.</div>
</div>
</div>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Product Price</label>
<input type="text" class="form-control" id="validationCustom03"
placeholder="Product Price" name="productprice" required>
<div class="invalid-feedback">Please provide a valid product price.</div>
</div>
</div>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
</div>
</div>

Dept. of BCA, RJSFGC 2023-2024 Page 49


DAIRY FARM SHOP MANAGEMENT

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</div>
<!-- /Main Content -->

</div>

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-
bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>

</body>
</html>
<?php } ?>
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Code for deletion
if(isset($_GET['del'])){
$cmpid=substr(base64_decode($_GET['del']),0,-5);
$query=mysqli_query($con,"delete from tblcategory where id='$cmpid'");
echo "<script>alert('Category record deleted.');</script>";
echo "<script>window.location.href='manage-categories.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />

Dept. of BCA, RJSFGC 2023-2024 Page 50


DAIRY FARM SHOP MANAGEMENT
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />
<title>Manage Invoices</title>
<!-- Data Table CSS -->
<link href="vendors/datatables.net-dt/css/jquery.dataTables.min.css"
rel="stylesheet" type="text/css" />
<link href="vendors/datatables.net-responsive-
dt/css/responsive.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">
<!-- Top Navbar -->
<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>
<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>
<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Reports</a></li>
<li class="breadcrumb-item active" aria-current="page">B/w Dates Report
Details</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">

<!-- Title -->


<div class="hk-pg-header">

Dept. of BCA, RJSFGC 2023-2024 Page 51


DAIRY FARM SHOP MANAGEMENT

<h4 class="hk-pg-title"><span class="pg-title-icon">


<?php
$fdate=$_POST['fromdate'];
$tdate=$_POST['todate'];
?>

<span class="feather-icon"><i data-feather="database"></i></span></span>B/w


Dates report from <?php echo $fdate?> to <?php echo $tdate?></h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">
<div class="row">
<div class="col-sm">
<div class="table-wrap">
<table id="datable_1" class="table table-
hover w-100 display pb-30">
<thead>
<tr>
<th>#</th>
<th>Invocie Number</th>
<th>Customer Name</th>
<th>Customer Contact no.</th>
<th>Payment Mode</th>
<th>Invoice Gen. Date</th>
<th>Action</th>

</tr>
</thead>
<tbody>
<?php
$rno=mt_rand(10000,99999);
$query=mysqli_query($con,"select distinct
InvoiceNumber,CustomerName,CustomerContactNo,PaymentMode,InvoiceGenDate from
tblorders where date(InvoiceGenDate) between '$fdate' and '$tdate'");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<td><?php echo $cnt;?></td>

Dept. of BCA, RJSFGC 2023-2024 Page 52


DAIRY FARM SHOP MANAGEMENT
<td><?php echo $row['InvoiceNumber'];?></td>
<td><?php echo $row['CustomerName'];?></td>
<td><?php echo $row['CustomerContactNo'];?></td>
<td><?php echo $row['PaymentMode'];?></td>
<td><?php echo $row['InvoiceGenDate'];?></td>
<td>
<a href="view-invoice.php?invid=<?php echo
base64_encode($row['InvoiceNumber'].$rno);?>" class="mr-25" data-toggle="tooltip"
data-original-title="View Details" target="_blank"> <i class="glyphicon glyphicon-
envelope"></i></a>
</td>
</tr>
<?php
$cnt++;
} ?>

</tbody>
</table>
</div>
</div>
</div>
</section>

</div>
</div>
<!-- /Row -->

</div>
<!-- /Container -->

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<!-- /HK Wrapper -->

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>

Dept. of BCA, RJSFGC 2023-2024 Page 53


DAIRY FARM SHOP MANAGEMENT

<script src="vendors/datatables.net-
bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-dt/js/dataTables.dataTables.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/dataTables.buttons.min.js"></script>
<script src="vendors/datatables.net-buttons-
bs4/js/buttons.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.flash.min.js"></script>
<script src="vendors/jszip/dist/jszip.min.js"></script>
<script src="vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/pdfmake/build/vfs_fonts.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.html5.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.print.min.js"></script>
<script src="vendors/datatables.net-
responsive/js/dataTables.responsive.min.js"></script>
<script src="dist/js/dataTables-data.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
</body>
</html>
<?php } ?>
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add company Code
if(isset($_POST['submit']))
{
//Getting Post Values
$cname=$_POST['companyname'];
$query=mysqli_query($con,"insert into tblcompany(CompanyName) values('$cname')");
if($query){
echo "<script>alert('Company added successfully.');</script>";
echo "<script>window.location.href='add-company.php'</script>";
} else{

Dept. of BCA, RJSFGC 2023-2024 Page 54


DAIRY FARM SHOP MANAGEMENT
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href='add-company.php'</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />
<title>B/w Dates Report</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>

<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>


<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">

Dept. of BCA, RJSFGC 2023-2024 Page 55


DAIRY FARM SHOP MANAGEMENT

<ol class="breadcrumb breadcrumb-light bg-transparent">


<li class="breadcrumb-item"><a href="#">Reports</a></li>
<li class="breadcrumb-item active" aria-current="page">B/w Dates</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>B/w Date
Report Date Selection</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" action="bwdate-report-details.php"
novalidate>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">From Date</label>
<input class="form-control" type="date" name="fromdate" required />
<div class="invalid-feedback">Please provide a from date.</div>
</div>
</div>

<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">To Date</label>
<input class="form-control" type="date" name="todate" required />
<div class="invalid-feedback">Please provide a to date.</div>
</div>
</div>
<button class="btn btn-primary" type="submit" name="submit">Submit</button>
</form>

Dept. of BCA, RJSFGC 2023-2024 Page 56


DAIRY FARM SHOP MANAGEMENT
</div>
</div>
</section>

</div>
</div>
</div>

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</div>
<!-- /Main Content -->

</div>

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-
bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>

</body>
</html>
<?php } ?>
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['login']))
{
$adminuser=$_POST['username'];
$password=md5($_POST['password']);

Dept. of BCA, RJSFGC 2023-2024 Page 57


DAIRY FARM SHOP MANAGEMENT

$query=mysqli_query($con,"select ID from tbladmin where UserName='admin' &&


Password='$password' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['aid']=$ret['ID'];
header('location:dashboard.php');
}

elseif(isset($_POST['login']))
{
$adminuser=$_POST['username'];
$password=md5($_POST['password']);
$query=mysqli_query($con,"select ID from tbladmin where UserName='$adminuser'
&& Password='$password' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['aid']=$ret['ID'];
header('location:dashboard2.php');
}

else{

echo "<script>alert('Invalid details. Please try again.');</script>";


echo "<script>window.location.href='dashboard3.php'</script>";
}
}
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />
<title>Login Page</title>
<meta name="description" content="A responsive bootstrap 4 admin dashboard
template by hencework" />

<!-- Favicon -->


<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="favicon.ico" type="image/x-icon">

Dept. of BCA, RJSFGC 2023-2024 Page 58


DAIRY FARM SHOP MANAGEMENT
<!-- Custom CSS -->
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->


<div class="hk-wrapper">

<!-- Main Content -->


<div class="hk-pg-wrapper hk-auth-wrapper">
<header class="d-flex justify-content-between align-items-center">
<a class="d-flex auth-brand align-items-center" href="#">
<span class="text-white font-30">Dairy Farm Shop Management System</span>
</a>

</header>
<div class="container-fluid">
<div class="row">
<div class="col-xl-5 pa-0">
<div id="owl_demo_1" class="owl-carousel dots-on-item owl-
theme">
<div class="fadeOut item auth-cover-img overlay-wrap"
style="background-image:url(dist/img/banner2.png);">
<div class="auth-cover-info py-xl-0 pt-100 pb-50">
<div class="auth-cover-content text-center w-
xxl-75 w-sm-90 w-xs-100">

</div>
</div>
<div class="bg-overlay bg-trans-dark-50"></div>
</div>
<div class="fadeOut item auth-cover-img overlay-wrap"
style="background-image:url(dist/img/banner1.png);">
<div class="auth-cover-info py-xl-0 pt-100 pb-50">
<div class="auth-cover-content text-center w-
xxl-75 w-sm-90 w-xs-100">

</div>
</div>
<div class="bg-overlay bg-trans-dark-50"></div>
</div>

Dept. of BCA, RJSFGC 2023-2024 Page 59


DAIRY FARM SHOP MANAGEMENT

</div>
</div>
<div class="col-xl-7 pa-0">
<div class="auth-form-wrap py-xl-0 py-50">
<div class="auth-form w-xxl-55 w-xl-75 w-sm-90 w-xs-100">
<form method="post">
<h1 class="display-4 mb-10">Welcome Back
:)</h1>

<div class="form-group">
<input class="form-control" placeholder="Username" type="text" name="username"
required="true">
</div>

<div class="form-group">
<div class="input-group">
<input class="form-control" placeholder="Password" type="password"
name="password" required="true">
<div class="input-group-append">
<span class="input-group-text"><span class="feather-icon"><i data-feather="eye-
off"></i></span></span>
</div>
</div>
</div>

<button class="btn btn-warning btn-block" type="submit"


name="login">Login</button>

</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /Main Content -->

</div>
<!-- /HK Wrapper -->

<!-- jQuery -->


<script src="vendors/jquery/dist/jquery.min.js"></script>

Dept. of BCA, RJSFGC 2023-2024 Page 60


DAIRY FARM SHOP MANAGEMENT
<!-- Bootstrap Core JavaScript -->
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>

<!-- Slimscroll JavaScript -->


<script src="dist/js/jquery.slimscroll.js"></script>

<!-- Fancy Dropdown JS -->


<script src="dist/js/dropdown-bootstrap-extended.js"></script>

<!-- Owl JavaScript -->


<script src="vendors/owl.carousel/dist/owl.carousel.min.js"></script>

<!-- FeatherIcons JavaScript -->


<script src="dist/js/feather.min.js"></script>

<!-- Init JavaScript -->


<script src="dist/js/init.js"></script>
<script src="dist/js/login-data.js"></script>
</body>

</html>
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Code for deletion
if(isset($_GET['del'])){
$cmpid=substr(base64_decode($_GET['del']),0,-5);
$query=mysqli_query($con,"delete from tblcategory where id='$cmpid'");
echo "<script>alert('Category record deleted.');</script>";
echo "<script>window.location.href='manage-categories.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />

Dept. of BCA, RJSFGC 2023-2024 Page 61


DAIRY FARM SHOP MANAGEMENT

<title>Manage Invoices</title>
<!-- Data Table CSS -->
<link href="vendors/datatables.net-dt/css/jquery.dataTables.min.css"
rel="stylesheet" type="text/css" />
<link href="vendors/datatables.net-responsive-
dt/css/responsive.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">
<!-- Top Navbar -->
<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>
<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>
<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper" >
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Invoice</a></li>
<li class="breadcrumb-item active" aria-current="page">View</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">

<!-- Title -->


<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span class="feather-
icon"><i data-feather="file"></i></span></span>View Invoice</h4>
</div>
<!-- /Title -->

Dept. of BCA, RJSFGC 2023-2024 Page 62


DAIRY FARM SHOP MANAGEMENT

<!-- Row -->


<div class="row">
<div class="col-xl-12">

<section class="hk-sec-wrapper hk-invoice-wrap pa-35" id ='DivIdToPrint'>


<div class="invoice-from-wrap">
<div class="row">
<div class="col-md-7 mb-20">
<h3 class="mb-35 font-weight-600"> DFSMS </h3>
<h6 class="mb-5">Dairy Farm Shop Management System</h6>

<script>
function printDiv()
{

var divToPrint=document.getElementById('DivIdToPrint');

var newWin=window.open('','Print-Window');

newWin.document.open();

newWin.document.write('<html><body
onload="window.print()">'+divToPrint.innerHTML+'</body></html>');

newWin.document.close();

setTimeout(function(){newWin.close();},10);

}
</script>

</div>

<?php
//Consumer Details
$inid=$_SESSION['invoice'];

Dept. of BCA, RJSFGC 2023-2024 Page 63


DAIRY FARM SHOP MANAGEMENT

$query=mysqli_query($con,"select distinct
InvoiceNumber,CustomerName,CustomerContactNo,PaymentMode,InvoiceGenDate from
tblorders where InvoiceNumber='$inid'");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<div class="col-md-5 mb-20" >
<h4 class="mb-35 font-weight-600">Invoice / Receipt</h4>
<span class="d-block">Date:<span class="pl-10 text-dark"><?php echo
$row['InvoiceGenDate'];?></span></span>
<span class="d-block">Invoice / Receipt #<span class="pl-10 text-dark"><?php echo
$row['InvoiceNumber'];?></span></span>
<span class="d-block">Customer #<span class="pl-10 text-dark"><?php echo
$row['CustomerName'];?></span></span>
<span class="d-block">Customer Mobile No #<span class="pl-10 text-dark"><?php echo
$row['CustomerContactNo'];?></span></span>
<span class="d-block">Payment Mode #<span class="pl-10 text-dark"><?php echo
$row['PaymentMode'];?></span></span>
</div>
</div>
</div>
<?php } ?>
<hr class="mt-0">

<div class="row" >


<div class="col-sm">
<div class="table-wrap">
<table class="table mb-0" border="1">
<thead>
<tr>
<th>#</th>
<th >Product Name</th>
<th>Category</th>
<th>Company</th>
<th width="5%">Quantity</th>
<th width="10%">Unit Price</th>
<th width="10%">Price</th>

</tr>
</thead>
<tbody>

Dept. of BCA, RJSFGC 2023-2024 Page 64


DAIRY FARM SHOP MANAGEMENT
<?php
//Product Details
$query=mysqli_query($con,"select
tblproducts.CategoryName,tblproducts.ProductName,tblproducts.CompanyName,tblprod
ucts.ProductPrice,tblorders.Quantity from tblorders join tblproducts on
tblproducts.id=tblorders.ProductId where tblorders.InvoiceNumber='$inid'");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row['ProductName'];?></td>
<td><?php echo $row['CategoryName'];?></td>
<td><?php echo $row['CompanyName'];?></td>
<td><?php echo $qty=$row['Quantity'];?></td>
<td><?php echo $ppu=$row['ProductPrice'];?></td>
<td><?php echo $subtotal=number_format($ppu*$qty,2);?></td>
</tr>

<?php
$grandtotal+=$subtotal;
$cnt++;
} ?>
<tr>
<th colspan="6" style="text-align:center; font-size:20px;">Total</th>

<th style="text-align:left; font-size:20px;"><?php echo


number_format($grandtotal,2);?></th>

</tr>
</tbody>
</table>
</div>
</div>
</div>

</section>

</div>

Dept. of BCA, RJSFGC 2023-2024 Page 65


DAIRY FARM SHOP MANAGEMENT

</div>
<input type='button' id='btn' value='Print' onclick='printDiv();'>
<!-- /Row -->

<div class="razorpay-embed-btn" data-


url="https://pages.razorpay.com/pl_GDHySC8xb8V2TZ/view" data-text="Pay Now" data-
color="#528FF0" data-size="large" align="right">
<script>
(function(){
var d=document; var x=!d.getElementById('razorpay-embed-btn-js')
if(x){ var s=d.createElement('script'); s.defer=!0;s.id='razorpay-embed-btn-
js';
s.src='https://cdn.razorpay.com/static/embed_btn/bundle.js';d.body.appendC
hild(s);} else{var rzp=window['__rzp__'];
rzp && rzp.init && rzp.init()}})();
</script>
</div>

</div>
<!-- /Container -->

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<!-- /HK Wrapper -->

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="vendors/datatables.net-
bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-dt/js/dataTables.dataTables.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/dataTables.buttons.min.js"></script>

Dept. of BCA, RJSFGC 2023-2024 Page 66


DAIRY FARM SHOP MANAGEMENT
<script src="vendors/datatables.net-buttons-
bs4/js/buttons.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.flash.min.js"></script>
<script src="vendors/jszip/dist/jszip.min.js"></script>
<script src="vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/pdfmake/build/vfs_fonts.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.html5.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.print.min.js"></script>
<script src="vendors/datatables.net-
responsive/js/dataTables.responsive.min.js"></script>
<script src="dist/js/dataTables-data.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
</body>
</html>
<?php } ?>
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Code for deletion
if(isset($_GET['del'])){
$cmpid=substr(base64_decode($_GET['del']),0,-5);
$query=mysqli_query($con,"delete from tblcategory where id='$cmpid'");
echo "<script>alert('Category record deleted.');</script>";
echo "<script>window.location.href='manage-categories.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />

Dept. of BCA, RJSFGC 2023-2024 Page 67


DAIRY FARM SHOP MANAGEMENT

<title>Manage Invoices</title>
<!-- Data Table CSS -->
<link href="vendors/datatables.net-dt/css/jquery.dataTables.min.css"
rel="stylesheet" type="text/css" />
<link href="vendors/datatables.net-responsive-
dt/css/responsive.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">
<!-- Top Navbar -->
<?php include_once('includes/navbar.php');
include_once('includes/sidebar2.php');
?>
<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>
<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper" >
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Invoice</a></li>
<li class="breadcrumb-item active" aria-current="page">View</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">

<!-- Title -->


<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span class="feather-
icon"><i data-feather="file"></i></span></span>View Invoice</h4>
</div>
<!-- /Title -->

Dept. of BCA, RJSFGC 2023-2024 Page 68


DAIRY FARM SHOP MANAGEMENT

<!-- Row -->


<div class="row">
<div class="col-xl-12">

<section class="hk-sec-wrapper hk-invoice-wrap pa-35" id ='DivIdToPrint'>


<div class="invoice-from-wrap">
<div class="row">
<div class="col-md-7 mb-20">
<h3 class="mb-35 font-weight-600"> DFSMS </h3>
<h6 class="mb-5">Dairy Farm Shop Management System</h6>

<script>
function printDiv()
{

var divToPrint=document.getElementById('DivIdToPrint');

var newWin=window.open('','Print-Window');

newWin.document.open();

newWin.document.write('<html><body
onload="window.print()">'+divToPrint.innerHTML+'</body></html>');

newWin.document.close();

setTimeout(function(){newWin.close();},10);

}
</script>

</div>

<?php
//Consumer Details
$inid=$_SESSION['invoice'];

Dept. of BCA, RJSFGC 2023-2024 Page 69


DAIRY FARM SHOP MANAGEMENT

$query=mysqli_query($con,"select distinct
InvoiceNumber,CustomerName,CustomerContactNo,PaymentMode,InvoiceGenDate from
tblorders where InvoiceNumber='$inid'");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<div class="col-md-5 mb-20" >
<h4 class="mb-35 font-weight-600">Invoice / Receipt</h4>
<span class="d-block">Date:<span class="pl-10 text-dark"><?php echo
$row['InvoiceGenDate'];?></span></span>
<span class="d-block">Invoice / Receipt #<span class="pl-10 text-dark"><?php echo
$row['InvoiceNumber'];?></span></span>
<span class="d-block">Customer #<span class="pl-10 text-dark"><?php echo
$row['CustomerName'];?></span></span>
<span class="d-block">Customer Mobile No #<span class="pl-10 text-dark"><?php echo
$row['CustomerContactNo'];?></span></span>
<span class="d-block">Payment Mode #<span class="pl-10 text-dark"><?php echo
$row['PaymentMode'];?></span></span>
</div>
</div>
</div>
<?php } ?>
<hr class="mt-0">

<div class="row" >


<div class="col-sm">
<div class="table-wrap">
<table class="table mb-0" border="1">
<thead>
<tr>
<th>#</th>
<th >Product Name</th>
<th>Category</th>
<th>Company</th>
<th width="5%">Quantity</th>
<th width="10%">Unit Price</th>
<th width="10%">Price</th>

</tr>
</thead>
<tbody>

Dept. of BCA, RJSFGC 2023-2024 Page 70


DAIRY FARM SHOP MANAGEMENT
<?php
//Product Details
$query=mysqli_query($con,"select
tblproducts.CategoryName,tblproducts.ProductName,tblproducts.CompanyName,tblprod
ucts.ProductPrice,tblorders.Quantity from tblorders join tblproducts on
tblproducts.id=tblorders.ProductId where tblorders.InvoiceNumber='$inid'");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row['ProductName'];?></td>
<td><?php echo $row['CategoryName'];?></td>
<td><?php echo $row['CompanyName'];?></td>
<td><?php echo $qty=$row['Quantity'];?></td>
<td><?php echo $ppu=$row['ProductPrice'];?></td>
<td><?php echo $subtotal=number_format($ppu*$qty,2);?></td>
</tr>

<?php
$grandtotal+=$subtotal;
$cnt++;
} ?>
<tr>
<th colspan="6" style="text-align:center; font-size:20px;">Total</th>

<th style="text-align:left; font-size:20px;"><?php echo


number_format($grandtotal,2);?></th>

</tr>
</tbody>
</table>
</div>
</div>
</div>

</section>

</div>

Dept. of BCA, RJSFGC 2023-2024 Page 71


DAIRY FARM SHOP MANAGEMENT

</div>
<input type='button' id='btn' value='Print' onclick='printDiv();'>
<!-- /Row -->

<div class="razorpay-embed-btn" data-


url="https://pages.razorpay.com/pl_GDHySC8xb8V2TZ/view" data-text="Pay Now" data-
color="#528FF0" data-size="large" align="right">
<script>
(function(){
var d=document; var x=!d.getElementById('razorpay-embed-btn-js')
if(x){ var s=d.createElement('script'); s.defer=!0;s.id='razorpay-embed-btn-
js';
s.src='https://cdn.razorpay.com/static/embed_btn/bundle.js';d.body.appendC
hild(s);} else{var rzp=window['__rzp__'];
rzp && rzp.init && rzp.init()}})();
</script>
</div>

</div>
<!-- /Container -->

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<!-- /HK Wrapper -->

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="vendors/datatables.net-
bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-dt/js/dataTables.dataTables.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/dataTables.buttons.min.js"></script>

Dept. of BCA, RJSFGC 2023-2024 Page 72


DAIRY FARM SHOP MANAGEMENT
<script src="vendors/datatables.net-buttons-
bs4/js/buttons.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.flash.min.js"></script>
<script src="vendors/jszip/dist/jszip.min.js"></script>
<script src="vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/pdfmake/build/vfs_fonts.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.html5.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.print.min.js"></script>
<script src="vendors/datatables.net-
responsive/js/dataTables.responsive.min.js"></script>
<script src="dist/js/dataTables-data.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
</body>
</html>
<?php } ?>
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Code for deletion
if(isset($_GET['del'])){
$cmpid=substr(base64_decode($_GET['del']),0,-5);
$query=mysqli_query($con,"delete from tblcategory where id='$cmpid'");
echo "<script>alert('Category record deleted.');</script>";
echo "<script>window.location.href='manage-categories.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no" />

Dept. of BCA, RJSFGC 2023-2024 Page 73


DAIRY FARM SHOP MANAGEMENT

<title>Manage Categories</title>
<!-- Data Table CSS -->
<link href="vendors/datatables.net-dt/css/jquery.dataTables.min.css"
rel="stylesheet" type="text/css" />
<link href="vendors/datatables.net-responsive-
dt/css/responsive.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet"
type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css"
rel="stylesheet" type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">
<!-- Top Navbar -->
<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>
<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>
<!-- /Vertical Nav -->

<!-- Main Content -->


<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Category</a></li>
<li class="breadcrumb-item active" aria-current="page">Manage</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">

<!-- Title -->


<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span class="feather-
icon"><i data-feather="database"></i></span></span>Manage Categories</h4>
</div>
<!-- /Title -->

Dept. of BCA, RJSFGC 2023-2024 Page 74


DAIRY FARM SHOP MANAGEMENT

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">
<div class="row">
<div class="col-sm">
<div class="table-wrap">
<table id="datable_1" class="table table-
hover w-100 display pb-30">
<thead>
<tr>
<th>#</th>
<th>Category</th>
<th>Category Code</th>
<th>Posting Date</th>
<th>Action</th>

</tr>
</thead>
<tbody>
<?php
$rno=mt_rand(10000,99999);
$query=mysqli_query($con,"select * from tblcategory");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row['CategoryName'];?></td>
<td><?php echo $row['CategoryCode'];?></td>
<td><?php echo $row['PostingDate'];?></td>
<td>
<a href="edit-category.php?catid=<?php echo base64_encode($row['id'].$rno);?>"
class="mr-25" data-toggle="tooltip" data-original-title="Edit"> <i class="icon-
pencil"></i></a>
<a href="manage-categories.php?del=<?php echo base64_encode($row['id'].$rno);?>"
data-toggle="tooltip" data-original-title="Delete" onclick="return confirm('Do
you really want to delete?');"> <i class="icon-trash txt-danger"></i> </a>
</td>
</tr>
<?php

Dept. of BCA, RJSFGC 2023-2024 Page 75


DAIRY FARM SHOP MANAGEMENT

$cnt++;
} ?>

</tbody>
</table>
</div>
</div>
</div>
</section>

</div>
</div>
<!-- /Row -->

</div>
<!-- /Container -->

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<!-- /HK Wrapper -->

<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="vendors/datatables.net-
bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-dt/js/dataTables.dataTables.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/dataTables.buttons.min.js"></script>
<script src="vendors/datatables.net-buttons-
bs4/js/buttons.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.flash.min.js"></script>
<script src="vendors/jszip/dist/jszip.min.js"></script>
<script src="vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/pdfmake/build/vfs_fonts.js"></script>
<script src="vendors/datatables.net-
buttons/js/buttons.html5.min.js"></script>

Dept. of BCA, RJSFGC 2023-2024 Page 76


DAIRY FARM SHOP MANAGEMENT
<script src="vendors/datatables.net-
buttons/js/buttons.print.min.js"></script>
<script src="vendors/datatables.net-
responsive/js/dataTables.responsive.min.js"></script>
<script src="dist/js/dataTables-data.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
</body>
</html>
<?php } ?>

Dept. of BCA, RJSFGC 2023-2024 Page 77

You might also like