Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
mjwshared
Commits
11b91993
Commit
11b91993
authored
Jun 14, 2022
by
mattwire
Browse files
Add generic support for extensions that modify amount (eg. percentagepricesetfield and extrafee)
parent
a476b463
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/crm.payment.js
View file @
11b91993
...
...
@@ -18,9 +18,13 @@
totalAmount
+=
parseFloat
(
$
(
this
).
data
(
'
amount
'
));
});
}
else
if
(
typeof
CRM
.
percentagepricesetfield
!==
'
undefined
'
&&
typeof
CRM
.
percentagepricesetfield
.
calculateTotalFee
===
'
function
'
)
{
totalAmount
=
CRM
.
percentagepricesetfield
.
calculateTotalFee
();
}
else
if
(
typeof
calculateTotalFee
==
'
function
'
)
{
// This is ONLY triggered in the following circumstances on a CiviCRM contribution page:
// - With a priceset that allows a 0 amount to be selected.
// - When we are the ONLY payment processor configured on the page.
// It is ALSO replaced by percentagepricesetfield and extrafee extensions
totalAmount
=
parseFloat
(
calculateTotalFee
());
}
else
if
(
document
.
getElementById
(
'
totalTaxAmount
'
)
!==
null
)
{
totalAmount
=
parseFloat
(
this
.
calculateTaxAmount
());
this
.
debugging
(
this
.
name
,
'
Calculated amount using internal calculateTaxAmount()
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment