លំហសិក្សាធិការកម្ពុជា លំហសិក្សាធិការកម្ពុជា V1.0
ចូល ចុះឈ្មោះ

Design and Development of Retail POS and Inventory Management System Using PyQt6 and SQLite3

មូលសង្ខេប / Abstract

Small retail businesses often face difficulties in managing products, inventory, sales transactions, and sales records efficiently when using manual or paper-based methods. These methods may result in inaccurate inventory records, calculation errors, and difficulties in tracking sales information. This project aims to design and develop a desktop-based Retail Point of Sale (POS) and Inventory Management System to improve the management of retail operations. The system is developed using PyQt6 for the graphical user interface and SQLite3 for local database management. The Research and Development (R&D) approach is applied to identify system requirements, design the system architecture and database, develop the user interface and core functions, and plan system testing. The proposed system includes product management, inventory management, sales transactions, search functionality, stock monitoring, tax and discount calculation, and sales reporting. The system is expected to provide a simple and efficient solution for managing retail products, inventory, and sales while reducing manual work and improving data accuracy.

ពាក្យគន្លឹះ

I. Introduction

1.1 Background of the Study

Retail businesses need to manage several daily activities, including product management, inventory control, sales transactions, and sales record keeping. Accurate inventory and sales information is important because it allows businesses to monitor available products and understand their sales performance.

However, some small retail businesses still rely on manual methods such as notebooks, spreadsheets, or simple records to manage their products and sales. These methods can make it difficult to update inventory after each transaction, identify low-stock products, calculate the total price accurately, and generate sales reports.

A Point of Sale (POS) and Inventory Management System can help organize these activities in a single application. A computerized system can automate product management, sales calculations, inventory updates, and data storage. Therefore, this project focuses on designing and developing a desktop-based Retail POS and Inventory Management System using PyQt6 and SQLite3. PyQt6 is used to develop the graphical user interface, while SQLite3 is used to store and manage the system data locally.

Figure 1.1: Current Retail Sales and Inventory Workflow

Inventory Flow Chart For Retail Sector | PowerPoint Slides ...

1.2 Problem Statement

Manual management of retail sales and inventory can create several operational problems. First, product and inventory records may not be updated consistently after sales transactions. Second, manual calculations of prices, taxes, and discounts can result in calculation errors. Third, identifying products with low stock can be difficult without an automated monitoring function. Finally, preparing daily or monthly sales reports manually can require additional time and effort.

Therefore, there is a need for a simple desktop-based system that can integrate product management, inventory management, sales transactions, calculations, and reporting in one application. This project addresses these problems by designing and developing a Retail POS and Inventory Management System using PyQt6 and SQLite3.

Table 1.1: Problems and Impacts

1.3 Research Questions

This project addresses the following research questions:

  1. 1. How can a desktop-based POS and inventory management system be designed to support retail operations?
  2. How can PyQt6 and SQLite3 be integrated to develop an effective retail management application?
  3. How can CRUD operations and business logic be implemented to manage products, inventory, and sales transactions?
  4. How can the system improve the accuracy and efficiency of retail sales and inventory management?

1.4 Objectives

General Objective

To design and develop a desktop-based Retail POS and Inventory Management System using PyQt6 and SQLite3.

Specific Objectives

  1. To analyze the requirements of a retail POS and inventory management system.
  2. To design a relational database for managing products, inventory, and sales data.
  3. To develop a user-friendly graphical user interface using PyQt6.
  4. To implement CRUD operations for product and inventory management.
  5. To implement sales transactions with tax, discount, and stock deduction functionality.
  6. To provide search and sales reporting functions for retail management.
  7. To prepare a testing approach to verify the functionality and accuracy of the system.

Figure 1.2: Objective Mapping

1.5 Scope and Limitations

Scope

The proposed system focuses on the basic operations of a small retail business. The system includes product management, category management, inventory stock-in and stock-out, product search, sales transactions, tax and discount calculation, automatic stock deduction, low-stock monitoring, and sales reporting. The application is designed as a desktop-based system using PyQt6 and SQLite3.

Limitations

The initial version of the system has several limitations. It uses a local SQLite database and does not provide cloud synchronization. Online payment integration, barcode or QR-code scanning, multi-branch management, and advanced role-based access control are outside the scope of the current version. These features may be considered for future development.

Figure 1.3: Scope and Limitations

II. Literature Review

2.1 Software Development Life Cycle and Research & Development

Software development requires a structured process to identify requirements, design a solution, implement the system, and evaluate the developed product. Software Development Life Cycle (SDLC) provides a systematic framework for organizing software development activities. The Research and Development (R&D) approach is also suitable for this project because it focuses on identifying a problem, developing a solution, testing the solution, and improving the resulting system.

For this project, the R&D process consists of problem identification, requirement collection, system design, implementation, testing, improvement, and documentation. This process provides a structured approach for developing the Retail POS and Inventory Management System. 

Figure 2.1: R&D Development Lifecycle

2.2 Requirements Engineering

Requirements engineering is the process of identifying, analyzing, documenting, and validating the requirements of a software system. In this project, requirements are divided into functional and non-functional requirements.

Functional requirements describe what the system should do, such as managing products, updating inventory, processing sales, calculating tax and discounts, searching products, and generating reports. Non-functional requirements describe system qualities such as usability, data integrity, validation, performance, and reliability.

Table 2.1: Functional and Non-Functional Requirements

2.3 GUI and Event-Driven Programming

A Graphical User Interface (GUI) allows users to interact with software through visual components such as buttons, text fields, tables, menus, and dialogs. PyQt6 provides Python bindings for the Qt framework and supports the development of desktop graphical applications.

The system uses event-driven programming, where user actions such as clicking a button or selecting an item trigger specific function. PyQt6 uses the signal-slot mechanism to connect user interface events with application functions. This approach is used in the project to support actions such as adding products, updating records, processing sales, and searching data.

Figure 2.2: PyQt6 Signal-Slot Interaction

2.4 SQLite3 Database

SQLite3 is a lightweight relational database used to store structured data locally. It is suitable for this desktop application because it does not require a separate database server. It uses related tables, primary keys, and foreign keys to manage products, inventory, sales, and maintain data integrity.

Figure 2.3: Relational Database Concept

2.5 CRUD and Business Logic

CRUD refers to the four basic database operations: Create, Read, Update, and Delete. These operations are important for managing product and inventory information in the proposed system.

The system also applies business logic to support retail operations. Examples include automatically deducting stock after a sale, displaying low-stock alerts, calculating tax, applying discounts, calculating the final transaction total, and generating receipts. These rules connect the user interface with the database and ensure that retail transactions are processed consistently.

Table 2.2: CRUD Module Mapping

III. Research and Development Methodology

3.1 R&D Model

This project applies a Research and Development (R&D) approach to guide the design and development of the Retail POS and Inventory Management System. The development process consists of several stages: problem identification, requirement collection, system design, implementation, testing, improvement, and documentation.

First, the problems associated with manual retail sales and inventory management are identified. Second, system requirements are collected and analyzed to determine the necessary functions. Third, the system architecture, database, and user interface are designed. The proposed functions are then implemented using PyQt6 and SQLite3. After implementation, the system will be tested to identify functional errors and verify whether the requirements are satisfied. Finally, improvements and documentation will be prepared based on the testing results.

3.2 Requirement Collection

The system requirements were collected by identifying the main needs of a small retail business, focusing on product, inventory, sales, and report management.

The main methods used were observation, user scenarios, and document review. Observation helped understand common retail activities, while user scenarios identified required functions. Document review examined project requirements and relevant software development references.

Based on the collected requirements, the system should support product and category management, inventory management, sales processing, search, low-stock alerts, and daily or monthly reports.

3.3 Functional Requirements

The functional requirements define the main operations that the Retail POS and Inventory Management System should provide.

Table 3.1: Functional Requirement

No

Functional Requirement

Description

01

Product Management

Add, view, update, delete, and search products

02

Category Management

Add, view, update, and delete product categories

03

Inventory Management

Record stock-in and stock-out activities

04

Low-Stock Alert

Identify products below the reorder level

05

Sales Management

Process customer sales transactions

06

Tax Calculation

Calculate tax based on the transaction

07

Discount

Apply fixed or percentage discounts

08

Stock Deduction

Automatically reduce stock after a sale

09

Search

Search products by name or product code

10

Sales Reports

Generate daily and monthly sales information


3.4 Non-Functional Requirements

The non-functional requirements describe the quality and performance expected from the system. The system should have a simple and user-friendly interface so that users can easily perform common tasks such as managing products, updating inventory, and processing sales.

The system should maintain data integrity by validating user input and preventing invalid data, such as duplicate product codes or negative stock quantities. The system should also provide acceptable performance when searching products, saving data, and processing sales.

For data protection, the system should store information securely in the local SQLite3 database and support basic backup of database data. The system may also include basic user roles or access control where necessary to prevent unauthorized operations.

3.5 System Architecture

The proposed system follows a layered architecture consisting of the user interface layer, service or controller layer, data access layer, and SQLite database. The UI layer is developed using PyQt6 and is responsible for displaying information and receiving user input. The service or controller layer processes application logic and coordinates user actions. The data access layer manages communication between the application and the database. SQLite3 is used as the local database for storing product, inventory, and sales information.

This layered structure separates the user interface from data management and business logic, making the system easier to organize and maintain.

Figure 3.2: System Architecture

3.6 Database Design

The system uses SQLite3 as the relational database for storing and managing application data. The database is designed to organize information into separate but related tables. Primary keys are used to uniquely identify records, while foreign keys are used to establish relationships between related tables.

The main database entities include categories, products, inventory records, sales transactions, and sale items. The database design aims to reduce data duplication and maintain data integrity. Foreign key relationships are used where necessary to ensure that related records remain consistent.

Figure 3.3: ERD

3.7 PyQt6 UI/UX Design

The user interface is designed using PyQt6 to provide a simple and organized desktop application. It includes Dashboard, Product Management, Inventory Management, Sales/POS, and Reports.

Qt layouts such as form, horizontal, vertical, and grid layouts are used to organize buttons, input fields, tables, and other components. The design focuses on consistency, readability, and ease of use.

Figure 3.4: PyQt6 UI Wireframe

3.8 CRUD and Validation

CRUD operations are implemented to manage product and inventory records. The Create operation allows users to add new records, Read allows users to view and search existing records, Update allows users to modify existing information, and Delete allows users to remove records when necessary.

Input validation is applied to prevent invalid data from entering the database. Required fields must be completed before a record is saved. Product codes should not be duplicated, prices should not contain invalid values, and stock quantities should not become negative. Validation messages are displayed to inform users when an input does not satisfy the system rules.

Figure 3.5: CRUD & Validation Flowchart

3.9 Business Logic

The system applies business rules to ensure that retail transactions are processed correctly. When a customer purchases a product, the system calculates the subtotal based on product price and quantity. Tax and discount values are then applied according to the configured rules to determine the final total.

After a successful sale, the corresponding product stock is automatically reduced by the quantity sold. The system also checks the remaining stock against the reorder level and displays a low-stock alert when the available quantity is below the defined threshold.

The main business rules include stock deduction, low-stock monitoring, tax calculation, discount calculation, receipt generation, and final total calculation.

Table 3.2: Business Rule Matrix

References

[1] IEEE Author Center, IEEE Reference Guide, IEEE, 2025.

[2] ISO/IEC/IEEE, ISO/IEC/IEEE 12207:2017, Systems and Software Engineering - Software Life Cycle Processes. Geneva, Switzerland: ISO, 2017.

[3] ISO/IEC/IEEE, ISO/IEC/IEEE 29148:2018, Systems and Software Engineering - Life Cycle Processes - Requirements Engineering. Geneva, Switzerland: ISO, 2018.

[4] Qt Company, Signals and Slots - Qt for Python Documentation, Qt Documentation, 2026.

[5] Python Software Foundation, sqlite3 - DB-API 2.0 Interface for SQLite Databases, Python Documentation, 2026.

[6] SQLite Consortium, SQLite Foreign Key Support, SQLite Documentation, 2026.

[7] I. Sommerville, Software Engineering, 10th ed. Boston, MA, USA: Pearson, 2016.

[8] R. S. Pressman and B. R. Maxim, Software Engineering: A Practitioner’s Approach, 9th ed. New York, NY, USA: McGraw - Hill, 2020.


ចែករំលែក
រក្សាទុក
មតិយោបល់ 0
ចូលគណនី ដើម្បីបញ្ចេញមតិ