School Asset Inventory Asset Assignment Module
Overview of the Asset Assignment Module
Table of Contents
The Asset Assignment Module in the School Asset Inventory system streamlines the process of assigning assets to accountable persons, enabling efficient tracking and management of school resources. This feature allows administrators to assign assets, like computers, lab equipment, or furniture, to specific individuals or locations, ensuring each item is accounted for and properly managed.
By maintaining clear records of asset ownership, location, and status, this module enhances accountability across departments. With features to update and track asset status—such as active, returned, or under maintenance—this module supports better resource planning and quick retrieval of asset information, helping schools maximize the use of their inventory effectively.
Setting Up the Module
To begin using the Asset Assignment Module, let’s walk through its folder structure and the core files that make up its functionality.
Folder Structure
The assignment directory organizes key files to manage asset assignments efficiently:
- assignment_list.php: This page displays a list of assets available for assignment. Each asset entry includes details like serial code, name, description, status, and an “assign” button, which opens a modal for assigning the asset.
- assign_modal.php: This modal serves as the asset assignment form, allowing users to select the accountable person, office, and location, and input assignment details.
Function Folder
The function folder includes backend scripts that power the assignment logic and data retrieval:
- assignAsset.php: This file contains the core logic to process asset assignments, saving the information to both the tbl_assignment and tbl_assignment_history tables for record-keeping.
- fetchMR.php: This script fetches data needed to populate fields in the assignment modal, such as the list of accountable persons and locations, ensuring an accurate and dynamic selection process.
By organizing these files in a structured way, the Asset Assignment Module makes it easy to manage and update asset assignment operations within the School Asset Inventory system.
Assignment List Page (assignment_list.php)
The assignment_list.php page is essential for listing all unassigned assets, helping users easily identify items that are ready for assignment to an accountable person.
Purpose
The purpose of assignment_list.php is to display a list of assets that have not yet been assigned, allowing users to view available assets in the system. Each asset entry includes basic details, along with an option to assign it to a designated person, office, or location.
Fields and Features
- Table Columns: The asset list table includes the following columns for each asset:
- serial_code: A unique code for identifying each asset.
- asset_name: The name of the asset.
- description: A brief description of the asset.
- amount: The value of the asset.
- asset_image: A visual reference of the asset.
- status: Indicates the current status (e.g., available).
- Assign Button: The button for assigning the asset, which opens assign_modal.php, allowing users to complete the assignment details.
- SQL Query to Filter Unassigned Assets:
To ensure only unassigned assets appear in the list, use a query that excludes assets found in tbl_assignment based on asset_id. Below is a sample SQL query:
SELECT asset_id, serial_code, asset_name, description, amount, asset_image, status
FROM tbl_asset
WHERE asset_id NOT IN (SELECT asset_id FROM tbl_assignment);
This query fetches only those assets whose asset_id does not exist in tbl_assignment, ensuring the list displays only unassigned items. This setup ensures that users can quickly find and assign available assets without confusion.
Assign Modal (assign_modal.php)
The assign_modal.php page is a modal interface designed to streamline the asset assignment process. By using this modal, users can easily designate an asset to an accountable person and specify additional details for tracking.
Purpose
The purpose of assign_modal.php is to provide a dedicated interface for assigning assets to accountable individuals. It allows users to input all necessary information for tracking asset ownership, location, and status, ensuring proper documentation and accountability.
Modal Fields
- Hidden Field
- asset_id: A hidden field that contains the unique ID of the asset being assigned, which is used in the background to update the database.
- Display Fields for Identification
- serial_code & asset_name: Displayed fields that help users identify the asset being assigned, allowing them to confirm the correct item before finalizing the assignment.
- Dropdowns for Selection
- accountable_person_id: A dropdown list populated with available accountable persons, enabling the user to select who will be responsible for the asset.
- office_id: A dropdown list showing all office locations, which allows the user to specify where the asset will be located.
- location_id: Another dropdown list with various specific locations within the office, allowing precise asset placement.
- Additional Fields
- remarks: An optional field for users to enter notes or comments relevant to the asset assignment.
- Assign Button: This button finalizes the assignment. On submission, the data is saved to two tables:
- tbl_assignment: Stores the current asset assignment details.
- tbl_assignment_history: Records the assignment for historical tracking, including past assignments if the asset is reassigned in the future.
By utilizing assign_modal.php, users ensure that all asset assignments are accurately documented, supporting efficient asset management and historical accountability within the school inventory system.
Database Structure
This module relies on two main tables within the database to manage and track asset assignments. Together, these tables provide both a current view of asset assignments and a historical log of each asset’s status over time.
- tbl_assignment: Current Assignments Table
The tbl_assignment table is the primary storage location for ongoing asset assignments. It stores details about which asset is assigned to whom, its location, and the assignment’s current status.
- Columns:
- assignment_id: Unique identifier for each assignment record.
- accountable_person_id: References the individual responsible for the asset.
- asset_id: Identifies the specific asset being assigned.
- office_id: Refers to the office where the asset is located.
- location_id: Indicates the specific location within the office.
- assignment_date: Date the asset was assigned.
- status: Describes the current state of the asset, which could be:
- active: The asset is currently assigned and in use.
- returned: The asset has been returned to the main inventory or storage.
- disposed: The asset is no longer in use and has been permanently removed.
- maintenance: The asset is under maintenance and temporarily unavailable.
- remarks: Additional comments or notes about the assignment.
- mr_id: Used for tracking the unique Material Requisition or assignment request associated with the asset.
- tbl_assignment_history: Assignment History Table
The tbl_assignment_history table logs every assignment made to each asset, providing a chronological history of its locations, responsible persons, and status changes. This helps maintain a comprehensive record, essential for asset tracking and accountability.
- Columns:
- assignment_id: References the unique assignment ID, matching entries in tbl_assignment for historical continuity.
- accountable_person_id: Records the person responsible at the time of each assignment.
- asset_id: Identifies the asset whose history is being tracked.
- office_id: Notes the office where the asset was assigned.
- location_id: Specifies the precise location within the office during each assignment.
- assignment_date: The date each assignment was made.
- status: Documents the asset’s status at each assignment stage, mirroring the values in tbl_assignment.
- remarks: Additional comments related to each historical assignment record.
This database structure allows the module to capture both current and historical data, making it easy to trace the lifecycle of any asset within the inventory system.
Source code and Screenshots
This section provides essential source code snippets and screenshots to guide you through setting up and using the Asset Assignment Module. The code examples will illustrate the core functionality of asset assignment, while screenshots offer visual aids for a more straightforward setup and testing process.
Summary
The Assignment Module in the School Asset Inventory system offers a streamlined way to assign assets to individuals, track their locations, and monitor their statuses. By using this module, users can easily view unassigned assets, assign them through a clear modal interface, and ensure that every assignment is saved and tracked in the database.
This structured approach to asset assignment provides clear benefits, enhancing accountability by recording who is responsible for each asset and where it is located. The module also promotes efficient asset tracking and quick retrieval of assignment history, making it an essential tool for effective inventory management in a school or organizational setting.
Previous Tutorial: