Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.labkey.onprc_billing.dataentry.ChargesARTCoreFormType;
import org.labkey.onprc_billing.dataentry.ReversalFormType;
import org.labkey.onprc_billing.notification.BillingValidationNotification;
import org.labkey.onprc_billing.notification.DCMFinanceNotification;
import org.labkey.onprc_billing.notification.FinanceNotification;
import org.labkey.onprc_billing.pipeline.BillingPipelineProvider;
import org.labkey.onprc_billing.query.BillingAuditProvider;
Expand Down Expand Up @@ -113,7 +112,6 @@ protected void doStartupAfterSpringConfig(ModuleContext moduleContext)
PipelineService.get().registerPipelineProvider(new BillingPipelineProvider(this));

NotificationService.get().registerNotification(new FinanceNotification());
NotificationService.get().registerNotification(new DCMFinanceNotification());
NotificationService.get().registerNotification(new BillingValidationNotification());

EHRService.get().registerTableCustomizer(this, ONPRC_BillingCustomizer.class);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.labkey.api.query.QueryService;
import org.labkey.api.query.UserSchema;
import org.labkey.api.security.User;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.onprc_billing.ONPRC_BillingManager;
import org.labkey.onprc_billing.ONPRC_BillingModule;
import org.labkey.onprc_billing.ONPRC_BillingSchema;
Expand Down Expand Up @@ -428,8 +429,8 @@ protected void writeResultTable(final StringBuilder msg, Date lastInvoiceEnd, Ca
Map<String, Double> totalsMap = totalsByCategory.get(category);
Container container = containerMap.get(category);

String url = getExecuteQueryUrl(container, ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + getDateFormat(c).format(start.getTime()) + "&query.param.EndDate=" + getDateFormat(c).format(endDate.getTime());
msg.append("<tr><td><a href='" + url + "'>" + category + "</a></td><td>" + totalsMap.get("total") + "</td><td>" + _dollarFormat.format(totalsMap.get("totalCost")) + "</td></tr>");
String url = getExecuteQueryUrl(container, ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(start.getTime())) + "&query.param.EndDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(endDate.getTime()));
msg.append("<tr><td><a href='" + PageFlowUtil.filter(url) + "'>" + PageFlowUtil.filter(category) + "</a></td><td>" + totalsMap.get("total") + "</td><td>" + _dollarFormat.format(totalsMap.get("totalCost")) + "</td></tr>");
}
msg.append("</table><br><br>");

Expand Down Expand Up @@ -472,37 +473,37 @@ protected void writeResultTable(final StringBuilder msg, Date lastInvoiceEnd, Ca
{
Map<String, Integer> totals = dataByCategory.get(category);

String baseUrl = getExecuteQueryUrl(containerMap.get(category), ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + getDateFormat(c).format(start.getTime()) + "&query.param.EndDate=" + getDateFormat(c).format(endDate.getTime());
String projUrl = baseUrl + ("None".equals(tokens[1]) ? "&query.project/displayName~isblank" : "&query.project/displayName~eq=" + tokens[1]);
msg.append("<tr><td>" + financialAnalyst + "</td>"); //the FA
msg.append("<td><a href='" + projUrl + "'>" + tokens[1] + "</a></td>");
String baseUrl = getExecuteQueryUrl(containerMap.get(category), ONPRC_BillingSchema.NAME, categoryToQuery.get(category), null) + "&query.param.StartDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(start.getTime())) + "&query.param.EndDate=" + PageFlowUtil.encodeURIComponent(getDateFormat(c).format(endDate.getTime()));
String projUrl = baseUrl + ("None".equals(tokens[1]) ? "&query.project/displayName~isblank" : "&query.project/displayName~eq=" + PageFlowUtil.encodeURIComponent(tokens[1]));
msg.append("<tr><td>" + PageFlowUtil.filter(financialAnalyst) + "</td>"); //the FA
msg.append("<td><a href='" + PageFlowUtil.filter(projUrl) + "'>" + PageFlowUtil.filter(tokens[1]) + "</a></td>");

//alias
String accountUrl = null;
Container financeContainer = ONPRC_BillingManager.get().getBillingContainer(containerMap.get(category));
if (financeContainer != null && !"Unknown".equals((tokens[2])))
{
accountUrl = getExecuteQueryUrl(financeContainer, ONPRC_BillingSchema.NAME, "aliases", null, null) + "&query.alias~eq=" + tokens[2];
accountUrl = getExecuteQueryUrl(financeContainer, ONPRC_BillingSchema.NAME, "aliases", null, null) + "&query.alias~eq=" + PageFlowUtil.encodeURIComponent(tokens[2]);
}

if (accountUrl != null)
{
msg.append("<td><a href='" + accountUrl + "'>" + tokens[2] + "</a></td>");
msg.append("<td><a href='" + PageFlowUtil.filter(accountUrl) + "'>" + PageFlowUtil.filter(tokens[2]) + "</a></td>");
}
else
{
msg.append("<td>" + (tokens[2]) + "</td>");
msg.append("<td>" + PageFlowUtil.filter(tokens[2]) + "</td>");
}

msg.append("<td>" + (tokens[3]) + "</td>");
msg.append("<td>" + category + "</td>");
msg.append("<td>" + PageFlowUtil.filter(tokens[3]) + "</td>");
msg.append("<td>" + PageFlowUtil.filter(category) + "</td>");

for (FieldDescriptor fd : foundCols)
{
if (totals.containsKey(fd.getFieldName()))
{
String url = projUrl + fd.getFilter();
msg.append("<td" + (fd.isShouldHighlight() ? " style='background-color: yellow;'" : "") + "><a href='" + url + "'>" + totals.get(fd.getFieldName()) + "</a></td>");
msg.append("<td" + (fd.isShouldHighlight() ? " style='background-color: yellow;'" : "") + "><a href='" + PageFlowUtil.filter(url) + "'>" + totals.get(fd.getFieldName()) + "</a></td>");
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public void testNotifications()

//run finance notifications
Set<String> notifications = new HashSet<>();
notifications.add("DCM Finance Notification");
notifications.add("Finance Notification");

beginAt(WebTestHelper.getBaseURL() + "/ldk/" + getContainerPath() + "/notificationAdmin.view");
Expand Down