app/models/dorsale/billing_machine/quotation.rb in dorsale-3.14.9 vs app/models/dorsale/billing_machine/quotation.rb in dorsale-3.14.10
- old
+ new
@@ -31,10 +31,11 @@
def document_type
:quotation
end
+ before_save :update_totals
before_create :assign_unique_index
before_create :assign_tracking_id
def assign_unique_index
if unique_index.nil?
@@ -52,11 +53,9 @@
assign_default :expires_at, date + 1.month
assign_default :commercial_discount, 0
assign_default :vat_amount, 0
assign_default :total_excluding_taxes, 0
end
-
- before_save :update_totals
def update_totals
assign_default_values
lines.each(&:update_total)
apply_vat_rate_to_lines