Netdeploy2 Babyyyy
This commit is contained in:
72
templates/quotes/edit.html
Normal file
72
templates/quotes/edit.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<h2>Edit Quote #{{ q.id }}</h2>
|
||||
|
||||
<form method="POST">
|
||||
<p>
|
||||
<label>
|
||||
Title<br>
|
||||
<input name="title" value="{{ q.title or '' }}" style="width: 420px;">
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Category:</strong> {{ q.category }}<br>
|
||||
<strong>Status:</strong> {{ q.status }}
|
||||
</p>
|
||||
|
||||
<h3>Line Items</h3>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th style="width:110px;">Qty</th>
|
||||
<th style="width:140px;">Unit Price</th>
|
||||
<th style="width:140px;">Line Total</th>
|
||||
</tr>
|
||||
|
||||
{% for item in q.items %}
|
||||
<tr>
|
||||
<td>
|
||||
<!-- THIS is what makes saving work -->
|
||||
<input type="hidden" name="item_id" value="{{ item.id }}">
|
||||
|
||||
<input name="description" value="{{ item.description or '' }}" style="width: 100%;">
|
||||
</td>
|
||||
<td>
|
||||
<input name="qty" type="number" step="0.01" value="{{ item.qty or 0 }}" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
<input name="unit_price" type="number" step="0.01" value="{{ item.unit_price or 0 }}" style="width: 120px;">
|
||||
</td>
|
||||
<td>
|
||||
${{ ((item.qty or 0) * (item.unit_price or 0)) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">No items yet. Click “Add Item”.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<p style="margin-top: 10px;">
|
||||
<button type="submit">Save Quote</button>
|
||||
<a href="{{ url_for('quotes.dashboard') }}" style="margin-left:10px;">Back</a>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form method="POST" action="{{ url_for('quotes.add_item', quote_id=q.id) }}">
|
||||
<button type="submit">Add Item</button>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Total: ${{ q.total }}</h3>
|
||||
|
||||
<form method="POST" action="{{ url_for('invoices.create_from_quote', quote_id=q.id) }}">
|
||||
<button type="submit">Create Invoice from Quote</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user