Skip to content

Commit 6f4708b

Browse files
committed
fix southwestgas account no
1 parent 5f9ac69 commit 6f4708b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/documentTypes/southwestGasBill.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,14 @@ module.exports = {
7979

8080
// account number
8181
let account_number = keyValues['ACCOUNT NUMBER'];
82+
8283
if (!account_number || !account_number.length) {
8384
account_number = rawText.filter((line) => (
84-
line.match(/ACCOUNT NUMBER/g)
85+
line.match(/ACCOUNT NUM/g)
8586
&& line.match(/\d+/g)
8687
));
8788

88-
account_number = account_number.length ? account_number[0].replace('ACCOUNT NUMBER: ', '') : '';
89+
account_number = (/(.*) (\d+\-\d+\-\d+)/g.exec(account_number) || [])[2];
8990
}
9091

9192
return {

0 commit comments

Comments
 (0)