@chevre/domain 24.1.0-alpha.6 → 24.1.0-alpha.8
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.
- package/lib/chevre/repo/factory/reservation/createMongoConditions.js +140 -139
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +1 -0
- package/lib/chevre/repo/mongoose/schemas/reservation.js +117 -117
- package/lib/chevre/repo/order.d.ts +2 -1
- package/lib/chevre/repo/order.js +171 -170
- package/lib/chevre/repo/reservation.d.ts +2 -0
- package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -1
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +15 -15
- package/lib/chevre/service/task/createAccountingReport.js +4 -4
- package/package.json +2 -2
|
@@ -455,41 +455,41 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
455
455
|
}
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
-
const brokerIdentifierAll = params.broker?.identifier?.$all;
|
|
459
|
-
if (Array.isArray(brokerIdentifierAll)) {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
const brokerIdentifierIn = params.broker?.identifier?.$in;
|
|
468
|
-
if (Array.isArray(brokerIdentifierIn)) {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
const brokerIdentifierNin = params.broker?.identifier?.$nin;
|
|
477
|
-
if (Array.isArray(brokerIdentifierNin)) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
}
|
|
484
|
-
const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
|
|
485
|
-
if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
458
|
+
// const brokerIdentifierAll = params.broker?.identifier?.$all;
|
|
459
|
+
// if (Array.isArray(brokerIdentifierAll)) {
|
|
460
|
+
// andConditions.push({
|
|
461
|
+
// 'broker.identifier': {
|
|
462
|
+
// $exists: true,
|
|
463
|
+
// $all: brokerIdentifierAll
|
|
464
|
+
// }
|
|
465
|
+
// });
|
|
466
|
+
// }
|
|
467
|
+
// const brokerIdentifierIn = params.broker?.identifier?.$in;
|
|
468
|
+
// if (Array.isArray(brokerIdentifierIn)) {
|
|
469
|
+
// andConditions.push({
|
|
470
|
+
// 'broker.identifier': {
|
|
471
|
+
// $exists: true,
|
|
472
|
+
// $in: brokerIdentifierIn
|
|
473
|
+
// }
|
|
474
|
+
// });
|
|
475
|
+
// }
|
|
476
|
+
// const brokerIdentifierNin = params.broker?.identifier?.$nin;
|
|
477
|
+
// if (Array.isArray(brokerIdentifierNin)) {
|
|
478
|
+
// andConditions.push({
|
|
479
|
+
// 'broker.identifier': {
|
|
480
|
+
// $nin: brokerIdentifierNin
|
|
481
|
+
// }
|
|
482
|
+
// });
|
|
483
|
+
// }
|
|
484
|
+
// const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
|
|
485
|
+
// if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
|
|
486
|
+
// andConditions.push({
|
|
487
|
+
// 'broker.identifier': {
|
|
488
|
+
// $exists: true,
|
|
489
|
+
// $elemMatch: brokerIdentifierElemMatch
|
|
490
|
+
// }
|
|
491
|
+
// });
|
|
492
|
+
// }
|
|
493
493
|
/* istanbul ignore else */
|
|
494
494
|
if (params.underName !== undefined) {
|
|
495
495
|
/* istanbul ignore else */
|
|
@@ -606,49 +606,49 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
606
606
|
});
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
/* istanbul ignore else */
|
|
610
|
-
if (params.underName.identifier !== undefined) {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
/* istanbul ignore else */
|
|
644
|
-
if (Array.isArray(params.underName.identifiers)) {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
}
|
|
609
|
+
// /* istanbul ignore else */
|
|
610
|
+
// if (params.underName.identifier !== undefined) {
|
|
611
|
+
// if (Array.isArray(params.underName.identifier.$all)) {
|
|
612
|
+
// andConditions.push({
|
|
613
|
+
// 'underName.identifier': {
|
|
614
|
+
// $exists: true,
|
|
615
|
+
// $all: params.underName.identifier.$all
|
|
616
|
+
// }
|
|
617
|
+
// });
|
|
618
|
+
// }
|
|
619
|
+
// if (Array.isArray(params.underName.identifier.$in)) {
|
|
620
|
+
// andConditions.push({
|
|
621
|
+
// 'underName.identifier': {
|
|
622
|
+
// $exists: true,
|
|
623
|
+
// $in: params.underName.identifier.$in
|
|
624
|
+
// }
|
|
625
|
+
// });
|
|
626
|
+
// }
|
|
627
|
+
// if (Array.isArray(params.underName.identifier.$nin)) {
|
|
628
|
+
// andConditions.push({
|
|
629
|
+
// 'underName.identifier': {
|
|
630
|
+
// $nin: params.underName.identifier.$nin
|
|
631
|
+
// }
|
|
632
|
+
// });
|
|
633
|
+
// }
|
|
634
|
+
// if (params.underName.identifier.$elemMatch !== undefined) {
|
|
635
|
+
// andConditions.push({
|
|
636
|
+
// 'underName.identifier': {
|
|
637
|
+
// $exists: true,
|
|
638
|
+
// $elemMatch: params.underName.identifier.$elemMatch
|
|
639
|
+
// }
|
|
640
|
+
// });
|
|
641
|
+
// }
|
|
642
|
+
// }
|
|
643
|
+
// /* istanbul ignore else */
|
|
644
|
+
// if (Array.isArray(params.underName.identifiers)) {
|
|
645
|
+
// andConditions.push({
|
|
646
|
+
// 'underName.identifier': {
|
|
647
|
+
// $exists: true,
|
|
648
|
+
// $in: params.underName.identifiers
|
|
649
|
+
// }
|
|
650
|
+
// });
|
|
651
|
+
// }
|
|
652
652
|
}
|
|
653
653
|
/* istanbul ignore else */
|
|
654
654
|
if (typeof params.attended === 'boolean') {
|
|
@@ -662,66 +662,67 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
662
662
|
checkedIn: params.checkedIn
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
-
/* istanbul ignore else */
|
|
666
|
-
if (params.additionalProperty !== undefined) {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
}
|
|
699
|
-
const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
|
|
700
|
-
if (typeof programMembershipUsedIdentifierEq === 'string') {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}
|
|
708
|
-
const programMembershipUsedIssuedThroughServiceTypeCodeValueEq =
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
665
|
+
// /* istanbul ignore else */
|
|
666
|
+
// if (params.additionalProperty !== undefined) {
|
|
667
|
+
// if (Array.isArray(params.additionalProperty.$all)) {
|
|
668
|
+
// andConditions.push({
|
|
669
|
+
// additionalProperty: {
|
|
670
|
+
// $exists: true,
|
|
671
|
+
// $all: params.additionalProperty.$all
|
|
672
|
+
// }
|
|
673
|
+
// });
|
|
674
|
+
// }
|
|
675
|
+
// if (Array.isArray(params.additionalProperty.$in)) {
|
|
676
|
+
// andConditions.push({
|
|
677
|
+
// additionalProperty: {
|
|
678
|
+
// $exists: true,
|
|
679
|
+
// $in: params.additionalProperty.$in
|
|
680
|
+
// }
|
|
681
|
+
// });
|
|
682
|
+
// }
|
|
683
|
+
// if (Array.isArray(params.additionalProperty.$nin)) {
|
|
684
|
+
// andConditions.push({
|
|
685
|
+
// additionalProperty: {
|
|
686
|
+
// $nin: params.additionalProperty.$nin
|
|
687
|
+
// }
|
|
688
|
+
// });
|
|
689
|
+
// }
|
|
690
|
+
// if (params.additionalProperty.$elemMatch !== undefined) {
|
|
691
|
+
// andConditions.push({
|
|
692
|
+
// additionalProperty: {
|
|
693
|
+
// $exists: true,
|
|
694
|
+
// $elemMatch: params.additionalProperty.$elemMatch
|
|
695
|
+
// }
|
|
696
|
+
// });
|
|
697
|
+
// }
|
|
698
|
+
// }
|
|
699
|
+
// const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
|
|
700
|
+
// if (typeof programMembershipUsedIdentifierEq === 'string') {
|
|
701
|
+
// andConditions.push({
|
|
702
|
+
// 'programMembershipUsed.identifier': {
|
|
703
|
+
// $exists: true,
|
|
704
|
+
// $eq: programMembershipUsedIdentifierEq
|
|
705
|
+
// }
|
|
706
|
+
// });
|
|
707
|
+
// }
|
|
708
|
+
// const programMembershipUsedIssuedThroughServiceTypeCodeValueEq =
|
|
709
|
+
// params.programMembershipUsed?.issuedThrough?.serviceType?.codeValue?.$eq;
|
|
710
|
+
// if (typeof programMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
|
|
711
|
+
// andConditions.push({
|
|
712
|
+
// 'programMembershipUsed.issuedThrough.serviceType.codeValue': {
|
|
713
|
+
// $exists: true,
|
|
714
|
+
// $eq: programMembershipUsedIssuedThroughServiceTypeCodeValueEq
|
|
715
|
+
// }
|
|
716
|
+
// });
|
|
717
|
+
// }
|
|
718
|
+
// const appliesToMovieTicketIdentifierEq = params.price?.priceComponent?.appliesToMovieTicket?.identifier?.$eq;
|
|
719
|
+
// if (typeof appliesToMovieTicketIdentifierEq === 'string') {
|
|
720
|
+
// andConditions.push({
|
|
721
|
+
// 'price.priceComponent.appliesToMovieTicket.identifier': {
|
|
722
|
+
// $exists: true,
|
|
723
|
+
// $eq: appliesToMovieTicketIdentifierEq
|
|
724
|
+
// }
|
|
725
|
+
// });
|
|
726
|
+
// }
|
|
726
727
|
return andConditions;
|
|
727
728
|
}
|
|
@@ -5,6 +5,7 @@ type IDocType = (Omit<factory.reservation.eventReservation.IReservation, 'id'>)
|
|
|
5
5
|
_id: string;
|
|
6
6
|
bookingAgent?: any;
|
|
7
7
|
previousReservationStatus?: factory.reservationStatusType;
|
|
8
|
+
priceCurrency?: factory.priceCurrency;
|
|
8
9
|
};
|
|
9
10
|
type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
|
|
10
11
|
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
@@ -109,15 +109,15 @@ const indexes = [
|
|
|
109
109
|
{ attended: 1, bookingTime: -1 },
|
|
110
110
|
{ name: 'searchByAttended-v3' }
|
|
111
111
|
],
|
|
112
|
-
[
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
],
|
|
112
|
+
// [
|
|
113
|
+
// { useActionExists: 1, bookingTime: -1 },
|
|
114
|
+
// {
|
|
115
|
+
// name: 'searchByUseActionExists',
|
|
116
|
+
// partialFilterExpression: {
|
|
117
|
+
// useActionExists: { $exists: true }
|
|
118
|
+
// }
|
|
119
|
+
// }
|
|
120
|
+
// ],
|
|
121
121
|
[
|
|
122
122
|
{ additionalTicketText: 1, bookingTime: -1 },
|
|
123
123
|
{
|
|
@@ -127,24 +127,24 @@ const indexes = [
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
],
|
|
130
|
-
[
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
],
|
|
139
|
-
[
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
],
|
|
130
|
+
// [
|
|
131
|
+
// { additionalProperty: 1, bookingTime: -1 },
|
|
132
|
+
// {
|
|
133
|
+
// name: 'searchByAdditionalProperty-v3',
|
|
134
|
+
// partialFilterExpression: {
|
|
135
|
+
// additionalProperty: { $exists: true }
|
|
136
|
+
// }
|
|
137
|
+
// }
|
|
138
|
+
// ],
|
|
139
|
+
// [
|
|
140
|
+
// { 'price.priceComponent.appliesToMovieTicket.identifier': 1, bookingTime: -1 },
|
|
141
|
+
// {
|
|
142
|
+
// name: 'searchByPriceComponentAppliesToMovieTicketIdentifier',
|
|
143
|
+
// partialFilterExpression: {
|
|
144
|
+
// 'price.priceComponent.appliesToMovieTicket.identifier': { $exists: true }
|
|
145
|
+
// }
|
|
146
|
+
// }
|
|
147
|
+
// ],
|
|
148
148
|
[
|
|
149
149
|
{ 'reservationFor.typeOf': 1, bookingTime: -1 },
|
|
150
150
|
{
|
|
@@ -271,42 +271,42 @@ const indexes = [
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
],
|
|
274
|
-
[
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
],
|
|
283
|
-
[
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
],
|
|
292
|
-
[
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
],
|
|
301
|
-
[
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
],
|
|
274
|
+
// [
|
|
275
|
+
// { 'reservedTicket.ticketType.id': 1, bookingTime: -1 },
|
|
276
|
+
// {
|
|
277
|
+
// name: 'searchByReservedTicketTicketTypeId-v3',
|
|
278
|
+
// partialFilterExpression: {
|
|
279
|
+
// 'reservedTicket.ticketType.id': { $exists: true }
|
|
280
|
+
// }
|
|
281
|
+
// }
|
|
282
|
+
// ],
|
|
283
|
+
// [
|
|
284
|
+
// { 'reservedTicket.ticketType.category.id': 1, bookingTime: -1 },
|
|
285
|
+
// {
|
|
286
|
+
// name: 'searchByReservedTicketTicketTypeCategoryId-v3',
|
|
287
|
+
// partialFilterExpression: {
|
|
288
|
+
// 'reservedTicket.ticketType.category.id': { $exists: true }
|
|
289
|
+
// }
|
|
290
|
+
// }
|
|
291
|
+
// ],
|
|
292
|
+
// [
|
|
293
|
+
// { 'reservedTicket.ticketType.category.codeValue': 1, bookingTime: -1 },
|
|
294
|
+
// {
|
|
295
|
+
// name: 'searchByReservedTicketTicketTypeCategoryCodeValue-v3',
|
|
296
|
+
// partialFilterExpression: {
|
|
297
|
+
// 'reservedTicket.ticketType.category.codeValue': { $exists: true }
|
|
298
|
+
// }
|
|
299
|
+
// }
|
|
300
|
+
// ],
|
|
301
|
+
// [
|
|
302
|
+
// { 'reservedTicket.dateIssued': 1, bookingTime: -1 },
|
|
303
|
+
// {
|
|
304
|
+
// name: 'reservedTicketDateIssued',
|
|
305
|
+
// partialFilterExpression: {
|
|
306
|
+
// 'reservedTicket.dateIssued': { $exists: true }
|
|
307
|
+
// }
|
|
308
|
+
// }
|
|
309
|
+
// ],
|
|
310
310
|
[
|
|
311
311
|
{ 'broker.id': 1, bookingTime: -1 },
|
|
312
312
|
{
|
|
@@ -316,60 +316,60 @@ const indexes = [
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
],
|
|
319
|
-
[
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
],
|
|
328
|
-
[
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
],
|
|
337
|
-
[
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
],
|
|
346
|
-
[
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
],
|
|
355
|
-
[
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
],
|
|
364
|
-
[
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
],
|
|
319
|
+
// [
|
|
320
|
+
// { 'broker.name': 1, bookingTime: -1 },
|
|
321
|
+
// {
|
|
322
|
+
// name: 'searchByBrokerName',
|
|
323
|
+
// partialFilterExpression: {
|
|
324
|
+
// 'broker.name': { $exists: true }
|
|
325
|
+
// }
|
|
326
|
+
// }
|
|
327
|
+
// ],
|
|
328
|
+
// [
|
|
329
|
+
// { 'broker.familyName': 1, bookingTime: -1 },
|
|
330
|
+
// {
|
|
331
|
+
// name: 'searchByBrokerFamilyName',
|
|
332
|
+
// partialFilterExpression: {
|
|
333
|
+
// 'broker.familyName': { $exists: true }
|
|
334
|
+
// }
|
|
335
|
+
// }
|
|
336
|
+
// ],
|
|
337
|
+
// [
|
|
338
|
+
// { 'broker.givenName': 1, bookingTime: -1 },
|
|
339
|
+
// {
|
|
340
|
+
// name: 'searchByBrokerGivenName',
|
|
341
|
+
// partialFilterExpression: {
|
|
342
|
+
// 'broker.givenName': { $exists: true }
|
|
343
|
+
// }
|
|
344
|
+
// }
|
|
345
|
+
// ],
|
|
346
|
+
// [
|
|
347
|
+
// { 'broker.identifier': 1, bookingTime: -1 },
|
|
348
|
+
// {
|
|
349
|
+
// name: 'searchByBrokerIdentifier',
|
|
350
|
+
// partialFilterExpression: {
|
|
351
|
+
// 'broker.identifier': { $exists: true }
|
|
352
|
+
// }
|
|
353
|
+
// }
|
|
354
|
+
// ],
|
|
355
|
+
// [
|
|
356
|
+
// { 'programMembershipUsed.identifier': 1, bookingTime: -1 },
|
|
357
|
+
// {
|
|
358
|
+
// name: 'searchByProgramMembershipUsedIdentifier',
|
|
359
|
+
// partialFilterExpression: {
|
|
360
|
+
// 'programMembershipUsed.identifier': { $exists: true }
|
|
361
|
+
// }
|
|
362
|
+
// }
|
|
363
|
+
// ],
|
|
364
|
+
// [
|
|
365
|
+
// { 'programMembershipUsed.issuedThrough.serviceType.codeValue': 1, bookingTime: -1 },
|
|
366
|
+
// {
|
|
367
|
+
// name: 'searchByMembershipUsedServiceType',
|
|
368
|
+
// partialFilterExpression: {
|
|
369
|
+
// 'programMembershipUsed.issuedThrough.serviceType.codeValue': { $exists: true }
|
|
370
|
+
// }
|
|
371
|
+
// }
|
|
372
|
+
// ],
|
|
373
373
|
[
|
|
374
374
|
{ 'underName.id': 1, bookingTime: -1 },
|
|
375
375
|
{
|
|
@@ -32,13 +32,14 @@ interface IAggregateOrder {
|
|
|
32
32
|
export type IOrderOnStatusChanged = Pick<IOrderWithoutAcceptedOffers & {
|
|
33
33
|
id: string;
|
|
34
34
|
}, 'id' | 'orderNumber' | 'broker' | 'confirmationNumber' | 'customer' | 'dateReturned' | 'name' | 'orderDate' | 'orderStatus' | 'orderedItem' | 'paymentMethods' | 'previousOrderStatus' | 'price' | 'priceCurrency' | 'project' | 'returner' | 'seller' | 'typeOf'>;
|
|
35
|
+
type ISearchConditions = Pick<factory.order.ISearchConditions, 'acceptedOffers' | 'broker' | 'confirmationNumbers' | 'customer' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'paymentMethods' | 'project' | 'provider' | 'seller'>;
|
|
35
36
|
/**
|
|
36
37
|
* 注文リポジトリ
|
|
37
38
|
*/
|
|
38
39
|
export declare class OrderRepo {
|
|
39
40
|
private readonly orderModel;
|
|
40
41
|
constructor(connection: Connection);
|
|
41
|
-
static CREATE_MONGO_CONDITIONS(params:
|
|
42
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<factory.order.IOrder>[];
|
|
42
43
|
/**
|
|
43
44
|
* なければ作成する
|
|
44
45
|
*/
|
package/lib/chevre/repo/order.js
CHANGED
|
@@ -31,27 +31,27 @@ class OrderRepo {
|
|
|
31
31
|
if (typeof projectIdEq === 'string') {
|
|
32
32
|
andConditions.push({ 'project.id': { $eq: projectIdEq } });
|
|
33
33
|
}
|
|
34
|
-
/* istanbul ignore else */
|
|
35
|
-
if (params.identifier !== undefined) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
34
|
+
// /* istanbul ignore else */
|
|
35
|
+
// if (params.identifier !== undefined) {
|
|
36
|
+
// /* istanbul ignore else */
|
|
37
|
+
// if (Array.isArray(params.identifier.$all)) {
|
|
38
|
+
// andConditions.push({
|
|
39
|
+
// identifier: {
|
|
40
|
+
// $exists: true,
|
|
41
|
+
// $all: params.identifier.$all
|
|
42
|
+
// }
|
|
43
|
+
// });
|
|
44
|
+
// }
|
|
45
|
+
// /* istanbul ignore else */
|
|
46
|
+
// if (Array.isArray(params.identifier.$in)) {
|
|
47
|
+
// andConditions.push({
|
|
48
|
+
// identifier: {
|
|
49
|
+
// $exists: true,
|
|
50
|
+
// $in: params.identifier.$in
|
|
51
|
+
// }
|
|
52
|
+
// });
|
|
53
|
+
// }
|
|
54
|
+
// }
|
|
55
55
|
const providerIdEq = params.provider?.id?.$eq;
|
|
56
56
|
if (typeof providerIdEq === 'string') {
|
|
57
57
|
andConditions.push({ 'seller.id': { $exists: true, $eq: providerIdEq } });
|
|
@@ -129,44 +129,44 @@ class OrderRepo {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
if (params.customer.additionalProperty !== undefined && params.customer.additionalProperty !== null) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
if (params.customer.memberOf !== undefined && params.customer.memberOf !== null) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
132
|
+
// if (params.customer.additionalProperty !== undefined && params.customer.additionalProperty !== null) {
|
|
133
|
+
// if (Array.isArray(params.customer.additionalProperty.$all)) {
|
|
134
|
+
// andConditions.push({
|
|
135
|
+
// 'customer.additionalProperty': {
|
|
136
|
+
// $exists: true,
|
|
137
|
+
// $all: params.customer.additionalProperty.$all
|
|
138
|
+
// }
|
|
139
|
+
// });
|
|
140
|
+
// }
|
|
141
|
+
// if (Array.isArray(params.customer.additionalProperty.$in)) {
|
|
142
|
+
// andConditions.push({
|
|
143
|
+
// 'customer.additionalProperty': {
|
|
144
|
+
// $exists: true,
|
|
145
|
+
// $in: params.customer.additionalProperty.$in
|
|
146
|
+
// }
|
|
147
|
+
// });
|
|
148
|
+
// }
|
|
149
|
+
// }
|
|
150
|
+
// if (params.customer.memberOf !== undefined && params.customer.memberOf !== null) {
|
|
151
|
+
// if (params.customer.memberOf.membershipNumber !== undefined && params.customer.memberOf.membershipNumber !== null) {
|
|
152
|
+
// if (typeof params.customer.memberOf.membershipNumber.$eq === 'string') {
|
|
153
|
+
// andConditions.push({
|
|
154
|
+
// 'customer.memberOf.membershipNumber': {
|
|
155
|
+
// $exists: true,
|
|
156
|
+
// $eq: params.customer.memberOf.membershipNumber.$eq
|
|
157
|
+
// }
|
|
158
|
+
// });
|
|
159
|
+
// }
|
|
160
|
+
// if (Array.isArray(params.customer.memberOf.membershipNumber.$in)) {
|
|
161
|
+
// andConditions.push({
|
|
162
|
+
// 'customer.memberOf.membershipNumber': {
|
|
163
|
+
// $exists: true,
|
|
164
|
+
// $in: params.customer.memberOf.membershipNumber.$in
|
|
165
|
+
// }
|
|
166
|
+
// });
|
|
167
|
+
// }
|
|
168
|
+
// }
|
|
169
|
+
// }
|
|
170
170
|
if (typeof params.customer.givenName === 'string') {
|
|
171
171
|
if (params.customer.givenName.length > 0) {
|
|
172
172
|
andConditions.push({
|
|
@@ -325,72 +325,73 @@ class OrderRepo {
|
|
|
325
325
|
andConditions.push({ confirmationNumber: { $exists: true, $in: params.confirmationNumbers } });
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
const orderedItemSize = params.orderedItem?.$size;
|
|
329
|
-
if (typeof orderedItemSize === 'number') {
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
const acceptedOffersSize = params.acceptedOffers?.$size;
|
|
333
|
-
if (typeof acceptedOffersSize === 'number') {
|
|
334
|
-
|
|
335
|
-
}
|
|
328
|
+
// const orderedItemSize = params.orderedItem?.$size;
|
|
329
|
+
// if (typeof orderedItemSize === 'number') {
|
|
330
|
+
// andConditions.push({ orderedItem: { $size: orderedItemSize } });
|
|
331
|
+
// }
|
|
332
|
+
// const acceptedOffersSize = params.acceptedOffers?.$size;
|
|
333
|
+
// if (typeof acceptedOffersSize === 'number') {
|
|
334
|
+
// andConditions.push({ acceptedOffers: { $size: acceptedOffersSize } });
|
|
335
|
+
// }
|
|
336
336
|
const serialNumberEq = params.acceptedOffers?.serialNumber?.$eq;
|
|
337
337
|
if (typeof serialNumberEq === 'string') {
|
|
338
338
|
andConditions.push({ 'acceptedOffers.serialNumber': { $exists: true, $eq: serialNumberEq } });
|
|
339
339
|
}
|
|
340
|
-
const itemOfferedIdentifierIn = params.acceptedOffers?.itemOffered?.identifier?.$in;
|
|
341
|
-
if (Array.isArray(itemOfferedIdentifierIn)) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
const itemOfferedTypeOfIn = params.acceptedOffers?.itemOffered?.typeOf?.$in;
|
|
350
|
-
if (Array.isArray(itemOfferedTypeOfIn)) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
const itemOfferedIssuedThroughTypeOfEq = params.acceptedOffers?.itemOffered?.issuedThrough?.typeOf?.$eq;
|
|
359
|
-
if (typeof itemOfferedIssuedThroughTypeOfEq === 'string') {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
const itemOfferedIssuedThroughIdIn = params.acceptedOffers?.itemOffered?.issuedThrough?.id?.$in;
|
|
368
|
-
if (Array.isArray(itemOfferedIssuedThroughIdIn)) {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
const itemOfferedProgramMembershipUsedIdentifierEq = params.acceptedOffers?.itemOffered?.programMembershipUsed?.identifier?.$eq;
|
|
377
|
-
if (typeof itemOfferedProgramMembershipUsedIdentifierEq === 'string') {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
const itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq =
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
340
|
+
// const itemOfferedIdentifierIn = params.acceptedOffers?.itemOffered?.identifier?.$in;
|
|
341
|
+
// if (Array.isArray(itemOfferedIdentifierIn)) {
|
|
342
|
+
// andConditions.push({
|
|
343
|
+
// 'acceptedOffers.itemOffered.identifier': {
|
|
344
|
+
// $exists: true,
|
|
345
|
+
// $in: itemOfferedIdentifierIn
|
|
346
|
+
// }
|
|
347
|
+
// });
|
|
348
|
+
// }
|
|
349
|
+
// const itemOfferedTypeOfIn = params.acceptedOffers?.itemOffered?.typeOf?.$in;
|
|
350
|
+
// if (Array.isArray(itemOfferedTypeOfIn)) {
|
|
351
|
+
// andConditions.push({
|
|
352
|
+
// 'acceptedOffers.itemOffered.typeOf': {
|
|
353
|
+
// $exists: true,
|
|
354
|
+
// $in: itemOfferedTypeOfIn
|
|
355
|
+
// }
|
|
356
|
+
// });
|
|
357
|
+
// }
|
|
358
|
+
// const itemOfferedIssuedThroughTypeOfEq = params.acceptedOffers?.itemOffered?.issuedThrough?.typeOf?.$eq;
|
|
359
|
+
// if (typeof itemOfferedIssuedThroughTypeOfEq === 'string') {
|
|
360
|
+
// andConditions.push({
|
|
361
|
+
// 'acceptedOffers.itemOffered.issuedThrough.typeOf': {
|
|
362
|
+
// $exists: true,
|
|
363
|
+
// $eq: itemOfferedIssuedThroughTypeOfEq
|
|
364
|
+
// }
|
|
365
|
+
// });
|
|
366
|
+
// }
|
|
367
|
+
// const itemOfferedIssuedThroughIdIn = params.acceptedOffers?.itemOffered?.issuedThrough?.id?.$in;
|
|
368
|
+
// if (Array.isArray(itemOfferedIssuedThroughIdIn)) {
|
|
369
|
+
// andConditions.push({
|
|
370
|
+
// 'acceptedOffers.itemOffered.issuedThrough.id': {
|
|
371
|
+
// $exists: true,
|
|
372
|
+
// $in: itemOfferedIssuedThroughIdIn
|
|
373
|
+
// }
|
|
374
|
+
// });
|
|
375
|
+
// }
|
|
376
|
+
// const itemOfferedProgramMembershipUsedIdentifierEq = params.acceptedOffers?.itemOffered?.programMembershipUsed?.identifier?.$eq;
|
|
377
|
+
// if (typeof itemOfferedProgramMembershipUsedIdentifierEq === 'string') {
|
|
378
|
+
// andConditions.push({
|
|
379
|
+
// 'acceptedOffers.itemOffered.programMembershipUsed.identifier': {
|
|
380
|
+
// $exists: true,
|
|
381
|
+
// $eq: itemOfferedProgramMembershipUsedIdentifierEq
|
|
382
|
+
// }
|
|
383
|
+
// });
|
|
384
|
+
// }
|
|
385
|
+
// const itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq =
|
|
386
|
+
// params.acceptedOffers?.itemOffered?.programMembershipUsed?.issuedThrough?.serviceType?.codeValue?.$eq;
|
|
387
|
+
// if (typeof itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
|
|
388
|
+
// andConditions.push({
|
|
389
|
+
// 'acceptedOffers.itemOffered.programMembershipUsed.issuedThrough.serviceType.codeValue': {
|
|
390
|
+
// $exists: true,
|
|
391
|
+
// $eq: itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq
|
|
392
|
+
// }
|
|
393
|
+
// });
|
|
394
|
+
// }
|
|
394
395
|
const itemOfferedReservedTicketIdentifierEq = params.acceptedOffers?.itemOffered?.reservedTicket?.identifier?.$eq;
|
|
395
396
|
if (typeof itemOfferedReservedTicketIdentifierEq === 'string') {
|
|
396
397
|
andConditions.push({
|
|
@@ -434,25 +435,25 @@ class OrderRepo {
|
|
|
434
435
|
}
|
|
435
436
|
});
|
|
436
437
|
}
|
|
437
|
-
/* istanbul ignore else */
|
|
438
|
-
if (typeof reservationForConditions.name === 'string' && reservationForConditions.name.length > 0) {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
438
|
+
// /* istanbul ignore else */
|
|
439
|
+
// if (typeof reservationForConditions.name === 'string' && reservationForConditions.name.length > 0) {
|
|
440
|
+
// andConditions.push({
|
|
441
|
+
// $or: [
|
|
442
|
+
// {
|
|
443
|
+
// 'acceptedOffers.itemOffered.reservationFor.name.ja': {
|
|
444
|
+
// $exists: true,
|
|
445
|
+
// $regex: new RegExp(reservationForConditions.name)
|
|
446
|
+
// }
|
|
447
|
+
// },
|
|
448
|
+
// {
|
|
449
|
+
// 'acceptedOffers.itemOffered.reservationFor.name.en': {
|
|
450
|
+
// $exists: true,
|
|
451
|
+
// $regex: new RegExp(reservationForConditions.name)
|
|
452
|
+
// }
|
|
453
|
+
// }
|
|
454
|
+
// ]
|
|
455
|
+
// });
|
|
456
|
+
// }
|
|
456
457
|
/* istanbul ignore else */
|
|
457
458
|
if (reservationForConditions.location !== undefined) {
|
|
458
459
|
if (Array.isArray(reservationForConditions.location.branchCodes)) {
|
|
@@ -608,18 +609,18 @@ class OrderRepo {
|
|
|
608
609
|
}
|
|
609
610
|
});
|
|
610
611
|
}
|
|
611
|
-
/* istanbul ignore else */
|
|
612
|
-
if (params.orderDateFrom instanceof Date) {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
}
|
|
617
|
-
/* istanbul ignore else */
|
|
618
|
-
if (params.orderDateThrough instanceof Date) {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
}
|
|
612
|
+
// /* istanbul ignore else */
|
|
613
|
+
// if (params.orderDateFrom instanceof Date) {
|
|
614
|
+
// andConditions.push({
|
|
615
|
+
// orderDate: { $gte: params.orderDateFrom }
|
|
616
|
+
// });
|
|
617
|
+
// }
|
|
618
|
+
// /* istanbul ignore else */
|
|
619
|
+
// if (params.orderDateThrough instanceof Date) {
|
|
620
|
+
// andConditions.push({
|
|
621
|
+
// orderDate: { $lte: params.orderDateThrough }
|
|
622
|
+
// });
|
|
623
|
+
// }
|
|
623
624
|
if (params.orderDate !== undefined && params.orderDate !== null) {
|
|
624
625
|
if (params.orderDate.$gte instanceof Date) {
|
|
625
626
|
andConditions.push({
|
|
@@ -632,24 +633,24 @@ class OrderRepo {
|
|
|
632
633
|
});
|
|
633
634
|
}
|
|
634
635
|
}
|
|
635
|
-
if (params.price !== undefined && params.price !== null) {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
636
|
+
// if (params.price !== undefined && params.price !== null) {
|
|
637
|
+
// if (typeof params.price.$gte === 'number') {
|
|
638
|
+
// andConditions.push({
|
|
639
|
+
// price: {
|
|
640
|
+
// $exists: true,
|
|
641
|
+
// $gte: params.price.$gte
|
|
642
|
+
// }
|
|
643
|
+
// });
|
|
644
|
+
// }
|
|
645
|
+
// if (typeof params.price.$lte === 'number') {
|
|
646
|
+
// andConditions.push({
|
|
647
|
+
// price: {
|
|
648
|
+
// $exists: true,
|
|
649
|
+
// $lte: params.price.$lte
|
|
650
|
+
// }
|
|
651
|
+
// });
|
|
652
|
+
// }
|
|
653
|
+
// }
|
|
653
654
|
return andConditions;
|
|
654
655
|
}
|
|
655
656
|
/**
|
|
@@ -147,6 +147,7 @@ export declare class ReservationRepo {
|
|
|
147
147
|
_id: string;
|
|
148
148
|
bookingAgent?: any;
|
|
149
149
|
previousReservationStatus?: factory.reservationStatusType;
|
|
150
|
+
priceCurrency?: factory.priceCurrency;
|
|
150
151
|
} & Required<{
|
|
151
152
|
_id: string;
|
|
152
153
|
}> & {
|
|
@@ -155,6 +156,7 @@ export declare class ReservationRepo {
|
|
|
155
156
|
_id: string;
|
|
156
157
|
bookingAgent?: any;
|
|
157
158
|
previousReservationStatus?: factory.reservationStatusType;
|
|
159
|
+
priceCurrency?: factory.priceCurrency;
|
|
158
160
|
} & Required<{
|
|
159
161
|
_id: string;
|
|
160
162
|
}> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountingReportRepo } from '../../repo/accountingReport';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
|
-
export declare function createAccountingReportIfNotExist(params: Pick<factory.order.IOrder, 'id' | 'orderNumber' | 'project' | '
|
|
3
|
+
export declare function createAccountingReportIfNotExist(params: Pick<factory.order.IOrder, 'id' | 'orderNumber' | 'project' | 'paymentMethods' | 'seller' | 'typeOf' | 'orderDate'> & {}): (repos: {
|
|
4
4
|
accountingReport: AccountingReportRepo;
|
|
5
5
|
}) => Promise<void>;
|
|
@@ -62,32 +62,32 @@ function createOrder4report(params) {
|
|
|
62
62
|
// }
|
|
63
63
|
// })
|
|
64
64
|
// : [];
|
|
65
|
-
const customer = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
65
|
+
// const customer: factory.report.accountingReport.IOptimizedCustomer = {
|
|
66
|
+
// id: params.customer.id,
|
|
67
|
+
// typeOf: params.customer.typeOf,
|
|
68
|
+
// additionalProperty: (Array.isArray(params.customer.additionalProperty))
|
|
69
|
+
// ? params.customer.additionalProperty
|
|
70
|
+
// : [],
|
|
71
|
+
// identifier: (Array.isArray(params.customer.identifier))
|
|
72
|
+
// ? params.customer.identifier
|
|
73
|
+
// : []
|
|
74
|
+
// };
|
|
75
75
|
return {
|
|
76
|
-
confirmationNumber: params.confirmationNumber,
|
|
77
76
|
id: params.id,
|
|
78
77
|
orderNumber: params.orderNumber,
|
|
79
|
-
paymentMethods: params.paymentMethods,
|
|
80
|
-
price: params.price,
|
|
81
|
-
priceCurrency: params.priceCurrency,
|
|
78
|
+
paymentMethods: params.paymentMethods.map(({ paymentMethodId }) => ({ paymentMethodId })),
|
|
82
79
|
seller: {
|
|
83
80
|
id: params.seller.id,
|
|
84
81
|
name: params.seller.name,
|
|
85
82
|
typeOf: params.seller.typeOf
|
|
86
83
|
},
|
|
87
84
|
typeOf: params.typeOf,
|
|
88
|
-
customer,
|
|
89
85
|
orderDate: (0, moment_timezone_1.default)(params.orderDate)
|
|
90
86
|
.toDate(),
|
|
87
|
+
// confirmationNumber: params.confirmationNumber, // discontinue(2026-05-06~)
|
|
88
|
+
// price: params.price, // discontinue(2026-05-06~)
|
|
89
|
+
// priceCurrency: params.priceCurrency, // discontinue(2026-05-06~)
|
|
90
|
+
// customer, // discontinue(2026-05-06~)
|
|
91
91
|
// numItems, // discontinue(2026-05-06~)
|
|
92
92
|
// orderedItem: params.orderedItem, // discontinue(2026-05-06~)
|
|
93
93
|
// acceptedOffers, // discontinue(2026-05-06~)
|
|
@@ -27,11 +27,12 @@ function createAccountingReport(params) {
|
|
|
27
27
|
orderNumber: data.object.mainEntity.orderNumber,
|
|
28
28
|
project: { id: params.project.id },
|
|
29
29
|
inclusion: [
|
|
30
|
-
'orderNumber', 'project', '
|
|
30
|
+
'orderNumber', 'project', 'paymentMethods', 'seller', 'typeOf', 'orderDate'
|
|
31
|
+
// 'customer', 'confirmationNumber',
|
|
31
32
|
// 'orderedItem',
|
|
32
33
|
// 'broker',
|
|
33
|
-
'price', 'priceCurrency',
|
|
34
|
-
]
|
|
34
|
+
// 'price', 'priceCurrency',
|
|
35
|
+
]
|
|
35
36
|
});
|
|
36
37
|
const simpleOrder = {
|
|
37
38
|
typeOf: order.typeOf,
|
|
@@ -39,7 +40,6 @@ function createAccountingReport(params) {
|
|
|
39
40
|
orderDate: order.orderDate
|
|
40
41
|
};
|
|
41
42
|
const actionObject = {
|
|
42
|
-
// ...params,
|
|
43
43
|
mainEntity: { orderNumber: simpleOrder.orderNumber },
|
|
44
44
|
typeOf: 'Report'
|
|
45
45
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "8.1.0-alpha.
|
|
14
|
+
"@chevre/factory": "8.1.0-alpha.4",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"postversion": "git push origin --tags",
|
|
92
92
|
"prepublishOnly": "npm run clean && npm run build"
|
|
93
93
|
},
|
|
94
|
-
"version": "24.1.0-alpha.
|
|
94
|
+
"version": "24.1.0-alpha.8"
|
|
95
95
|
}
|