Skip to content

Commit

Permalink
Merge pull request #3370 from DFE-Digital/LUPEYALPHA-1222
Browse files Browse the repository at this point in the history
Add empty roll number column to payment csv file
  • Loading branch information
kenfodder authored Nov 7, 2024
2 parents 635bd4e + 2df55ce commit 8a4b579
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/models/payroll/payment_csv_row.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def scheme_amount
model.award_amount.to_s
end

# NOTE: Payroll people require this on the CSV, but we no longer ask or store it
def roll_number
nil
end

def payment_id
model.id
end
Expand Down
1 change: 1 addition & 0 deletions app/models/payroll/payments_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class PaymentsCsv
banking_name: "BANK_NAME",
bank_sort_code: "SORT_CODE",
bank_account_number: "ACCOUNT_NUMBER",
roll_number: "ROLL_NUMBER",
scheme_amount: "SCHEME_AMOUNT",
payment_id: "PAYMENT_ID",
policies_in_payment: "CLAIM_POLICIES",
Expand Down
5 changes: 4 additions & 1 deletion spec/models/payroll/payment_csv_row_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
claim.banking_name,
"00-11-22",
claim.bank_account_number,
nil,
payment_award_amount.to_s,
payment.id,
payment.policies_in_payment,
Expand Down Expand Up @@ -162,6 +163,7 @@
claim.banking_name,
"33-09-90",
claim.bank_account_number,
nil,
payment_award_amount.to_s,
payment.id,
payment.policies_in_payment,
Expand Down Expand Up @@ -234,6 +236,7 @@
claim.banking_name,
"21-09-09",
claim.bank_account_number,
nil,
payment_award_amount.to_s,
payment.id,
payment.policies_in_payment,
Expand All @@ -255,7 +258,7 @@

describe "PAYMENT_ID" do
it "is 36 characters long, satisfying DfE Payroll’s length validation" do
expect(row[29].length).to eq(36)
expect(row[30].length).to eq(36)
end
end

Expand Down

0 comments on commit 8a4b579

Please sign in to comment.