mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Formatting dates for account invoices in rails time zone
This commit is contained in:
@@ -51,7 +51,7 @@ class FinalizeAccountInvoices
|
||||
job: "FinalizeAccountInvoices",
|
||||
error: "end_date is in the future",
|
||||
data: {
|
||||
end_date: end_date.localtime.strftime("%F %T"),
|
||||
end_date: end_date.in_time_zone.strftime("%F %T"),
|
||||
now: Time.zone.now.strftime("%F %T")
|
||||
}
|
||||
})
|
||||
|
||||
@@ -85,7 +85,7 @@ class UpdateAccountInvoices
|
||||
job: "UpdateAccountInvoices",
|
||||
error: "end_date is in the future",
|
||||
data: {
|
||||
end_date: end_date.localtime.strftime("%F %T"),
|
||||
end_date: end_date.in_time_zone.strftime("%F %T"),
|
||||
now: Time.zone.now.strftime("%F %T")
|
||||
}
|
||||
})
|
||||
|
||||
@@ -118,7 +118,7 @@ class UpdateBillablePeriods
|
||||
job: "UpdateBillablePeriods",
|
||||
error: "end_date is in the future",
|
||||
data: {
|
||||
end_date: end_date.localtime.strftime("%F %T"),
|
||||
end_date: end_date.in_time_zone.strftime("%F %T"),
|
||||
now: Time.zone.now.strftime("%F %T")
|
||||
}
|
||||
})
|
||||
|
||||
@@ -31,8 +31,8 @@ class BillablePeriod < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def adjustment_label
|
||||
begins = begins_at.localtime.strftime("%d/%m/%y")
|
||||
ends = ends_at.localtime.strftime("%d/%m/%y")
|
||||
begins = begins_at.in_time_zone.strftime("%d/%m/%y")
|
||||
ends = ends_at.in_time_zone.strftime("%d/%m/%y")
|
||||
|
||||
"#{label} [#{begins} - #{ends}]"
|
||||
end
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
-# %th Bill
|
||||
-# - enterprise.billable_periods.each do |billable_period|
|
||||
-# %tr
|
||||
-# %td= billable_period.begins_at.localtime.strftime("%F %T")
|
||||
-# %td= billable_period.ends_at.localtime.strftime("%F %T")
|
||||
-# %td= billable_period.begins_at.in_time_zone.strftime("%F %T")
|
||||
-# %td= billable_period.ends_at.in_time_zone.strftime("%F %T")
|
||||
-# %td= billable_period.sells
|
||||
-# %td= billable_period.trial?
|
||||
-# %td= billable_period.display_turnover
|
||||
|
||||
Reference in New Issue
Block a user