Tankers represent the fuel storage units at a petrol pump. Each tanker holds a specific fuel type and tracks its current volume, capacity, and storage pressure. The total monetary value of the fuel stored in any tanker can be calculated on demand using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Adarsh275/PetrolPump-Management-System/llms.txt
Use this file to discover all available pages before exploring further.
TOTAL_AMOUNT MySQL stored function, accessible from the Query → Function menu in the sidebar.
Tanker Fields
Primary key. A unique alphanumeric identifier for the tanker. Example:
"BR6872".Total physical capacity of the tanker in litres (i.e. the maximum it can hold).
Storage pressure of the fuel inside the tanker, measured in psi.
Internal fuel product identifier. Example:
"A1234". Used as a stable reference independent of the fuel name.Current volume of fuel in the tanker in litres.
Human-readable fuel product name. Known values:
"PetrolE10", "Diesel", "CNG", "Kerosene", "Gasoline91".Price per litre for the stored fuel, in Indian Rupees (₹).
Foreign key referencing
PetrolPump.Registration_No. Links the tanker to the petrol pump station it belongs to.Add a Tanker
Fill in the tanker form
Complete all fields:
- Tanker_ID — unique identifier (e.g.
BR6872) - Capacity — total tank capacity in litres (numeric)
- pressure — storage pressure in psi (numeric)
- Fuel_ID — internal fuel identifier (e.g.
A1234) - Fuel_Amount — current fuel volume in litres (numeric)
- Fuel_Name — fuel product name (e.g.
PetrolE10) - Fuel_Price — price per litre in ₹ (numeric)
- Petrolpump_No — linked petrol pump registration number
create.py):
add_Tanker_data() in database.py:
View Tankers
The
read_for_Tanker() function in read.py fetches all rows and renders them with all eight columns:
Update a Tanker
Choose the tanker to edit
Current records are shown in the Current Tanker details expander. Select the target tanker from the Tankers to Edit dropdown, which lists all existing
Tanker_ID values.Edit the mutable fields
The form pre-fills with the current values. Modify any of the following:
- Capacity
- pressure
- Fuel_ID
- Fuel_Amount
- Fuel_Name
- Fuel_Price
- Petrolpump_No
edit_Tanker_data() in database.py:
Delete a Tanker
Select the tanker
Choose the
Tanker_ID to remove from the Tanker to delete dropdown. A warning banner displays the selected ID for confirmation.delete_data_Tanker() in database.py:
Calculate Total Fuel Value
The system includes a MySQL stored functionTOTAL_AMOUNT that returns Fuel_Price × Fuel_Amount for a given tanker. This is exposed through the Query → Function sidebar option.
Open the Function query screen
In the sidebar, select Query from the Tables dropdown, then choose Function from the Query dropdown.
app.py that drives this screen:
TOTAL_Amount() helper in database.py sets the parameter and calls the stored function:
BR6872 holds PetrolE10 at ₹101.72 per litre with a current volume of 513.50 litres:
Seed / Sample Data
The following five tanker records are inserted bycreate_table.sql as the initial dataset: