skip adding invoiced fees

This commit is contained in:
Bilal Catic
2019-09-04 18:12:11 +02:00
parent 15a89f9da6
commit ea327e9bec
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(() => {