{% extends "base.html" %} {% load static %} {% block title %}Delete Stock Record{% endblock %} {% block content %}

Delete Stock Record

Back to Stock

Confirm Stock Record Deletion

Are you sure you want to delete this stock record?

This action cannot be undone. The stock record and all associated transaction history will be permanently removed from the system.

Item Information
Item: {{ object.item.name }}
SKU: {{ object.item.sku }}
Category: {{ object.item.category.name }}
Unit: {{ object.item.unit_of_measure }}
Stock Information
Current Quantity: {{ object.current_quantity }} {{ object.item.unit_of_measure }}
Location: {{ object.location.name }}
Unit Cost: ${{ object.unit_cost|floatformat:2 }}
Total Value: ${{ object.total_value|floatformat:2 }}
Stock Levels
{{ object.minimum_quantity }}
Minimum Quantity
{{ object.reorder_level }}
Reorder Level
{{ object.maximum_quantity|default:"∞" }}
Maximum Quantity
{% if object.batch_number or object.expiry_date %}
Batch Information
{% if object.batch_number %}
Batch Number: {{ object.batch_number }}
{% endif %} {% if object.expiry_date %}
Expiry Date: {{ object.expiry_date|date:"M d, Y" }} {% if object.days_until_expiry <= 30 %} {% if object.days_until_expiry <= 0 %} Expired {% else %} {{ object.days_until_expiry }} days left {% endif %} {% endif %}
{% endif %}
{% endif %} {% if object.notes %}
Notes
{{ object.notes }}
{% endif %} {% if recent_transactions %}
Recent Transaction History
{% for transaction in recent_transactions|slice:":5" %} {% endfor %}
Date Type Quantity Balance User
{{ transaction.date|date:"M d, Y" }} {{ transaction.get_transaction_type_display }} {% if transaction.transaction_type == 'in' %}+{% elif transaction.transaction_type == 'out' %}-{% endif %}{{ transaction.quantity }} {{ transaction.balance_after }} {{ transaction.user.get_full_name|default:"System" }}
{% if recent_transactions.count > 5 %}
And {{ recent_transactions.count|add:"-5" }} more transactions...
{% endif %}
{% endif %}
{% csrf_token %}
These notes will be recorded for audit purposes and inventory tracking.
What happens when you delete this stock record?
  • The stock record will be permanently removed from the system
  • All transaction history for this stock will be deleted
  • Inventory reports and statistics will be affected
  • Any pending orders or transfers may need manual adjustment
  • This action will be logged in the audit trail
  • Stock alerts and notifications will be updated
  • The item will remain in the system but without stock at this location
Cancel
{% if object.current_quantity > 0 %}
Stock Value Impact
Financial Impact: Deleting this stock record will remove inventory worth ${{ object.total_value|floatformat:2 }} from your system.
{% if object.current_quantity <= object.minimum_quantity %}
Critical Stock Level: This item is already at or below minimum stock levels. Deleting this record may cause stockouts and affect patient care.
{% endif %} {% if object.expiry_date and object.days_until_expiry <= 30 %}
Expiring Stock: This stock is approaching expiry ({{ object.days_until_expiry }} days remaining). Consider if this deletion is due to expired stock.
{% endif %}
{% endif %}
Related Information
Stock Details
  • Stock ID: {{ object.pk }}
  • Created: {{ object.created_at|date:"M d, Y g:i A" }}
  • Last Updated: {{ object.updated_at|date:"M d, Y g:i A" }}
  • Created By: {{ object.created_by.get_full_name|default:"System" }}
System Information
  • Item ID: {{ object.item.pk }}
  • Location ID: {{ object.location.pk }}
  • {% if recent_transactions %}
  • Transactions: {{ recent_transactions.count }} recorded
  • {% endif %} {% if object.batch_number %}
  • Batch Tracked: Yes
  • {% endif %}
{% endblock %}