{% extends "base.html" %}
{% block title %}Import Cost Calculator{% endblock %}
{% block content %}
<h2>🧮 Import Stock Cost Calculator</h2>
<form method="post" class="card p-3 mb-3"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><div class="row g-3"><div class="col-md-2"><label>Quantity</label><input type="number" class="form-control" name="qty" required min="1"></div><div class="col-md-2"><label>Product Cost</label><input type="number" step="0.01" class="form-control" name="product_cost"></div><div class="col-md-2"><label>Shipping</label><input type="number" step="0.01" class="form-control" name="shipping_cost"></div><div class="col-md-2"><label>Customs</label><input type="number" step="0.01" class="form-control" name="customs_cost"></div><div class="col-md-2"><label>Other</label><input type="number" step="0.01" class="form-control" name="other_cost"></div><div class="col-md-2 d-flex align-items-end"><button class="btn btn-primary w-100">Calculate</button></div></div></form>
{% if result %}<div class="alert alert-info"><h4>Total Cost: LKR {{ '%.2f'|format(result.total_cost) }}</h4><h4>Unit Cost: LKR {{ '%.2f'|format(result.unit_cost) }}</h4></div>{% endif %}
{% endblock %}
