We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 209de06 commit 7bbcc67Copy full SHA for 7bbcc67
2 files changed
app/controllers/api/v1/quotes_controller.rb
@@ -59,7 +59,7 @@ def render_not_found
59
def quote_params_with_defaults
60
quote_params.merge({
61
contract_start_date: Date.current,
62
- contract_end_date: Date.current + 1,
+ contract_end_date: Date.current.next_year - 1.day,
63
contract_type_id: nil
64
})
65
end
app/models/quote.rb
@@ -23,7 +23,9 @@ class Quote < ApplicationRecord
23
scope :completed, -> { where(step: 'completed') }
24
25
def contract_period
26
- "#{contract_start_date} - #{contract_end_date}"
+ start_date = contract_start_date&.strftime('%m/%d/%Y')
27
+ end_date = contract_end_date&.strftime('%m/%d/%Y')
28
+ "#{start_date} - #{end_date}"
29
30
31
def self.last_unfinished
0 commit comments