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.
138 lines
3.6 KiB
138 lines
3.6 KiB
<!doctype html> |
|
<html> |
|
<head> |
|
<title>Edit Payment</title> |
|
<style> |
|
.info-box { |
|
border: 1px solid #2563eb; |
|
background: #eff6ff; |
|
padding: 10px; |
|
margin-bottom: 15px; |
|
} |
|
.warn-box { |
|
border: 1px solid #aa6600; |
|
background: #fff4dd; |
|
padding: 10px; |
|
margin-bottom: 15px; |
|
} |
|
.error-box { |
|
border: 1px solid red; |
|
padding: 10px; |
|
margin-bottom: 15px; |
|
} |
|
</style> |
|
<link rel="icon" type="image/png" href="/static/favicon.png"> |
|
</head> |
|
<body> |
|
|
|
<h1>Edit Payment</h1> |
|
|
|
<p><a href="/">Home</a></p> |
|
<p><a href="/payments">Back to Payments</a></p> |
|
|
|
<div class="info-box"> |
|
Payment edits are validated against the invoice balance. |
|
</div> |
|
|
|
<div class="warn-box"> |
|
<strong>Important payment policy:</strong><br> |
|
Do not increase a payment beyond the invoice balance.<br> |
|
If a client wants money carried forward to the next bill, that must be added separately as client credit.<br> |
|
Overpayment is not used to create account credit. |
|
</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> |
|
Payment ID<br> |
|
<input value="{{ payment.id }}" readonly> |
|
</p> |
|
|
|
<p> |
|
Invoice<br> |
|
<input value="{{ payment.invoice_number }} - {{ payment.client_code }} - {{ payment.company_name }}" readonly> |
|
</p> |
|
|
|
<p> |
|
Received<br> |
|
<input value="{{ payment.received_at|localtime }}" readonly> |
|
</p> |
|
|
|
<p> |
|
Payment Method *<br> |
|
<select name="payment_method" required> |
|
<option value="square" {% if payment.payment_method == 'square' %}selected{% endif %}>square</option> |
|
<option value="etransfer" {% if payment.payment_method == 'etransfer' %}selected{% endif %}>etransfer</option> |
|
<option value="crypto_etho" {% if payment.payment_method == 'crypto_etho' %}selected{% endif %}>crypto_etho</option> |
|
<option value="crypto_egaz" {% if payment.payment_method == 'crypto_egaz' %}selected{% endif %}>crypto_egaz</option> |
|
<option value="crypto_alt" {% if payment.payment_method == 'crypto_alt' %}selected{% endif %}>crypto_alt</option> |
|
<option value="cash" {% if payment.payment_method == 'cash' %}selected{% endif %}>cash</option> |
|
<option value="other" {% if payment.payment_method == 'other' %}selected{% endif %}>other</option> |
|
</select> |
|
</p> |
|
|
|
<p> |
|
Payment Currency *<br> |
|
<select name="payment_currency" required> |
|
<option value="CAD" {% if payment.payment_currency == 'CAD' %}selected{% endif %}>CAD</option> |
|
<option value="ETHO" {% if payment.payment_currency == 'ETHO' %}selected{% endif %}>ETHO</option> |
|
<option value="EGAZ" {% if payment.payment_currency == 'EGAZ' %}selected{% endif %}>EGAZ</option> |
|
<option value="ALT" {% if payment.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="{{ payment.payment_amount }}" required> |
|
</p> |
|
|
|
<p> |
|
CAD Value At Payment *<br> |
|
<input type="number" step="0.00000001" min="0" name="cad_value_at_payment" value="{{ payment.cad_value_at_payment }}" required> |
|
</p> |
|
|
|
<p> |
|
Reference<br> |
|
<input name="reference" value="{{ payment.reference or '' }}"> |
|
</p> |
|
|
|
<p> |
|
Sender Name<br> |
|
<input name="sender_name" value="{{ payment.sender_name or '' }}"> |
|
</p> |
|
|
|
<p> |
|
TXID<br> |
|
<input name="txid" value="{{ payment.txid or '' }}"> |
|
</p> |
|
|
|
<p> |
|
Wallet Address<br> |
|
<input name="wallet_address" value="{{ payment.wallet_address or '' }}"> |
|
</p> |
|
|
|
<p> |
|
Notes<br> |
|
<textarea name="notes">{{ payment.notes or '' }}</textarea> |
|
</p> |
|
|
|
<p> |
|
<button type="submit">Save Payment</button> |
|
</p> |
|
|
|
</form> |
|
|
|
{% include "footer.html" %} |
|
</body> |
|
</html>
|
|
|