Verified Commit b8025f33 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

add last_billing_expense field to volunteer

parent f5a93eed
......@@ -67,6 +67,7 @@ class BillingExpense < ApplicationRecord
bank: volunteer.bank,
iban: volunteer.iban
)
volunteer.update(last_billing_expense: billing_expense_semester(date).to_date)
end
end
end
......
class AddLastBillingExpenseSemesterToVolunteers < ActiveRecord::Migration[5.1]
def change
add_column :volunteers, :last_billing_expense, :date
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180709115633) do
ActiveRecord::Schema.define(version: 20180713084814) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -731,6 +731,7 @@ ActiveRecord::Schema.define(version: 20180709115633) do
t.text "additional_comments"
t.boolean "teenager"
t.bigint "department_id"
t.date "last_billing_expense"
t.index ["acceptance"], name: "index_volunteers_on_acceptance"
t.index ["accepted_at"], name: "index_volunteers_on_accepted_at"
t.index ["active"], name: "index_volunteers_on_active"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment