skip adding null fees if there is no discount

This commit is contained in:
Bilal Catic
2019-08-14 12:27:02 +02:00
parent dd4d909b5d
commit 8a80321fe3

View File

@@ -358,7 +358,10 @@ const getMembersFeesForDateRange = (dateRange, memberIds) => {
//add discount //add discount
memberIds.forEach((memberId) => { memberIds.forEach((memberId) => {
allFees.push(createNegativeFeeForDiscount(membersMap[memberId], dateRange)); const discountFee = createNegativeFeeForDiscount(membersMap[memberId], dateRange);
if (discountFee){
allFees.push(discountFee);
}
}); });
allFees.forEach((fee) => { allFees.forEach((fee) => {