Skip to content

Commit

Permalink
srp bill_amount extraction fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andobolocco committed Jun 22, 2020
1 parent e57e65e commit 2e04304
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/documentTypes/srpBill.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ module.exports = {
const [city, state, zip_code] = cityStateZipCodeLine;

// bill amount
const bill_amount = keyValues['This Month\'s Charges'];
let bill_amount = keyValues['PLEASE PAY'];
if(!bill_amount || !bill_amount.length) {
bill_amount = keyValues['This Month\'s Charges'];
}

// bill date
const bill_date = rawText.slice(-15).find((line) => line.match(/^\w+ \d+, \d+$/g));
Expand Down

0 comments on commit 2e04304

Please sign in to comment.