mirror of
https://github.com/we-promise/sure.git
synced 2026-04-22 21:44:11 +00:00
Add transaction fee support to trades (#1248)
Add an optional fee field (decimal, precision: 19, scale: 4) to trades. Fee is included in the total amount calculation (qty * price + fee) for both create and update flows. The fee field appears on both the create and edit forms, defaults to 0, and auto-submits like other trade fields. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
5
db/migrate/20260322120702_add_fee_to_trades.rb
Normal file
5
db/migrate/20260322120702_add_fee_to_trades.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddFeeToTrades < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :trades, :fee, :decimal, precision: 19, scale: 4, default: 0, null: false
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user