@chevre/domain 24.1.0-alpha.6 → 24.1.0-alpha.7
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.
|
@@ -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.3",
|
|
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.7"
|
|
95
95
|
}
|