Created
March 18, 2013 15:05
-
-
Save laspluviosillas/5187805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Payroll | |
class Period < ActiveRecord::Base | |
set_table_name "payroll_periods" | |
has_many :fps_submissions, | |
:dependent => :delete_all, | |
:class_name => 'Payroll::FpsSubmission' | |
# Public: prepares a VatSubmission so it's ready for validation | |
# | |
# gateway_id - The users Government Gateway login as a String. | |
# gateway_password - The users Government Gateway password as a String. | |
# user - The User who is submitting the VatReturn. | |
# | |
# Returns nothing | |
def prepare_submission(gateway_id, gateway_password, user) | |
@current_submission = fps_submissions.build( | |
:gateway_id => gateway_id.gsub(/ +/, ''), | |
:gateway_password => gateway_password.gsub(/ +/, ''), | |
:sender => sender_for_user(user) | |
) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment