mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Allow user to add buy and sell trade transactions for investment accounts (#1066)
* Consolidate modal form structure into partial + helper * Scaffold out trade transaction form * Normalize translations * Add buy and sell trade form with tests * Move entryable lists to dedicated controllers * Delegate entry group contents rendering * More cleanup * Extract transaction and valuation update logic from entries controller * Delegate edit and show actions to entryables * Trade builder * Update paths for transaction updates
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<%# locals: (form:, money_method:, default_currency:, disable_currency: false, hide_currency: false, label: nil) %>
|
||||
|
||||
<% fallback_label = t(".money-label") %>
|
||||
<% currency = form.object.send(money_method)&.currency || Money::Currency.new(default_currency) %>
|
||||
<% currency = form.object ? (form.object.send(money_method)&.currency || Money::Currency.new(default_currency)) : Money::Currency.new(default_currency) %>
|
||||
|
||||
<div class="form-field pr-0" data-controller="money-field">
|
||||
<%= form.label label || fallback_label, { class: "form-field__label" } %>
|
||||
|
||||
Reference in New Issue
Block a user