Skip to content

Commit 6fc0a83

Browse files
committed
Merge pull request #160 from laboro/ticket/BAP-1776
BAP-1776: Workflow adjustments
2 parents 8609e1f + 003cbc8 commit 6fc0a83

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/OroCRM/Bundle/SalesBundle/Resources/config/workflow.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,6 @@ workflows:
306306
form_type: oro_date
307307
options:
308308
required: true
309-
probability:
310-
form_type: percent
311-
options:
312-
required: false
313309
attributes:
314310
opportunity:
315311
label: Opportunity
@@ -410,11 +406,15 @@ workflows:
410406
- @less_or_equal: [$probability, 1]
411407
post_actions: # update opportunity properties
412408
- @assign_value:
409+
- [$opportunity.contact, $contact]
410+
- [$opportunity.account, $account]
411+
- [$opportunity.budgetAmount, $budget_amount]
412+
- [$opportunity.probability, $probability]
413413
- [$opportunity.customerNeed, $customer_need]
414414
- [$opportunity.proposedSolution, $proposed_solution]
415-
- [$opportunity.probability, $probability]
415+
- [$close_revenue, 0]
416416
close_as_won_definition:
417-
conditions: # if opportunity.status = "in_progress", required data is entered and reason = "won" or "outsold"
417+
conditions: # if opportunity.status = "in_progress", required data is entered and reason = "won"
418418
@and:
419419
- @equal: [$opportunity.status.name, 'in_progress']
420420
- @not_empty: $close_date
@@ -423,11 +423,10 @@ workflows:
423423
- @and:
424424
- @greater_or_equal: [$probability, 0]
425425
- @less_or_equal: [$probability, 1]
426-
- @or:
427-
- @equal: [$close_reason.name, 'won']
428-
- @equal: [$close_reason.name, 'outsold']
426+
- @equal: [$close_reason.name, 'won']
429427
post_actions: # update opportunity properties, set opportunity.status = "won"
430428
- @assign_value:
429+
- [$probability, 1]
431430
- [$opportunity.closeDate, $close_date]
432431
- [$opportunity.closeRevenue, $close_revenue]
433432
- [$opportunity.closeReason, $close_reason]
@@ -456,6 +455,7 @@ workflows:
456455
- @equal: [$close_reason.name, 'outsold']
457456
post_actions: # update opportunity properties, set opportunity.status = "lost"
458457
- @assign_value:
458+
- [$probability, 0]
459459
- [$opportunity.closeDate, $close_date]
460460
- [$opportunity.closeRevenue, $close_revenue]
461461
- [$opportunity.closeReason, $close_reason]

src/OroCRM/Bundle/SalesBundle/Resources/views/Opportunity/widget/info.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{%- endif -%}
3434
{{ _self.renderRow('Account'|trans, accountView) }}
3535

36-
{{ _self.renderRow('Probability'|trans, entity.probability ? (entity.probability * 100) ~ '%' : '') }}
36+
{{ _self.renderRow('Probability'|trans, entity.probability|length ? (entity.probability * 100) ~ '%' : '') }}
3737
{{ _self.renderRow('Budget amount'|trans, entity.budgetAmount|length ? entity.budgetAmount|number_format(2), '') }}
3838

3939
{% if dynamic|length %}

0 commit comments

Comments
 (0)