Skip to content

Repository files navigation

🛒 Purchase-to-Pay (P2P) Management System

A MySQL-based Purchase-to-Pay (P2P) Management System developed as a SQL Mini Project. The project automates the procurement process from Purchase Requisition to Vendor Payment using relational database concepts and SQL programming.


📌 Project Overview

The Purchase-to-Pay (P2P) Management System manages the complete procurement lifecycle within an organization. It demonstrates database design, SQL programming, stored procedures, triggers, views, and reporting in a real-world business scenario.

The system helps:

  • Reduce manual effort
  • Improve transaction accuracy
  • Track procurement activities
  • Generate business reports

🚀 Business Process Flow

Purchase Requisition
        ↓
PR Approval
        ↓
Purchase Order
        ↓
Product Receipt
        ↓
Vendor Invoice
        ↓
Vendor Payment
        ↓
Reports

📂 Modules

  • Company Management
  • Department Management
  • Employee Management
  • Vendor Management
  • Product Management
  • Purchase Requisition
  • Purchase Order
  • Product Receipt
  • Vendor Invoice
  • Vendor Payment

🗄️ Database Design

Master Tables

  • Company
  • Department
  • Employee
  • Warehouse
  • Payment Terms
  • Product Group
  • Tax Information
  • Vendor
  • Product

Transaction Tables

  • Purchase Requisition
  • Purchase Order
  • Product Receipt
  • Vendor Invoice
  • Vendor Payment

⚙️ SQL Features Implemented

  • CREATE DATABASE
  • CREATE TABLE
  • Primary Keys
  • Foreign Keys
  • Constraints
  • INSERT
  • UPDATE
  • Stored Procedures
  • Triggers
  • Views
  • Aggregate Functions
  • GROUP BY
  • HAVING
  • ORDER BY
  • LIKE
  • BETWEEN
  • DISTINCT
  • LIMIT
  • INNER JOIN
  • LEFT JOIN
  • Multi-table JOIN

🔄 Stored Procedure

Purchase Requisition Approval & Purchase Order Creation

The stored procedure:

  • Approves Purchase Requisition
  • Calculates GST
  • Calculates Total Purchase Value
  • Automatically creates the Purchase Order

⚡ Triggers

Trigger 1

Updates Purchase Order Status after Product Receipt.

Trigger 2

Updates Purchase Order Status after Vendor Invoice creation.

Trigger 3

Updates Vendor Invoice Status after Vendor Payment.


📊 Reports (Views)

  • Purchase Report
  • Open Vendor Invoices
  • Vendor Wise Purchase Summary
  • Monthly Purchase Summary

💻 SQL Demonstrations

The project includes SQL queries demonstrating:

  • Filtering (WHERE)
  • Sorting (ORDER BY)
  • DISTINCT
  • BETWEEN
  • LIKE
  • Aggregate Functions
  • GROUP BY
  • HAVING
  • COUNT
  • SUM
  • INNER JOIN
  • LEFT JOIN
  • Multi-table JOIN
  • LIMIT

🛠️ Technologies Used

  • MySQL
  • SQL

📄 Project Report

The complete project documentation is available in this repository.


👩‍💻 Author

Ashwini Selvanathan

SQL Mini Project – Purchase-to-Pay (P2P) Management System

About

MySQL-based Purchase-to-Pay (P2P) Management System implementing Stored Procedures, Triggers, Views and SQL Reports.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors