From 1cd6023f4d353e89aebded644219891e2305d83d Mon Sep 17 00:00:00 2001 From: Joshua Greben Date: Wed, 7 Feb 2024 10:55:18 -0800 Subject: [PATCH] Only check for Paid fully matches in paymentStatus folio field --- cyber_source/download_payment_batch_detail_report.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cyber_source/download_payment_batch_detail_report.rb b/cyber_source/download_payment_batch_detail_report.rb index aef95bd..32d0b31 100644 --- a/cyber_source/download_payment_batch_detail_report.rb +++ b/cyber_source/download_payment_batch_detail_report.rb @@ -116,8 +116,8 @@ def is_a_payment?(account, batch_date, transaction_date) bx_date = Date.parse(batch_date) dates = [tx_date - 1, tx_date, tx_date + 1, bx_date - 1, bx_date, bx_date + 1] - dates.include?(created_date(account)) || dates.include?(updated_date(account)) && - (account['status']['name'] == 'Closed' || account['paymentStatus']['name'] == 'Paid fully') + (dates.include?(created_date(account)) || dates.include?(updated_date(account))) && + (account['paymentStatus']['name'] == 'Paid fully') end def created_date(account)