Implement partial payment logging for EveryPay / Bank links

This commit is contained in:
Karl Erik Õunapuu 2020-01-30 17:24:07 +02:00
parent feb3a5d9da
commit 53fbd2f50c
14 changed files with 470 additions and 345 deletions

View file

@ -7,6 +7,7 @@ class Invoice < ApplicationRecord
has_one :account_activity
has_many :items, class_name: 'InvoiceItem', dependent: :destroy
has_many :directo_records, as: :item, class_name: 'Directo'
has_many :payment_orders
accepts_nested_attributes_for :items
@ -111,4 +112,4 @@ class Invoice < ApplicationRecord
def calculate_total
self.total = subtotal + vat_amount
end
end
end