basic_dem_app/app/models/p_compta_element.rb
Nicolas Bally 3524d4c862 intial
2020-03-18 15:49:29 +01: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