0% found this document useful (0 votes)
7 views9 pages

APWT Mid Lab-Task

The document outlines a Company-Client Management System for an Advanced Programming in Web Technology course. It details the roles of different users (Admin, Customer, Accountant, Sales and Marketing Person) and their functionalities within the system, including modules for login, registration, sales channels, and product management. Each module includes specific functions, descriptions, and database interactions necessary for the system's operation.

Uploaded by

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

APWT Mid Lab-Task

The document outlines a Company-Client Management System for an Advanced Programming in Web Technology course. It details the roles of different users (Admin, Customer, Accountant, Sales and Marketing Person) and their functionalities within the system, including modules for login, registration, sales channels, and product management. Each module includes specific functions, descriptions, and database interactions necessary for the system's operation.

Uploaded by

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

Department of Computer Science

Final Term Lab Task, Spring 20-21

Course Title ADVANCED PROGRAMMING IN WEB Section B


TECHNOLOGY

Title:
Company – Client Management System

Short Description:

Role Name Description


Admin An admin can login to the system and manage customers, vendors and others
company stuffs. He can also check attendances, manage day and night shifts,
salary of the stuffs along with searching, adding, editing and removing them
from the system. An admin can change web pages static contents form pages
like about us, contact us or blogs by uploading contents or editing them.
Customer The customers can register to the system and make monetary transactions,
track transaction log, get reminder of future transaction date and time, connect
to their respective bank accounts. They can manage their respective accounts
and track flow of money, account details, spent money, earned money, balance
etc. They can make payments for product purchase. Purchase products based
on company offering. View purchase log.
Accountant An accountant can login to the system and check the flow of money,
expenditure of every department with details, request funding from every
department, check available fund, issue money for spending to any
department, account details of all the customers and company stuffs.
Sales and Sales person can sell products on physical store, virtual store and import those
Marketing data to the system. They can manage current sales, plan for upcoming sales and
Person view report of sales. They can also offer sales using e-marketing to specific
customers for specific or a segmented products or services. They can manage
product and pricing as well as track behavior of customers towards specific
products or services.
Business Partner
Vendors
Modules:

Login Module (M1)


Function Description Database
M1F1 There will be a login page with 2 input fields one will N/A
take the users email address and another will take
input of the user’s password. There will also be a
login button which will be used to submit form data
for successful login to the system using a post
request.
M1F2 A backend form validation will occur which will N/A
validate the user’s credentials submitted if they are
secure to pass to the database for validation.
Validations includes:
• Valid email syntax
• Email length < 50 characters
• Null email and password field validation.
• Password length min. 8 characters and max.
20 characters.
• Password contains alphanumeric characters.
If any invalid input is given then error message
should be shown to the view page accordingly.
M1F3 Upon passing the validation steps the user must be Search from database table
searched by the email address in the database and “Customers”, “Admins”,
get the users email, username and password. Then “Vendors”, “Accountants” and
the password must be checked with the user column “email” and return
submitted password if it matches with the database “password”, “user_name”,
password for validation. If it matches then necessary “user_type” fields.
credentials such as user type, user name should be
saved in session of cookie storage and redirected to
the home page of the user using get request. Upon
not finding the user form database or password
mismatch an error message must be shown to the
view.

Logout Module (M2)


Function Description Database
M2F1 User logged into the system can press a log out N/A
button which will redirect them to a logout url by
making a get request that clears the previous session
or cookie credentials of the user which logs him out
of the system and takes him to the login view page.
Registration Module (M3)
Function Description Database
M3F1 Users can register the system from a registration N/A
page where there will be some input fields
including full name, user name, email, password,
confirm password, address, company name, phone
number, city, country. Users need to fillup the
form and make a post request with the help of a
button named sign up.
M3F2 Upon submission of the registration post request a Match data from database table
backend validation will take place that validates if “Customers” and column
all the inputs are valid and match the database “email”, “user_name”.
data and types. Validations include:
• Full name length must be between 3 to 30 Store full_name = full_name,
characters. user_name=user_name,
• Full name must be alphabetic email=email,
• Email length must be between 10 to 50 password=password, city=city,
characters. country=country, phone=phone,
• Email address should be a valid email company_name=company_name,
syntax. user_type=”active”,
• City, country, company name length must date_added=”current_date”,
be between 3 to 20 characters. last_updated=”null” to
• Phone number should be integer type and respective columns of table
length should be min. 11 digit and max. 15 “Customers”.
digits.
• Password must be between 8 to 20
characters and it must be alphanumeric.
• Password and Confirm Password field
must match their input data.
• Full name, email, user name, password,
confirm password, phone number. cannot
be empty.
For any validation error an error message will be
shown and redirected to M3F1. If user name or
email address is already registered to the database
then it will not save the user and its data to the
database and show an error message redirecting
to M3F1. For successful validation the user will be
recorded to the database and redirected to M1F1
with a registration completion message.

Sales Chanel Module (M5)


Functions Descriptions Database
M5F1 A sales channel should be developed in the Select count of products sold from
system in the route “system/sales” where table “physical_store_channel” for
multiple types of channels would be the current date and for the last
present. In this view page there would be a seven days.
dashboard showing number of products
sold for current date and last seven days for Select count of products sold from
each of the below channels and some table “social_media_channel” for the
buttons to navigate to various channels current date and last seven days.
such as:
• Physical Store: Select count of products sold from
“system/sales/physical_store” (GET table “ecommerce_channel” for the
Request) current date and last seven days.
• Social Media:
“system/sales/social_media” (GET
Request)
• Ecommerce Web App:
“system/sales/ecommerce” (GET
Request)

M5F2 On the physical store sales view page on Select count of products sold from
route “system/sales/physical_store” there table “physical_store_channel” for
would be a dashboard which shows number the current date and last seven
of items sold this current date, last seven days.
days, most sold item name, average sales
amount on current month. Select avg. sales amount of current
month from the table
There should be a button named “View “physical_store_channel”.
Sales Log” which redirect to
“system/sales/physical_store/sales_log”. Select max. sold item name from the
table “physical_store_channel”
There should also be a form to sell products
to customers with the fields “Customer Store into database table
Name”, “Address”, “Phone” of customers “physical_store_channel” the data
which will be added to the fields coming “customer_name” =
from the POS machine such as “Product Id”, “customer_name”, “address” =
“Product Name”, “Unit Price”. These all “address”, “phone” = “phone”,
fields will be added with fields called “product_id” =” product_id”,
“Quantity” and “Total Price”. These above- “product_name”=”product_name”,
mentioned fields are on the same form. A “unit_price”=”unit_price”,
backend validation would take place to “quantity”=”quantity”,
validate the followings: “total_price”=”total_price”,
• Customer Name, Address, Phone, “date_sold”=”current_date”,
Product Name, Unit Price, Quantity, “payment_type”=”cash/card/onine”,
Total Price should not be empty. “status” =” sold”.
• Max. quantity of items should be 20
and it cannot be equal to or less
than zero.
• Total Price cannot be equal to or
less than zero.
• Full Name must be alphabetic and
length must be between 3 to 30
characters.
• Address could be alphanumeric
with special characters and the
length must be between 3 to 50
characters.
• Phone number should be integer
digits with min. 11 digit to max. 15
digits.
• Unit price cannot be zero or less.
If all the validation is successful then it
would store the record to the data to table
“physical_store_channel” and give success
message by redirecting to
“system/sales/physical_store” or upon any
validation error or database record error it
would show appropriate error message.
M5F3 On M5F3 there was a button named “View Select all data from table
Sales Log” which redirected to “physical_store_channel” where
“system/sales/physical_store/sales_log”. In “status” = “sold”.
this above route view page, there should be
a report of sold items log of current month Select all data from table
which could be downloaded in pdf or excel “physical_store_channel” where
format with a button “Download Sales “status” = “pending”.
Report”.
Store into database table
There should be also another log of pending “physical_store_channel” the data
sales under the sold items log which can “customer_name” =
also be downloaded in pdf or excel format “customer_name”, “address” =
with a button named “Download Pending “address”, “phone” = “phone”,
Log”. “product_id” =” product_id”,
“product_name”=”product_name”,
A go back button will be there to navigate “unit_price”=”unit_price”,
back to the sales page “quantity”=”quantity”,
“system/sales/physical_store” using “GET” “total_price”=”total_price”,
request. “date_sold”=”current_date”,
“payment_type”=”cash/card/onine”,
Another form will be there in this view page “status” =” sold/pending” that is
which will have a file picker that uploads an pursed from excel file.
excel file containing sales data to store into
database. The excel data and columns
should match the database sales column
“pending_store_channel”. A button called
“Load Sales Data” button is placed under it
which makes a post request to
“system/sales/physical_store/upload_sales-
data”. It then goes under a backend
validation to check:
• File type should be .xlsx, .xls.
• File size must not exceed 5MB.
• File should not be empty.
The file data then parsed from excel file to
store into “physical_store_channel” table.
Upon successful storing it will redirect to
“system/sales/physical_store” with success
message and upon failure it would show
error message.

Product Management Module (M6)


Functions Descriptions Database
M6F1 Product management module start from the route Select count of
“system/product_management”. In this view page there will be existing from
a navigation bar which have buttons “Existing Products”, database table
“Upcoming Products”, “Add Product”. The necessary route for “products” where
the above navigations are: “status” =
• Existing Products: “existing”
“system/product_management/existing_products”
• Upcoming Products : Select count of
“system/product_management/upcoming_products” existing from
• Add Product: database table
“system/product_management/add_product” “products” where
Above mentioned routes are achieved using “GET” method. “status” =
“upcoming”
Again, this view page would have a dashboard containing
number of existing products and upcoming products category
wise.
M6F2 In the existing product management page from M6F1 to the Select all data from
route “system/product_management/existing_products” there table “products” of
would be a list of existing products in the system which would database where
have pagination where each page contains 20 products in the “status” =
list along with an edit and delete button. The buttons would “existing”.
contain the id of the products such as:
• Edit:
“system/product_management/existing_products/edit
/{id}”
• Delete:
“system/product_management/existing_products/dele
te/{id}”
• View Details :
“system/product_management/product/{product_id}/
vendor_details/{vendor_id}”
The list of products can be sorted according to “date_added”,
“quantity”, “category”.
M6F3 On clicking edit button beside each product on M6F2 it will Update the row
create a “GET” request and redirect to route data of table
“system/product_management/existing_products/edit{id}” “products” where
with that particular id of the product. Here a form will be id = “id” and the
present with the information about the product according to data are
the id from the database. This could be edited in that form and “product_name” =
a button “Update Product” should be placed below the form “product_name”,
which will create a post request to “category” =
“system/product_management/existing_products/edit/{id}”. “category”,
Upon submission of the edited data there will take place a “unit_price” =
validation including: “unit_price”,
• Product Name, Category, Unit Price, Status cannot be “status” = “status”,
empty. “last_updated” =
• Status can be only of two types “existing” and “last_updated”.
“upcoming” that should be selected form a dropdown
list.
• Product name should be alphabetic and min. length
should be 5 character to max. length 30 character.
• Category should be selected from a dropdown list
where some category name is present such as
“Grocery”, “Medical”, “Stationary”, etc.
• Unit price cannot be zero or less and should be decimal
type.
After validating all the above criteria, it would update the row
of the table “products” from database according to the selected
id. If there is validation error or database update error it would
redirect to
“system/product_management/existing_products/edit/{id}”
with a “GET” request and appropriate error message. If the
database update is successful then it would give success
message.
M6F4 On clicking delete button beside each product on M6F2 it will Delete a row from
pop up a confirmation for deletion of the product. If it gets table “products” by
“Confirm Deletion” then it would create a “GET” request to using id = “id”
“system/product_management/existing_products/delete/{id}”
with the id of that particular product. This route method would
delete the particular row of the table “products” by using the
id. If it does not get confirmation on the pop up then it would
do nothing and stay in the same page.
M6F5 In the upcoming product management page from M6F1 to the Select all data from
route “system/product_management/upcoming_products” table “products” of
there would be a list of upcoming products in the system database where
which would have pagination where each page contains 20 “status” =
products in the list along with an edit and delete button. The “upcoming”.
buttons would contain the id of the products such as:
• Edit:
“system/product_management/upcoming_products/e
dit/{id}”
• Delete:
• “system/product_management/upcoming_products/d
elete/{id}”
• View Details :
“system/product_management/product/{product_id}/
vendor_details/{vendor_id}”
The list of products can be sorted according to “date_added”,
“quantity”, “category”.
M6F6 On clicking edit button beside each product on M6F5 it will Update the row
create a “GET” request and redirect to route data of table
“system/product_management/upcoming_products/edit{id}” “products” where
with that particular id of the product. Here a form will be id = “id” and the
present with the information about the product according to data are
the id from the database. This could be edited in that form and “product_name” =
a button “Update Product” should be placed below the form “product_name”,
which will create a post request to “category” =
“system/product_management/upcoming_products/edit/{id}” “category”,
. Upon submission of the edited data there will take place a “unit_price” =
validation including: “unit_price”,
• Product Name, Category, Unit Price, Status cannot be “status” = “status”,
empty. “last_updated” =
• Status can be only of two types “existing” and “last_updated”.
“upcoming” that should be selected form a dropdown
list.
• Product name should be alphabetic and min. length
should be 5 character to max. length 30 character.
• Category should be selected from a dropdown list
where some category name is present such as
“Grocery”, “Medical”, “Stationary”, etc.
• Unit price cannot be zero or less and should be decimal
type.
After validating all the above criteria, it would update the row
of the table “products” from database according to the selected
id. If there is validation error or database update error it would
redirect to
“system/product_management/upcoming_products/edit/{id}”
with a “GET” request and appropriate error message. If the
database update is successful then it would give success
message.
M6F7 On clicking delete button beside each product on M6F5 it will Delete a row from
pop up a confirmation for deletion of the product. If it gets table “products” by
“Confirm Deletion” then it would create a “GET” request to using id = “id”
“system/product_management/upcoming_products/delete/{i
d}” with the id of that particular product. This route method
would delete the particular row of the table “products” by
using the id. If it does not get confirmation on the pop up then
it would do nothing and stay in the same page.
M6F8 When “View Details” button is clicked on the existing products Select all data from
list page, and upcoming product list page on M6F2 and M6F5 it table “products”
would show the details of the product as well as the vendor joining table
details information to the users making “GET” request to “vendors” where
another page using route “[Link]” =
“system/product_management/product/{product_id}/vendor_ “product_id” and
details/{vendor_id}”. “[Link]” =
“vendor_id”.
M6F9 To add new product from M6F1 “Add Product” button is Select id and
clicked that makes a “GET” request to vendor name from
“system/product_management/add_product” which shows a table “vendors”.
view page with a form containing necessary fields including
such as “Product Name”, “Category”, “Unit Price”, “Vendor
Name”, “Status”. Vendor name should be selected from drop
down but the corresponding vendor id would be stored in
database. Vendor names would be selected from a drop down
which would come from the “vendors” table in database.
M6F10 On the product add page in route Insert into
“system/product_management/add_product” there is a form “products” table
to add product with necessary field along with a “Add Product” the data values are
button. Clicking this button makes a post request to “product_name” =
“system/product_management/add_product” where a backend “product_name”,
validation takes places and shows error message is the “category” =
following occurs: “category”,
• Product Name, Category, Unit Price, Status, Vendor “unit_price” =
Name cannot be empty. “unit_price”,
• Status can be only of two types “existing” and “status” = “status”,
“upcoming” that should be selected form a dropdown “last_updated” =
list. “last_updated”,
• Product name should be alphabetic and min. length “vendor_id”=”vend
should be 5 character to max. length 30 character. or_id”.
• Category should be selected from a dropdown list
where some category name is present such as
“Grocery”, “Medical”, “Stationary”, etc.
• Unit price cannot be zero or less and should be decimal
type.
• Vendor id should be traced for corresponding vendor
name.
If all the above validations are successful then it would add the
product to the table “products” in the database. If any
validation error or database insertion error occurs it would
show error message by redirecting to
“system/product_management/add_product” using a “GET”
request or if everything is done properly then it would show
success message.

You might also like