@things-factory/sales 10.1.308 → 10.1.310

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist-client/entity360/opportunity-360.js +4 -3
  2. package/dist-client/list-filters.d.ts +3 -2
  3. package/dist-client/list-filters.js +4 -3
  4. package/dist-client/opportunity-words.d.ts +2 -0
  5. package/dist-client/opportunity-words.js +11 -1
  6. package/dist-client/pages/opportunity-editor.d.ts +12 -5
  7. package/dist-client/pages/opportunity-editor.js +60 -23
  8. package/dist-client/pages/opportunity-list.js +2 -2
  9. package/dist-client/route.d.ts +1 -1
  10. package/dist-server/service/index.d.ts +2 -2
  11. package/dist-server/service/opportunity/index.d.ts +1 -1
  12. package/dist-server/service/opportunity/opportunity-event.js +2 -2
  13. package/dist-server/service/opportunity/opportunity-mutation.d.ts +3 -0
  14. package/dist-server/service/opportunity/opportunity-mutation.js +47 -1
  15. package/dist-server/service/opportunity/opportunity-query.js +1 -1
  16. package/dist-server/service/opportunity/opportunity-rules.d.ts +14 -7
  17. package/dist-server/service/opportunity/opportunity-rules.js +25 -11
  18. package/dist-server/service/opportunity/opportunity-service.d.ts +22 -5
  19. package/dist-server/service/opportunity/opportunity-service.js +60 -14
  20. package/dist-server/service/opportunity/opportunity-type.d.ts +1 -1
  21. package/dist-server/service/opportunity/opportunity-type.js +3 -3
  22. package/dist-server/service/opportunity/opportunity.d.ts +3 -2
  23. package/dist-server/service/opportunity/opportunity.js +10 -5
  24. package/dist-server/service/quotation/index.d.ts +2 -2
  25. package/dist-server/service/sales-read.js +3 -2
  26. package/package.json +2 -2
  27. package/translations/en.json +20 -5
  28. package/translations/es.json +20 -5
  29. package/translations/ja.json +20 -5
  30. package/translations/ko.json +20 -5
  31. package/translations/ms.json +20 -5
  32. package/translations/zh.json +20 -5
@@ -5,6 +5,8 @@ exports.opportunityStageCounts = opportunityStageCounts;
5
5
  exports.opportunityInDomain = opportunityInDomain;
6
6
  exports.saveOpportunity = saveOpportunity;
7
7
  exports.closeOpportunity = closeOpportunity;
8
+ exports.holdOpportunity = holdOpportunity;
9
+ exports.resumeOpportunity = resumeOpportunity;
8
10
  exports.reopenWonOpportunity = reopenWonOpportunity;
9
11
  const auth_base_1 = require("@things-factory/auth-base");
10
12
  const biz_base_1 = require("@things-factory/biz-base");
@@ -32,17 +34,20 @@ async function opportunityInDomain(tx, domain, id) {
32
34
  return opportunity;
33
35
  }
34
36
  /**
35
- * Create an opportunity, or change one a person may still change. An open one takes any open stage; a lost one is
36
- * opened again by giving it an open stage. Closing is `closeOpportunity`'s.
37
+ * Create an opportunity, or change one a person may still change. An open one takes any open stage; a lost or cancelled
38
+ * one is opened again by giving it an open stage. Closing is `closeOpportunity`'s, holding `holdOpportunity`'s, and a
39
+ * held one is changed only once it is resumed (`resumeOpportunity`).
37
40
  */
38
41
  async function saveOpportunity(tx, domain, user, input, id) {
39
42
  const old = id ? await opportunityInDomain(tx, domain, id) : undefined;
40
43
  const stage = input.stage ?? old?.stage ?? opportunity_rules_1.OpportunityStage.LEAD;
41
- /* A closed one changes only by being opened again, and only a lost one may be. */
44
+ if (old?.stage === opportunity_rules_1.OpportunityStage.ON_HOLD)
45
+ throw new shell_1.Refusal('opportunity-held', {}, 'A held opportunity is resumed before it is changed');
46
+ /* A closed one changes only by being opened again, and only a lost or cancelled one may be. */
42
47
  if (old && !(0, opportunity_rules_1.isOpen)(old.stage) && !((0, opportunity_rules_1.isOpen)(stage) && (0, opportunity_rules_1.stageMove)(old.stage, stage)))
43
48
  throw new shell_1.Refusal('opportunity-closed', {}, 'A closed opportunity is not changed');
44
49
  if (!(0, opportunity_rules_1.isOpen)(stage))
45
- throw new shell_1.Refusal('opportunity-stage-open-required', {}, 'Give an open stage; won and lost are closings');
50
+ throw new shell_1.Refusal('opportunity-stage-open-required', {}, 'Give an open stage; on hold, won, lost and cancelled are set by their own actions');
46
51
  const name = input.name?.trim();
47
52
  if (!name)
48
53
  throw new shell_1.Refusal('opportunity-name-required', {}, 'Name the opportunity');
@@ -81,9 +86,10 @@ async function saveOpportunity(tx, domain, user, input, id) {
81
86
  stage,
82
87
  probability,
83
88
  owner: { id: ownerId },
84
- /* A lost opportunity opened again is no longer closed. */
89
+ /* A lost or cancelled opportunity opened again is no longer closed. */
85
90
  closedOn: null,
86
- lostReason: null,
91
+ stageReason: null,
92
+ heldUntil: null,
87
93
  description: input.description?.trim() || null,
88
94
  updater: user
89
95
  }));
@@ -92,24 +98,64 @@ async function saveOpportunity(tx, domain, user, input, id) {
92
98
  return saved;
93
99
  }
94
100
  /**
95
- * Close an open opportunity — lost, with the reason, by a person; won by the application that turned it into its own
96
- * record (Office's contract, ADR-0138 decision 8). The day is the domain's today unless one is given.
101
+ * Close an opportunity — lost or cancelled, with the reason, by a person, from an open stage or from hold; won by the
102
+ * application that turned it into its own record (Office's contract, ADR-0138 decision 8), from an open stage only.
103
+ * Cancelled is the customer dropping the work: nobody won it, so the win rate leaves it out (ADR-0233 decision 1). The
104
+ * day is the domain's today unless one is given.
97
105
  */
98
106
  async function closeOpportunity(tx, domain, user, id, outcome, { closedOn, reason } = {}) {
99
107
  const opportunity = await opportunityInDomain(tx, domain, id);
100
108
  if (!(0, opportunity_rules_1.stageMove)(opportunity.stage, outcome))
101
109
  throw new shell_1.Refusal('opportunity-stage-move-invalid', {}, 'The opportunity cannot move to that stage');
102
- if (outcome === opportunity_rules_1.OpportunityStage.LOST && !reason?.trim())
103
- throw new shell_1.Refusal('opportunity-reason-required', {}, 'Say why it was lost');
110
+ if (outcome !== opportunity_rules_1.OpportunityStage.WON && !reason?.trim())
111
+ throw new shell_1.Refusal('opportunity-reason-required', {}, 'Give the reason');
104
112
  const day = closedOn || (0, shell_1.calendarDay)(domain.timezone);
105
113
  if (!(0, invoice_1.validDay)(day))
106
114
  throw new shell_1.Refusal('opportunity-closed-on-invalid', {}, 'Give the closing day as YYYY-MM-DD');
107
115
  const from = opportunity.stage;
108
- await tx.getRepository(opportunity_1.Opportunity).update({ id: opportunity.id }, { stage: outcome, probability: (0, opportunity_rules_1.probabilityAfter)(outcome), closedOn: day, lostReason: outcome === opportunity_rules_1.OpportunityStage.LOST ? reason.trim() : null, updater: user });
116
+ await tx.getRepository(opportunity_1.Opportunity).update({ id: opportunity.id }, { stage: outcome, probability: (0, opportunity_rules_1.probabilityAfter)(outcome), closedOn: day, stageReason: outcome === opportunity_rules_1.OpportunityStage.WON ? null : reason.trim(), heldUntil: null, updater: user });
109
117
  const closed = await opportunityInDomain(tx, domain, id);
110
- await recordOpportunityEvent(tx, domain, user, closed, outcome, from, outcome === opportunity_rules_1.OpportunityStage.LOST ? closed.lostReason : undefined);
118
+ await recordOpportunityEvent(tx, domain, user, closed, outcome, from, closed.stageReason ?? undefined);
111
119
  return closed;
112
120
  }
121
+ /**
122
+ * Put an open opportunity on hold until a review day, with the reason — or change the reason and the day of a held one.
123
+ * A hold is a pause the owner means: it leaves the pipeline and 「no activity」, keeps its probability, and comes back
124
+ * to its owner on the review day, which is after today and at most `HOLD_DAYS_MAX` days ahead (ADR-0233 decision 2).
125
+ */
126
+ async function holdOpportunity(tx, domain, user, id, { reason, heldUntil }) {
127
+ const opportunity = await opportunityInDomain(tx, domain, id);
128
+ const again = opportunity.stage === opportunity_rules_1.OpportunityStage.ON_HOLD;
129
+ if (!again && !(0, opportunity_rules_1.stageMove)(opportunity.stage, opportunity_rules_1.OpportunityStage.ON_HOLD))
130
+ throw new shell_1.Refusal('opportunity-stage-move-invalid', {}, 'The opportunity cannot move to that stage');
131
+ if (!reason?.trim())
132
+ throw new shell_1.Refusal('opportunity-reason-required', {}, 'Give the reason');
133
+ const today = (0, shell_1.calendarDay)(domain.timezone);
134
+ const latest = addDays(today, opportunity_rules_1.HOLD_DAYS_MAX);
135
+ if (!(0, invoice_1.validDay)(heldUntil) || heldUntil <= today || heldUntil > latest)
136
+ throw new shell_1.Refusal('opportunity-held-until-invalid', { today, latest, days: opportunity_rules_1.HOLD_DAYS_MAX }, `Give a review day after ${today} and no later than ${latest}`);
137
+ const from = opportunity.stage;
138
+ await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage: opportunity_rules_1.OpportunityStage.ON_HOLD, stageReason: reason.trim(), heldUntil, closedOn: null, updater: user });
139
+ const held = await opportunityInDomain(tx, domain, id);
140
+ await recordOpportunityEvent(tx, domain, user, held, 'HELD', from, held.stageReason);
141
+ return held;
142
+ }
143
+ /**
144
+ * A held opportunity resumed: back to the open stage it was held from (the last hold that left an open stage), with the
145
+ * probability it kept. The reason and the review day are cleared; the history keeps them.
146
+ */
147
+ async function resumeOpportunity(tx, domain, user, id) {
148
+ const opportunity = await opportunityInDomain(tx, domain, id);
149
+ if (opportunity.stage !== opportunity_rules_1.OpportunityStage.ON_HOLD)
150
+ throw new shell_1.Refusal('opportunity-not-held', {}, 'Only a held opportunity is resumed');
151
+ const holds = await tx.getRepository(opportunity_event_1.OpportunityEvent).find({ where: { opportunity: { id }, action: 'HELD' }, order: { createdAt: 'DESC' } });
152
+ const stage = holds.find(one => one.fromStage && (0, opportunity_rules_1.isOpen)(one.fromStage))?.fromStage ?? opportunity_rules_1.OpportunityStage.LEAD;
153
+ await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage, stageReason: null, heldUntil: null, updater: user });
154
+ const resumed = await opportunityInDomain(tx, domain, id);
155
+ await recordOpportunityEvent(tx, domain, user, resumed, 'RESUMED', opportunity_rules_1.OpportunityStage.ON_HOLD);
156
+ return resumed;
157
+ }
158
+ const addDays = (day, days) => new Date(Date.parse(`${day}T00:00:00Z`) + days * 86400000).toISOString().slice(0, 10);
113
159
  /**
114
160
  * A won opportunity opened again, because the record its win became was undone - an application's contract link taken
115
161
  * back (the user, 2026-10-30: 「계약 연결을 취소할 수 있어야지」). Only the application that closed it as won undoes it; a
@@ -123,7 +169,7 @@ async function reopenWonOpportunity(tx, domain, user, id, reason) {
123
169
  throw new shell_1.Refusal('opportunity-reopen-reason-required', {}, 'Say why it is opened again');
124
170
  const won = await tx.getRepository(opportunity_event_1.OpportunityEvent).findOne({ where: { opportunity: { id }, action: opportunity_rules_1.OpportunityStage.WON }, order: { createdAt: 'DESC' } });
125
171
  const stage = won?.fromStage && (0, opportunity_rules_1.isOpen)(won.fromStage) ? won.fromStage : opportunity_rules_1.OpportunityStage.NEGOTIATION;
126
- await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage, probability: (0, opportunity_rules_1.probabilityAfter)(stage), closedOn: null, lostReason: null, updater: user });
172
+ await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage, probability: (0, opportunity_rules_1.probabilityAfter)(stage), closedOn: null, stageReason: null, heldUntil: null, updater: user });
127
173
  const reopened = await opportunityInDomain(tx, domain, id);
128
174
  await recordOpportunityEvent(tx, domain, user, reopened, 'REOPENED', opportunity_rules_1.OpportunityStage.WON, reason.trim());
129
175
  return reopened;
@@ -133,7 +179,7 @@ function recordOpportunityEvent(tx, domain, user, opportunity, action, fromStage
133
179
  }
134
180
  /** The opportunity as it stood. */
135
181
  function snapshotOf(opportunity) {
136
- const keys = ['id', 'name', 'counterpartyId', 'endCustomerId', 'amount', 'currency', 'expectedCloseMonth', 'stage', 'probability', 'ownerId', 'closedOn', 'lostReason', 'description'];
182
+ const keys = ['id', 'name', 'counterpartyId', 'endCustomerId', 'amount', 'currency', 'expectedCloseMonth', 'stage', 'probability', 'ownerId', 'closedOn', 'stageReason', 'heldUntil', 'description'];
137
183
  return Object.fromEntries(keys.map(key => [key, opportunity[key] ?? null]));
138
184
  }
139
185
  //# sourceMappingURL=opportunity-service.js.map
@@ -18,7 +18,7 @@ export declare class OpportunityList {
18
18
  }
19
19
  export declare class OpportunityStageDefault {
20
20
  stage: OpportunityStage;
21
- probability: number;
21
+ probability?: number;
22
22
  open: boolean;
23
23
  }
24
24
  export declare class OpportunityStageCount {
@@ -73,11 +73,11 @@ tslib_1.__decorate([
73
73
  tslib_1.__metadata("design:type", String)
74
74
  ], OpportunityStageDefault.prototype, "stage", void 0);
75
75
  tslib_1.__decorate([
76
- (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The probability the stage gives, in percent — a judgement, not a measurement' }),
76
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'The probability the stage gives, in percent — a judgement, not a measurement; none for on hold, which keeps the one it had' }),
77
77
  tslib_1.__metadata("design:type", Number)
78
78
  ], OpportunityStageDefault.prototype, "probability", void 0);
79
79
  tslib_1.__decorate([
80
- (0, type_graphql_1.Field)({ description: 'Whether a person moves an opportunity through this stage; won and lost close it' }),
80
+ (0, type_graphql_1.Field)({ description: 'Whether a person moves an opportunity through this stage; on hold pauses it, won, lost and cancelled close it' }),
81
81
  tslib_1.__metadata("design:type", Boolean)
82
82
  ], OpportunityStageDefault.prototype, "open", void 0);
83
83
  exports.OpportunityStageDefault = OpportunityStageDefault = tslib_1.__decorate([
@@ -95,7 +95,7 @@ tslib_1.__decorate([
95
95
  tslib_1.__metadata("design:type", Number)
96
96
  ], OpportunityStageCount.prototype, "count", void 0);
97
97
  tslib_1.__decorate([
98
- (0, type_graphql_1.Field)({ description: 'Whether the stage is open; the list starts with the open stages chosen, won and lost left out' }),
98
+ (0, type_graphql_1.Field)({ description: 'Whether the stage is open; the list starts with the open stages and on hold chosen, won, lost and cancelled left out' }),
99
99
  tslib_1.__metadata("design:type", Boolean)
100
100
  ], OpportunityStageCount.prototype, "open", void 0);
101
101
  exports.OpportunityStageCount = OpportunityStageCount = tslib_1.__decorate([
@@ -4,7 +4,7 @@ import { Domain } from '@things-factory/shell';
4
4
  import { OpportunityStage } from './opportunity-rules';
5
5
  /**
6
6
  * A sales opportunity — work the domain hopes to win, before there is a contract: with whom, for how much, by when,
7
- * and how likely. A person moves it through the stages; it closes as won or lost (ADR-0138 decision 5).
7
+ * and how likely. A person moves it through the stages; it closes as won, lost or cancelled, or is put on hold until a review day (ADR-0138 decision 5, ADR-0233).
8
8
  */
9
9
  export declare class Opportunity {
10
10
  readonly id: string;
@@ -23,7 +23,8 @@ export declare class Opportunity {
23
23
  owner?: User;
24
24
  ownerId?: string;
25
25
  closedOn?: string;
26
- lostReason?: string;
26
+ stageReason?: string;
27
+ heldUntil?: string;
27
28
  description?: string;
28
29
  createdAt?: Date;
29
30
  updatedAt?: Date;
@@ -10,7 +10,7 @@ const typeorm_1 = require("typeorm");
10
10
  const opportunity_rules_1 = require("./opportunity-rules");
11
11
  /**
12
12
  * A sales opportunity — work the domain hopes to win, before there is a contract: with whom, for how much, by when,
13
- * and how likely. A person moves it through the stages; it closes as won or lost (ADR-0138 decision 5).
13
+ * and how likely. A person moves it through the stages; it closes as won, lost or cancelled, or is put on hold until a review day (ADR-0138 decision 5, ADR-0233).
14
14
  */
15
15
  let Opportunity = class Opportunity {
16
16
  };
@@ -71,7 +71,7 @@ tslib_1.__decorate([
71
71
  ], Opportunity.prototype, "expectedCloseMonth", void 0);
72
72
  tslib_1.__decorate([
73
73
  (0, typeorm_1.Column)({ default: opportunity_rules_1.OpportunityStage.LEAD }),
74
- (0, type_graphql_1.Field)(type => opportunity_rules_1.OpportunityStage, { description: 'Lead, proposal, quoted, negotiation, won or lost' }),
74
+ (0, type_graphql_1.Field)(type => opportunity_rules_1.OpportunityStage, { description: 'Lead, proposal, quoted, negotiation, on hold, won, lost or cancelled' }),
75
75
  tslib_1.__metadata("design:type", String)
76
76
  ], Opportunity.prototype, "stage", void 0);
77
77
  tslib_1.__decorate([
@@ -91,14 +91,19 @@ tslib_1.__decorate([
91
91
  ], Opportunity.prototype, "ownerId", void 0);
92
92
  tslib_1.__decorate([
93
93
  (0, typeorm_1.Column)({ nullable: true }),
94
- (0, type_graphql_1.Field)({ nullable: true, description: 'Day it was closed as won or lost, YYYY-MM-DD' }),
94
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Day it was closed as won, lost or cancelled, YYYY-MM-DD' }),
95
95
  tslib_1.__metadata("design:type", String)
96
96
  ], Opportunity.prototype, "closedOn", void 0);
97
97
  tslib_1.__decorate([
98
98
  (0, typeorm_1.Column)({ nullable: true }),
99
- (0, type_graphql_1.Field)({ nullable: true, description: 'Why it was lost' }),
99
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Why it was lost, cancelled or put on hold' }),
100
100
  tslib_1.__metadata("design:type", String)
101
- ], Opportunity.prototype, "lostReason", void 0);
101
+ ], Opportunity.prototype, "stageReason", void 0);
102
+ tslib_1.__decorate([
103
+ (0, typeorm_1.Column)({ nullable: true }),
104
+ (0, type_graphql_1.Field)({ nullable: true, description: 'While on hold: the day to review it again, YYYY-MM-DD' }),
105
+ tslib_1.__metadata("design:type", String)
106
+ ], Opportunity.prototype, "heldUntil", void 0);
102
107
  tslib_1.__decorate([
103
108
  (0, typeorm_1.Column)({ type: 'text', nullable: true }),
104
109
  (0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
@@ -5,6 +5,6 @@ import { QuotationItem } from './quotation-item';
5
5
  import { QuotationItemQuery } from './quotation-item-query';
6
6
  import { QuotationMutation } from './quotation-mutation';
7
7
  import { QuotationQuery } from './quotation-query';
8
- export declare const entities: (typeof QuotationItem | typeof Quotation | typeof QuotationEvent)[];
9
- export declare const resolvers: (typeof QuotationEventQuery | typeof QuotationItemQuery | typeof QuotationMutation | typeof QuotationQuery)[];
8
+ export declare const entities: (typeof Quotation | typeof QuotationItem | typeof QuotationEvent)[];
9
+ export declare const resolvers: (typeof QuotationQuery | typeof QuotationMutation | typeof QuotationItemQuery | typeof QuotationEventQuery)[];
10
10
  export declare const subscribers: any[];
@@ -16,7 +16,7 @@ exports.OPPORTUNITY_LIST_READ = {
16
16
  title: 'title.opportunity-list',
17
17
  name: 'Sales opportunities (영업 기회)',
18
18
  listQuery: 'opportunities',
19
- selection: 'id name stage probability amount currency expectedCloseMonth closedOn lostReason description counterparty { id name } endCustomer { id name } owner { id name }',
19
+ selection: 'id name stage probability amount currency expectedCloseMonth closedOn stageReason heldUntil description counterparty { id name } endCustomer { id name } owner { id name }',
20
20
  columns: [
21
21
  { name: 'name', type: 'string', labelKey: 'field.opportunity-name' },
22
22
  { name: 'counterparty', path: 'counterparty.name', type: 'string', labelKey: 'field.opportunity-counterparty' },
@@ -27,7 +27,8 @@ exports.OPPORTUNITY_LIST_READ = {
27
27
  { name: 'amount', type: 'number', total: true, currency: 'currency', labelKey: 'field.opportunity-amount' },
28
28
  { name: 'expectedCloseMonth', type: 'string', labelKey: 'field.opportunity-expected-close-month' },
29
29
  { name: 'closedOn', type: 'date' },
30
- { name: 'lostReason', type: 'string' },
30
+ { name: 'stageReason', type: 'string' },
31
+ { name: 'heldUntil', type: 'date' },
31
32
  { name: 'owner', path: 'owner.name', type: 'string', labelKey: 'field.opportunity-owner' },
32
33
  { name: 'description', type: 'string' }
33
34
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/sales",
3
- "version": "10.1.308",
3
+ "version": "10.1.310",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -63,5 +63,5 @@
63
63
  "@things-factory/invoice": "^10.1.304",
64
64
  "@things-factory/shell": "^10.1.304"
65
65
  },
66
- "gitHead": "fb1e5f82471a206f641bcc5b79bbb9db909cc0a1"
66
+ "gitHead": "af1e7b73772abf0b89dfe66193c771e24e18a721"
67
67
  }
@@ -44,8 +44,8 @@
44
44
  "button.opportunity-new": "New opportunity",
45
45
  "button.opportunity-lose": "Mark as lost",
46
46
  "error.opportunity-not-found": "Opportunity not found.",
47
- "error.opportunity-closed": "This opportunity is closed. Choose an open stage to reopen a lost one.",
48
- "error.opportunity-stage-open-required": "Choose an open stage. Won and lost are closings.",
47
+ "error.opportunity-closed": "This opportunity is closed. Choose an open stage to reopen a lost or cancelled one.",
48
+ "error.opportunity-stage-open-required": "Choose an open stage. On hold, won, lost and cancelled are set under Close or hold.",
49
49
  "error.opportunity-stage-move-invalid": "The opportunity cannot move to that stage.",
50
50
  "error.opportunity-name-required": "Enter the opportunity name.",
51
51
  "error.opportunity-amount-invalid": "The expected amount must be zero or more.",
@@ -54,7 +54,7 @@
54
54
  "error.opportunity-counterparty-required": "Choose the counterparty.",
55
55
  "error.opportunity-end-customer-invalid": "Choose the end customer among the registered counterparties.",
56
56
  "error.opportunity-owner-invalid": "Choose the owner among this company's users.",
57
- "error.opportunity-reason-required": "Enter the reason it was lost.",
57
+ "error.opportunity-reason-required": "Enter the reason.",
58
58
  "error.opportunity-closed-on-invalid": "Enter the closing day as YYYY-MM-DD.",
59
59
  "field.opportunity-name": "Name",
60
60
  "field.opportunity-counterparty": "Counterparty",
@@ -82,7 +82,6 @@
82
82
  "text.opportunity-not-found": "Opportunity not found.",
83
83
  "text.opportunity-section-head": "Details",
84
84
  "text.opportunity-section-stage": "Stage",
85
- "text.opportunity-section-lose": "Lost",
86
85
  "text.opportunity-section-history": "History",
87
86
  "text.opportunity-owner-me": "Me",
88
87
  "text.opportunity-owner-all": "Every owner",
@@ -173,5 +172,21 @@
173
172
  "text.quotation-mail-sent": "The quotation was mailed to {to}.",
174
173
  "text.quotation-mail-always-cc": "Always copied to {addresses}",
175
174
  "error.quotation-mail-expired": "The offer passed its last day ({validUntil}). Make a new version to send it.",
176
- "error.quotation-mail-just-sent": "This quotation went to the same people ({to}) a moment ago."
175
+ "error.quotation-mail-just-sent": "This quotation went to the same people ({to}) a moment ago.",
176
+ "button.opportunity-cancel": "Mark as cancelled",
177
+ "button.opportunity-hold": "Put on hold",
178
+ "button.opportunity-resume": "Resume",
179
+ "error.opportunity-held": "This opportunity is on hold. Resume it before changing it.",
180
+ "error.opportunity-not-held": "Only an opportunity on hold can be resumed.",
181
+ "error.opportunity-held-until-invalid": "Enter a review day after {today} and no later than {latest} (within {days} days).",
182
+ "field.opportunity-reason": "Reason",
183
+ "field.opportunity-cancel-reason": "Cancellation reason",
184
+ "field.opportunity-hold-reason": "Hold reason",
185
+ "field.opportunity-held-until": "Review day",
186
+ "text.opportunity-stage-on-hold": "On hold",
187
+ "text.opportunity-stage-cancelled": "Cancelled",
188
+ "text.opportunity-section-close": "Close or hold",
189
+ "text.opportunity-event-cancelled": "Cancelled",
190
+ "text.opportunity-event-held": "Put on hold",
191
+ "text.opportunity-event-resumed": "Resumed"
177
192
  }
@@ -44,8 +44,8 @@
44
44
  "button.opportunity-new": "Nueva oportunidad",
45
45
  "button.opportunity-lose": "Marcar como perdida",
46
46
  "error.opportunity-not-found": "No se encontró la oportunidad.",
47
- "error.opportunity-closed": "Esta oportunidad está cerrada. Elija una etapa abierta para reabrir una perdida.",
48
- "error.opportunity-stage-open-required": "Elija una etapa abierta. Ganada y perdida son cierres.",
47
+ "error.opportunity-closed": "Esta oportunidad está cerrada. Elija una etapa abierta para reabrir una perdida o cancelada.",
48
+ "error.opportunity-stage-open-required": "Elija una etapa abierta. En espera, ganada, perdida y cancelada se indican en Cerrar o poner en espera.",
49
49
  "error.opportunity-stage-move-invalid": "La oportunidad no puede pasar a esa etapa.",
50
50
  "error.opportunity-name-required": "Introduzca el nombre de la oportunidad.",
51
51
  "error.opportunity-amount-invalid": "El importe previsto debe ser cero o más.",
@@ -54,7 +54,7 @@
54
54
  "error.opportunity-counterparty-required": "Elija la contraparte.",
55
55
  "error.opportunity-end-customer-invalid": "Elija el cliente final entre las contrapartes registradas.",
56
56
  "error.opportunity-owner-invalid": "Elija el responsable entre los usuarios de esta empresa.",
57
- "error.opportunity-reason-required": "Indique por qué se perdió.",
57
+ "error.opportunity-reason-required": "Introduzca el motivo.",
58
58
  "error.opportunity-closed-on-invalid": "Introduzca el día de cierre como AAAA-MM-DD.",
59
59
  "field.opportunity-name": "Nombre",
60
60
  "field.opportunity-counterparty": "Contraparte",
@@ -82,7 +82,6 @@
82
82
  "text.opportunity-not-found": "No se encontró la oportunidad.",
83
83
  "text.opportunity-section-head": "Datos",
84
84
  "text.opportunity-section-stage": "Etapa",
85
- "text.opportunity-section-lose": "Perdida",
86
85
  "text.opportunity-section-history": "Historial",
87
86
  "text.opportunity-owner-me": "Yo",
88
87
  "text.opportunity-owner-all": "Todos los responsables",
@@ -173,5 +172,21 @@
173
172
  "text.quotation-mail-sent": "La cotización se envió a {to}.",
174
173
  "text.quotation-mail-always-cc": "Siempre con copia a {addresses}",
175
174
  "error.quotation-mail-expired": "La oferta venció ({validUntil}). Cree una nueva versión para enviarla.",
176
- "error.quotation-mail-just-sent": "Esta cotización se acaba de enviar a las mismas personas ({to})."
175
+ "error.quotation-mail-just-sent": "Esta cotización se acaba de enviar a las mismas personas ({to}).",
176
+ "button.opportunity-cancel": "Marcar como cancelada",
177
+ "button.opportunity-hold": "Poner en espera",
178
+ "button.opportunity-resume": "Reanudar",
179
+ "error.opportunity-held": "Esta oportunidad está en espera. Reanúdela antes de cambiarla.",
180
+ "error.opportunity-not-held": "Solo se puede reanudar una oportunidad en espera.",
181
+ "error.opportunity-held-until-invalid": "Introduzca una fecha de revisión posterior a {today} y no posterior a {latest} (en {days} días).",
182
+ "field.opportunity-reason": "Motivo",
183
+ "field.opportunity-cancel-reason": "Motivo de cancelación",
184
+ "field.opportunity-hold-reason": "Motivo de espera",
185
+ "field.opportunity-held-until": "Fecha de revisión",
186
+ "text.opportunity-stage-on-hold": "En espera",
187
+ "text.opportunity-stage-cancelled": "Cancelada",
188
+ "text.opportunity-section-close": "Cerrar o poner en espera",
189
+ "text.opportunity-event-cancelled": "Cancelada",
190
+ "text.opportunity-event-held": "En espera",
191
+ "text.opportunity-event-resumed": "Reanudada"
177
192
  }
@@ -44,8 +44,8 @@
44
44
  "button.opportunity-new": "商談登録",
45
45
  "button.opportunity-lose": "失注にする",
46
46
  "error.opportunity-not-found": "商談が見つかりません。",
47
- "error.opportunity-closed": "終了した商談です。失注した商談は進行中の段階を選ぶと再開します。",
48
- "error.opportunity-stage-open-required": "進行中の段階を選んでください。受注と失注は終了処理で行います。",
47
+ "error.opportunity-closed": "終了した商談です。失注・取消した商談は進行段階を選択すると再開できます。",
48
+ "error.opportunity-stage-open-required": "進行段階を選択してください。保留・受注・失注・取消は終了・保留で処理します。",
49
49
  "error.opportunity-stage-move-invalid": "その段階には移せません。",
50
50
  "error.opportunity-name-required": "商談名を入力してください。",
51
51
  "error.opportunity-amount-invalid": "見込金額は0以上にしてください。",
@@ -54,7 +54,7 @@
54
54
  "error.opportunity-counterparty-required": "取引先を選んでください。",
55
55
  "error.opportunity-end-customer-invalid": "エンド顧客は登録済みの取引先から選んでください。",
56
56
  "error.opportunity-owner-invalid": "担当者はこの会社のユーザーから選んでください。",
57
- "error.opportunity-reason-required": "失注理由を入力してください。",
57
+ "error.opportunity-reason-required": "理由を入力してください。",
58
58
  "error.opportunity-closed-on-invalid": "終了日をYYYY-MM-DD形式で入力してください。",
59
59
  "field.opportunity-name": "商談名",
60
60
  "field.opportunity-counterparty": "取引先",
@@ -82,7 +82,6 @@
82
82
  "text.opportunity-not-found": "商談が見つかりません。",
83
83
  "text.opportunity-section-head": "基本情報",
84
84
  "text.opportunity-section-stage": "段階",
85
- "text.opportunity-section-lose": "失注",
86
85
  "text.opportunity-section-history": "履歴",
87
86
  "text.opportunity-owner-me": "自分",
88
87
  "text.opportunity-owner-all": "すべての担当者",
@@ -173,5 +172,21 @@
173
172
  "text.quotation-mail-sent": "{to} に見積書を送りました。",
174
173
  "text.quotation-mail-always-cc": "自動 CC: {addresses}",
175
174
  "error.quotation-mail-expired": "有効期限({validUntil})を過ぎた見積は再送しません。新しいバージョンを作って送ってください。",
176
- "error.quotation-mail-just-sent": "先ほど同じ宛先({to})にこの見積を送りました。"
175
+ "error.quotation-mail-just-sent": "先ほど同じ宛先({to})にこの見積を送りました。",
176
+ "button.opportunity-cancel": "取消処理",
177
+ "button.opportunity-hold": "保留処理",
178
+ "button.opportunity-resume": "再開",
179
+ "error.opportunity-held": "保留中の商談です。再開してから変更してください。",
180
+ "error.opportunity-not-held": "保留中の商談のみ再開できます。",
181
+ "error.opportunity-held-until-invalid": "再検討日は{today}の翌日から{latest}まで({days}日以内)で入力してください。",
182
+ "field.opportunity-reason": "理由",
183
+ "field.opportunity-cancel-reason": "取消理由",
184
+ "field.opportunity-hold-reason": "保留理由",
185
+ "field.opportunity-held-until": "再検討日",
186
+ "text.opportunity-stage-on-hold": "保留",
187
+ "text.opportunity-stage-cancelled": "取消",
188
+ "text.opportunity-section-close": "終了・保留",
189
+ "text.opportunity-event-cancelled": "取消",
190
+ "text.opportunity-event-held": "保留",
191
+ "text.opportunity-event-resumed": "再開"
177
192
  }
@@ -44,8 +44,8 @@
44
44
  "button.opportunity-new": "영업 기회 등록",
45
45
  "button.opportunity-lose": "실주 처리",
46
46
  "error.opportunity-not-found": "영업 기회를 찾을 수 없습니다.",
47
- "error.opportunity-closed": "종료된 영업 기회입니다. 실주한 영업 기회는 진행 단계를 선택하면 다시 열 수 있습니다.",
48
- "error.opportunity-stage-open-required": "진행 단계를 선택해 주세요. 수주·실주는 종료 처리에서 지정합니다.",
47
+ "error.opportunity-closed": "종료된 영업 기회입니다. 실주·취소한 영업 기회는 진행 단계를 선택하면 다시 열 수 있습니다.",
48
+ "error.opportunity-stage-open-required": "진행 단계를 선택해 주세요. 보류·수주·실주·취소는 종결·보류 구역에서 처리합니다.",
49
49
  "error.opportunity-stage-move-invalid": "선택한 단계로 변경할 수 없습니다.",
50
50
  "error.opportunity-name-required": "기회 이름을 입력하세요.",
51
51
  "error.opportunity-amount-invalid": "예상 금액은 0 이상이어야 합니다.",
@@ -54,7 +54,7 @@
54
54
  "error.opportunity-counterparty-required": "거래처를 선택해 주세요.",
55
55
  "error.opportunity-end-customer-invalid": "등록된 거래처에서 최종 고객을 선택해 주세요.",
56
56
  "error.opportunity-owner-invalid": "이 회사에 등록된 사용자 중에서 담당자를 선택해 주세요.",
57
- "error.opportunity-reason-required": "실주 사유를 입력하세요.",
57
+ "error.opportunity-reason-required": "사유를 입력하세요.",
58
58
  "error.opportunity-closed-on-invalid": "종료일을 YYYY-MM-DD 형식으로 입력하세요.",
59
59
  "field.opportunity-name": "기회 이름",
60
60
  "field.opportunity-counterparty": "거래처",
@@ -82,7 +82,6 @@
82
82
  "text.opportunity-not-found": "영업 기회를 찾을 수 없습니다.",
83
83
  "text.opportunity-section-head": "기본 정보",
84
84
  "text.opportunity-section-stage": "단계",
85
- "text.opportunity-section-lose": "실주",
86
85
  "text.opportunity-section-history": "이력",
87
86
  "text.opportunity-owner-me": "나",
88
87
  "text.opportunity-owner-all": "모든 담당자",
@@ -173,5 +172,21 @@
173
172
  "text.quotation-mail-sent": "{to} 에게 견적서를 보냈습니다.",
174
173
  "text.quotation-mail-always-cc": "자동 참조: {addresses}",
175
174
  "error.quotation-mail-expired": "유효기한({validUntil})이 지난 견적은 다시 보내지 않습니다. 새 버전을 만들어 보내세요.",
176
- "error.quotation-mail-just-sent": "방금 같은 사람들({to})에게 이 견적을 보냈습니다."
175
+ "error.quotation-mail-just-sent": "방금 같은 사람들({to})에게 이 견적을 보냈습니다.",
176
+ "button.opportunity-cancel": "취소 처리",
177
+ "button.opportunity-hold": "보류 처리",
178
+ "button.opportunity-resume": "재개",
179
+ "error.opportunity-held": "보류 중인 영업 기회입니다. 재개한 뒤 변경하세요.",
180
+ "error.opportunity-not-held": "보류 중인 영업 기회만 재개할 수 있습니다.",
181
+ "error.opportunity-held-until-invalid": "재검토일은 {today} 다음 날부터 {latest}까지({days}일 이내) 입력하세요.",
182
+ "field.opportunity-reason": "사유",
183
+ "field.opportunity-cancel-reason": "취소 사유",
184
+ "field.opportunity-hold-reason": "보류 사유",
185
+ "field.opportunity-held-until": "재검토일",
186
+ "text.opportunity-stage-on-hold": "보류",
187
+ "text.opportunity-stage-cancelled": "취소",
188
+ "text.opportunity-section-close": "종결·보류",
189
+ "text.opportunity-event-cancelled": "취소",
190
+ "text.opportunity-event-held": "보류",
191
+ "text.opportunity-event-resumed": "재개"
177
192
  }
@@ -44,8 +44,8 @@
44
44
  "button.opportunity-new": "Peluang baharu",
45
45
  "button.opportunity-lose": "Tandakan sebagai kalah",
46
46
  "error.opportunity-not-found": "Peluang tidak ditemui.",
47
- "error.opportunity-closed": "Peluang ini telah ditutup. Pilih peringkat terbuka untuk membuka semula peluang yang kalah.",
48
- "error.opportunity-stage-open-required": "Pilih peringkat terbuka. Menang dan kalah ialah penutupan.",
47
+ "error.opportunity-closed": "Peluang ini telah ditutup. Pilih peringkat terbuka untuk membuka semula peluang yang hilang atau dibatalkan.",
48
+ "error.opportunity-stage-open-required": "Pilih peringkat terbuka. Ditangguhkan, menang, hilang dan dibatalkan ditetapkan di Tutup atau tangguh.",
49
49
  "error.opportunity-stage-move-invalid": "Peluang tidak boleh dipindahkan ke peringkat itu.",
50
50
  "error.opportunity-name-required": "Masukkan nama peluang.",
51
51
  "error.opportunity-amount-invalid": "Jumlah dijangka mestilah sifar atau lebih.",
@@ -54,7 +54,7 @@
54
54
  "error.opportunity-counterparty-required": "Pilih pihak berurusan.",
55
55
  "error.opportunity-end-customer-invalid": "Pilih pelanggan akhir daripada pihak berurusan yang didaftarkan.",
56
56
  "error.opportunity-owner-invalid": "Pilih pemilik daripada pengguna syarikat ini.",
57
- "error.opportunity-reason-required": "Nyatakan sebab kalah.",
57
+ "error.opportunity-reason-required": "Masukkan sebabnya.",
58
58
  "error.opportunity-closed-on-invalid": "Masukkan tarikh tutup sebagai YYYY-MM-DD.",
59
59
  "field.opportunity-name": "Nama",
60
60
  "field.opportunity-counterparty": "Pihak berurusan",
@@ -82,7 +82,6 @@
82
82
  "text.opportunity-not-found": "Peluang tidak ditemui.",
83
83
  "text.opportunity-section-head": "Butiran",
84
84
  "text.opportunity-section-stage": "Peringkat",
85
- "text.opportunity-section-lose": "Kalah",
86
85
  "text.opportunity-section-history": "Sejarah",
87
86
  "text.opportunity-owner-me": "Saya",
88
87
  "text.opportunity-owner-all": "Semua pemilik",
@@ -173,5 +172,21 @@
173
172
  "text.quotation-mail-sent": "Sebut harga telah dihantar kepada {to}.",
174
173
  "text.quotation-mail-always-cc": "Sentiasa disalin kepada {addresses}",
175
174
  "error.quotation-mail-expired": "Tawaran telah tamat ({validUntil}). Buat versi baharu untuk menghantarnya.",
176
- "error.quotation-mail-just-sent": "Sebut harga ini baru sahaja dihantar kepada orang yang sama ({to})."
175
+ "error.quotation-mail-just-sent": "Sebut harga ini baru sahaja dihantar kepada orang yang sama ({to}).",
176
+ "button.opportunity-cancel": "Tandakan dibatalkan",
177
+ "button.opportunity-hold": "Tangguhkan",
178
+ "button.opportunity-resume": "Sambung semula",
179
+ "error.opportunity-held": "Peluang ini ditangguhkan. Sambung semula sebelum mengubahnya.",
180
+ "error.opportunity-not-held": "Hanya peluang yang ditangguhkan boleh disambung semula.",
181
+ "error.opportunity-held-until-invalid": "Masukkan tarikh semakan selepas {today} dan tidak lewat daripada {latest} (dalam {days} hari).",
182
+ "field.opportunity-reason": "Sebab",
183
+ "field.opportunity-cancel-reason": "Sebab pembatalan",
184
+ "field.opportunity-hold-reason": "Sebab penangguhan",
185
+ "field.opportunity-held-until": "Tarikh semakan",
186
+ "text.opportunity-stage-on-hold": "Ditangguhkan",
187
+ "text.opportunity-stage-cancelled": "Dibatalkan",
188
+ "text.opportunity-section-close": "Tutup atau tangguh",
189
+ "text.opportunity-event-cancelled": "Dibatalkan",
190
+ "text.opportunity-event-held": "Ditangguhkan",
191
+ "text.opportunity-event-resumed": "Disambung semula"
177
192
  }
@@ -44,8 +44,8 @@
44
44
  "button.opportunity-new": "新建商机",
45
45
  "button.opportunity-lose": "标记为丢单",
46
46
  "error.opportunity-not-found": "未找到商机。",
47
- "error.opportunity-closed": "该商机已结束。丢单的商机可选择进行中的阶段重新打开。",
48
- "error.opportunity-stage-open-required": "请选择进行中的阶段。赢单和丢单通过结束处理完成。",
47
+ "error.opportunity-closed": "该商机已关闭。选择进行中的阶段即可重新打开已丢单或已取消的商机。",
48
+ "error.opportunity-stage-open-required": "请选择进行中的阶段。搁置、赢单、丢单和取消在“关闭或搁置”中处理。",
49
49
  "error.opportunity-stage-move-invalid": "无法移至该阶段。",
50
50
  "error.opportunity-name-required": "请输入商机名称。",
51
51
  "error.opportunity-amount-invalid": "预计金额须为0或以上。",
@@ -54,7 +54,7 @@
54
54
  "error.opportunity-counterparty-required": "请选择往来单位。",
55
55
  "error.opportunity-end-customer-invalid": "请从已登记的往来单位中选择最终客户。",
56
56
  "error.opportunity-owner-invalid": "请从本公司用户中选择负责人。",
57
- "error.opportunity-reason-required": "请输入丢单原因。",
57
+ "error.opportunity-reason-required": "请输入原因。",
58
58
  "error.opportunity-closed-on-invalid": "请按YYYY-MM-DD格式输入结束日期。",
59
59
  "field.opportunity-name": "商机名称",
60
60
  "field.opportunity-counterparty": "往来单位",
@@ -82,7 +82,6 @@
82
82
  "text.opportunity-not-found": "未找到商机。",
83
83
  "text.opportunity-section-head": "基本信息",
84
84
  "text.opportunity-section-stage": "阶段",
85
- "text.opportunity-section-lose": "丢单",
86
85
  "text.opportunity-section-history": "历史",
87
86
  "text.opportunity-owner-me": "我",
88
87
  "text.opportunity-owner-all": "所有负责人",
@@ -173,5 +172,21 @@
173
172
  "text.quotation-mail-sent": "已将报价单发送给 {to}。",
174
173
  "text.quotation-mail-always-cc": "自动抄送:{addresses}",
175
174
  "error.quotation-mail-expired": "已过有效期({validUntil})的报价不再发送。请创建新版本后发送。",
176
- "error.quotation-mail-just-sent": "刚刚已将此报价发送给相同的收件人({to})。"
175
+ "error.quotation-mail-just-sent": "刚刚已将此报价发送给相同的收件人({to})。",
176
+ "button.opportunity-cancel": "标记为取消",
177
+ "button.opportunity-hold": "搁置",
178
+ "button.opportunity-resume": "恢复",
179
+ "error.opportunity-held": "该商机已搁置。请先恢复再修改。",
180
+ "error.opportunity-not-held": "只有已搁置的商机才能恢复。",
181
+ "error.opportunity-held-until-invalid": "复查日期须晚于{today},且不晚于{latest}({days}天以内)。",
182
+ "field.opportunity-reason": "原因",
183
+ "field.opportunity-cancel-reason": "取消原因",
184
+ "field.opportunity-hold-reason": "搁置原因",
185
+ "field.opportunity-held-until": "复查日期",
186
+ "text.opportunity-stage-on-hold": "搁置",
187
+ "text.opportunity-stage-cancelled": "已取消",
188
+ "text.opportunity-section-close": "关闭或搁置",
189
+ "text.opportunity-event-cancelled": "取消",
190
+ "text.opportunity-event-held": "搁置",
191
+ "text.opportunity-event-resumed": "恢复"
177
192
  }