lockaz_app/app/models/p_compta_element.rb
Nicolas Bally f20fe482c6 initial
2020-04-06 10:38:07 +02:00

21 lines
347 B
Ruby

class PComptaElement < ApplicationRecord
belongs_to :p_customer
belongs_to :element, :polymorphic => true
QI_DYNAMICS = %w(amount solde element_date)
eval(QI_DYNAMICS_CORE)
def ca_amount
self.element.compta_amount if self.element
end
def ca_solde
end
def element_date
self.element.compta_date
end
end