nbg and auto fill GEL exchange rate
This commit is contained in:
parent
37a491cf79
commit
7dbeb0dd49
7 changed files with 161 additions and 5 deletions
|
|
@ -48,8 +48,10 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="gel_rate">GEL rate</label>
|
||||
<label for="gel_rate">GEL rate (GEL per 1 <span id="gel-rate-ccy">unit</span>)</label>
|
||||
<input type="text" id="gel_rate" name="gel_rate" value="<%= @form_values[:gel_rate] %>" placeholder="2.9500" inputmode="decimal" required />
|
||||
<button type="button" id="fetch-gel-rate" class="link-button">↻ Fetch official (NBG)</button>
|
||||
<span id="gel-rate-status" class="optional"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<% if @invoice.ltc? %>
|
||||
<dt>LTC</dt>
|
||||
<dd class="mono">
|
||||
<% if (amt = @invoice.ltc_amount_due) %><%= amt.to_s('F').sub(/\.?0+$/, '') %> LTC<% if @invoice.ltc_rate %> @ <%= '%.2f' % @invoice.ltc_rate %> <%= @invoice.currency %><% end %><br /><% end %>
|
||||
<% if (amt = @invoice.ltc_amount_due) %><%= amt.to_s('F').sub(/\.?0+$/, '') %> LTC<% if @invoice.ltc_rate %> @ <%= @invoice.ltc_rate.to_s('F').sub(/(\.\d*?)0+$/, '\1').sub(/\.$/, '') %> <%= @invoice.currency %><% end %><br /><% end %>
|
||||
<span style="word-break:break-all;"><%= @invoice.ltc_address %></span>
|
||||
</dd>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue