compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

MAE-524: Fix contribution amount assigned as NaN #378

Closed erawat closed 3 years ago

erawat commented 3 years ago

Overview

This PR fixes NaN is assigned when setting a formatted amount more than 4 digits.

Before

When assign formatted amount more than 4 digit, NaN was assigned.

Peek 2021-04-06 09-48

After

Correct formatted amount is assigned.

Peek 2021-04-14 17-10

Technical Details

Since the totalAmount has already been formatted, calling CRM.formatMoney() to format amount again, it returns NaN when passing the amount that more than 999