Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(beinleumi): added support for balance over 100K #853

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading