Duplicate charging fix

This commit is contained in:
Senad Uka
2019-09-04 18:32:32 +02:00
parent f0a3e430a2
commit 12e94c30e8
2 changed files with 24 additions and 6 deletions

View File

@@ -121,11 +121,11 @@ const addFees = (req, res) => {
checkBookingChanges()
.then(() => {
deleteFeesFromORD(dateRange, memberIds)
.then(() => {
.then((invoicedFees) => {
// TODO: Change this to parallel execution
getMembersFeesForDateRange(dateRange, memberIds)
.then(({allFees, memberships}) => {
addFeesToORD(allFees)
addFeesToORD(allFees, invoicedFees)
.then((numberOfInsertedFees) => {
reformatMembershipsName(memberships)
.then(() => {