diff --git a/src/app/bpe/bp-view/bp-data-service.ts b/src/app/bpe/bp-view/bp-data-service.ts
index b0c6e3946..0377dcd6c 100755
--- a/src/app/bpe/bp-view/bp-data-service.ts
+++ b/src/app/bpe/bp-view/bp-data-service.ts
@@ -582,6 +582,19 @@ export class BPDataService {
return companyWorkflow[companyWorkflow.length - 1] == processId;
}
+ // checks whether the given process is in the workflow or not
+ isProcessPresentInTheWorkflow(processId: string, sellerSettings: CompanySettings = null) {
+ if (sellerSettings == null) {
+ sellerSettings = this.getCompanySettings();
+ }
+ let companyWorkflow = sellerSettings.negotiationSettings.company.processID;
+ // if there is no workflow specified, then consider the default flow which contains the all processes
+ if (!companyWorkflow || companyWorkflow.length == 0) {
+ return true;
+ }
+ return companyWorkflow.indexOf(processId) != -1;
+ }
+
// it retrieves the company's business workflow through settings and construct a workflow map
// key is the id of process and value is true/false (whether this process is included in company's workflow or not)
getCompanyWorkflowMap(companyWorkflow: string[]) {
diff --git a/src/app/bpe/bp-view/negotiation/negotiation-request.component.html b/src/app/bpe/bp-view/negotiation/negotiation-request.component.html
index 3c62fc42d..4713b4fc6 100644
--- a/src/app/bpe/bp-view/negotiation/negotiation-request.component.html
+++ b/src/app/bpe/bp-view/negotiation/negotiation-request.component.html
@@ -72,8 +72,8 @@
diff --git a/src/app/bpe/bp-view/negotiation/negotiation-request.component.ts b/src/app/bpe/bp-view/negotiation/negotiation-request.component.ts
index 56326f49b..108c54d0d 100644
--- a/src/app/bpe/bp-view/negotiation/negotiation-request.component.ts
+++ b/src/app/bpe/bp-view/negotiation/negotiation-request.component.ts
@@ -179,7 +179,7 @@ export class NegotiationRequestComponent implements OnInit {
}
}
- if (!this.doesManufacturerOfferHasPrice() || this.isNegotiatingAnyTerm() || this.bpDataService.isFinalProcessInTheWorkflow("Negotiation")) {
+ if (!this.doesManufacturerOfferHasPrice() || this.isNegotiatingAnyTerm() || !this.bpDataService.isProcessPresentInTheWorkflow('Order')) {
// final check on the rfq
const rfq: RequestForQuotation = this.rfq;
diff --git a/src/app/bpe/bp-view/negotiation/negotiation-response.component.html b/src/app/bpe/bp-view/negotiation/negotiation-response.component.html
index d47a45b2e..d68f5a1d0 100644
--- a/src/app/bpe/bp-view/negotiation/negotiation-response.component.html
+++ b/src/app/bpe/bp-view/negotiation/negotiation-response.component.html
@@ -89,7 +89,7 @@