Skip to content

Commit

Permalink
fix(beinleumi): added support for balance over 100K (#853)
Browse files Browse the repository at this point in the history
Co-authored-by: Arnon Meshoulam <arnonm@gmail.com>
Co-authored-by: Baruch Odem <baruchiro@gmail.com>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent de0e614 commit 128e245
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scrapers/base-beinleumi-group.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import moment, { type Moment } from 'moment';
import { type Page } from 'puppeteer';
import { SHEKEL_CURRENCY } from '../constants';
import { SHEKEL_CURRENCY, SHEKEL_CURRENCY_SYMBOL } from '../constants';
import {
clickButton,
elementPresentOnPage,
Expand All @@ -25,7 +25,7 @@ const DESCRIPTION_COLUMN_CLASS_COMPLETED = 'reference wrap_normal';
const DESCRIPTION_COLUMN_CLASS_PENDING = 'details wrap_normal';
const REFERENCE_COLUMN_CLASS = 'details';
const DEBIT_COLUMN_CLASS = 'debit';
const CREDIT_COLUMN_CLASS = 'credit';
const CREDIT_COLUMN_CLASS = 'credit';
const ERROR_MESSAGE_CLASS = 'NO_DATA';
const ACCOUNTS_NUMBER = 'div.fibi_account span.acc_num';
const CLOSE_SEARCH_BY_DATES_BUTTON_CLASS = 'ui-datepicker-close';
Expand Down Expand Up @@ -64,7 +64,8 @@ export function createLoginFields(credentials: ScraperSpecificCredentials) {
}

function getAmountData(amountStr: string) {
const amountStrCopy = amountStr.replace(',', '');
let amountStrCopy = amountStr.replace(SHEKEL_CURRENCY_SYMBOL, '');
amountStrCopy = amountStrCopy.replaceAll(',', '');
return parseFloat(amountStrCopy);
}

Expand Down

0 comments on commit 128e245

Please sign in to comment.