You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.0 KiB
139 lines
4.0 KiB
<!doctype html> |
|
<html> |
|
<head> |
|
<title>New Payment</title> |
|
<style> |
|
.status-badge { |
|
display: inline-block; |
|
padding: 2px 7px; |
|
border-radius: 999px; |
|
font-size: 11px; |
|
font-weight: bold; |
|
text-transform: uppercase; |
|
letter-spacing: 0.03em; |
|
} |
|
.status-pending { background: #dbeafe; color: #1d4ed8; } |
|
.status-partial { background: #fef3c7; color: #92400e; } |
|
.status-overdue { background: #fee2e2; color: #991b1b; } |
|
|
|
.info-box { |
|
border: 1px solid #2563eb; |
|
background: #eff6ff; |
|
padding: 10px; |
|
margin-bottom: 15px; |
|
} |
|
.error-box { |
|
border: 1px solid red; |
|
padding: 10px; |
|
margin-bottom: 15px; |
|
} |
|
</style> |
|
</head> |
|
<body> |
|
|
|
<h1>Record Payment</h1> |
|
|
|
<p><a href="/">Home</a></p> |
|
<p><a href="/payments">Back to Payments</a></p> |
|
|
|
<div class="info-box"> |
|
Only invoices with an outstanding balance are shown here.<br> |
|
Paid and cancelled invoices are excluded from payment entry. |
|
</div> |
|
|
|
{% if errors %} |
|
<div class="error-box"> |
|
<strong>Please fix the following:</strong> |
|
<ul> |
|
{% for error in errors %} |
|
<li>{{ error }}</li> |
|
{% endfor %} |
|
</ul> |
|
</div> |
|
{% endif %} |
|
|
|
<form method="post"> |
|
|
|
<p> |
|
Invoice *<br> |
|
<select name="invoice_id" required> |
|
<option value="">Select invoice</option> |
|
{% for i in invoices %} |
|
<option value="{{ i.id }}" {% if form_data.get('invoice_id') == (i.id|string) %}selected{% endif %}> |
|
{{ i.invoice_number }} - {{ i.client_code }} - {{ i.company_name }} - |
|
Remaining {{ (i.total_amount - i.amount_paid)|money(i.currency_code) }} {{ i.currency_code }} - |
|
{{ i.status }} |
|
</option> |
|
{% endfor %} |
|
</select> |
|
</p> |
|
|
|
<p> |
|
Payment Method *<br> |
|
<select name="payment_method" required> |
|
<option value="">Select method</option> |
|
<option value="square" {% if form_data.get('payment_method') == 'square' %}selected{% endif %}>square</option> |
|
<option value="etransfer" {% if form_data.get('payment_method') == 'etransfer' %}selected{% endif %}>etransfer</option> |
|
<option value="crypto_etho" {% if form_data.get('payment_method') == 'crypto_etho' %}selected{% endif %}>crypto_etho</option> |
|
<option value="crypto_egaz" {% if form_data.get('payment_method') == 'crypto_egaz' %}selected{% endif %}>crypto_egaz</option> |
|
<option value="crypto_alt" {% if form_data.get('payment_method') == 'crypto_alt' %}selected{% endif %}>crypto_alt</option> |
|
<option value="cash" {% if form_data.get('payment_method') == 'cash' %}selected{% endif %}>cash</option> |
|
<option value="other" {% if form_data.get('payment_method') == 'other' %}selected{% endif %}>other</option> |
|
</select> |
|
</p> |
|
|
|
<p> |
|
Payment Currency *<br> |
|
<select name="payment_currency" required> |
|
<option value="">Select currency</option> |
|
<option value="CAD" {% if form_data.get('payment_currency') == 'CAD' %}selected{% endif %}>CAD</option> |
|
<option value="ETHO" {% if form_data.get('payment_currency') == 'ETHO' %}selected{% endif %}>ETHO</option> |
|
<option value="EGAZ" {% if form_data.get('payment_currency') == 'EGAZ' %}selected{% endif %}>EGAZ</option> |
|
<option value="ALT" {% if form_data.get('payment_currency') == 'ALT' %}selected{% endif %}>ALT</option> |
|
</select> |
|
</p> |
|
|
|
<p> |
|
Payment Amount *<br> |
|
<input type="number" step="0.00000001" min="0.00000001" name="payment_amount" value="{{ form_data.get('payment_amount', '') }}" required> |
|
</p> |
|
|
|
<p> |
|
CAD Value At Payment *<br> |
|
<input type="number" step="0.00000001" min="0" name="cad_value_at_payment" value="{{ form_data.get('cad_value_at_payment', '') }}" required> |
|
</p> |
|
|
|
<p> |
|
Reference<br> |
|
<input name="reference" value="{{ form_data.get('reference', '') }}"> |
|
</p> |
|
|
|
<p> |
|
Sender Name<br> |
|
<input name="sender_name" value="{{ form_data.get('sender_name', '') }}"> |
|
</p> |
|
|
|
<p> |
|
TXID<br> |
|
<input name="txid" value="{{ form_data.get('txid', '') }}"> |
|
</p> |
|
|
|
<p> |
|
Wallet Address<br> |
|
<input name="wallet_address" value="{{ form_data.get('wallet_address', '') }}"> |
|
</p> |
|
|
|
<p> |
|
Notes<br> |
|
<textarea name="notes">{{ form_data.get('notes', '') }}</textarea> |
|
</p> |
|
|
|
<p> |
|
<button type="submit">Record Payment</button> |
|
</p> |
|
|
|
</form> |
|
|
|
{% include "footer.html" %} |
|
</body> |
|
</html>
|
|
|