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_ship_bill_line.rb
2021-08-23 10:26:02 +02:00

11 lines
234 B
Ruby

class PShipBillLine < ApplicationRecord
belongs_to :p_ship_bill
validates :qte, :presence => true
validates :price, :presence => true
before_validation do
self.a_ok_total = self.qte.to_f * self.price.to_f
end
end