This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
phone_app/app/models/p_compta_element.rb
2021-08-23 10:26:02 +02:00

21 lines
363 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 if self.element
end
end