@chevre/domain 20.11.1 → 20.12.0-alpha.0

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.
@@ -72,6 +72,10 @@ function importCategoryCodesFromCOA(params) {
72
72
  theaterCode: params.theaterCode,
73
73
  kubunClass: '045'
74
74
  });
75
+ // const acousticKubuns = await repos.masterService.kubunName({
76
+ // theaterCode: params.theaterCode,
77
+ // kubunClass: '046'
78
+ // });
75
79
  const seatKubuns = yield repos.masterService.kubunName({
76
80
  theaterCode: params.theaterCode,
77
81
  kubunClass: '050'
@@ -87,6 +91,16 @@ function importCategoryCodesFromCOA(params) {
87
91
  upsert: true
88
92
  });
89
93
  });
94
+ // acousticKubuns.forEach((kubun) => {
95
+ // saveParams.push({
96
+ // attributes: kubun2categoryCode({
97
+ // kubun,
98
+ // project: params.project,
99
+ // inCodeSet: { identifier: factory.categoryCode.CategorySetIdentifier.SoundFormatType }
100
+ // }),
101
+ // upsert: true
102
+ // });
103
+ // });
90
104
  seatKubuns.forEach((kubun) => {
91
105
  saveParams.push({
92
106
  attributes: kubun2categoryCode({
@@ -50,7 +50,7 @@ function createAppliesToMovieTicket(params) {
50
50
  }
51
51
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
52
52
  function createPriceComponent(params) {
53
- var _a, _b, _c, _d, _e, _f;
53
+ var _a, _b, _c, _d, _e, _f, _g;
54
54
  const acceptedOffer = params.acceptedOffer;
55
55
  const availableUnitPriceOffer = params.availableUnitPriceOffer;
56
56
  const kbnJoueihousiki = (_a = params.screeningEvent.superEvent.coaInfo) === null || _a === void 0 ? void 0 : _a.kbnJoueihousiki;
@@ -130,29 +130,58 @@ function createPriceComponent(params) {
130
130
  // movieTicketTypeChargePriceSpecにaddPriceが含まれる場合は除く
131
131
  if (movieTicketTypeChargePriceSpec === undefined) {
132
132
  if (ticketInfo.addPrice > 0) {
133
- categoryCodeChargeSpecs.push({
134
- name: {
135
- en: (typeof (kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunNameEng) === 'string')
136
- ? kbnJoueihousiki.kubunNameEng
137
- : String(kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunCode),
138
- ja: (typeof (kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunName) === 'string')
139
- ? `${kbnJoueihousiki.kubunName}加算料金`
140
- : '加算単価'
141
- },
142
- price: ticketInfo.addPrice,
143
- priceCurrency: factory.priceCurrency.JPY,
144
- typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification,
145
- appliesToCategoryCode: [{
146
- // project: { id: params.project.id, typeOf: factory.organizationType.Project },
147
- typeOf: 'CategoryCode',
148
- codeValue: String(kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunCode),
149
- inCodeSet: {
150
- typeOf: 'CategoryCodeSet',
151
- identifier: factory.categoryCode.CategorySetIdentifier.VideoFormatType
152
- }
153
- }],
154
- valueAddedTaxIncluded: true
155
- });
133
+ const videoFormatTypeCharge = (typeof (kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunAddPrice) === 'number') ? kbnJoueihousiki.kubunAddPrice : 0;
134
+ const kbnAcoustic = (_g = params.screeningEvent.coaInfo) === null || _g === void 0 ? void 0 : _g.kbnAcoustic;
135
+ const soundFormatTypeCharge = (typeof (kbnAcoustic === null || kbnAcoustic === void 0 ? void 0 : kbnAcoustic.kubunAddPrice) === 'number') ? kbnAcoustic.kubunAddPrice : 0;
136
+ // 上映方式区分加算料金と音響区分加算料金を考慮する
137
+ if (videoFormatTypeCharge > 0) {
138
+ categoryCodeChargeSpecs.push({
139
+ name: {
140
+ en: (typeof (kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunNameEng) === 'string')
141
+ ? kbnJoueihousiki.kubunNameEng
142
+ : String(kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunCode),
143
+ ja: (typeof (kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunName) === 'string')
144
+ ? `${kbnJoueihousiki.kubunName}加算料金`
145
+ : '加算単価'
146
+ },
147
+ price: videoFormatTypeCharge,
148
+ priceCurrency: factory.priceCurrency.JPY,
149
+ typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification,
150
+ appliesToCategoryCode: [{
151
+ typeOf: 'CategoryCode',
152
+ codeValue: String(kbnJoueihousiki === null || kbnJoueihousiki === void 0 ? void 0 : kbnJoueihousiki.kubunCode),
153
+ inCodeSet: {
154
+ typeOf: 'CategoryCodeSet',
155
+ identifier: factory.categoryCode.CategorySetIdentifier.VideoFormatType
156
+ }
157
+ }],
158
+ valueAddedTaxIncluded: true
159
+ });
160
+ }
161
+ if (soundFormatTypeCharge > 0) {
162
+ categoryCodeChargeSpecs.push({
163
+ name: {
164
+ en: (typeof (kbnAcoustic === null || kbnAcoustic === void 0 ? void 0 : kbnAcoustic.kubunNameEng) === 'string')
165
+ ? kbnAcoustic.kubunNameEng
166
+ : String(kbnAcoustic === null || kbnAcoustic === void 0 ? void 0 : kbnAcoustic.kubunCode),
167
+ ja: (typeof (kbnAcoustic === null || kbnAcoustic === void 0 ? void 0 : kbnAcoustic.kubunName) === 'string')
168
+ ? `${kbnAcoustic.kubunName}加算料金`
169
+ : '加算単価'
170
+ },
171
+ price: soundFormatTypeCharge,
172
+ priceCurrency: factory.priceCurrency.JPY,
173
+ typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification,
174
+ appliesToCategoryCode: [{
175
+ typeOf: 'CategoryCode',
176
+ codeValue: String(kbnAcoustic === null || kbnAcoustic === void 0 ? void 0 : kbnAcoustic.kubunCode),
177
+ inCodeSet: {
178
+ typeOf: 'CategoryCodeSet',
179
+ identifier: factory.categoryCode.CategorySetIdentifier.SoundFormatType
180
+ }
181
+ }],
182
+ valueAddedTaxIncluded: true
183
+ });
184
+ }
156
185
  }
157
186
  }
158
187
  if (ticketInfo.spseatAdd1 > 0) {
package/package.json CHANGED
@@ -120,5 +120,5 @@
120
120
  "postversion": "git push origin --tags",
121
121
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
122
122
  },
123
- "version": "20.11.1"
123
+ "version": "20.12.0-alpha.0"
124
124
  }