Skip to content

Commit

Permalink
BTHAB-263: Use current membership in discount calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Oct 12, 2023
1 parent 1816a85 commit d62b614
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
const clientID = $scope.salesOrder.client_id;
crmApi4('Membership', 'get', {
select: ['membership_type_id.Product_Discounts.Product_Discount_Amount'],
where: [['contact_id', '=', clientID]]
where: [['contact_id', '=', clientID], ['status_id.is_current_member', '=', true]]
}).then(function (results) {
let discountPercentage = 0;
results.forEach((membership) => {
Expand Down

0 comments on commit d62b614

Please sign in to comment.