Commit 2124dab8 by Nilu

S10656911 # Issue List #The job link hasn't generated properly for 2 cases

parent 18142654
......@@ -18,6 +18,8 @@ import com.stripe.model.Card;
import com.stripe.model.Charge;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import oneit.logging.LoggingArea;
import oneit.security.SecUser;
import oneit.utils.DateDiff;
......@@ -111,7 +113,12 @@ public class MakePaymentFP extends SaveFP
}
// restarting process as custom attributes needs to be updated to intercom
completeProcessRestartAndRestoreAttribs(process, request);
Set<String> attribsToRestore = new HashSet<>();
attribsToRestore.add("Job");
attribsToRestore.add("Company");
completeProcessRestartAndRestoreAttribs(process, attribsToRestore);
secUser = SecUser.getTXUser(process.getTransaction());
companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
......
......@@ -132,7 +132,7 @@ public class StripeUtils
{
Map<String, Object> invoiceParams = new HashMap<>();
invoiceParams.put("subscription", company.getStripeSubscription());
invoiceParams.put("customer", company.getStripeReference());
return Invoice.list(invoiceParams).getData();
}
......
......@@ -8,8 +8,8 @@
SecUser loggedInUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
Company company = companyUser.getCompany();
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATED_JOB) + "&fromJob=true";
Job job = (Job) process.getAttribute("Job");
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATED_JOB) + "&JobID=" + job.getObjectID() + "&fromJob=true";
Boolean ppj = (Boolean) process.getAttribute("PPJ");
String jobsPage = WebUtils.getSamePageInRenderMode(request, "Page");
%>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment