diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx b/Site/Pages/v5/Ledgers/EndOfMonth.aspx index 889f7288..4e3484bf 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx @@ -223,6 +223,14 @@ $('img.status-icon-pleasewait[data-item="' + itemId + '"]').hide(); $('img.status-icon-completed[data-item="' + itemId + '"]').fadeIn(); + // If any items depended on this one, enable them now + + var dependentItemId = $('span.action-list-item[data-dependson="' + itemId + '"]').attr("data-item"); + $('span.action-list-item[data-item="' + dependentItemId + '"]').removeClass('action-list-item-disabled'); + $('img.action-icon[data-item="' + dependentItemId + '"]').removeClass('action-icon-disabled'); + + // Check if group is complete + var selector = ".action-list-item:not(.action-list-item-completed):not(.action-list-item-disabled)[data-group='" + groupId + "']"; if ($(selector).length == 0) // no further actions in this group enabled { @@ -230,12 +238,6 @@ $(".group-status-icon[data-group='" + groupId + "']").fadeIn(); } - // If any items depended on this one, enable them now - - var dependentItemId = $('span.action-list-item[data-dependson="' + itemId + '"]').attr("data-item"); - $('span.action-list-item[data-item="' + dependentItemId + '"]').removeClass('action-list-item-disabled'); - $('img.action-icon[data-item="' + dependentItemId + '"]').removeClass('action-icon-disabled'); - } function clientStartedUpload() {