Add edit functionality for financial links
This commit is contained in:
parent
f0a55fb951
commit
707501e3f8
13 changed files with 169 additions and 6 deletions
|
|
@ -25,6 +25,8 @@ class BankTransaction < ActiveRecord::Base
|
|||
validates_presence_of :date, :amount, :bank_account_id
|
||||
validates_numericality_of :amount
|
||||
|
||||
scope :without_financial_link, -> { where(financial_link: nil) }
|
||||
|
||||
# Replace numeric seperator with database format
|
||||
localize_input_of :amount
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ class FinancialTransaction < ActiveRecord::Base
|
|||
validates_numericality_of :amount, greater_then: -100_000,
|
||||
less_than: 100_000
|
||||
|
||||
scope :without_financial_link, -> { where(financial_link: nil) }
|
||||
|
||||
localize_input_of :amount
|
||||
|
||||
after_initialize do
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class Invoice < ActiveRecord::Base
|
|||
validate :valid_attachment
|
||||
|
||||
scope :unpaid, -> { where(paid_on: nil) }
|
||||
scope :without_financial_link, -> { where(financial_link: nil) }
|
||||
|
||||
attr_accessor :delete_attachment
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue