School Asset Inventory MR Module

School Asset Inventory MR Module

Introduction

In this module, we will walk through how to manage Memorandum Receipts (MR) in the School Asset Inventory System. MRs are official documents that assign responsibility for school assets to a designated Accountable Person.

This section will cover:

  • Uploading and attaching MRs to accountable individuals.
  • Understanding the database structure related to MRs.
  • A detailed breakdown of the relevant files and how they work together.

By the end of this guide, you’ll be able to successfully implement and manage the MR module in your asset inventory system.

Upload MR Module

The Upload MR Module is a crucial part of the system, enabling administrators to attach an MR document to a specific accountable person. This ensures proper tracking of assets and assigns clear responsibility for each item.

Key Features:

  • Upload and attach an MR document (PDF, image, etc.) to the accountable person.
  • Automatically generate unique file names based on the accountable person and MR date.
  • Ensure smooth and secure file management, including old file deletion and new file uploads.

What is an MR?

Memorandum Receipt (MR) is an official document used in institutions to record assets or properties assigned to an individual. This module integrates with the inventory system to maintain accurate records of asset responsibility.

Understanding the tbl_mr Table in the School Asset Inventory System

The tbl_mr table is a key component of the School Asset Inventory System, designed to manage Memorandum Receipts (MRs), which document the assignment of school assets to accountable individuals. Each entry in this table represents a record of an MR and contains vital information about the asset assignment, including the person responsible, the date of assignment, and any additional remarks or documentation related to the MR.

Below is a detailed explanation of each field in the tbl_mr table:

  1. mr_id (INT)
  • Description: This is the primary key and unique identifier for each MR record in the database. It is auto-incremented and ensures that each MR entry is uniquely identifiable.
  • Purpose: It allows the system to manage and retrieve specific MR records efficiently, ensuring that each record is distinct and cannot be confused with another.
  1. accountable_person_id (INT)
  • Description: This foreign key links to the table that contains information about the accountable individuals (typically stored in a table like tbl_accountable_person or tbl_personnel).
  • Purpose: It associates each MR record with a specific accountable person. This field ensures that the responsibility for the school asset can be clearly attributed to the correct individual, creating accountability for asset management.
  1. mr_date (DATE)
  • Description: This field stores the date when the MR was issued. It records when the asset was formally assigned to the accountable person.
  • Purpose: The MR date is crucial for tracking the timeline of asset assignments. It provides a historical record of when the asset changed hands or when responsibility was documented, which is important for both legal and administrative purposes.
  1. remarks (TEXT)
  • Description: This field contains any additional comments or notes related to the MR. It can be used to store details such as specific conditions, asset descriptions, or any relevant observations.
  • Purpose: The remarks field offers flexibility for administrators to add context to the MR record, which might not be captured in other fields. It helps provide more insight into the assignment or any special circumstances surrounding the asset.
  1. upload_mr (VARCHAR)
  • Description: This field stores the filename of the scanned MR document, typically in PDF format. It holds the path to the uploaded document that corresponds to the MR.
  • Purpose: This field enables the system to maintain a digital record of the MR in the form of a scanned document. It allows users to access the original, signed MR if needed for auditing, verification, or reference. By storing a scanned version, the system can ensure that the original document is always available.

Explanation of Files in the MR Module

The MR module in the School Asset Inventory System is designed to manage the uploading, editing, and deletion of Memorandum Receipt (MR) records, linking them to the accountable personnel and storing scanned copies for reference. Here’s a breakdown of the key files and their purposes:

  1. upload_mr_list.php
  • Description: This file serves as the main interface for viewing and managing MR records in the system.
  • Functionality:
    • Displays a list of all the MR entries stored in the database.
    • Provides options to view, edit, or delete MR records.
    • Includes buttons or links to add new MR records using modals or forms.
    • Uses data tables for easy search, filter, and pagination functionality.
  • Purpose: To allow users (e.g., administrators) to view and manage the uploaded MRs efficiently.
  1. add_modal.php
  • Description: This modal form is used to collect data when adding a new MR record.
  • Functionality:
    • Displays input fields for entering information such as the accountable person, MR date, remarks, and the option to upload a scanned MR document.
    • Submits the entered data to addMR.php for processing and database insertion.
    • Includes file upload functionality for attaching the scanned MR document.
  • Purpose: To provide an easy-to-use interface for adding new MR records to the system.
  1. edit_delete_modal.php
  • Description: This file contains the modals used to either edit or delete existing MR records.
  • Functionality:
    • Edit Modal: Pre-populates the form with the current MR record data for easy editing.
      • Allows users to update the MR details (accountable person, date, remarks) and replace the uploaded MR document if needed.
      • Submits the updated data to editMR.php.
    • Delete Modal: Displays a confirmation prompt for deleting an MR record.
      • Upon confirmation, it sends a request to deleteMR.php to remove the MR record from the database.
  • Purpose: To provide user-friendly modals for updating or removing MR records directly from the MR list interface.
  1. upload_mr – Folder
  • Description: This folder is where the scanned PDF files of the MR documents are uploaded and stored.
  • Functionality:
    • Holds all the uploaded MR documents in a secure location on the server.
    • The file names typically follow a specific naming convention (e.g., MR_<accountable_person_id>_<mr_id>.pdf) to ensure consistency.
  • Purpose: To serve as the storage directory for all MR-related PDF files, enabling users to retrieve or view the scanned MR documents from the system.

Function Folder – Core Functionality Files

  1. addMR.php
  • Description: This script handles the addition of new MR records to the database.
  • Functionality:
    • Receives data from the add_modal.php form.
    • Sanitizes and validates the inputs.
    • Handles the uploading of the MR document to the upload_mr folder.
    • Inserts the new MR record into the tbl_mr table, linking it with the uploaded document.
    • Provides feedback to the user (success or error).
  • Purpose: To process the addition of new MR entries, ensuring that all data is securely added to the system.
  1. editMR.php
  • Description: This script handles the editing of existing MR records.
  • Functionality:
    • Receives updated data from the edit_delete_modal.php form.
    • Retrieves the current MR record from the database.
    • Allows for updating details like the accountable person, date, remarks, and replacing the uploaded MR document.
    • Manages the deletion of old uploaded files (if replaced).
    • Updates the MR record in the database.
    • Provides feedback to the user (success or error).
  • Purpose: To allow modification of MR records, ensuring that updates are reflected in the database and file system.
  1. deleteMR.php
  • Description: This script handles the deletion of MR records from the database.
  • Functionality:
    • Receives the MR ID from the edit_delete_modal.php delete confirmation.
    • Validates and sanitizes the input.
    • Deletes the corresponding MR record from the tbl_mr table.
    • Removes the associated uploaded MR document from the upload_mr folder.
    • Provides feedback to the user (success or error).
  • Purpose: To process the safe removal of MR records from the system, ensuring both the database entry and uploaded file are deleted.

The MR module manages the lifecycle of Memorandum Receipts in the School Asset Inventory System. It includes functionality for uploading, editing, and deleting MR records, while securely storing scanned documents for reference. The combination of modals and processing scripts ensures that the system is user-friendly and efficient, providing a robust interface for administrators to manage asset accountability.

Source code and Demo

In this section, we’ll provide you with the complete source code for the MR Upload Module. Along with the code, there’s a demo showing how to upload an MR document, update it, and link it to the appropriate person in the system.

  • Source Code:
  • Live Demo:

Notes and Best Practices

  • File Naming Convention: To avoid confusion and ensure clarity, the MR document filenames should follow the format complete_name-date_of_mr.pdf (or other file extensions). This ensures each file is uniquely identifiable.
  • File Security: Always validate and sanitize file uploads to prevent security vulnerabilities, such as file injection attacks. The system should only accept specific file types (e.g., PDFs, images) and store them securely.
  • Backup and Audit: Regularly back up MR records and files. Implement an audit trail to track who uploaded or modified the MR records to ensure accountability.
  • All files should be placed inside the upload_mr folder
  • We have an update to the database structure, please update the database which can be downloaded together in this module

FREE DOWNLOAD SOURCE CODE

School Asset Inventory MR Module - List
School Asset Inventory MR Module – List
School Asset Inventory MR Module - Add Modal
School Asset Inventory MR Module – Add Modal
School Asset Inventory MR Module - Edit and Update Modal
School Asset Inventory MR Module – Edit and Update Modal
School Asset Inventory MR Module - Delete Modal
School Asset Inventory MR Module – Delete Modal

Summary

The Upload MR Module is a powerful addition to the School Asset Inventory System, allowing for effective and organized tracking of assets through Memorandum Receipts. By tying assets to accountable persons and maintaining proper documentation, schools can enhance the accuracy and accountability of their asset management processes.

Key takeaways:

  • MRs are linked to an accountable person to assign responsibility.
  • The tbl_mr table plays a vital role in organizing and managing the MR records.
  • The module includes functionality for uploading, editing, and removing MR documents.

With this guide, you are now equipped to integrate the MR upload functionality into your school asset system effectively.

Previous Tutorial:

School Asset Inventory Asset Module

You may visit our Facebook page for more information, inquiries, and comments. Please subscribe also to our YouTube Channel to receive free capstone projects resources and computer programming tutorials.

Hire our team to do the project

, , , , , ,

Post navigation