@mj-biz-apps/orders-entities 5.1.0 → 5.2.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.
- package/dist/OrderHeaderEntity.d.ts +15 -0
- package/dist/OrderHeaderEntity.d.ts.map +1 -1
- package/dist/OrderHeaderEntity.js +54 -1
- package/dist/OrderHeaderEntity.js.map +1 -1
- package/dist/OrderLineExtensionCompanion.d.ts.map +1 -1
- package/dist/OrderLineExtensionCompanion.js +8 -0
- package/dist/OrderLineExtensionCompanion.js.map +1 -1
- package/dist/OrderStatusBehavior.d.ts +31 -22
- package/dist/OrderStatusBehavior.d.ts.map +1 -1
- package/dist/OrderStatusBehavior.js +47 -51
- package/dist/OrderStatusBehavior.js.map +1 -1
- package/dist/PartyAffiliationBehavior.d.ts +20 -0
- package/dist/PartyAffiliationBehavior.d.ts.map +1 -0
- package/dist/PartyAffiliationBehavior.js +52 -0
- package/dist/PartyAffiliationBehavior.js.map +1 -0
- package/dist/configuration-types.d.ts +157 -0
- package/dist/configuration-types.d.ts.map +1 -0
- package/dist/configuration-types.js +10 -0
- package/dist/configuration-types.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +859 -289
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +1180 -364
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/generated/remote_operations.d.ts +153 -2
- package/dist/generated/remote_operations.d.ts.map +1 -1
- package/dist/generated/remote_operations.js +144 -0
- package/dist/generated/remote_operations.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pricing/OrderPricingService.d.ts +14 -7
- package/dist/pricing/OrderPricingService.d.ts.map +1 -1
- package/dist/pricing/OrderPricingService.js +2 -0
- package/dist/pricing/OrderPricingService.js.map +1 -1
- package/dist/pricing/PriceResolver.d.ts +11 -6
- package/dist/pricing/PriceResolver.d.ts.map +1 -1
- package/dist/pricing/PriceResolver.js +35 -22
- package/dist/pricing/PriceResolver.js.map +1 -1
- package/package.json +3 -3
|
@@ -83,6 +83,217 @@ export const mjBizAppsOrdersChargeTypeSchema = z.object({
|
|
|
83
83
|
* * SQL Data Type: datetimeoffset
|
|
84
84
|
* * Default Value: getutcdate()`),
|
|
85
85
|
});
|
|
86
|
+
/**
|
|
87
|
+
* zod schema definition for the entity MJ_BizApps_Orders: Checkout Sessions
|
|
88
|
+
*/
|
|
89
|
+
export const mjBizAppsOrdersCheckoutSessionSchema = z.object({
|
|
90
|
+
ID: z.string().describe(`
|
|
91
|
+
* * Field Name: ID
|
|
92
|
+
* * Display Name: ID
|
|
93
|
+
* * SQL Data Type: uniqueidentifier
|
|
94
|
+
* * Default Value: newsequentialid()`),
|
|
95
|
+
CheckoutWidgetID: z.string().describe(`
|
|
96
|
+
* * Field Name: CheckoutWidgetID
|
|
97
|
+
* * Display Name: Checkout Widget ID
|
|
98
|
+
* * SQL Data Type: uniqueidentifier
|
|
99
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widgets (vwCheckoutWidgets.ID)`),
|
|
100
|
+
DistributionID: z.string().nullable().describe(`
|
|
101
|
+
* * Field Name: DistributionID
|
|
102
|
+
* * Display Name: Distribution ID
|
|
103
|
+
* * SQL Data Type: uniqueidentifier
|
|
104
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widget Distributions (vwCheckoutWidgetDistributions.ID)`),
|
|
105
|
+
ClientSessionKey: z.string().describe(`
|
|
106
|
+
* * Field Name: ClientSessionKey
|
|
107
|
+
* * Display Name: Client Session Key
|
|
108
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
109
|
+
Email: z.string().nullable().describe(`
|
|
110
|
+
* * Field Name: Email
|
|
111
|
+
* * Display Name: Email
|
|
112
|
+
* * SQL Data Type: nvarchar(255)`),
|
|
113
|
+
PersonID: z.string().nullable().describe(`
|
|
114
|
+
* * Field Name: PersonID
|
|
115
|
+
* * Display Name: Person ID
|
|
116
|
+
* * SQL Data Type: uniqueidentifier
|
|
117
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)`),
|
|
118
|
+
DraftOrderID: z.string().nullable().describe(`
|
|
119
|
+
* * Field Name: DraftOrderID
|
|
120
|
+
* * Display Name: Draft Order ID
|
|
121
|
+
* * SQL Data Type: uniqueidentifier
|
|
122
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)`),
|
|
123
|
+
PaymentIntentID: z.string().nullable().describe(`
|
|
124
|
+
* * Field Name: PaymentIntentID
|
|
125
|
+
* * Display Name: Payment Intent ID
|
|
126
|
+
* * SQL Data Type: uniqueidentifier
|
|
127
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Intents (vwPaymentIntents.ID)`),
|
|
128
|
+
Status: z.union([z.literal('Abandoned'), z.literal('Confirmed'), z.literal('Expired'), z.literal('Open'), z.literal('Processing')]).describe(`
|
|
129
|
+
* * Field Name: Status
|
|
130
|
+
* * Display Name: Status
|
|
131
|
+
* * SQL Data Type: nvarchar(20)
|
|
132
|
+
* * Default Value: Open
|
|
133
|
+
* * Value List Type: List
|
|
134
|
+
* * Possible Values
|
|
135
|
+
* * Abandoned
|
|
136
|
+
* * Confirmed
|
|
137
|
+
* * Expired
|
|
138
|
+
* * Open
|
|
139
|
+
* * Processing`),
|
|
140
|
+
ExpiresAt: z.date().describe(`
|
|
141
|
+
* * Field Name: ExpiresAt
|
|
142
|
+
* * Display Name: Expires At
|
|
143
|
+
* * SQL Data Type: datetimeoffset`),
|
|
144
|
+
MetadataJSON: z.string().nullable().describe(`
|
|
145
|
+
* * Field Name: MetadataJSON
|
|
146
|
+
* * Display Name: Metadata JSON
|
|
147
|
+
* * SQL Data Type: nvarchar(MAX)`),
|
|
148
|
+
__mj_CreatedAt: z.date().describe(`
|
|
149
|
+
* * Field Name: __mj_CreatedAt
|
|
150
|
+
* * Display Name: Created At
|
|
151
|
+
* * SQL Data Type: datetimeoffset
|
|
152
|
+
* * Default Value: getutcdate()`),
|
|
153
|
+
__mj_UpdatedAt: z.date().describe(`
|
|
154
|
+
* * Field Name: __mj_UpdatedAt
|
|
155
|
+
* * Display Name: Updated At
|
|
156
|
+
* * SQL Data Type: datetimeoffset
|
|
157
|
+
* * Default Value: getutcdate()`),
|
|
158
|
+
CheckoutWidget: z.string().describe(`
|
|
159
|
+
* * Field Name: CheckoutWidget
|
|
160
|
+
* * Display Name: Checkout Widget
|
|
161
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
162
|
+
Distribution: z.string().nullable().describe(`
|
|
163
|
+
* * Field Name: Distribution
|
|
164
|
+
* * Display Name: Distribution
|
|
165
|
+
* * SQL Data Type: nvarchar(255)`),
|
|
166
|
+
Person: z.string().nullable().describe(`
|
|
167
|
+
* * Field Name: Person
|
|
168
|
+
* * Display Name: Person
|
|
169
|
+
* * SQL Data Type: nvarchar(201)`),
|
|
170
|
+
DraftOrder: z.string().nullable().describe(`
|
|
171
|
+
* * Field Name: DraftOrder
|
|
172
|
+
* * Display Name: Draft Order
|
|
173
|
+
* * SQL Data Type: nvarchar(40)`),
|
|
174
|
+
PaymentIntent: z.string().nullable().describe(`
|
|
175
|
+
* * Field Name: PaymentIntent
|
|
176
|
+
* * Display Name: Payment Intent
|
|
177
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
178
|
+
});
|
|
179
|
+
/**
|
|
180
|
+
* zod schema definition for the entity MJ_BizApps_Orders: Checkout Widget Distributions
|
|
181
|
+
*/
|
|
182
|
+
export const mjBizAppsOrdersCheckoutWidgetDistributionSchema = z.object({
|
|
183
|
+
ID: z.string().describe(`
|
|
184
|
+
* * Field Name: ID
|
|
185
|
+
* * Display Name: ID
|
|
186
|
+
* * SQL Data Type: uniqueidentifier
|
|
187
|
+
* * Default Value: newsequentialid()`),
|
|
188
|
+
CheckoutWidgetID: z.string().describe(`
|
|
189
|
+
* * Field Name: CheckoutWidgetID
|
|
190
|
+
* * Display Name: Checkout Widget
|
|
191
|
+
* * SQL Data Type: uniqueidentifier
|
|
192
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widgets (vwCheckoutWidgets.ID)`),
|
|
193
|
+
Slug: z.string().describe(`
|
|
194
|
+
* * Field Name: Slug
|
|
195
|
+
* * Display Name: Vanity Slug
|
|
196
|
+
* * SQL Data Type: nvarchar(255)`),
|
|
197
|
+
MagicLinkInviteID: z.string().nullable().describe(`
|
|
198
|
+
* * Field Name: MagicLinkInviteID
|
|
199
|
+
* * Display Name: Magic Link Invite
|
|
200
|
+
* * SQL Data Type: uniqueidentifier
|
|
201
|
+
* * Related Entity/Foreign Key: MJ: Magic Link Invites (vwMagicLinkInvites.ID)`),
|
|
202
|
+
Status: z.union([z.literal('Active'), z.literal('Revoked')]).describe(`
|
|
203
|
+
* * Field Name: Status
|
|
204
|
+
* * Display Name: Status
|
|
205
|
+
* * SQL Data Type: nvarchar(20)
|
|
206
|
+
* * Default Value: Active
|
|
207
|
+
* * Value List Type: List
|
|
208
|
+
* * Possible Values
|
|
209
|
+
* * Active
|
|
210
|
+
* * Revoked`),
|
|
211
|
+
RevokedAt: z.date().nullable().describe(`
|
|
212
|
+
* * Field Name: RevokedAt
|
|
213
|
+
* * Display Name: Revoked At
|
|
214
|
+
* * SQL Data Type: datetimeoffset`),
|
|
215
|
+
RevocationReason: z.string().nullable().describe(`
|
|
216
|
+
* * Field Name: RevocationReason
|
|
217
|
+
* * Display Name: Revocation Reason
|
|
218
|
+
* * SQL Data Type: nvarchar(500)`),
|
|
219
|
+
EmbedSnippet: z.string().nullable().describe(`
|
|
220
|
+
* * Field Name: EmbedSnippet
|
|
221
|
+
* * Display Name: Embed Snippet
|
|
222
|
+
* * SQL Data Type: nvarchar(MAX)`),
|
|
223
|
+
__mj_CreatedAt: z.date().describe(`
|
|
224
|
+
* * Field Name: __mj_CreatedAt
|
|
225
|
+
* * Display Name: Created At
|
|
226
|
+
* * SQL Data Type: datetimeoffset
|
|
227
|
+
* * Default Value: getutcdate()`),
|
|
228
|
+
__mj_UpdatedAt: z.date().describe(`
|
|
229
|
+
* * Field Name: __mj_UpdatedAt
|
|
230
|
+
* * Display Name: Updated At
|
|
231
|
+
* * SQL Data Type: datetimeoffset
|
|
232
|
+
* * Default Value: getutcdate()`),
|
|
233
|
+
CheckoutWidget: z.string().describe(`
|
|
234
|
+
* * Field Name: CheckoutWidget
|
|
235
|
+
* * Display Name: Checkout Widget Name
|
|
236
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
237
|
+
});
|
|
238
|
+
/**
|
|
239
|
+
* zod schema definition for the entity MJ_BizApps_Orders: Checkout Widgets
|
|
240
|
+
*/
|
|
241
|
+
export const mjBizAppsOrdersCheckoutWidgetSchema = z.object({
|
|
242
|
+
ID: z.string().describe(`
|
|
243
|
+
* * Field Name: ID
|
|
244
|
+
* * Display Name: ID
|
|
245
|
+
* * SQL Data Type: uniqueidentifier
|
|
246
|
+
* * Default Value: newsequentialid()`),
|
|
247
|
+
Name: z.string().describe(`
|
|
248
|
+
* * Field Name: Name
|
|
249
|
+
* * Display Name: Name
|
|
250
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
251
|
+
Description: z.string().nullable().describe(`
|
|
252
|
+
* * Field Name: Description
|
|
253
|
+
* * Display Name: Description
|
|
254
|
+
* * SQL Data Type: nvarchar(MAX)`),
|
|
255
|
+
CompanyID: z.string().describe(`
|
|
256
|
+
* * Field Name: CompanyID
|
|
257
|
+
* * Display Name: Company ID
|
|
258
|
+
* * SQL Data Type: uniqueidentifier
|
|
259
|
+
* * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)`),
|
|
260
|
+
Status: z.union([z.literal('Active'), z.literal('Disabled'), z.literal('Draft')]).describe(`
|
|
261
|
+
* * Field Name: Status
|
|
262
|
+
* * Display Name: Status
|
|
263
|
+
* * SQL Data Type: nvarchar(20)
|
|
264
|
+
* * Default Value: Draft
|
|
265
|
+
* * Value List Type: List
|
|
266
|
+
* * Possible Values
|
|
267
|
+
* * Active
|
|
268
|
+
* * Disabled
|
|
269
|
+
* * Draft`),
|
|
270
|
+
Configuration: z.string().nullable().describe(`
|
|
271
|
+
* * Field Name: Configuration
|
|
272
|
+
* * Display Name: Configuration
|
|
273
|
+
* * SQL Data Type: nvarchar(MAX)`),
|
|
274
|
+
CustomCSS: z.string().nullable().describe(`
|
|
275
|
+
* * Field Name: CustomCSS
|
|
276
|
+
* * Display Name: Custom CSS
|
|
277
|
+
* * SQL Data Type: nvarchar(MAX)`),
|
|
278
|
+
CustomJS: z.string().nullable().describe(`
|
|
279
|
+
* * Field Name: CustomJS
|
|
280
|
+
* * Display Name: Custom JavaScript
|
|
281
|
+
* * SQL Data Type: nvarchar(MAX)`),
|
|
282
|
+
__mj_CreatedAt: z.date().describe(`
|
|
283
|
+
* * Field Name: __mj_CreatedAt
|
|
284
|
+
* * Display Name: Created At
|
|
285
|
+
* * SQL Data Type: datetimeoffset
|
|
286
|
+
* * Default Value: getutcdate()`),
|
|
287
|
+
__mj_UpdatedAt: z.date().describe(`
|
|
288
|
+
* * Field Name: __mj_UpdatedAt
|
|
289
|
+
* * Display Name: Updated At
|
|
290
|
+
* * SQL Data Type: datetimeoffset
|
|
291
|
+
* * Default Value: getutcdate()`),
|
|
292
|
+
Company: z.string().describe(`
|
|
293
|
+
* * Field Name: Company
|
|
294
|
+
* * Display Name: Company
|
|
295
|
+
* * SQL Data Type: nvarchar(50)`),
|
|
296
|
+
});
|
|
86
297
|
/**
|
|
87
298
|
* zod schema definition for the entity MJ_BizApps_Orders: Customer Payment Methods
|
|
88
299
|
*/
|
|
@@ -429,7 +640,7 @@ export const mjBizAppsOrdersEventOrderLineSchema = z.object({
|
|
|
429
640
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Lines (vwOrderLines.ID)`),
|
|
430
641
|
CheckInAt: z.date().nullable().describe(`
|
|
431
642
|
* * Field Name: CheckInAt
|
|
432
|
-
* * Display Name: Check-In
|
|
643
|
+
* * Display Name: Check-In Time
|
|
433
644
|
* * SQL Data Type: datetimeoffset
|
|
434
645
|
* * Description: UTC timestamp the attendee checked in.`),
|
|
435
646
|
__mj_CreatedAt: z.date().describe(`
|
|
@@ -444,7 +655,7 @@ export const mjBizAppsOrdersEventOrderLineSchema = z.object({
|
|
|
444
655
|
* * Default Value: getutcdate()`),
|
|
445
656
|
PersonID: z.string().describe(`
|
|
446
657
|
* * Field Name: PersonID
|
|
447
|
-
* * Display Name:
|
|
658
|
+
* * Display Name: Person ID
|
|
448
659
|
* * SQL Data Type: uniqueidentifier
|
|
449
660
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)
|
|
450
661
|
* * Description: FK to __mj_BizAppsCommon.Person — the attendee. Required for a new event line; check-in is separate and optional.`),
|
|
@@ -577,7 +788,7 @@ export const mjBizAppsOrdersEventOrderLineSchema = z.object({
|
|
|
577
788
|
* * SQL Data Type: uniqueidentifier`),
|
|
578
789
|
Person: z.string().describe(`
|
|
579
790
|
* * Field Name: Person
|
|
580
|
-
* * Display Name:
|
|
791
|
+
* * Display Name: Person
|
|
581
792
|
* * SQL Data Type: nvarchar(201)`),
|
|
582
793
|
});
|
|
583
794
|
/**
|
|
@@ -713,15 +924,15 @@ export const mjBizAppsOrdersEventProductSchema = z.object({
|
|
|
713
924
|
* * SQL Data Type: decimal(18, 4)`),
|
|
714
925
|
VenueAddress: z.string().nullable().describe(`
|
|
715
926
|
* * Field Name: VenueAddress
|
|
716
|
-
* * Display Name: Venue Address
|
|
927
|
+
* * Display Name: Venue Address Details
|
|
717
928
|
* * SQL Data Type: nvarchar(255)`),
|
|
718
929
|
__mj_Latitude: z.number().nullable().describe(`
|
|
719
930
|
* * Field Name: __mj_Latitude
|
|
720
|
-
* * Display Name: Latitude
|
|
931
|
+
* * Display Name: Mj Latitude
|
|
721
932
|
* * SQL Data Type: decimal(10, 6)`),
|
|
722
933
|
__mj_Longitude: z.number().nullable().describe(`
|
|
723
934
|
* * Field Name: __mj_Longitude
|
|
724
|
-
* * Display Name: Longitude
|
|
935
|
+
* * Display Name: Mj Longitude
|
|
725
936
|
* * SQL Data Type: decimal(10, 6)`),
|
|
726
937
|
});
|
|
727
938
|
/**
|
|
@@ -786,7 +997,7 @@ export const mjBizAppsOrdersOrderAdjustmentSchema = z.object({
|
|
|
786
997
|
* * Description: The promotion redeemed. NULL means a manual discount, which then requires a Reason and a SalesAuthority.`),
|
|
787
998
|
PromotionCodeID: z.string().nullable().describe(`
|
|
788
999
|
* * Field Name: PromotionCodeID
|
|
789
|
-
* * Display Name: Promotion Code
|
|
1000
|
+
* * Display Name: Promotion Code
|
|
790
1001
|
* * SQL Data Type: uniqueidentifier
|
|
791
1002
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Promotion Codes (vwPromotionCodes.ID)`),
|
|
792
1003
|
Amount: z.number().describe(`
|
|
@@ -848,7 +1059,7 @@ export const mjBizAppsOrdersOrderAdjustmentSchema = z.object({
|
|
|
848
1059
|
* * SQL Data Type: nvarchar(200)`),
|
|
849
1060
|
PromotionCode: z.string().nullable().describe(`
|
|
850
1061
|
* * Field Name: PromotionCode
|
|
851
|
-
* * Display Name: Promotion Code
|
|
1062
|
+
* * Display Name: Promotion Code Name
|
|
852
1063
|
* * SQL Data Type: nvarchar(60)`),
|
|
853
1064
|
});
|
|
854
1065
|
/**
|
|
@@ -974,7 +1185,7 @@ export const mjBizAppsOrdersOrderChargeSchema = z.object({
|
|
|
974
1185
|
* * Default Value: getutcdate()`),
|
|
975
1186
|
OrderHeader: z.string().describe(`
|
|
976
1187
|
* * Field Name: OrderHeader
|
|
977
|
-
* * Display Name: Order
|
|
1188
|
+
* * Display Name: Order Header Name
|
|
978
1189
|
* * SQL Data Type: nvarchar(40)`),
|
|
979
1190
|
ChargeType: z.string().describe(`
|
|
980
1191
|
* * Field Name: ChargeType
|
|
@@ -1020,7 +1231,7 @@ export const mjBizAppsOrdersOrderCompanyPolicySchema = z.object({
|
|
|
1020
1231
|
* * Description: Fallback list for customers with no assignment of their own.`),
|
|
1021
1232
|
DefaultPaymentTermsTypeID: z.string().nullable().describe(`
|
|
1022
1233
|
* * Field Name: DefaultPaymentTermsTypeID
|
|
1023
|
-
* * Display Name: Default Payment Terms
|
|
1234
|
+
* * Display Name: Default Payment Terms
|
|
1024
1235
|
* * SQL Data Type: uniqueidentifier`),
|
|
1025
1236
|
__mj_CreatedAt: z.date().describe(`
|
|
1026
1237
|
* * Field Name: __mj_CreatedAt
|
|
@@ -1074,7 +1285,7 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1074
1285
|
* * Display Name: Order Date
|
|
1075
1286
|
* * SQL Data Type: date
|
|
1076
1287
|
* * Description: Effective date of the order; used as the journal entry EffectiveDate and the as-of date for GL-account link resolution.`),
|
|
1077
|
-
Status: z.union([z.literal('Confirmed'), z.literal('Draft'), z.literal('
|
|
1288
|
+
Status: z.union([z.literal('Confirmed'), z.literal('Draft'), z.literal('Quoted'), z.literal('Voided')]).describe(`
|
|
1078
1289
|
* * Field Name: Status
|
|
1079
1290
|
* * Display Name: Status
|
|
1080
1291
|
* * SQL Data Type: nvarchar(20)
|
|
@@ -1083,58 +1294,56 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1083
1294
|
* * Possible Values
|
|
1084
1295
|
* * Confirmed
|
|
1085
1296
|
* * Draft
|
|
1086
|
-
* * Fulfilled
|
|
1087
|
-
* * Posted
|
|
1088
1297
|
* * Quoted
|
|
1089
1298
|
* * Voided
|
|
1090
1299
|
* * Description: Draft | Quoted | Confirmed | Posted | Fulfilled | Voided. Voided is reachable only from Draft/Quoted; the JE fires once on the first Confirmed.`),
|
|
1091
1300
|
CompanyID: z.string().describe(`
|
|
1092
1301
|
* * Field Name: CompanyID
|
|
1093
|
-
* * Display Name: Company
|
|
1302
|
+
* * Display Name: Company ID
|
|
1094
1303
|
* * SQL Data Type: uniqueidentifier
|
|
1095
1304
|
* * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)
|
|
1096
1305
|
* * Description: The ORIGINATING/owning company (D6): document, visibility, and sales-attribution anchor (pairs with SalesRepUserID). NEVER used for GL resolution — revenue company is per line via the product's company. FK to __mj.Company.`),
|
|
1097
1306
|
BillToPersonID: z.string().nullable().describe(`
|
|
1098
1307
|
* * Field Name: BillToPersonID
|
|
1099
|
-
* * Display Name: Bill To Person
|
|
1308
|
+
* * Display Name: Bill To Person ID
|
|
1100
1309
|
* * SQL Data Type: uniqueidentifier
|
|
1101
1310
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)`),
|
|
1102
1311
|
BillToOrganizationID: z.string().nullable().describe(`
|
|
1103
1312
|
* * Field Name: BillToOrganizationID
|
|
1104
|
-
* * Display Name: Bill To Organization
|
|
1313
|
+
* * Display Name: Bill To Organization ID
|
|
1105
1314
|
* * SQL Data Type: uniqueidentifier
|
|
1106
1315
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Organizations (vwOrganizations.ID)
|
|
1107
1316
|
* * Description: FK to __mj_BizAppsCommon.Organization — the paying organization (D65). Nullable; a personal order names only a person.`),
|
|
1108
1317
|
SalesRepUserID: z.string().nullable().describe(`
|
|
1109
1318
|
* * Field Name: SalesRepUserID
|
|
1110
|
-
* * Display Name: Sales Rep
|
|
1319
|
+
* * Display Name: Sales Rep User ID
|
|
1111
1320
|
* * SQL Data Type: uniqueidentifier
|
|
1112
1321
|
* * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
|
|
1113
1322
|
BillToAddressID: z.string().nullable().describe(`
|
|
1114
1323
|
* * Field Name: BillToAddressID
|
|
1115
|
-
* * Display Name:
|
|
1324
|
+
* * Display Name: Bill To Address
|
|
1116
1325
|
* * SQL Data Type: uniqueidentifier
|
|
1117
1326
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Addresses (vwAddresses.ID)
|
|
1118
1327
|
* * Description: FK to __mj_BizAppsCommon.Address — the billing address for this order/invoice. Nullable.`),
|
|
1119
1328
|
ShipToAddressID: z.string().nullable().describe(`
|
|
1120
1329
|
* * Field Name: ShipToAddressID
|
|
1121
|
-
* * Display Name:
|
|
1330
|
+
* * Display Name: Ship To Address
|
|
1122
1331
|
* * SQL Data Type: uniqueidentifier
|
|
1123
1332
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Addresses (vwAddresses.ID)
|
|
1124
1333
|
* * Description: FK to __mj_BizAppsCommon.Address — the shipping/service address; drives tax jurisdiction when tax lands. Nullable.`),
|
|
1125
1334
|
ShipToOrganizationID: z.string().nullable().describe(`
|
|
1126
1335
|
* * Field Name: ShipToOrganizationID
|
|
1127
|
-
* * Display Name: Ship To Organization
|
|
1336
|
+
* * Display Name: Ship To Organization ID
|
|
1128
1337
|
* * SQL Data Type: uniqueidentifier
|
|
1129
1338
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Organizations (vwOrganizations.ID)`),
|
|
1130
1339
|
ShipToPersonID: z.string().nullable().describe(`
|
|
1131
1340
|
* * Field Name: ShipToPersonID
|
|
1132
|
-
* * Display Name: Ship To Person
|
|
1341
|
+
* * Display Name: Ship To Person ID
|
|
1133
1342
|
* * SQL Data Type: uniqueidentifier
|
|
1134
1343
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)`),
|
|
1135
1344
|
PaymentTermsTypeID: z.string().nullable().describe(`
|
|
1136
1345
|
* * Field Name: PaymentTermsTypeID
|
|
1137
|
-
* * Display Name: Payment Terms
|
|
1346
|
+
* * Display Name: Payment Terms Type ID
|
|
1138
1347
|
* * SQL Data Type: uniqueidentifier
|
|
1139
1348
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Terms Types (vwPaymentTermsTypes.ID)`),
|
|
1140
1349
|
TotalGross: z.number().nullable().describe(`
|
|
@@ -1158,19 +1367,6 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1158
1367
|
* * Display Name: Due Date
|
|
1159
1368
|
* * SQL Data Type: date
|
|
1160
1369
|
* * Description: Payment due date, derived at Confirm/Post from PaymentTermsType.NetDays (posting date + net days) when not manually supplied. Editable override.`),
|
|
1161
|
-
PaymentStatus: z.union([z.literal('Overdue'), z.literal('Paid'), z.literal('PartiallyPaid'), z.literal('Unpaid'), z.literal('WrittenOff')]).describe(`
|
|
1162
|
-
* * Field Name: PaymentStatus
|
|
1163
|
-
* * Display Name: Payment Status
|
|
1164
|
-
* * SQL Data Type: nvarchar(20)
|
|
1165
|
-
* * Default Value: Unpaid
|
|
1166
|
-
* * Value List Type: List
|
|
1167
|
-
* * Possible Values
|
|
1168
|
-
* * Overdue
|
|
1169
|
-
* * Paid
|
|
1170
|
-
* * PartiallyPaid
|
|
1171
|
-
* * Unpaid
|
|
1172
|
-
* * WrittenOff
|
|
1173
|
-
* * Description: Unpaid | PartiallyPaid | Paid | Overdue | WrittenOff. Engine-derived from AmountPaid vs TotalGross; Overdue is time-derived in views/UI, WrittenOff is an explicit action.`),
|
|
1174
1370
|
ExternalDocumentNumber: z.string().nullable().describe(`
|
|
1175
1371
|
* * Field Name: ExternalDocumentNumber
|
|
1176
1372
|
* * Display Name: External Document Number
|
|
@@ -1178,7 +1374,7 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1178
1374
|
* * Description: External document/invoice number for downstream systems (e.g. bill.com sync, UPD-1). Free-form; may equal OrderNumber. Not unique pending the dual-numbering decision.`),
|
|
1179
1375
|
InitialPaymentTypeID: z.string().nullable().describe(`
|
|
1180
1376
|
* * Field Name: InitialPaymentTypeID
|
|
1181
|
-
* * Display Name: Initial Payment Type
|
|
1377
|
+
* * Display Name: Initial Payment Type ID
|
|
1182
1378
|
* * SQL Data Type: uniqueidentifier
|
|
1183
1379
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Types (vwPaymentTypes.ID)`),
|
|
1184
1380
|
InitialPaymentAmount: z.number().describe(`
|
|
@@ -1188,7 +1384,7 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1188
1384
|
* * Default Value: 0`),
|
|
1189
1385
|
InitialPaymentDetailID: z.string().nullable().describe(`
|
|
1190
1386
|
* * Field Name: InitialPaymentDetailID
|
|
1191
|
-
* * Display Name: Initial Payment Detail
|
|
1387
|
+
* * Display Name: Initial Payment Detail ID
|
|
1192
1388
|
* * SQL Data Type: uniqueidentifier
|
|
1193
1389
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Details (vwPaymentDetails.ID)`),
|
|
1194
1390
|
PostedAt: z.date().nullable().describe(`
|
|
@@ -1203,7 +1399,7 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1203
1399
|
* * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
|
|
1204
1400
|
ReversesOrderHeaderID: z.string().nullable().describe(`
|
|
1205
1401
|
* * Field Name: ReversesOrderHeaderID
|
|
1206
|
-
* * Display Name: Reverses Order
|
|
1402
|
+
* * Display Name: Reverses Order Header ID
|
|
1207
1403
|
* * SQL Data Type: uniqueidentifier
|
|
1208
1404
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)`),
|
|
1209
1405
|
ReversalReason: z.string().nullable().describe(`
|
|
@@ -1218,7 +1414,7 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1218
1414
|
* * Description: Customer-requested delivery/service date. Informational.`),
|
|
1219
1415
|
ApprovalTaskID: z.string().nullable().describe(`
|
|
1220
1416
|
* * Field Name: ApprovalTaskID
|
|
1221
|
-
* * Display Name: Approval Task
|
|
1417
|
+
* * Display Name: Approval Task ID
|
|
1222
1418
|
* * SQL Data Type: uniqueidentifier
|
|
1223
1419
|
* * Description: Soft reference (no FK) to the __mj_BizAppsTasks Task raised when a sales rule blocked Confirm (BO-D17). Convenience pointer; Task Links carry the authoritative linkage.`),
|
|
1224
1420
|
Description: z.string().nullable().describe(`
|
|
@@ -1228,7 +1424,7 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1228
1424
|
* * Description: Optional free-text description / memo for the order.`),
|
|
1229
1425
|
Notes: z.string().nullable().describe(`
|
|
1230
1426
|
* * Field Name: Notes
|
|
1231
|
-
* * Display Name: Notes
|
|
1427
|
+
* * Display Name: Internal Notes
|
|
1232
1428
|
* * SQL Data Type: nvarchar(MAX)
|
|
1233
1429
|
* * Description: Internal notes on the order (Description is the customer-facing memo).`),
|
|
1234
1430
|
ConfirmedAt: z.date().nullable().describe(`
|
|
@@ -1246,37 +1442,60 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1246
1442
|
* * Display Name: Updated At
|
|
1247
1443
|
* * SQL Data Type: datetimeoffset
|
|
1248
1444
|
* * Default Value: getutcdate()`),
|
|
1445
|
+
Origin: z.string().describe(`
|
|
1446
|
+
* * Field Name: Origin
|
|
1447
|
+
* * Display Name: Origin
|
|
1448
|
+
* * SQL Data Type: nvarchar(50)
|
|
1449
|
+
* * Default Value: Direct`),
|
|
1450
|
+
SourceCheckoutWidgetID: z.string().nullable().describe(`
|
|
1451
|
+
* * Field Name: SourceCheckoutWidgetID
|
|
1452
|
+
* * Display Name: Source Checkout Widget ID
|
|
1453
|
+
* * SQL Data Type: uniqueidentifier
|
|
1454
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widgets (vwCheckoutWidgets.ID)`),
|
|
1455
|
+
FulfillmentStatus: z.union([z.literal('Fulfilled'), z.literal('NotApplicable'), z.literal('PartiallyFulfilled'), z.literal('Pending'), z.literal('Returned')]).describe(`
|
|
1456
|
+
* * Field Name: FulfillmentStatus
|
|
1457
|
+
* * Display Name: Fulfillment Status
|
|
1458
|
+
* * SQL Data Type: nvarchar(20)
|
|
1459
|
+
* * Default Value: Pending
|
|
1460
|
+
* * Value List Type: List
|
|
1461
|
+
* * Possible Values
|
|
1462
|
+
* * Fulfilled
|
|
1463
|
+
* * NotApplicable
|
|
1464
|
+
* * PartiallyFulfilled
|
|
1465
|
+
* * Pending
|
|
1466
|
+
* * Returned
|
|
1467
|
+
* * Description: Operational fulfillment progress rolled up across order lines: Pending, PartiallyFulfilled, Fulfilled, NotApplicable (no physical goods), or Returned.`),
|
|
1249
1468
|
Company: z.string().describe(`
|
|
1250
1469
|
* * Field Name: Company
|
|
1251
|
-
* * Display Name: Company
|
|
1470
|
+
* * Display Name: Company
|
|
1252
1471
|
* * SQL Data Type: nvarchar(50)`),
|
|
1253
1472
|
BillToPerson: z.string().nullable().describe(`
|
|
1254
1473
|
* * Field Name: BillToPerson
|
|
1255
|
-
* * Display Name: Bill To Person
|
|
1474
|
+
* * Display Name: Bill To Person
|
|
1256
1475
|
* * SQL Data Type: nvarchar(201)`),
|
|
1257
1476
|
BillToOrganization: z.string().nullable().describe(`
|
|
1258
1477
|
* * Field Name: BillToOrganization
|
|
1259
|
-
* * Display Name: Bill To Organization
|
|
1478
|
+
* * Display Name: Bill To Organization
|
|
1260
1479
|
* * SQL Data Type: nvarchar(255)`),
|
|
1261
1480
|
SalesRepUser: z.string().nullable().describe(`
|
|
1262
1481
|
* * Field Name: SalesRepUser
|
|
1263
|
-
* * Display Name: Sales Rep
|
|
1482
|
+
* * Display Name: Sales Rep User
|
|
1264
1483
|
* * SQL Data Type: nvarchar(100)`),
|
|
1265
1484
|
BillToAddress: z.string().nullable().describe(`
|
|
1266
1485
|
* * Field Name: BillToAddress
|
|
1267
|
-
* * Display Name:
|
|
1486
|
+
* * Display Name: Bill To Address Details
|
|
1268
1487
|
* * SQL Data Type: nvarchar(255)`),
|
|
1269
1488
|
ShipToAddress: z.string().nullable().describe(`
|
|
1270
1489
|
* * Field Name: ShipToAddress
|
|
1271
|
-
* * Display Name:
|
|
1490
|
+
* * Display Name: Ship To Address Details
|
|
1272
1491
|
* * SQL Data Type: nvarchar(255)`),
|
|
1273
1492
|
ShipToOrganization: z.string().nullable().describe(`
|
|
1274
1493
|
* * Field Name: ShipToOrganization
|
|
1275
|
-
* * Display Name: Ship To Organization
|
|
1494
|
+
* * Display Name: Ship To Organization
|
|
1276
1495
|
* * SQL Data Type: nvarchar(255)`),
|
|
1277
1496
|
ShipToPerson: z.string().nullable().describe(`
|
|
1278
1497
|
* * Field Name: ShipToPerson
|
|
1279
|
-
* * Display Name: Ship To Person
|
|
1498
|
+
* * Display Name: Ship To Person
|
|
1280
1499
|
* * SQL Data Type: nvarchar(201)`),
|
|
1281
1500
|
PaymentTermsType: z.string().nullable().describe(`
|
|
1282
1501
|
* * Field Name: PaymentTermsType
|
|
@@ -1284,32 +1503,47 @@ export const mjBizAppsOrdersOrderHeaderSchema = z.object({
|
|
|
1284
1503
|
* * SQL Data Type: nvarchar(200)`),
|
|
1285
1504
|
InitialPaymentType: z.string().nullable().describe(`
|
|
1286
1505
|
* * Field Name: InitialPaymentType
|
|
1287
|
-
* * Display Name: Initial Payment Type
|
|
1506
|
+
* * Display Name: Initial Payment Type
|
|
1288
1507
|
* * SQL Data Type: nvarchar(200)`),
|
|
1289
1508
|
InitialPaymentDetail: z.string().nullable().describe(`
|
|
1290
1509
|
* * Field Name: InitialPaymentDetail
|
|
1291
|
-
* * Display Name: Initial Payment Detail
|
|
1510
|
+
* * Display Name: Initial Payment Detail
|
|
1292
1511
|
* * SQL Data Type: char(4)`),
|
|
1293
1512
|
PostedByUser: z.string().nullable().describe(`
|
|
1294
1513
|
* * Field Name: PostedByUser
|
|
1295
|
-
* * Display Name: Posted By User
|
|
1514
|
+
* * Display Name: Posted By User Name
|
|
1296
1515
|
* * SQL Data Type: nvarchar(100)`),
|
|
1297
1516
|
ReversesOrderHeader: z.string().nullable().describe(`
|
|
1298
1517
|
* * Field Name: ReversesOrderHeader
|
|
1299
|
-
* * Display Name:
|
|
1518
|
+
* * Display Name: Reversed Order Name
|
|
1300
1519
|
* * SQL Data Type: nvarchar(40)`),
|
|
1520
|
+
SourceCheckoutWidget: z.string().nullable().describe(`
|
|
1521
|
+
* * Field Name: SourceCheckoutWidget
|
|
1522
|
+
* * Display Name: Source Checkout Widget
|
|
1523
|
+
* * SQL Data Type: nvarchar(100)`),
|
|
1301
1524
|
__mj_Latitude: z.number().nullable().describe(`
|
|
1302
1525
|
* * Field Name: __mj_Latitude
|
|
1303
|
-
* * Display Name: Latitude
|
|
1526
|
+
* * Display Name: Mj Latitude
|
|
1304
1527
|
* * SQL Data Type: decimal(10, 6)`),
|
|
1305
1528
|
__mj_Longitude: z.number().nullable().describe(`
|
|
1306
1529
|
* * Field Name: __mj_Longitude
|
|
1307
|
-
* * Display Name: Longitude
|
|
1530
|
+
* * Display Name: Mj Longitude
|
|
1308
1531
|
* * SQL Data Type: decimal(10, 6)`),
|
|
1309
1532
|
IsOverdue: z.number().describe(`
|
|
1310
1533
|
* * Field Name: IsOverdue
|
|
1311
1534
|
* * Display Name: Is Overdue
|
|
1312
1535
|
* * SQL Data Type: int`),
|
|
1536
|
+
PaymentStatus: z.union([z.literal('Overdue'), z.literal('Paid'), z.literal('PartiallyPaid'), z.literal('Unpaid'), z.literal('WrittenOff')]).describe(`
|
|
1537
|
+
* * Field Name: PaymentStatus
|
|
1538
|
+
* * Display Name: Payment Status
|
|
1539
|
+
* * SQL Data Type: nvarchar(13)
|
|
1540
|
+
* * Value List Type: List
|
|
1541
|
+
* * Possible Values
|
|
1542
|
+
* * Overdue
|
|
1543
|
+
* * Paid
|
|
1544
|
+
* * PartiallyPaid
|
|
1545
|
+
* * Unpaid
|
|
1546
|
+
* * WrittenOff`),
|
|
1313
1547
|
});
|
|
1314
1548
|
/**
|
|
1315
1549
|
* zod schema definition for the entity MJ_BizApps_Orders: Order Line Dimensions
|
|
@@ -1632,11 +1866,11 @@ export const mjBizAppsOrdersOrderLineSchema = z.object({
|
|
|
1632
1866
|
* * SQL Data Type: nvarchar(40)`),
|
|
1633
1867
|
__mj_Latitude: z.number().nullable().describe(`
|
|
1634
1868
|
* * Field Name: __mj_Latitude
|
|
1635
|
-
* * Display Name: Latitude
|
|
1869
|
+
* * Display Name: Mj Latitude
|
|
1636
1870
|
* * SQL Data Type: decimal(10, 6)`),
|
|
1637
1871
|
__mj_Longitude: z.number().nullable().describe(`
|
|
1638
1872
|
* * Field Name: __mj_Longitude
|
|
1639
|
-
* * Display Name: Longitude
|
|
1873
|
+
* * Display Name: Mj Longitude
|
|
1640
1874
|
* * SQL Data Type: decimal(10, 6)`),
|
|
1641
1875
|
RootParentOrderLineID: z.string().nullable().describe(`
|
|
1642
1876
|
* * Field Name: RootParentOrderLineID
|
|
@@ -1644,19 +1878,19 @@ export const mjBizAppsOrdersOrderLineSchema = z.object({
|
|
|
1644
1878
|
* * SQL Data Type: uniqueidentifier`),
|
|
1645
1879
|
ParentOrderLineIDDepth: z.number().nullable().describe(`
|
|
1646
1880
|
* * Field Name: ParentOrderLineIDDepth
|
|
1647
|
-
* * Display Name:
|
|
1881
|
+
* * Display Name: Hierarchy Depth
|
|
1648
1882
|
* * SQL Data Type: int`),
|
|
1649
1883
|
ParentOrderLineIDPath: z.string().nullable().describe(`
|
|
1650
1884
|
* * Field Name: ParentOrderLineIDPath
|
|
1651
|
-
* * Display Name:
|
|
1885
|
+
* * Display Name: Hierarchy Path
|
|
1652
1886
|
* * SQL Data Type: nvarchar(MAX)`),
|
|
1653
1887
|
ParentOrderLineIDIsLeaf: z.boolean().nullable().describe(`
|
|
1654
1888
|
* * Field Name: ParentOrderLineIDIsLeaf
|
|
1655
|
-
* * Display Name:
|
|
1889
|
+
* * Display Name: Is Leaf Node
|
|
1656
1890
|
* * SQL Data Type: bit`),
|
|
1657
1891
|
ParentOrderLineIDChildCount: z.number().nullable().describe(`
|
|
1658
1892
|
* * Field Name: ParentOrderLineIDChildCount
|
|
1659
|
-
* * Display Name:
|
|
1893
|
+
* * Display Name: Child Count
|
|
1660
1894
|
* * SQL Data Type: int`),
|
|
1661
1895
|
});
|
|
1662
1896
|
/**
|
|
@@ -1777,7 +2011,7 @@ export const mjBizAppsOrdersPaymentDetailSchema = z.object({
|
|
|
1777
2011
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Stored Value Accounts (vwStoredValueAccounts.ID)`),
|
|
1778
2012
|
SourceOrderHeaderID: z.string().nullable().describe(`
|
|
1779
2013
|
* * Field Name: SourceOrderHeaderID
|
|
1780
|
-
* * Display Name: Source Order
|
|
2014
|
+
* * Display Name: Source Order Header
|
|
1781
2015
|
* * SQL Data Type: uniqueidentifier
|
|
1782
2016
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
1783
2017
|
* * Description: ACCOUNT CREDIT tender (D68): the order whose NEGATIVE balance this payment draws down. A customer credit is not its own instrument the way a gift card is — it already lives on the over-paid order — so this points at that order rather than duplicating the balance onto a second record. NULL for every other tender type.`),
|
|
@@ -1817,7 +2051,7 @@ export const mjBizAppsOrdersPaymentDetailSchema = z.object({
|
|
|
1817
2051
|
* * SQL Data Type: nvarchar(60)`),
|
|
1818
2052
|
SourceOrderHeader: z.string().nullable().describe(`
|
|
1819
2053
|
* * Field Name: SourceOrderHeader
|
|
1820
|
-
* * Display Name: Source Order Name
|
|
2054
|
+
* * Display Name: Source Order Header Name
|
|
1821
2055
|
* * SQL Data Type: nvarchar(40)`),
|
|
1822
2056
|
});
|
|
1823
2057
|
/**
|
|
@@ -1867,7 +2101,7 @@ export const mjBizAppsOrdersPaymentHeaderSchema = z.object({
|
|
|
1867
2101
|
* * Description: Gross amount received (negative for reversal methods).`),
|
|
1868
2102
|
ProcessingFeeAmount: z.number().describe(`
|
|
1869
2103
|
* * Field Name: ProcessingFeeAmount
|
|
1870
|
-
* * Display Name: Processing Fee
|
|
2104
|
+
* * Display Name: Processing Fee Amount
|
|
1871
2105
|
* * SQL Data Type: decimal(18, 2)
|
|
1872
2106
|
* * Default Value: 0
|
|
1873
2107
|
* * Description: Processor fee withheld from this payment.`),
|
|
@@ -2029,7 +2263,7 @@ export const mjBizAppsOrdersPaymentIntentSchema = z.object({
|
|
|
2029
2263
|
* * Description: Amount being collected.`),
|
|
2030
2264
|
OrderHeaderID: z.string().nullable().describe(`
|
|
2031
2265
|
* * Field Name: OrderHeaderID
|
|
2032
|
-
* * Display Name: Order
|
|
2266
|
+
* * Display Name: Order Header
|
|
2033
2267
|
* * SQL Data Type: uniqueidentifier
|
|
2034
2268
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)`),
|
|
2035
2269
|
BillToPersonID: z.string().nullable().describe(`
|
|
@@ -2069,7 +2303,7 @@ export const mjBizAppsOrdersPaymentIntentSchema = z.object({
|
|
|
2069
2303
|
* * SQL Data Type: nvarchar(200)`),
|
|
2070
2304
|
OrderHeader: z.string().nullable().describe(`
|
|
2071
2305
|
* * Field Name: OrderHeader
|
|
2072
|
-
* * Display Name: Order Header
|
|
2306
|
+
* * Display Name: Order Header Name
|
|
2073
2307
|
* * SQL Data Type: nvarchar(40)`),
|
|
2074
2308
|
BillToPerson: z.string().nullable().describe(`
|
|
2075
2309
|
* * Field Name: BillToPerson
|
|
@@ -2658,7 +2892,7 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2658
2892
|
* * Default Value: newsequentialid()`),
|
|
2659
2893
|
CompanyID: z.string().describe(`
|
|
2660
2894
|
* * Field Name: CompanyID
|
|
2661
|
-
* * Display Name: Company
|
|
2895
|
+
* * Display Name: Company ID
|
|
2662
2896
|
* * SQL Data Type: uniqueidentifier
|
|
2663
2897
|
* * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)
|
|
2664
2898
|
* * Description: The company that owns this category tree (D7). No shared/global categories. FK to __mj.Company.`),
|
|
@@ -2674,7 +2908,7 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2674
2908
|
* * Description: Display name of the category.`),
|
|
2675
2909
|
ParentProductCategoryID: z.string().nullable().describe(`
|
|
2676
2910
|
* * Field Name: ParentProductCategoryID
|
|
2677
|
-
* * Display Name: Parent Category
|
|
2911
|
+
* * Display Name: Parent Category ID
|
|
2678
2912
|
* * SQL Data Type: uniqueidentifier
|
|
2679
2913
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Product Categories (vwProductCategories.ID)`),
|
|
2680
2914
|
Description: z.string().nullable().describe(`
|
|
@@ -2684,7 +2918,7 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2684
2918
|
* * Description: Optional description of the category.`),
|
|
2685
2919
|
IsActive: z.boolean().describe(`
|
|
2686
2920
|
* * Field Name: IsActive
|
|
2687
|
-
* * Display Name:
|
|
2921
|
+
* * Display Name: Active
|
|
2688
2922
|
* * SQL Data Type: bit
|
|
2689
2923
|
* * Default Value: 1
|
|
2690
2924
|
* * Description: Whether this category is active and selectable.`),
|
|
@@ -2700,7 +2934,7 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2700
2934
|
* * Description: Default taxability key for products in this category, matched against accounting's TaxRate.TaxCategory. NULL means the walk continues up the category tree and then to the product type.`),
|
|
2701
2935
|
DefaultEntitlementGrantTiming: z.union([z.literal('OnActivation'), z.literal('OnConfirm'), z.literal('OnPaidInFull')]).nullable().describe(`
|
|
2702
2936
|
* * Field Name: DefaultEntitlementGrantTiming
|
|
2703
|
-
* * Display Name: Entitlement Grant Timing
|
|
2937
|
+
* * Display Name: Default Entitlement Grant Timing
|
|
2704
2938
|
* * SQL Data Type: nvarchar(20)
|
|
2705
2939
|
* * Value List Type: List
|
|
2706
2940
|
* * Possible Values
|
|
@@ -2709,7 +2943,7 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2709
2943
|
* * OnPaidInFull`),
|
|
2710
2944
|
DefaultEntitlementQuantityMode: z.union([z.literal('Flat'), z.literal('PerUnit')]).nullable().describe(`
|
|
2711
2945
|
* * Field Name: DefaultEntitlementQuantityMode
|
|
2712
|
-
* * Display Name: Entitlement Quantity Mode
|
|
2946
|
+
* * Display Name: Default Entitlement Quantity Mode
|
|
2713
2947
|
* * SQL Data Type: nvarchar(20)
|
|
2714
2948
|
* * Value List Type: List
|
|
2715
2949
|
* * Possible Values
|
|
@@ -2717,7 +2951,7 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2717
2951
|
* * PerUnit`),
|
|
2718
2952
|
DefaultEntitlementValidityMode: z.union([z.literal('EventWindow'), z.literal('FixedDuration'), z.literal('Perpetual'), z.literal('SubscriptionTerm')]).nullable().describe(`
|
|
2719
2953
|
* * Field Name: DefaultEntitlementValidityMode
|
|
2720
|
-
* * Display Name: Entitlement Validity Mode
|
|
2954
|
+
* * Display Name: Default Entitlement Validity Mode
|
|
2721
2955
|
* * SQL Data Type: nvarchar(20)
|
|
2722
2956
|
* * Value List Type: List
|
|
2723
2957
|
* * Possible Values
|
|
@@ -2742,31 +2976,31 @@ export const mjBizAppsOrdersProductCategorySchema = z.object({
|
|
|
2742
2976
|
* * Description: ClassFactory key of a BasePriceResolver subclass for every product in this category (and, unless overridden, its child categories), or NULL. See Product.PricingDriverClass for the resolution order.`),
|
|
2743
2977
|
Company: z.string().describe(`
|
|
2744
2978
|
* * Field Name: Company
|
|
2745
|
-
* * Display Name: Company
|
|
2979
|
+
* * Display Name: Company
|
|
2746
2980
|
* * SQL Data Type: nvarchar(50)`),
|
|
2747
2981
|
ParentProductCategory: z.string().nullable().describe(`
|
|
2748
2982
|
* * Field Name: ParentProductCategory
|
|
2749
|
-
* * Display Name: Parent Category
|
|
2983
|
+
* * Display Name: Parent Category
|
|
2750
2984
|
* * SQL Data Type: nvarchar(200)`),
|
|
2751
2985
|
RootParentProductCategoryID: z.string().nullable().describe(`
|
|
2752
2986
|
* * Field Name: RootParentProductCategoryID
|
|
2753
|
-
* * Display Name: Root Category
|
|
2987
|
+
* * Display Name: Root Parent Category ID
|
|
2754
2988
|
* * SQL Data Type: uniqueidentifier`),
|
|
2755
2989
|
ParentProductCategoryIDDepth: z.number().nullable().describe(`
|
|
2756
2990
|
* * Field Name: ParentProductCategoryIDDepth
|
|
2757
|
-
* * Display Name: Depth
|
|
2991
|
+
* * Display Name: Parent Product Category ID Depth
|
|
2758
2992
|
* * SQL Data Type: int`),
|
|
2759
2993
|
ParentProductCategoryIDPath: z.string().nullable().describe(`
|
|
2760
2994
|
* * Field Name: ParentProductCategoryIDPath
|
|
2761
|
-
* * Display Name: Category Path
|
|
2995
|
+
* * Display Name: Parent Product Category ID Path
|
|
2762
2996
|
* * SQL Data Type: nvarchar(MAX)`),
|
|
2763
2997
|
ParentProductCategoryIDIsLeaf: z.boolean().nullable().describe(`
|
|
2764
2998
|
* * Field Name: ParentProductCategoryIDIsLeaf
|
|
2765
|
-
* * Display Name: Is Leaf
|
|
2999
|
+
* * Display Name: Parent Product Category ID Is Leaf
|
|
2766
3000
|
* * SQL Data Type: bit`),
|
|
2767
3001
|
ParentProductCategoryIDChildCount: z.number().nullable().describe(`
|
|
2768
3002
|
* * Field Name: ParentProductCategoryIDChildCount
|
|
2769
|
-
* * Display Name: Child Count
|
|
3003
|
+
* * Display Name: Parent Product Category ID Child Count
|
|
2770
3004
|
* * SQL Data Type: int`),
|
|
2771
3005
|
});
|
|
2772
3006
|
/**
|
|
@@ -3071,7 +3305,7 @@ export const mjBizAppsOrdersProductTypeSchema = z.object({
|
|
|
3071
3305
|
* * Description: MJ entity name of the IsA OrderLine-level extension for this type (e.g. MJ_BizApps_Orders: Event Order Lines). NULL = no extension (BO-D37).`),
|
|
3072
3306
|
IsActive: z.boolean().describe(`
|
|
3073
3307
|
* * Field Name: IsActive
|
|
3074
|
-
* * Display Name: Active
|
|
3308
|
+
* * Display Name: Is Active
|
|
3075
3309
|
* * SQL Data Type: bit
|
|
3076
3310
|
* * Default Value: 1
|
|
3077
3311
|
* * Description: Whether this type is active and selectable.`),
|
|
@@ -3120,6 +3354,11 @@ export const mjBizAppsOrdersProductTypeSchema = z.object({
|
|
|
3120
3354
|
* * Display Name: Pricing Driver Class
|
|
3121
3355
|
* * SQL Data Type: nvarchar(255)
|
|
3122
3356
|
* * Description: ClassFactory key of a BasePriceResolver subclass for every product of this type, or NULL. The natural home for behaviour-wide pricing such as usage metering.`),
|
|
3357
|
+
Configuration: z.string().nullable().describe(`
|
|
3358
|
+
* * Field Name: Configuration
|
|
3359
|
+
* * Display Name: Configuration
|
|
3360
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
3361
|
+
* * Description: Extensible JSON configuration for this product type including customUI (js, css, theme, componentOverrideKey), unitMode, allowQuantity, and fieldOverrides.`),
|
|
3123
3362
|
DefaultRevenueRecognitionType: z.string().nullable().describe(`
|
|
3124
3363
|
* * Field Name: DefaultRevenueRecognitionType
|
|
3125
3364
|
* * Display Name: Default Revenue Recognition Type
|
|
@@ -3178,7 +3417,7 @@ export const mjBizAppsOrdersProductSchema = z.object({
|
|
|
3178
3417
|
* * Description: Draft | Active | Discontinued | EOL — catalog lifecycle. Data-only until the catalog engine gates ordering on it.`),
|
|
3179
3418
|
SuccessorProductID: z.string().nullable().describe(`
|
|
3180
3419
|
* * Field Name: SuccessorProductID
|
|
3181
|
-
* * Display Name: Successor Product
|
|
3420
|
+
* * Display Name: Successor Product
|
|
3182
3421
|
* * SQL Data Type: uniqueidentifier
|
|
3183
3422
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Products (vwProducts.ID)`),
|
|
3184
3423
|
AvailableFrom: z.date().nullable().describe(`
|
|
@@ -3204,7 +3443,7 @@ export const mjBizAppsOrdersProductSchema = z.object({
|
|
|
3204
3443
|
* * Description: Standalone selling price for ASC 606 bundle revenue allocation (BO-D35; fields now, allocation engine later).`),
|
|
3205
3444
|
SubscriptionTypeID: z.string().nullable().describe(`
|
|
3206
3445
|
* * Field Name: SubscriptionTypeID
|
|
3207
|
-
* * Display Name: Subscription Type
|
|
3446
|
+
* * Display Name: Subscription Type
|
|
3208
3447
|
* * SQL Data Type: uniqueidentifier
|
|
3209
3448
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Subscription Types (vwSubscriptionTypes.ID)`),
|
|
3210
3449
|
IsTaxable: z.boolean().nullable().describe(`
|
|
@@ -3283,7 +3522,7 @@ export const mjBizAppsOrdersProductSchema = z.object({
|
|
|
3283
3522
|
* * SQL Data Type: nvarchar(50)`),
|
|
3284
3523
|
SuccessorProduct: z.string().nullable().describe(`
|
|
3285
3524
|
* * Field Name: SuccessorProduct
|
|
3286
|
-
* * Display Name: Successor Product
|
|
3525
|
+
* * Display Name: Successor Product Name
|
|
3287
3526
|
* * SQL Data Type: nvarchar(200)`),
|
|
3288
3527
|
RevenueRecognitionType: z.string().describe(`
|
|
3289
3528
|
* * Field Name: RevenueRecognitionType
|
|
@@ -3291,7 +3530,7 @@ export const mjBizAppsOrdersProductSchema = z.object({
|
|
|
3291
3530
|
* * SQL Data Type: nvarchar(200)`),
|
|
3292
3531
|
SubscriptionType: z.string().nullable().describe(`
|
|
3293
3532
|
* * Field Name: SubscriptionType
|
|
3294
|
-
* * Display Name: Subscription Type
|
|
3533
|
+
* * Display Name: Subscription Type Name
|
|
3295
3534
|
* * SQL Data Type: nvarchar(200)`),
|
|
3296
3535
|
});
|
|
3297
3536
|
/**
|
|
@@ -3888,7 +4127,7 @@ export const mjBizAppsOrdersStoredValueTransactionSchema = z.object({
|
|
|
3888
4127
|
* * Default Value: newsequentialid()`),
|
|
3889
4128
|
StoredValueAccountID: z.string().describe(`
|
|
3890
4129
|
* * Field Name: StoredValueAccountID
|
|
3891
|
-
* * Display Name: Stored Value Account
|
|
4130
|
+
* * Display Name: Stored Value Account
|
|
3892
4131
|
* * SQL Data Type: uniqueidentifier
|
|
3893
4132
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Stored Value Accounts (vwStoredValueAccounts.ID)`),
|
|
3894
4133
|
TransactionType: z.union([z.literal('Adjust'), z.literal('Expire'), z.literal('Issue'), z.literal('Redeem'), z.literal('Refund')]).describe(`
|
|
@@ -3915,12 +4154,12 @@ export const mjBizAppsOrdersStoredValueTransactionSchema = z.object({
|
|
|
3915
4154
|
* * Description: Account balance after applying this transaction.`),
|
|
3916
4155
|
RelatedPaymentID: z.string().nullable().describe(`
|
|
3917
4156
|
* * Field Name: RelatedPaymentID
|
|
3918
|
-
* * Display Name: Related Payment
|
|
4157
|
+
* * Display Name: Related Payment
|
|
3919
4158
|
* * SQL Data Type: uniqueidentifier
|
|
3920
4159
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Headers (vwPaymentHeaders.ID)`),
|
|
3921
4160
|
RelatedOrderHeaderID: z.string().nullable().describe(`
|
|
3922
4161
|
* * Field Name: RelatedOrderHeaderID
|
|
3923
|
-
* * Display Name: Related Order
|
|
4162
|
+
* * Display Name: Related Order
|
|
3924
4163
|
* * SQL Data Type: uniqueidentifier
|
|
3925
4164
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)`),
|
|
3926
4165
|
OccurredAt: z.date().describe(`
|
|
@@ -3940,15 +4179,15 @@ export const mjBizAppsOrdersStoredValueTransactionSchema = z.object({
|
|
|
3940
4179
|
* * Default Value: getutcdate()`),
|
|
3941
4180
|
StoredValueAccount: z.string().describe(`
|
|
3942
4181
|
* * Field Name: StoredValueAccount
|
|
3943
|
-
* * Display Name: Stored Value Account
|
|
4182
|
+
* * Display Name: Stored Value Account Name
|
|
3944
4183
|
* * SQL Data Type: nvarchar(60)`),
|
|
3945
4184
|
RelatedPayment: z.string().nullable().describe(`
|
|
3946
4185
|
* * Field Name: RelatedPayment
|
|
3947
|
-
* * Display Name: Related Payment
|
|
4186
|
+
* * Display Name: Related Payment Name
|
|
3948
4187
|
* * SQL Data Type: nvarchar(40)`),
|
|
3949
4188
|
RelatedOrderHeader: z.string().nullable().describe(`
|
|
3950
4189
|
* * Field Name: RelatedOrderHeader
|
|
3951
|
-
* * Display Name: Related Order
|
|
4190
|
+
* * Display Name: Related Order Name
|
|
3952
4191
|
* * SQL Data Type: nvarchar(40)`),
|
|
3953
4192
|
});
|
|
3954
4193
|
/**
|
|
@@ -3962,7 +4201,7 @@ export const mjBizAppsOrdersSubscriptionEventSchema = z.object({
|
|
|
3962
4201
|
* * Default Value: newsequentialid()`),
|
|
3963
4202
|
SubscriptionID: z.string().describe(`
|
|
3964
4203
|
* * Field Name: SubscriptionID
|
|
3965
|
-
* * Display Name: Subscription
|
|
4204
|
+
* * Display Name: Subscription ID
|
|
3966
4205
|
* * SQL Data Type: uniqueidentifier
|
|
3967
4206
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Subscriptions (vwSubscriptions.ID)`),
|
|
3968
4207
|
EventType: z.union([z.literal('Activated'), z.literal('Canceled'), z.literal('CancellationRequested'), z.literal('Created'), z.literal('Extended'), z.literal('Migrated'), z.literal('Paused'), z.literal('PaymentFailed'), z.literal('PaymentSucceeded'), z.literal('RenewalOrderSpawned'), z.literal('Resumed'), z.literal('TrialEnded'), z.literal('TrialStarted')]).describe(`
|
|
@@ -4007,7 +4246,7 @@ export const mjBizAppsOrdersSubscriptionEventSchema = z.object({
|
|
|
4007
4246
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Headers (vwPaymentHeaders.ID)`),
|
|
4008
4247
|
RelatedOrderHeaderID: z.string().nullable().describe(`
|
|
4009
4248
|
* * Field Name: RelatedOrderHeaderID
|
|
4010
|
-
* * Display Name: Related Order ID
|
|
4249
|
+
* * Display Name: Related Order Header ID
|
|
4011
4250
|
* * SQL Data Type: uniqueidentifier
|
|
4012
4251
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)`),
|
|
4013
4252
|
__mj_CreatedAt: z.date().describe(`
|
|
@@ -4022,7 +4261,7 @@ export const mjBizAppsOrdersSubscriptionEventSchema = z.object({
|
|
|
4022
4261
|
* * Default Value: getutcdate()`),
|
|
4023
4262
|
Subscription: z.string().describe(`
|
|
4024
4263
|
* * Field Name: Subscription
|
|
4025
|
-
* * Display Name: Subscription
|
|
4264
|
+
* * Display Name: Subscription
|
|
4026
4265
|
* * SQL Data Type: nvarchar(40)`),
|
|
4027
4266
|
RelatedPayment: z.string().nullable().describe(`
|
|
4028
4267
|
* * Field Name: RelatedPayment
|
|
@@ -4030,7 +4269,7 @@ export const mjBizAppsOrdersSubscriptionEventSchema = z.object({
|
|
|
4030
4269
|
* * SQL Data Type: nvarchar(40)`),
|
|
4031
4270
|
RelatedOrderHeader: z.string().nullable().describe(`
|
|
4032
4271
|
* * Field Name: RelatedOrderHeader
|
|
4033
|
-
* * Display Name: Related Order
|
|
4272
|
+
* * Display Name: Related Order Header
|
|
4034
4273
|
* * SQL Data Type: nvarchar(40)`),
|
|
4035
4274
|
});
|
|
4036
4275
|
/**
|
|
@@ -4542,13 +4781,555 @@ let mjBizAppsOrdersChargeTypeEntity = class mjBizAppsOrdersChargeTypeEntity exte
|
|
|
4542
4781
|
get Code() {
|
|
4543
4782
|
return this.Get('Code');
|
|
4544
4783
|
}
|
|
4545
|
-
set Code(value) {
|
|
4546
|
-
this.Set('Code', value);
|
|
4784
|
+
set Code(value) {
|
|
4785
|
+
this.Set('Code', value);
|
|
4786
|
+
}
|
|
4787
|
+
/**
|
|
4788
|
+
* * Field Name: Name
|
|
4789
|
+
* * Display Name: Name
|
|
4790
|
+
* * SQL Data Type: nvarchar(200)
|
|
4791
|
+
*/
|
|
4792
|
+
get Name() {
|
|
4793
|
+
return this.Get('Name');
|
|
4794
|
+
}
|
|
4795
|
+
set Name(value) {
|
|
4796
|
+
this.Set('Name', value);
|
|
4797
|
+
}
|
|
4798
|
+
/**
|
|
4799
|
+
* * Field Name: Description
|
|
4800
|
+
* * Display Name: Description
|
|
4801
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
4802
|
+
*/
|
|
4803
|
+
get Description() {
|
|
4804
|
+
return this.Get('Description');
|
|
4805
|
+
}
|
|
4806
|
+
set Description(value) {
|
|
4807
|
+
this.Set('Description', value);
|
|
4808
|
+
}
|
|
4809
|
+
/**
|
|
4810
|
+
* * Field Name: Category
|
|
4811
|
+
* * Display Name: Category
|
|
4812
|
+
* * SQL Data Type: nvarchar(20)
|
|
4813
|
+
* * Value List Type: List
|
|
4814
|
+
* * Possible Values
|
|
4815
|
+
* * Fee
|
|
4816
|
+
* * Handling
|
|
4817
|
+
* * Shipping
|
|
4818
|
+
* * Surcharge
|
|
4819
|
+
* * Tax
|
|
4820
|
+
* * Description: Shipping | Handling | Tax | Surcharge | Fee.
|
|
4821
|
+
*/
|
|
4822
|
+
get Category() {
|
|
4823
|
+
return this.Get('Category');
|
|
4824
|
+
}
|
|
4825
|
+
set Category(value) {
|
|
4826
|
+
this.Set('Category', value);
|
|
4827
|
+
}
|
|
4828
|
+
/**
|
|
4829
|
+
* * Field Name: Basis
|
|
4830
|
+
* * Display Name: Basis
|
|
4831
|
+
* * SQL Data Type: nvarchar(30)
|
|
4832
|
+
* * Default Value: LineNet
|
|
4833
|
+
* * Value List Type: List
|
|
4834
|
+
* * Possible Values
|
|
4835
|
+
* * Flat
|
|
4836
|
+
* * LineNet
|
|
4837
|
+
* * LineNetPlusCharges
|
|
4838
|
+
* * OrderNet
|
|
4839
|
+
* * Description: What the charge computes on: LineNet (the discounted line), LineNetPlusCharges (after earlier charges in sequence), OrderNet, or Flat. This is the field that makes tax-on-shipping work, which is jurisdiction-dependent and therefore configuration rather than code.
|
|
4840
|
+
*/
|
|
4841
|
+
get Basis() {
|
|
4842
|
+
return this.Get('Basis');
|
|
4843
|
+
}
|
|
4844
|
+
set Basis(value) {
|
|
4845
|
+
this.Set('Basis', value);
|
|
4846
|
+
}
|
|
4847
|
+
/**
|
|
4848
|
+
* * Field Name: Sequence
|
|
4849
|
+
* * Display Name: Sequence
|
|
4850
|
+
* * SQL Data Type: int
|
|
4851
|
+
* * Default Value: 0
|
|
4852
|
+
* * Description: Application order. Charges compute in this order and later ones may build on earlier ones via Basis.
|
|
4853
|
+
*/
|
|
4854
|
+
get Sequence() {
|
|
4855
|
+
return this.Get('Sequence');
|
|
4856
|
+
}
|
|
4857
|
+
set Sequence(value) {
|
|
4858
|
+
this.Set('Sequence', value);
|
|
4859
|
+
}
|
|
4860
|
+
/**
|
|
4861
|
+
* * Field Name: AllowsOverride
|
|
4862
|
+
* * Display Name: Allows Override
|
|
4863
|
+
* * SQL Data Type: bit
|
|
4864
|
+
* * Default Value: 1
|
|
4865
|
+
* * Description: Whether a human may override a computed charge of this type.
|
|
4866
|
+
*/
|
|
4867
|
+
get AllowsOverride() {
|
|
4868
|
+
return this.Get('AllowsOverride');
|
|
4869
|
+
}
|
|
4870
|
+
set AllowsOverride(value) {
|
|
4871
|
+
this.Set('AllowsOverride', value);
|
|
4872
|
+
}
|
|
4873
|
+
/**
|
|
4874
|
+
* * Field Name: IsActive
|
|
4875
|
+
* * Display Name: Is Active
|
|
4876
|
+
* * SQL Data Type: bit
|
|
4877
|
+
* * Default Value: 1
|
|
4878
|
+
*/
|
|
4879
|
+
get IsActive() {
|
|
4880
|
+
return this.Get('IsActive');
|
|
4881
|
+
}
|
|
4882
|
+
set IsActive(value) {
|
|
4883
|
+
this.Set('IsActive', value);
|
|
4884
|
+
}
|
|
4885
|
+
/**
|
|
4886
|
+
* * Field Name: __mj_CreatedAt
|
|
4887
|
+
* * Display Name: Created At
|
|
4888
|
+
* * SQL Data Type: datetimeoffset
|
|
4889
|
+
* * Default Value: getutcdate()
|
|
4890
|
+
*/
|
|
4891
|
+
get __mj_CreatedAt() {
|
|
4892
|
+
return this.Get('__mj_CreatedAt');
|
|
4893
|
+
}
|
|
4894
|
+
/**
|
|
4895
|
+
* * Field Name: __mj_UpdatedAt
|
|
4896
|
+
* * Display Name: Updated At
|
|
4897
|
+
* * SQL Data Type: datetimeoffset
|
|
4898
|
+
* * Default Value: getutcdate()
|
|
4899
|
+
*/
|
|
4900
|
+
get __mj_UpdatedAt() {
|
|
4901
|
+
return this.Get('__mj_UpdatedAt');
|
|
4902
|
+
}
|
|
4903
|
+
};
|
|
4904
|
+
mjBizAppsOrdersChargeTypeEntity = __decorate([
|
|
4905
|
+
RegisterClass(BaseEntity, 'MJ_BizApps_Orders: Charge Types')
|
|
4906
|
+
], mjBizAppsOrdersChargeTypeEntity);
|
|
4907
|
+
export { mjBizAppsOrdersChargeTypeEntity };
|
|
4908
|
+
/**
|
|
4909
|
+
* MJ_BizApps_Orders: Checkout Sessions - strongly typed entity sub-class
|
|
4910
|
+
* * Schema: __mj_BizAppsOrders
|
|
4911
|
+
* * Base Table: CheckoutSession
|
|
4912
|
+
* * Base View: vwCheckoutSessions
|
|
4913
|
+
* * @description Server-side state tracking for an anonymous or authenticated checkout attempt, linking client session key to draft orders and payment intents.
|
|
4914
|
+
* * Primary Key: ID
|
|
4915
|
+
* @extends {BaseEntity}
|
|
4916
|
+
* @class
|
|
4917
|
+
* @public
|
|
4918
|
+
*/
|
|
4919
|
+
let mjBizAppsOrdersCheckoutSessionEntity = class mjBizAppsOrdersCheckoutSessionEntity extends BaseEntity {
|
|
4920
|
+
/**
|
|
4921
|
+
* Loads the MJ_BizApps_Orders: Checkout Sessions record from the database
|
|
4922
|
+
* @param ID: string - primary key value to load the MJ_BizApps_Orders: Checkout Sessions record.
|
|
4923
|
+
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
4924
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
4925
|
+
* @public
|
|
4926
|
+
* @async
|
|
4927
|
+
* @memberof mjBizAppsOrdersCheckoutSessionEntity
|
|
4928
|
+
* @method
|
|
4929
|
+
* @override
|
|
4930
|
+
*/
|
|
4931
|
+
async Load(ID, EntityRelationshipsToLoad) {
|
|
4932
|
+
const compositeKey = new CompositeKey();
|
|
4933
|
+
compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
|
|
4934
|
+
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
4935
|
+
}
|
|
4936
|
+
/**
|
|
4937
|
+
* * Field Name: ID
|
|
4938
|
+
* * Display Name: ID
|
|
4939
|
+
* * SQL Data Type: uniqueidentifier
|
|
4940
|
+
* * Default Value: newsequentialid()
|
|
4941
|
+
*/
|
|
4942
|
+
get ID() {
|
|
4943
|
+
return this.Get('ID');
|
|
4944
|
+
}
|
|
4945
|
+
set ID(value) {
|
|
4946
|
+
this.Set('ID', value);
|
|
4947
|
+
}
|
|
4948
|
+
/**
|
|
4949
|
+
* * Field Name: CheckoutWidgetID
|
|
4950
|
+
* * Display Name: Checkout Widget ID
|
|
4951
|
+
* * SQL Data Type: uniqueidentifier
|
|
4952
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widgets (vwCheckoutWidgets.ID)
|
|
4953
|
+
*/
|
|
4954
|
+
get CheckoutWidgetID() {
|
|
4955
|
+
return this.Get('CheckoutWidgetID');
|
|
4956
|
+
}
|
|
4957
|
+
set CheckoutWidgetID(value) {
|
|
4958
|
+
this.Set('CheckoutWidgetID', value);
|
|
4959
|
+
}
|
|
4960
|
+
/**
|
|
4961
|
+
* * Field Name: DistributionID
|
|
4962
|
+
* * Display Name: Distribution ID
|
|
4963
|
+
* * SQL Data Type: uniqueidentifier
|
|
4964
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widget Distributions (vwCheckoutWidgetDistributions.ID)
|
|
4965
|
+
*/
|
|
4966
|
+
get DistributionID() {
|
|
4967
|
+
return this.Get('DistributionID');
|
|
4968
|
+
}
|
|
4969
|
+
set DistributionID(value) {
|
|
4970
|
+
this.Set('DistributionID', value);
|
|
4971
|
+
}
|
|
4972
|
+
/**
|
|
4973
|
+
* * Field Name: ClientSessionKey
|
|
4974
|
+
* * Display Name: Client Session Key
|
|
4975
|
+
* * SQL Data Type: nvarchar(100)
|
|
4976
|
+
*/
|
|
4977
|
+
get ClientSessionKey() {
|
|
4978
|
+
return this.Get('ClientSessionKey');
|
|
4979
|
+
}
|
|
4980
|
+
set ClientSessionKey(value) {
|
|
4981
|
+
this.Set('ClientSessionKey', value);
|
|
4982
|
+
}
|
|
4983
|
+
/**
|
|
4984
|
+
* * Field Name: Email
|
|
4985
|
+
* * Display Name: Email
|
|
4986
|
+
* * SQL Data Type: nvarchar(255)
|
|
4987
|
+
*/
|
|
4988
|
+
get Email() {
|
|
4989
|
+
return this.Get('Email');
|
|
4990
|
+
}
|
|
4991
|
+
set Email(value) {
|
|
4992
|
+
this.Set('Email', value);
|
|
4993
|
+
}
|
|
4994
|
+
/**
|
|
4995
|
+
* * Field Name: PersonID
|
|
4996
|
+
* * Display Name: Person ID
|
|
4997
|
+
* * SQL Data Type: uniqueidentifier
|
|
4998
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)
|
|
4999
|
+
*/
|
|
5000
|
+
get PersonID() {
|
|
5001
|
+
return this.Get('PersonID');
|
|
5002
|
+
}
|
|
5003
|
+
set PersonID(value) {
|
|
5004
|
+
this.Set('PersonID', value);
|
|
5005
|
+
}
|
|
5006
|
+
/**
|
|
5007
|
+
* * Field Name: DraftOrderID
|
|
5008
|
+
* * Display Name: Draft Order ID
|
|
5009
|
+
* * SQL Data Type: uniqueidentifier
|
|
5010
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
5011
|
+
*/
|
|
5012
|
+
get DraftOrderID() {
|
|
5013
|
+
return this.Get('DraftOrderID');
|
|
5014
|
+
}
|
|
5015
|
+
set DraftOrderID(value) {
|
|
5016
|
+
this.Set('DraftOrderID', value);
|
|
5017
|
+
}
|
|
5018
|
+
/**
|
|
5019
|
+
* * Field Name: PaymentIntentID
|
|
5020
|
+
* * Display Name: Payment Intent ID
|
|
5021
|
+
* * SQL Data Type: uniqueidentifier
|
|
5022
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Intents (vwPaymentIntents.ID)
|
|
5023
|
+
*/
|
|
5024
|
+
get PaymentIntentID() {
|
|
5025
|
+
return this.Get('PaymentIntentID');
|
|
5026
|
+
}
|
|
5027
|
+
set PaymentIntentID(value) {
|
|
5028
|
+
this.Set('PaymentIntentID', value);
|
|
5029
|
+
}
|
|
5030
|
+
/**
|
|
5031
|
+
* * Field Name: Status
|
|
5032
|
+
* * Display Name: Status
|
|
5033
|
+
* * SQL Data Type: nvarchar(20)
|
|
5034
|
+
* * Default Value: Open
|
|
5035
|
+
* * Value List Type: List
|
|
5036
|
+
* * Possible Values
|
|
5037
|
+
* * Abandoned
|
|
5038
|
+
* * Confirmed
|
|
5039
|
+
* * Expired
|
|
5040
|
+
* * Open
|
|
5041
|
+
* * Processing
|
|
5042
|
+
*/
|
|
5043
|
+
get Status() {
|
|
5044
|
+
return this.Get('Status');
|
|
5045
|
+
}
|
|
5046
|
+
set Status(value) {
|
|
5047
|
+
this.Set('Status', value);
|
|
5048
|
+
}
|
|
5049
|
+
/**
|
|
5050
|
+
* * Field Name: ExpiresAt
|
|
5051
|
+
* * Display Name: Expires At
|
|
5052
|
+
* * SQL Data Type: datetimeoffset
|
|
5053
|
+
*/
|
|
5054
|
+
get ExpiresAt() {
|
|
5055
|
+
return this.Get('ExpiresAt');
|
|
5056
|
+
}
|
|
5057
|
+
set ExpiresAt(value) {
|
|
5058
|
+
this.Set('ExpiresAt', value);
|
|
5059
|
+
}
|
|
5060
|
+
/**
|
|
5061
|
+
* * Field Name: MetadataJSON
|
|
5062
|
+
* * Display Name: Metadata JSON
|
|
5063
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
5064
|
+
*/
|
|
5065
|
+
get MetadataJSON() {
|
|
5066
|
+
return this.Get('MetadataJSON');
|
|
5067
|
+
}
|
|
5068
|
+
set MetadataJSON(value) {
|
|
5069
|
+
this.Set('MetadataJSON', value);
|
|
5070
|
+
}
|
|
5071
|
+
/**
|
|
5072
|
+
* * Field Name: __mj_CreatedAt
|
|
5073
|
+
* * Display Name: Created At
|
|
5074
|
+
* * SQL Data Type: datetimeoffset
|
|
5075
|
+
* * Default Value: getutcdate()
|
|
5076
|
+
*/
|
|
5077
|
+
get __mj_CreatedAt() {
|
|
5078
|
+
return this.Get('__mj_CreatedAt');
|
|
5079
|
+
}
|
|
5080
|
+
/**
|
|
5081
|
+
* * Field Name: __mj_UpdatedAt
|
|
5082
|
+
* * Display Name: Updated At
|
|
5083
|
+
* * SQL Data Type: datetimeoffset
|
|
5084
|
+
* * Default Value: getutcdate()
|
|
5085
|
+
*/
|
|
5086
|
+
get __mj_UpdatedAt() {
|
|
5087
|
+
return this.Get('__mj_UpdatedAt');
|
|
5088
|
+
}
|
|
5089
|
+
/**
|
|
5090
|
+
* * Field Name: CheckoutWidget
|
|
5091
|
+
* * Display Name: Checkout Widget
|
|
5092
|
+
* * SQL Data Type: nvarchar(100)
|
|
5093
|
+
*/
|
|
5094
|
+
get CheckoutWidget() {
|
|
5095
|
+
return this.Get('CheckoutWidget');
|
|
5096
|
+
}
|
|
5097
|
+
/**
|
|
5098
|
+
* * Field Name: Distribution
|
|
5099
|
+
* * Display Name: Distribution
|
|
5100
|
+
* * SQL Data Type: nvarchar(255)
|
|
5101
|
+
*/
|
|
5102
|
+
get Distribution() {
|
|
5103
|
+
return this.Get('Distribution');
|
|
5104
|
+
}
|
|
5105
|
+
/**
|
|
5106
|
+
* * Field Name: Person
|
|
5107
|
+
* * Display Name: Person
|
|
5108
|
+
* * SQL Data Type: nvarchar(201)
|
|
5109
|
+
*/
|
|
5110
|
+
get Person() {
|
|
5111
|
+
return this.Get('Person');
|
|
5112
|
+
}
|
|
5113
|
+
/**
|
|
5114
|
+
* * Field Name: DraftOrder
|
|
5115
|
+
* * Display Name: Draft Order
|
|
5116
|
+
* * SQL Data Type: nvarchar(40)
|
|
5117
|
+
*/
|
|
5118
|
+
get DraftOrder() {
|
|
5119
|
+
return this.Get('DraftOrder');
|
|
5120
|
+
}
|
|
5121
|
+
/**
|
|
5122
|
+
* * Field Name: PaymentIntent
|
|
5123
|
+
* * Display Name: Payment Intent
|
|
5124
|
+
* * SQL Data Type: nvarchar(100)
|
|
5125
|
+
*/
|
|
5126
|
+
get PaymentIntent() {
|
|
5127
|
+
return this.Get('PaymentIntent');
|
|
5128
|
+
}
|
|
5129
|
+
};
|
|
5130
|
+
mjBizAppsOrdersCheckoutSessionEntity = __decorate([
|
|
5131
|
+
RegisterClass(BaseEntity, 'MJ_BizApps_Orders: Checkout Sessions')
|
|
5132
|
+
], mjBizAppsOrdersCheckoutSessionEntity);
|
|
5133
|
+
export { mjBizAppsOrdersCheckoutSessionEntity };
|
|
5134
|
+
/**
|
|
5135
|
+
* MJ_BizApps_Orders: Checkout Widget Distributions - strongly typed entity sub-class
|
|
5136
|
+
* * Schema: __mj_BizAppsOrders
|
|
5137
|
+
* * Base Table: CheckoutWidgetDistribution
|
|
5138
|
+
* * Base View: vwCheckoutWidgetDistributions
|
|
5139
|
+
* * @description Public distribution endpoint for a CheckoutWidget, wrapping an anonymous scoped magic link invite and vanity slug with instant revocation capability.
|
|
5140
|
+
* * Primary Key: ID
|
|
5141
|
+
* @extends {BaseEntity}
|
|
5142
|
+
* @class
|
|
5143
|
+
* @public
|
|
5144
|
+
*/
|
|
5145
|
+
let mjBizAppsOrdersCheckoutWidgetDistributionEntity = class mjBizAppsOrdersCheckoutWidgetDistributionEntity extends BaseEntity {
|
|
5146
|
+
/**
|
|
5147
|
+
* Loads the MJ_BizApps_Orders: Checkout Widget Distributions record from the database
|
|
5148
|
+
* @param ID: string - primary key value to load the MJ_BizApps_Orders: Checkout Widget Distributions record.
|
|
5149
|
+
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
5150
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
5151
|
+
* @public
|
|
5152
|
+
* @async
|
|
5153
|
+
* @memberof mjBizAppsOrdersCheckoutWidgetDistributionEntity
|
|
5154
|
+
* @method
|
|
5155
|
+
* @override
|
|
5156
|
+
*/
|
|
5157
|
+
async Load(ID, EntityRelationshipsToLoad) {
|
|
5158
|
+
const compositeKey = new CompositeKey();
|
|
5159
|
+
compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
|
|
5160
|
+
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
5161
|
+
}
|
|
5162
|
+
/**
|
|
5163
|
+
* * Field Name: ID
|
|
5164
|
+
* * Display Name: ID
|
|
5165
|
+
* * SQL Data Type: uniqueidentifier
|
|
5166
|
+
* * Default Value: newsequentialid()
|
|
5167
|
+
*/
|
|
5168
|
+
get ID() {
|
|
5169
|
+
return this.Get('ID');
|
|
5170
|
+
}
|
|
5171
|
+
set ID(value) {
|
|
5172
|
+
this.Set('ID', value);
|
|
5173
|
+
}
|
|
5174
|
+
/**
|
|
5175
|
+
* * Field Name: CheckoutWidgetID
|
|
5176
|
+
* * Display Name: Checkout Widget
|
|
5177
|
+
* * SQL Data Type: uniqueidentifier
|
|
5178
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widgets (vwCheckoutWidgets.ID)
|
|
5179
|
+
*/
|
|
5180
|
+
get CheckoutWidgetID() {
|
|
5181
|
+
return this.Get('CheckoutWidgetID');
|
|
5182
|
+
}
|
|
5183
|
+
set CheckoutWidgetID(value) {
|
|
5184
|
+
this.Set('CheckoutWidgetID', value);
|
|
5185
|
+
}
|
|
5186
|
+
/**
|
|
5187
|
+
* * Field Name: Slug
|
|
5188
|
+
* * Display Name: Vanity Slug
|
|
5189
|
+
* * SQL Data Type: nvarchar(255)
|
|
5190
|
+
*/
|
|
5191
|
+
get Slug() {
|
|
5192
|
+
return this.Get('Slug');
|
|
5193
|
+
}
|
|
5194
|
+
set Slug(value) {
|
|
5195
|
+
this.Set('Slug', value);
|
|
5196
|
+
}
|
|
5197
|
+
/**
|
|
5198
|
+
* * Field Name: MagicLinkInviteID
|
|
5199
|
+
* * Display Name: Magic Link Invite
|
|
5200
|
+
* * SQL Data Type: uniqueidentifier
|
|
5201
|
+
* * Related Entity/Foreign Key: MJ: Magic Link Invites (vwMagicLinkInvites.ID)
|
|
5202
|
+
*/
|
|
5203
|
+
get MagicLinkInviteID() {
|
|
5204
|
+
return this.Get('MagicLinkInviteID');
|
|
5205
|
+
}
|
|
5206
|
+
set MagicLinkInviteID(value) {
|
|
5207
|
+
this.Set('MagicLinkInviteID', value);
|
|
5208
|
+
}
|
|
5209
|
+
/**
|
|
5210
|
+
* * Field Name: Status
|
|
5211
|
+
* * Display Name: Status
|
|
5212
|
+
* * SQL Data Type: nvarchar(20)
|
|
5213
|
+
* * Default Value: Active
|
|
5214
|
+
* * Value List Type: List
|
|
5215
|
+
* * Possible Values
|
|
5216
|
+
* * Active
|
|
5217
|
+
* * Revoked
|
|
5218
|
+
*/
|
|
5219
|
+
get Status() {
|
|
5220
|
+
return this.Get('Status');
|
|
5221
|
+
}
|
|
5222
|
+
set Status(value) {
|
|
5223
|
+
this.Set('Status', value);
|
|
5224
|
+
}
|
|
5225
|
+
/**
|
|
5226
|
+
* * Field Name: RevokedAt
|
|
5227
|
+
* * Display Name: Revoked At
|
|
5228
|
+
* * SQL Data Type: datetimeoffset
|
|
5229
|
+
*/
|
|
5230
|
+
get RevokedAt() {
|
|
5231
|
+
return this.Get('RevokedAt');
|
|
5232
|
+
}
|
|
5233
|
+
set RevokedAt(value) {
|
|
5234
|
+
this.Set('RevokedAt', value);
|
|
5235
|
+
}
|
|
5236
|
+
/**
|
|
5237
|
+
* * Field Name: RevocationReason
|
|
5238
|
+
* * Display Name: Revocation Reason
|
|
5239
|
+
* * SQL Data Type: nvarchar(500)
|
|
5240
|
+
*/
|
|
5241
|
+
get RevocationReason() {
|
|
5242
|
+
return this.Get('RevocationReason');
|
|
5243
|
+
}
|
|
5244
|
+
set RevocationReason(value) {
|
|
5245
|
+
this.Set('RevocationReason', value);
|
|
5246
|
+
}
|
|
5247
|
+
/**
|
|
5248
|
+
* * Field Name: EmbedSnippet
|
|
5249
|
+
* * Display Name: Embed Snippet
|
|
5250
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
5251
|
+
*/
|
|
5252
|
+
get EmbedSnippet() {
|
|
5253
|
+
return this.Get('EmbedSnippet');
|
|
5254
|
+
}
|
|
5255
|
+
set EmbedSnippet(value) {
|
|
5256
|
+
this.Set('EmbedSnippet', value);
|
|
5257
|
+
}
|
|
5258
|
+
/**
|
|
5259
|
+
* * Field Name: __mj_CreatedAt
|
|
5260
|
+
* * Display Name: Created At
|
|
5261
|
+
* * SQL Data Type: datetimeoffset
|
|
5262
|
+
* * Default Value: getutcdate()
|
|
5263
|
+
*/
|
|
5264
|
+
get __mj_CreatedAt() {
|
|
5265
|
+
return this.Get('__mj_CreatedAt');
|
|
5266
|
+
}
|
|
5267
|
+
/**
|
|
5268
|
+
* * Field Name: __mj_UpdatedAt
|
|
5269
|
+
* * Display Name: Updated At
|
|
5270
|
+
* * SQL Data Type: datetimeoffset
|
|
5271
|
+
* * Default Value: getutcdate()
|
|
5272
|
+
*/
|
|
5273
|
+
get __mj_UpdatedAt() {
|
|
5274
|
+
return this.Get('__mj_UpdatedAt');
|
|
5275
|
+
}
|
|
5276
|
+
/**
|
|
5277
|
+
* * Field Name: CheckoutWidget
|
|
5278
|
+
* * Display Name: Checkout Widget Name
|
|
5279
|
+
* * SQL Data Type: nvarchar(100)
|
|
5280
|
+
*/
|
|
5281
|
+
get CheckoutWidget() {
|
|
5282
|
+
return this.Get('CheckoutWidget');
|
|
5283
|
+
}
|
|
5284
|
+
};
|
|
5285
|
+
mjBizAppsOrdersCheckoutWidgetDistributionEntity = __decorate([
|
|
5286
|
+
RegisterClass(BaseEntity, 'MJ_BizApps_Orders: Checkout Widget Distributions')
|
|
5287
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionEntity);
|
|
5288
|
+
export { mjBizAppsOrdersCheckoutWidgetDistributionEntity };
|
|
5289
|
+
/**
|
|
5290
|
+
* MJ_BizApps_Orders: Checkout Widgets - strongly typed entity sub-class
|
|
5291
|
+
* * Schema: __mj_BizAppsOrders
|
|
5292
|
+
* * Base Table: CheckoutWidget
|
|
5293
|
+
* * Base View: vwCheckoutWidgets
|
|
5294
|
+
* * @description Metadata configuration for an embeddable checkout widget instance. Specifies selling company, product lines, layout rules, theme variables, and security policies.
|
|
5295
|
+
* * Primary Key: ID
|
|
5296
|
+
* @extends {BaseEntity}
|
|
5297
|
+
* @class
|
|
5298
|
+
* @public
|
|
5299
|
+
*/
|
|
5300
|
+
let mjBizAppsOrdersCheckoutWidgetEntity = class mjBizAppsOrdersCheckoutWidgetEntity extends BaseEntity {
|
|
5301
|
+
/**
|
|
5302
|
+
* Loads the MJ_BizApps_Orders: Checkout Widgets record from the database
|
|
5303
|
+
* @param ID: string - primary key value to load the MJ_BizApps_Orders: Checkout Widgets record.
|
|
5304
|
+
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
5305
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
5306
|
+
* @public
|
|
5307
|
+
* @async
|
|
5308
|
+
* @memberof mjBizAppsOrdersCheckoutWidgetEntity
|
|
5309
|
+
* @method
|
|
5310
|
+
* @override
|
|
5311
|
+
*/
|
|
5312
|
+
async Load(ID, EntityRelationshipsToLoad) {
|
|
5313
|
+
const compositeKey = new CompositeKey();
|
|
5314
|
+
compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
|
|
5315
|
+
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
5316
|
+
}
|
|
5317
|
+
/**
|
|
5318
|
+
* * Field Name: ID
|
|
5319
|
+
* * Display Name: ID
|
|
5320
|
+
* * SQL Data Type: uniqueidentifier
|
|
5321
|
+
* * Default Value: newsequentialid()
|
|
5322
|
+
*/
|
|
5323
|
+
get ID() {
|
|
5324
|
+
return this.Get('ID');
|
|
5325
|
+
}
|
|
5326
|
+
set ID(value) {
|
|
5327
|
+
this.Set('ID', value);
|
|
4547
5328
|
}
|
|
4548
5329
|
/**
|
|
4549
5330
|
* * Field Name: Name
|
|
4550
5331
|
* * Display Name: Name
|
|
4551
|
-
* * SQL Data Type: nvarchar(
|
|
5332
|
+
* * SQL Data Type: nvarchar(100)
|
|
4552
5333
|
*/
|
|
4553
5334
|
get Name() {
|
|
4554
5335
|
return this.Get('Name');
|
|
@@ -4568,80 +5349,66 @@ let mjBizAppsOrdersChargeTypeEntity = class mjBizAppsOrdersChargeTypeEntity exte
|
|
|
4568
5349
|
this.Set('Description', value);
|
|
4569
5350
|
}
|
|
4570
5351
|
/**
|
|
4571
|
-
* * Field Name:
|
|
4572
|
-
* * Display Name:
|
|
4573
|
-
* * SQL Data Type:
|
|
4574
|
-
* *
|
|
4575
|
-
* * Possible Values
|
|
4576
|
-
* * Fee
|
|
4577
|
-
* * Handling
|
|
4578
|
-
* * Shipping
|
|
4579
|
-
* * Surcharge
|
|
4580
|
-
* * Tax
|
|
4581
|
-
* * Description: Shipping | Handling | Tax | Surcharge | Fee.
|
|
5352
|
+
* * Field Name: CompanyID
|
|
5353
|
+
* * Display Name: Company ID
|
|
5354
|
+
* * SQL Data Type: uniqueidentifier
|
|
5355
|
+
* * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)
|
|
4582
5356
|
*/
|
|
4583
|
-
get
|
|
4584
|
-
return this.Get('
|
|
5357
|
+
get CompanyID() {
|
|
5358
|
+
return this.Get('CompanyID');
|
|
4585
5359
|
}
|
|
4586
|
-
set
|
|
4587
|
-
this.Set('
|
|
5360
|
+
set CompanyID(value) {
|
|
5361
|
+
this.Set('CompanyID', value);
|
|
4588
5362
|
}
|
|
4589
5363
|
/**
|
|
4590
|
-
* * Field Name:
|
|
4591
|
-
* * Display Name:
|
|
4592
|
-
* * SQL Data Type: nvarchar(
|
|
4593
|
-
* * Default Value:
|
|
5364
|
+
* * Field Name: Status
|
|
5365
|
+
* * Display Name: Status
|
|
5366
|
+
* * SQL Data Type: nvarchar(20)
|
|
5367
|
+
* * Default Value: Draft
|
|
4594
5368
|
* * Value List Type: List
|
|
4595
5369
|
* * Possible Values
|
|
4596
|
-
* *
|
|
4597
|
-
* *
|
|
4598
|
-
* *
|
|
4599
|
-
* * OrderNet
|
|
4600
|
-
* * Description: What the charge computes on: LineNet (the discounted line), LineNetPlusCharges (after earlier charges in sequence), OrderNet, or Flat. This is the field that makes tax-on-shipping work, which is jurisdiction-dependent and therefore configuration rather than code.
|
|
5370
|
+
* * Active
|
|
5371
|
+
* * Disabled
|
|
5372
|
+
* * Draft
|
|
4601
5373
|
*/
|
|
4602
|
-
get
|
|
4603
|
-
return this.Get('
|
|
5374
|
+
get Status() {
|
|
5375
|
+
return this.Get('Status');
|
|
4604
5376
|
}
|
|
4605
|
-
set
|
|
4606
|
-
this.Set('
|
|
5377
|
+
set Status(value) {
|
|
5378
|
+
this.Set('Status', value);
|
|
4607
5379
|
}
|
|
4608
5380
|
/**
|
|
4609
|
-
* * Field Name:
|
|
4610
|
-
* * Display Name:
|
|
4611
|
-
* * SQL Data Type:
|
|
4612
|
-
* * Default Value: 0
|
|
4613
|
-
* * Description: Application order. Charges compute in this order and later ones may build on earlier ones via Basis.
|
|
5381
|
+
* * Field Name: Configuration
|
|
5382
|
+
* * Display Name: Configuration
|
|
5383
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
4614
5384
|
*/
|
|
4615
|
-
get
|
|
4616
|
-
return this.Get('
|
|
5385
|
+
get Configuration() {
|
|
5386
|
+
return this.Get('Configuration');
|
|
4617
5387
|
}
|
|
4618
|
-
set
|
|
4619
|
-
this.Set('
|
|
5388
|
+
set Configuration(value) {
|
|
5389
|
+
this.Set('Configuration', value);
|
|
4620
5390
|
}
|
|
4621
5391
|
/**
|
|
4622
|
-
* * Field Name:
|
|
4623
|
-
* * Display Name:
|
|
4624
|
-
* * SQL Data Type:
|
|
4625
|
-
* * Default Value: 1
|
|
4626
|
-
* * Description: Whether a human may override a computed charge of this type.
|
|
5392
|
+
* * Field Name: CustomCSS
|
|
5393
|
+
* * Display Name: Custom CSS
|
|
5394
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
4627
5395
|
*/
|
|
4628
|
-
get
|
|
4629
|
-
return this.Get('
|
|
5396
|
+
get CustomCSS() {
|
|
5397
|
+
return this.Get('CustomCSS');
|
|
4630
5398
|
}
|
|
4631
|
-
set
|
|
4632
|
-
this.Set('
|
|
5399
|
+
set CustomCSS(value) {
|
|
5400
|
+
this.Set('CustomCSS', value);
|
|
4633
5401
|
}
|
|
4634
5402
|
/**
|
|
4635
|
-
* * Field Name:
|
|
4636
|
-
* * Display Name:
|
|
4637
|
-
* * SQL Data Type:
|
|
4638
|
-
* * Default Value: 1
|
|
5403
|
+
* * Field Name: CustomJS
|
|
5404
|
+
* * Display Name: Custom JavaScript
|
|
5405
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
4639
5406
|
*/
|
|
4640
|
-
get
|
|
4641
|
-
return this.Get('
|
|
5407
|
+
get CustomJS() {
|
|
5408
|
+
return this.Get('CustomJS');
|
|
4642
5409
|
}
|
|
4643
|
-
set
|
|
4644
|
-
this.Set('
|
|
5410
|
+
set CustomJS(value) {
|
|
5411
|
+
this.Set('CustomJS', value);
|
|
4645
5412
|
}
|
|
4646
5413
|
/**
|
|
4647
5414
|
* * Field Name: __mj_CreatedAt
|
|
@@ -4661,11 +5428,19 @@ let mjBizAppsOrdersChargeTypeEntity = class mjBizAppsOrdersChargeTypeEntity exte
|
|
|
4661
5428
|
get __mj_UpdatedAt() {
|
|
4662
5429
|
return this.Get('__mj_UpdatedAt');
|
|
4663
5430
|
}
|
|
5431
|
+
/**
|
|
5432
|
+
* * Field Name: Company
|
|
5433
|
+
* * Display Name: Company
|
|
5434
|
+
* * SQL Data Type: nvarchar(50)
|
|
5435
|
+
*/
|
|
5436
|
+
get Company() {
|
|
5437
|
+
return this.Get('Company');
|
|
5438
|
+
}
|
|
4664
5439
|
};
|
|
4665
|
-
|
|
4666
|
-
RegisterClass(BaseEntity, 'MJ_BizApps_Orders:
|
|
4667
|
-
],
|
|
4668
|
-
export {
|
|
5440
|
+
mjBizAppsOrdersCheckoutWidgetEntity = __decorate([
|
|
5441
|
+
RegisterClass(BaseEntity, 'MJ_BizApps_Orders: Checkout Widgets')
|
|
5442
|
+
], mjBizAppsOrdersCheckoutWidgetEntity);
|
|
5443
|
+
export { mjBizAppsOrdersCheckoutWidgetEntity };
|
|
4669
5444
|
/**
|
|
4670
5445
|
* MJ_BizApps_Orders: Customer Payment Methods - strongly typed entity sub-class
|
|
4671
5446
|
* * Schema: __mj_BizAppsOrders
|
|
@@ -4719,26 +5494,26 @@ let mjBizAppsOrdersCustomerPaymentMethodEntity = class mjBizAppsOrdersCustomerPa
|
|
|
4719
5494
|
}
|
|
4720
5495
|
/**
|
|
4721
5496
|
* Validate() method override for MJ_BizApps_Orders: Customer Payment Methods entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
4722
|
-
* * Table-Level:
|
|
5497
|
+
* * Table-Level: An owner must be assigned to this record. You must provide either an Owner Person or an Owner Organization.
|
|
4723
5498
|
* @public
|
|
4724
5499
|
* @method
|
|
4725
5500
|
* @override
|
|
4726
5501
|
*/
|
|
4727
5502
|
Validate() {
|
|
4728
5503
|
const result = super.Validate();
|
|
4729
|
-
this.
|
|
5504
|
+
this.ValidateAtLeastOneOwnerRequired(result);
|
|
4730
5505
|
result.Success = result.Success && (result.Errors.length === 0);
|
|
4731
5506
|
return result;
|
|
4732
5507
|
}
|
|
4733
5508
|
/**
|
|
4734
|
-
*
|
|
5509
|
+
* An owner must be assigned to this record. You must provide either an Owner Person or an Owner Organization.
|
|
4735
5510
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
4736
5511
|
* @public
|
|
4737
5512
|
* @method
|
|
4738
5513
|
*/
|
|
4739
|
-
|
|
5514
|
+
ValidateAtLeastOneOwnerRequired(result) {
|
|
4740
5515
|
if (this.OwnerPersonID == null && this.OwnerOrganizationID == null) {
|
|
4741
|
-
result.Errors.push(new ValidationErrorInfo("OwnerPersonID", "An owner must be specified. Please provide either an Owner Person or an Owner Organization.",
|
|
5516
|
+
result.Errors.push(new ValidationErrorInfo("OwnerPersonID", "An owner must be specified. Please provide either an Owner Person or an Owner Organization.", this.OwnerPersonID, ValidationErrorType.Failure));
|
|
4742
5517
|
}
|
|
4743
5518
|
}
|
|
4744
5519
|
/**
|
|
@@ -4903,7 +5678,7 @@ let mjBizAppsOrdersCustomerPaymentTermsEntity = class mjBizAppsOrdersCustomerPay
|
|
|
4903
5678
|
}
|
|
4904
5679
|
/**
|
|
4905
5680
|
* Validate() method override for MJ_BizApps_Orders: Customer Payment Terms entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
4906
|
-
* * Table-Level: The end date must be after the start date when both
|
|
5681
|
+
* * Table-Level: The end date and time must be after the start date and time when both are provided.
|
|
4907
5682
|
* * Table-Level: Each record must be associated with either an Organization or a Person, but not both. One of these associations is required to ensure proper ownership.
|
|
4908
5683
|
* @public
|
|
4909
5684
|
* @method
|
|
@@ -4917,17 +5692,15 @@ let mjBizAppsOrdersCustomerPaymentTermsEntity = class mjBizAppsOrdersCustomerPay
|
|
|
4917
5692
|
return result;
|
|
4918
5693
|
}
|
|
4919
5694
|
/**
|
|
4920
|
-
* The end date must be after the start date when both
|
|
5695
|
+
* The end date and time must be after the start date and time when both are provided.
|
|
4921
5696
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
4922
5697
|
* @public
|
|
4923
5698
|
* @method
|
|
4924
5699
|
*/
|
|
4925
5700
|
ValidateEndedAtAfterStartedAt(result) {
|
|
4926
5701
|
if (this.StartedAt != null && this.EndedAt != null) {
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
if (end <= start) {
|
|
4930
|
-
result.Errors.push(new ValidationErrorInfo("EndedAt", "The end date must be after the start date.", this.EndedAt, ValidationErrorType.Failure));
|
|
5702
|
+
if (this.EndedAt <= this.StartedAt) {
|
|
5703
|
+
result.Errors.push(new ValidationErrorInfo("EndedAt", "The end date and time must be after the start date and time.", this.EndedAt, ValidationErrorType.Failure));
|
|
4931
5704
|
}
|
|
4932
5705
|
}
|
|
4933
5706
|
}
|
|
@@ -5380,7 +6153,7 @@ let mjBizAppsOrdersEntitlementGrantEntity = class mjBizAppsOrdersEntitlementGran
|
|
|
5380
6153
|
}
|
|
5381
6154
|
/**
|
|
5382
6155
|
* Validate() method override for MJ_BizApps_Orders: Entitlement Grants entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
5383
|
-
* * Table-Level:
|
|
6156
|
+
* * Table-Level: If an entitlement's status is 'Revoked', a revocation date must be provided. Conversely, if the status is not 'Revoked', the revocation date must be empty.
|
|
5384
6157
|
* * Table-Level: The validity end date must be on or after the validity start date if both dates are specified.
|
|
5385
6158
|
* @public
|
|
5386
6159
|
* @method
|
|
@@ -5388,23 +6161,23 @@ let mjBizAppsOrdersEntitlementGrantEntity = class mjBizAppsOrdersEntitlementGran
|
|
|
5388
6161
|
*/
|
|
5389
6162
|
Validate() {
|
|
5390
6163
|
const result = super.Validate();
|
|
5391
|
-
this.
|
|
6164
|
+
this.ValidateRevokedAtBasedOnStatus(result);
|
|
5392
6165
|
this.ValidateValidToAfterOrEqualValidFrom(result);
|
|
5393
6166
|
result.Success = result.Success && (result.Errors.length === 0);
|
|
5394
6167
|
return result;
|
|
5395
6168
|
}
|
|
5396
6169
|
/**
|
|
5397
|
-
*
|
|
6170
|
+
* If an entitlement's status is 'Revoked', a revocation date must be provided. Conversely, if the status is not 'Revoked', the revocation date must be empty.
|
|
5398
6171
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
5399
6172
|
* @public
|
|
5400
6173
|
* @method
|
|
5401
6174
|
*/
|
|
5402
|
-
|
|
6175
|
+
ValidateRevokedAtBasedOnStatus(result) {
|
|
5403
6176
|
if (this.Status === "Revoked" && this.RevokedAt == null) {
|
|
5404
6177
|
result.Errors.push(new ValidationErrorInfo("RevokedAt", "A revocation date (RevokedAt) must be provided when the status is 'Revoked'.", this.RevokedAt, ValidationErrorType.Failure));
|
|
5405
6178
|
}
|
|
5406
6179
|
else if (this.Status !== "Revoked" && this.RevokedAt != null) {
|
|
5407
|
-
result.Errors.push(new ValidationErrorInfo("RevokedAt", "A revocation date (RevokedAt)
|
|
6180
|
+
result.Errors.push(new ValidationErrorInfo("RevokedAt", "A revocation date (RevokedAt) cannot be set unless the status is 'Revoked'.", this.RevokedAt, ValidationErrorType.Failure));
|
|
5408
6181
|
}
|
|
5409
6182
|
}
|
|
5410
6183
|
/**
|
|
@@ -5711,7 +6484,7 @@ let mjBizAppsOrdersEventOrderLineEntity = class mjBizAppsOrdersEventOrderLineEnt
|
|
|
5711
6484
|
}
|
|
5712
6485
|
/**
|
|
5713
6486
|
* * Field Name: CheckInAt
|
|
5714
|
-
* * Display Name: Check-In
|
|
6487
|
+
* * Display Name: Check-In Time
|
|
5715
6488
|
* * SQL Data Type: datetimeoffset
|
|
5716
6489
|
* * Description: UTC timestamp the attendee checked in.
|
|
5717
6490
|
*/
|
|
@@ -5741,7 +6514,7 @@ let mjBizAppsOrdersEventOrderLineEntity = class mjBizAppsOrdersEventOrderLineEnt
|
|
|
5741
6514
|
}
|
|
5742
6515
|
/**
|
|
5743
6516
|
* * Field Name: PersonID
|
|
5744
|
-
* * Display Name:
|
|
6517
|
+
* * Display Name: Person ID
|
|
5745
6518
|
* * SQL Data Type: uniqueidentifier
|
|
5746
6519
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)
|
|
5747
6520
|
* * Description: FK to __mj_BizAppsCommon.Person — the attendee. Required for a new event line; check-in is separate and optional.
|
|
@@ -6126,7 +6899,7 @@ let mjBizAppsOrdersEventOrderLineEntity = class mjBizAppsOrdersEventOrderLineEnt
|
|
|
6126
6899
|
}
|
|
6127
6900
|
/**
|
|
6128
6901
|
* * Field Name: Person
|
|
6129
|
-
* * Display Name:
|
|
6902
|
+
* * Display Name: Person
|
|
6130
6903
|
* * SQL Data Type: nvarchar(201)
|
|
6131
6904
|
*/
|
|
6132
6905
|
get Person() {
|
|
@@ -6167,7 +6940,7 @@ let mjBizAppsOrdersEventProductEntity = class mjBizAppsOrdersEventProductEntity
|
|
|
6167
6940
|
}
|
|
6168
6941
|
/**
|
|
6169
6942
|
* Validate() method override for MJ_BizApps_Orders: Event Products entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
6170
|
-
* * Capacity:
|
|
6943
|
+
* * Capacity: Capacity, if specified, must be greater than zero.
|
|
6171
6944
|
* * Table-Level: The event end date and time must be on or after the event start date and time, if an end date is provided.
|
|
6172
6945
|
* @public
|
|
6173
6946
|
* @method
|
|
@@ -6181,14 +6954,14 @@ let mjBizAppsOrdersEventProductEntity = class mjBizAppsOrdersEventProductEntity
|
|
|
6181
6954
|
return result;
|
|
6182
6955
|
}
|
|
6183
6956
|
/**
|
|
6184
|
-
*
|
|
6957
|
+
* Capacity, if specified, must be greater than zero.
|
|
6185
6958
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
6186
6959
|
* @public
|
|
6187
6960
|
* @method
|
|
6188
6961
|
*/
|
|
6189
6962
|
ValidateCapacityGreaterThanZero(result) {
|
|
6190
6963
|
if (this.Capacity != null && this.Capacity <= 0) {
|
|
6191
|
-
result.Errors.push(new ValidationErrorInfo("Capacity", "Capacity must be greater than
|
|
6964
|
+
result.Errors.push(new ValidationErrorInfo("Capacity", "Capacity must be greater than 0.", this.Capacity, ValidationErrorType.Failure));
|
|
6192
6965
|
}
|
|
6193
6966
|
}
|
|
6194
6967
|
/**
|
|
@@ -6552,7 +7325,7 @@ let mjBizAppsOrdersEventProductEntity = class mjBizAppsOrdersEventProductEntity
|
|
|
6552
7325
|
}
|
|
6553
7326
|
/**
|
|
6554
7327
|
* * Field Name: VenueAddress
|
|
6555
|
-
* * Display Name: Venue Address
|
|
7328
|
+
* * Display Name: Venue Address Details
|
|
6556
7329
|
* * SQL Data Type: nvarchar(255)
|
|
6557
7330
|
*/
|
|
6558
7331
|
get VenueAddress() {
|
|
@@ -6560,7 +7333,7 @@ let mjBizAppsOrdersEventProductEntity = class mjBizAppsOrdersEventProductEntity
|
|
|
6560
7333
|
}
|
|
6561
7334
|
/**
|
|
6562
7335
|
* * Field Name: __mj_Latitude
|
|
6563
|
-
* * Display Name: Latitude
|
|
7336
|
+
* * Display Name: Mj Latitude
|
|
6564
7337
|
* * SQL Data Type: decimal(10, 6)
|
|
6565
7338
|
*/
|
|
6566
7339
|
get __mj_Latitude() {
|
|
@@ -6568,7 +7341,7 @@ let mjBizAppsOrdersEventProductEntity = class mjBizAppsOrdersEventProductEntity
|
|
|
6568
7341
|
}
|
|
6569
7342
|
/**
|
|
6570
7343
|
* * Field Name: __mj_Longitude
|
|
6571
|
-
* * Display Name: Longitude
|
|
7344
|
+
* * Display Name: Mj Longitude
|
|
6572
7345
|
* * SQL Data Type: decimal(10, 6)
|
|
6573
7346
|
*/
|
|
6574
7347
|
get __mj_Longitude() {
|
|
@@ -6708,7 +7481,7 @@ let mjBizAppsOrdersOrderAdjustmentEntity = class mjBizAppsOrdersOrderAdjustmentE
|
|
|
6708
7481
|
/**
|
|
6709
7482
|
* Validate() method override for MJ_BizApps_Orders: Order Adjustments entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
6710
7483
|
* * Amount: The amount must be greater than zero to ensure all entries represent a positive financial value.
|
|
6711
|
-
* * Table-Level: Either a
|
|
7484
|
+
* * Table-Level: Either a Promotion must be selected or a Reason must be provided to explain the adjustment.
|
|
6712
7485
|
* @public
|
|
6713
7486
|
* @method
|
|
6714
7487
|
* @override
|
|
@@ -6732,14 +7505,14 @@ let mjBizAppsOrdersOrderAdjustmentEntity = class mjBizAppsOrdersOrderAdjustmentE
|
|
|
6732
7505
|
}
|
|
6733
7506
|
}
|
|
6734
7507
|
/**
|
|
6735
|
-
* Either a
|
|
7508
|
+
* Either a Promotion must be selected or a Reason must be provided to explain the adjustment.
|
|
6736
7509
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
6737
7510
|
* @public
|
|
6738
7511
|
* @method
|
|
6739
7512
|
*/
|
|
6740
7513
|
ValidatePromotionOrReasonRequired(result) {
|
|
6741
|
-
const hasPromotion = this.PromotionID
|
|
6742
|
-
const hasReason = this.Reason
|
|
7514
|
+
const hasPromotion = this.PromotionID !== null && this.PromotionID !== undefined;
|
|
7515
|
+
const hasReason = this.Reason !== null && this.Reason !== undefined && this.Reason.trim().length > 0;
|
|
6743
7516
|
if (!hasPromotion && !hasReason) {
|
|
6744
7517
|
result.Errors.push(new ValidationErrorInfo("PromotionID", "Either a Promotion must be selected or a Reason must be provided.", this.PromotionID, ValidationErrorType.Failure));
|
|
6745
7518
|
}
|
|
@@ -6796,7 +7569,7 @@ let mjBizAppsOrdersOrderAdjustmentEntity = class mjBizAppsOrdersOrderAdjustmentE
|
|
|
6796
7569
|
}
|
|
6797
7570
|
/**
|
|
6798
7571
|
* * Field Name: PromotionCodeID
|
|
6799
|
-
* * Display Name: Promotion Code
|
|
7572
|
+
* * Display Name: Promotion Code
|
|
6800
7573
|
* * SQL Data Type: uniqueidentifier
|
|
6801
7574
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Promotion Codes (vwPromotionCodes.ID)
|
|
6802
7575
|
*/
|
|
@@ -6937,7 +7710,7 @@ let mjBizAppsOrdersOrderAdjustmentEntity = class mjBizAppsOrdersOrderAdjustmentE
|
|
|
6937
7710
|
}
|
|
6938
7711
|
/**
|
|
6939
7712
|
* * Field Name: PromotionCode
|
|
6940
|
-
* * Display Name: Promotion Code
|
|
7713
|
+
* * Display Name: Promotion Code Name
|
|
6941
7714
|
* * SQL Data Type: nvarchar(60)
|
|
6942
7715
|
*/
|
|
6943
7716
|
get PromotionCode() {
|
|
@@ -7303,7 +8076,7 @@ let mjBizAppsOrdersOrderChargeEntity = class mjBizAppsOrdersOrderChargeEntity ex
|
|
|
7303
8076
|
}
|
|
7304
8077
|
/**
|
|
7305
8078
|
* * Field Name: OrderHeader
|
|
7306
|
-
* * Display Name: Order
|
|
8079
|
+
* * Display Name: Order Header Name
|
|
7307
8080
|
* * SQL Data Type: nvarchar(40)
|
|
7308
8081
|
*/
|
|
7309
8082
|
get OrderHeader() {
|
|
@@ -7420,7 +8193,7 @@ let mjBizAppsOrdersOrderCompanyPolicyEntity = class mjBizAppsOrdersOrderCompanyP
|
|
|
7420
8193
|
}
|
|
7421
8194
|
/**
|
|
7422
8195
|
* * Field Name: DefaultPaymentTermsTypeID
|
|
7423
|
-
* * Display Name: Default Payment Terms
|
|
8196
|
+
* * Display Name: Default Payment Terms
|
|
7424
8197
|
* * SQL Data Type: uniqueidentifier
|
|
7425
8198
|
*/
|
|
7426
8199
|
get DefaultPaymentTermsTypeID() {
|
|
@@ -7619,7 +8392,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7619
8392
|
}
|
|
7620
8393
|
/**
|
|
7621
8394
|
* Validate() method override for MJ_BizApps_Orders: Order Headers entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
7622
|
-
* * InitialPaymentAmount: The initial payment amount must be greater than or equal to zero.
|
|
8395
|
+
* * InitialPaymentAmount: The initial payment amount must be greater than or equal to zero.
|
|
7623
8396
|
* @public
|
|
7624
8397
|
* @method
|
|
7625
8398
|
* @override
|
|
@@ -7631,14 +8404,14 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7631
8404
|
return result;
|
|
7632
8405
|
}
|
|
7633
8406
|
/**
|
|
7634
|
-
* The initial payment amount must be greater than or equal to zero.
|
|
8407
|
+
* The initial payment amount must be greater than or equal to zero.
|
|
7635
8408
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
7636
8409
|
* @public
|
|
7637
8410
|
* @method
|
|
7638
8411
|
*/
|
|
7639
8412
|
ValidateInitialPaymentAmountGreaterThanOrEqualToZero(result) {
|
|
7640
8413
|
if (this.InitialPaymentAmount != null && this.InitialPaymentAmount < 0) {
|
|
7641
|
-
result.Errors.push(new ValidationErrorInfo("InitialPaymentAmount", "Initial payment amount must be greater than or equal to
|
|
8414
|
+
result.Errors.push(new ValidationErrorInfo("InitialPaymentAmount", "Initial payment amount must be greater than or equal to 0.", this.InitialPaymentAmount, ValidationErrorType.Failure));
|
|
7642
8415
|
}
|
|
7643
8416
|
}
|
|
7644
8417
|
/**
|
|
@@ -7706,8 +8479,6 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7706
8479
|
* * Possible Values
|
|
7707
8480
|
* * Confirmed
|
|
7708
8481
|
* * Draft
|
|
7709
|
-
* * Fulfilled
|
|
7710
|
-
* * Posted
|
|
7711
8482
|
* * Quoted
|
|
7712
8483
|
* * Voided
|
|
7713
8484
|
* * Description: Draft | Quoted | Confirmed | Posted | Fulfilled | Voided. Voided is reachable only from Draft/Quoted; the JE fires once on the first Confirmed.
|
|
@@ -7720,7 +8491,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7720
8491
|
}
|
|
7721
8492
|
/**
|
|
7722
8493
|
* * Field Name: CompanyID
|
|
7723
|
-
* * Display Name: Company
|
|
8494
|
+
* * Display Name: Company ID
|
|
7724
8495
|
* * SQL Data Type: uniqueidentifier
|
|
7725
8496
|
* * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)
|
|
7726
8497
|
* * Description: The ORIGINATING/owning company (D6): document, visibility, and sales-attribution anchor (pairs with SalesRepUserID). NEVER used for GL resolution — revenue company is per line via the product's company. FK to __mj.Company.
|
|
@@ -7733,7 +8504,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7733
8504
|
}
|
|
7734
8505
|
/**
|
|
7735
8506
|
* * Field Name: BillToPersonID
|
|
7736
|
-
* * Display Name: Bill To Person
|
|
8507
|
+
* * Display Name: Bill To Person ID
|
|
7737
8508
|
* * SQL Data Type: uniqueidentifier
|
|
7738
8509
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)
|
|
7739
8510
|
*/
|
|
@@ -7745,7 +8516,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7745
8516
|
}
|
|
7746
8517
|
/**
|
|
7747
8518
|
* * Field Name: BillToOrganizationID
|
|
7748
|
-
* * Display Name: Bill To Organization
|
|
8519
|
+
* * Display Name: Bill To Organization ID
|
|
7749
8520
|
* * SQL Data Type: uniqueidentifier
|
|
7750
8521
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Organizations (vwOrganizations.ID)
|
|
7751
8522
|
* * Description: FK to __mj_BizAppsCommon.Organization — the paying organization (D65). Nullable; a personal order names only a person.
|
|
@@ -7758,7 +8529,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7758
8529
|
}
|
|
7759
8530
|
/**
|
|
7760
8531
|
* * Field Name: SalesRepUserID
|
|
7761
|
-
* * Display Name: Sales Rep
|
|
8532
|
+
* * Display Name: Sales Rep User ID
|
|
7762
8533
|
* * SQL Data Type: uniqueidentifier
|
|
7763
8534
|
* * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
|
|
7764
8535
|
*/
|
|
@@ -7770,7 +8541,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7770
8541
|
}
|
|
7771
8542
|
/**
|
|
7772
8543
|
* * Field Name: BillToAddressID
|
|
7773
|
-
* * Display Name:
|
|
8544
|
+
* * Display Name: Bill To Address
|
|
7774
8545
|
* * SQL Data Type: uniqueidentifier
|
|
7775
8546
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Addresses (vwAddresses.ID)
|
|
7776
8547
|
* * Description: FK to __mj_BizAppsCommon.Address — the billing address for this order/invoice. Nullable.
|
|
@@ -7783,7 +8554,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7783
8554
|
}
|
|
7784
8555
|
/**
|
|
7785
8556
|
* * Field Name: ShipToAddressID
|
|
7786
|
-
* * Display Name:
|
|
8557
|
+
* * Display Name: Ship To Address
|
|
7787
8558
|
* * SQL Data Type: uniqueidentifier
|
|
7788
8559
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Addresses (vwAddresses.ID)
|
|
7789
8560
|
* * Description: FK to __mj_BizAppsCommon.Address — the shipping/service address; drives tax jurisdiction when tax lands. Nullable.
|
|
@@ -7796,7 +8567,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7796
8567
|
}
|
|
7797
8568
|
/**
|
|
7798
8569
|
* * Field Name: ShipToOrganizationID
|
|
7799
|
-
* * Display Name: Ship To Organization
|
|
8570
|
+
* * Display Name: Ship To Organization ID
|
|
7800
8571
|
* * SQL Data Type: uniqueidentifier
|
|
7801
8572
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: Organizations (vwOrganizations.ID)
|
|
7802
8573
|
*/
|
|
@@ -7808,7 +8579,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7808
8579
|
}
|
|
7809
8580
|
/**
|
|
7810
8581
|
* * Field Name: ShipToPersonID
|
|
7811
|
-
* * Display Name: Ship To Person
|
|
8582
|
+
* * Display Name: Ship To Person ID
|
|
7812
8583
|
* * SQL Data Type: uniqueidentifier
|
|
7813
8584
|
* * Related Entity/Foreign Key: MJ_BizApps_Common: People (vwPeople.ID)
|
|
7814
8585
|
*/
|
|
@@ -7820,7 +8591,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7820
8591
|
}
|
|
7821
8592
|
/**
|
|
7822
8593
|
* * Field Name: PaymentTermsTypeID
|
|
7823
|
-
* * Display Name: Payment Terms
|
|
8594
|
+
* * Display Name: Payment Terms Type ID
|
|
7824
8595
|
* * SQL Data Type: uniqueidentifier
|
|
7825
8596
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Terms Types (vwPaymentTermsTypes.ID)
|
|
7826
8597
|
*/
|
|
@@ -7880,26 +8651,6 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7880
8651
|
this.Set('DueDate', value);
|
|
7881
8652
|
}
|
|
7882
8653
|
/**
|
|
7883
|
-
* * Field Name: PaymentStatus
|
|
7884
|
-
* * Display Name: Payment Status
|
|
7885
|
-
* * SQL Data Type: nvarchar(20)
|
|
7886
|
-
* * Default Value: Unpaid
|
|
7887
|
-
* * Value List Type: List
|
|
7888
|
-
* * Possible Values
|
|
7889
|
-
* * Overdue
|
|
7890
|
-
* * Paid
|
|
7891
|
-
* * PartiallyPaid
|
|
7892
|
-
* * Unpaid
|
|
7893
|
-
* * WrittenOff
|
|
7894
|
-
* * Description: Unpaid | PartiallyPaid | Paid | Overdue | WrittenOff. Engine-derived from AmountPaid vs TotalGross; Overdue is time-derived in views/UI, WrittenOff is an explicit action.
|
|
7895
|
-
*/
|
|
7896
|
-
get PaymentStatus() {
|
|
7897
|
-
return this.Get('PaymentStatus');
|
|
7898
|
-
}
|
|
7899
|
-
set PaymentStatus(value) {
|
|
7900
|
-
this.Set('PaymentStatus', value);
|
|
7901
|
-
}
|
|
7902
|
-
/**
|
|
7903
8654
|
* * Field Name: ExternalDocumentNumber
|
|
7904
8655
|
* * Display Name: External Document Number
|
|
7905
8656
|
* * SQL Data Type: nvarchar(80)
|
|
@@ -7913,7 +8664,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7913
8664
|
}
|
|
7914
8665
|
/**
|
|
7915
8666
|
* * Field Name: InitialPaymentTypeID
|
|
7916
|
-
* * Display Name: Initial Payment Type
|
|
8667
|
+
* * Display Name: Initial Payment Type ID
|
|
7917
8668
|
* * SQL Data Type: uniqueidentifier
|
|
7918
8669
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Types (vwPaymentTypes.ID)
|
|
7919
8670
|
*/
|
|
@@ -7937,7 +8688,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7937
8688
|
}
|
|
7938
8689
|
/**
|
|
7939
8690
|
* * Field Name: InitialPaymentDetailID
|
|
7940
|
-
* * Display Name: Initial Payment Detail
|
|
8691
|
+
* * Display Name: Initial Payment Detail ID
|
|
7941
8692
|
* * SQL Data Type: uniqueidentifier
|
|
7942
8693
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Details (vwPaymentDetails.ID)
|
|
7943
8694
|
*/
|
|
@@ -7973,7 +8724,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
7973
8724
|
}
|
|
7974
8725
|
/**
|
|
7975
8726
|
* * Field Name: ReversesOrderHeaderID
|
|
7976
|
-
* * Display Name: Reverses Order
|
|
8727
|
+
* * Display Name: Reverses Order Header ID
|
|
7977
8728
|
* * SQL Data Type: uniqueidentifier
|
|
7978
8729
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
7979
8730
|
*/
|
|
@@ -8009,7 +8760,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8009
8760
|
}
|
|
8010
8761
|
/**
|
|
8011
8762
|
* * Field Name: ApprovalTaskID
|
|
8012
|
-
* * Display Name: Approval Task
|
|
8763
|
+
* * Display Name: Approval Task ID
|
|
8013
8764
|
* * SQL Data Type: uniqueidentifier
|
|
8014
8765
|
* * Description: Soft reference (no FK) to the __mj_BizAppsTasks Task raised when a sales rule blocked Confirm (BO-D17). Convenience pointer; Task Links carry the authoritative linkage.
|
|
8015
8766
|
*/
|
|
@@ -8033,7 +8784,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8033
8784
|
}
|
|
8034
8785
|
/**
|
|
8035
8786
|
* * Field Name: Notes
|
|
8036
|
-
* * Display Name: Notes
|
|
8787
|
+
* * Display Name: Internal Notes
|
|
8037
8788
|
* * SQL Data Type: nvarchar(MAX)
|
|
8038
8789
|
* * Description: Internal notes on the order (Description is the customer-facing memo).
|
|
8039
8790
|
*/
|
|
@@ -8074,8 +8825,52 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8074
8825
|
return this.Get('__mj_UpdatedAt');
|
|
8075
8826
|
}
|
|
8076
8827
|
/**
|
|
8828
|
+
* * Field Name: Origin
|
|
8829
|
+
* * Display Name: Origin
|
|
8830
|
+
* * SQL Data Type: nvarchar(50)
|
|
8831
|
+
* * Default Value: Direct
|
|
8832
|
+
*/
|
|
8833
|
+
get Origin() {
|
|
8834
|
+
return this.Get('Origin');
|
|
8835
|
+
}
|
|
8836
|
+
set Origin(value) {
|
|
8837
|
+
this.Set('Origin', value);
|
|
8838
|
+
}
|
|
8839
|
+
/**
|
|
8840
|
+
* * Field Name: SourceCheckoutWidgetID
|
|
8841
|
+
* * Display Name: Source Checkout Widget ID
|
|
8842
|
+
* * SQL Data Type: uniqueidentifier
|
|
8843
|
+
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Checkout Widgets (vwCheckoutWidgets.ID)
|
|
8844
|
+
*/
|
|
8845
|
+
get SourceCheckoutWidgetID() {
|
|
8846
|
+
return this.Get('SourceCheckoutWidgetID');
|
|
8847
|
+
}
|
|
8848
|
+
set SourceCheckoutWidgetID(value) {
|
|
8849
|
+
this.Set('SourceCheckoutWidgetID', value);
|
|
8850
|
+
}
|
|
8851
|
+
/**
|
|
8852
|
+
* * Field Name: FulfillmentStatus
|
|
8853
|
+
* * Display Name: Fulfillment Status
|
|
8854
|
+
* * SQL Data Type: nvarchar(20)
|
|
8855
|
+
* * Default Value: Pending
|
|
8856
|
+
* * Value List Type: List
|
|
8857
|
+
* * Possible Values
|
|
8858
|
+
* * Fulfilled
|
|
8859
|
+
* * NotApplicable
|
|
8860
|
+
* * PartiallyFulfilled
|
|
8861
|
+
* * Pending
|
|
8862
|
+
* * Returned
|
|
8863
|
+
* * Description: Operational fulfillment progress rolled up across order lines: Pending, PartiallyFulfilled, Fulfilled, NotApplicable (no physical goods), or Returned.
|
|
8864
|
+
*/
|
|
8865
|
+
get FulfillmentStatus() {
|
|
8866
|
+
return this.Get('FulfillmentStatus');
|
|
8867
|
+
}
|
|
8868
|
+
set FulfillmentStatus(value) {
|
|
8869
|
+
this.Set('FulfillmentStatus', value);
|
|
8870
|
+
}
|
|
8871
|
+
/**
|
|
8077
8872
|
* * Field Name: Company
|
|
8078
|
-
* * Display Name: Company
|
|
8873
|
+
* * Display Name: Company
|
|
8079
8874
|
* * SQL Data Type: nvarchar(50)
|
|
8080
8875
|
*/
|
|
8081
8876
|
get Company() {
|
|
@@ -8083,7 +8878,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8083
8878
|
}
|
|
8084
8879
|
/**
|
|
8085
8880
|
* * Field Name: BillToPerson
|
|
8086
|
-
* * Display Name: Bill To Person
|
|
8881
|
+
* * Display Name: Bill To Person
|
|
8087
8882
|
* * SQL Data Type: nvarchar(201)
|
|
8088
8883
|
*/
|
|
8089
8884
|
get BillToPerson() {
|
|
@@ -8091,7 +8886,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8091
8886
|
}
|
|
8092
8887
|
/**
|
|
8093
8888
|
* * Field Name: BillToOrganization
|
|
8094
|
-
* * Display Name: Bill To Organization
|
|
8889
|
+
* * Display Name: Bill To Organization
|
|
8095
8890
|
* * SQL Data Type: nvarchar(255)
|
|
8096
8891
|
*/
|
|
8097
8892
|
get BillToOrganization() {
|
|
@@ -8099,7 +8894,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8099
8894
|
}
|
|
8100
8895
|
/**
|
|
8101
8896
|
* * Field Name: SalesRepUser
|
|
8102
|
-
* * Display Name: Sales Rep
|
|
8897
|
+
* * Display Name: Sales Rep User
|
|
8103
8898
|
* * SQL Data Type: nvarchar(100)
|
|
8104
8899
|
*/
|
|
8105
8900
|
get SalesRepUser() {
|
|
@@ -8107,7 +8902,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8107
8902
|
}
|
|
8108
8903
|
/**
|
|
8109
8904
|
* * Field Name: BillToAddress
|
|
8110
|
-
* * Display Name:
|
|
8905
|
+
* * Display Name: Bill To Address Details
|
|
8111
8906
|
* * SQL Data Type: nvarchar(255)
|
|
8112
8907
|
*/
|
|
8113
8908
|
get BillToAddress() {
|
|
@@ -8115,7 +8910,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8115
8910
|
}
|
|
8116
8911
|
/**
|
|
8117
8912
|
* * Field Name: ShipToAddress
|
|
8118
|
-
* * Display Name:
|
|
8913
|
+
* * Display Name: Ship To Address Details
|
|
8119
8914
|
* * SQL Data Type: nvarchar(255)
|
|
8120
8915
|
*/
|
|
8121
8916
|
get ShipToAddress() {
|
|
@@ -8123,7 +8918,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8123
8918
|
}
|
|
8124
8919
|
/**
|
|
8125
8920
|
* * Field Name: ShipToOrganization
|
|
8126
|
-
* * Display Name: Ship To Organization
|
|
8921
|
+
* * Display Name: Ship To Organization
|
|
8127
8922
|
* * SQL Data Type: nvarchar(255)
|
|
8128
8923
|
*/
|
|
8129
8924
|
get ShipToOrganization() {
|
|
@@ -8131,7 +8926,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8131
8926
|
}
|
|
8132
8927
|
/**
|
|
8133
8928
|
* * Field Name: ShipToPerson
|
|
8134
|
-
* * Display Name: Ship To Person
|
|
8929
|
+
* * Display Name: Ship To Person
|
|
8135
8930
|
* * SQL Data Type: nvarchar(201)
|
|
8136
8931
|
*/
|
|
8137
8932
|
get ShipToPerson() {
|
|
@@ -8147,7 +8942,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8147
8942
|
}
|
|
8148
8943
|
/**
|
|
8149
8944
|
* * Field Name: InitialPaymentType
|
|
8150
|
-
* * Display Name: Initial Payment Type
|
|
8945
|
+
* * Display Name: Initial Payment Type
|
|
8151
8946
|
* * SQL Data Type: nvarchar(200)
|
|
8152
8947
|
*/
|
|
8153
8948
|
get InitialPaymentType() {
|
|
@@ -8155,7 +8950,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8155
8950
|
}
|
|
8156
8951
|
/**
|
|
8157
8952
|
* * Field Name: InitialPaymentDetail
|
|
8158
|
-
* * Display Name: Initial Payment Detail
|
|
8953
|
+
* * Display Name: Initial Payment Detail
|
|
8159
8954
|
* * SQL Data Type: char(4)
|
|
8160
8955
|
*/
|
|
8161
8956
|
get InitialPaymentDetail() {
|
|
@@ -8163,7 +8958,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8163
8958
|
}
|
|
8164
8959
|
/**
|
|
8165
8960
|
* * Field Name: PostedByUser
|
|
8166
|
-
* * Display Name: Posted By User
|
|
8961
|
+
* * Display Name: Posted By User Name
|
|
8167
8962
|
* * SQL Data Type: nvarchar(100)
|
|
8168
8963
|
*/
|
|
8169
8964
|
get PostedByUser() {
|
|
@@ -8171,15 +8966,23 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8171
8966
|
}
|
|
8172
8967
|
/**
|
|
8173
8968
|
* * Field Name: ReversesOrderHeader
|
|
8174
|
-
* * Display Name:
|
|
8969
|
+
* * Display Name: Reversed Order Name
|
|
8175
8970
|
* * SQL Data Type: nvarchar(40)
|
|
8176
8971
|
*/
|
|
8177
8972
|
get ReversesOrderHeader() {
|
|
8178
8973
|
return this.Get('ReversesOrderHeader');
|
|
8179
8974
|
}
|
|
8180
8975
|
/**
|
|
8976
|
+
* * Field Name: SourceCheckoutWidget
|
|
8977
|
+
* * Display Name: Source Checkout Widget
|
|
8978
|
+
* * SQL Data Type: nvarchar(100)
|
|
8979
|
+
*/
|
|
8980
|
+
get SourceCheckoutWidget() {
|
|
8981
|
+
return this.Get('SourceCheckoutWidget');
|
|
8982
|
+
}
|
|
8983
|
+
/**
|
|
8181
8984
|
* * Field Name: __mj_Latitude
|
|
8182
|
-
* * Display Name: Latitude
|
|
8985
|
+
* * Display Name: Mj Latitude
|
|
8183
8986
|
* * SQL Data Type: decimal(10, 6)
|
|
8184
8987
|
*/
|
|
8185
8988
|
get __mj_Latitude() {
|
|
@@ -8187,7 +8990,7 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8187
8990
|
}
|
|
8188
8991
|
/**
|
|
8189
8992
|
* * Field Name: __mj_Longitude
|
|
8190
|
-
* * Display Name: Longitude
|
|
8993
|
+
* * Display Name: Mj Longitude
|
|
8191
8994
|
* * SQL Data Type: decimal(10, 6)
|
|
8192
8995
|
*/
|
|
8193
8996
|
get __mj_Longitude() {
|
|
@@ -8201,6 +9004,21 @@ let mjBizAppsOrdersOrderHeaderEntity = class mjBizAppsOrdersOrderHeaderEntity ex
|
|
|
8201
9004
|
get IsOverdue() {
|
|
8202
9005
|
return this.Get('IsOverdue');
|
|
8203
9006
|
}
|
|
9007
|
+
/**
|
|
9008
|
+
* * Field Name: PaymentStatus
|
|
9009
|
+
* * Display Name: Payment Status
|
|
9010
|
+
* * SQL Data Type: nvarchar(13)
|
|
9011
|
+
* * Value List Type: List
|
|
9012
|
+
* * Possible Values
|
|
9013
|
+
* * Overdue
|
|
9014
|
+
* * Paid
|
|
9015
|
+
* * PartiallyPaid
|
|
9016
|
+
* * Unpaid
|
|
9017
|
+
* * WrittenOff
|
|
9018
|
+
*/
|
|
9019
|
+
get PaymentStatus() {
|
|
9020
|
+
return this.Get('PaymentStatus');
|
|
9021
|
+
}
|
|
8204
9022
|
};
|
|
8205
9023
|
mjBizAppsOrdersOrderHeaderEntity = __decorate([
|
|
8206
9024
|
RegisterClass(BaseEntity, 'MJ_BizApps_Orders: Order Headers')
|
|
@@ -8353,26 +9171,26 @@ let mjBizAppsOrdersOrderLinePriceComponentEntity = class mjBizAppsOrdersOrderLin
|
|
|
8353
9171
|
}
|
|
8354
9172
|
/**
|
|
8355
9173
|
* Validate() method override for MJ_BizApps_Orders: Order Line Price Components entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
8356
|
-
* * Table-Level: Both Source Entity ID and Source Record ID must
|
|
9174
|
+
* * Table-Level: Both Source Entity ID and Source Record ID must be provided together, or both must be left blank. You cannot specify one without the other.
|
|
8357
9175
|
* @public
|
|
8358
9176
|
* @method
|
|
8359
9177
|
* @override
|
|
8360
9178
|
*/
|
|
8361
9179
|
Validate() {
|
|
8362
9180
|
const result = super.Validate();
|
|
8363
|
-
this.
|
|
9181
|
+
this.ValidateSourceEntityAndRecordCoexistence(result);
|
|
8364
9182
|
result.Success = result.Success && (result.Errors.length === 0);
|
|
8365
9183
|
return result;
|
|
8366
9184
|
}
|
|
8367
9185
|
/**
|
|
8368
|
-
* Both Source Entity ID and Source Record ID must
|
|
9186
|
+
* Both Source Entity ID and Source Record ID must be provided together, or both must be left blank. You cannot specify one without the other.
|
|
8369
9187
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
8370
9188
|
* @public
|
|
8371
9189
|
* @method
|
|
8372
9190
|
*/
|
|
8373
|
-
|
|
8374
|
-
const hasSourceEntity = this.SourceEntityID != null;
|
|
8375
|
-
const hasSourceRecord = this.SourceRecordID != null;
|
|
9191
|
+
ValidateSourceEntityAndRecordCoexistence(result) {
|
|
9192
|
+
const hasSourceEntity = this.SourceEntityID != null && this.SourceEntityID !== "";
|
|
9193
|
+
const hasSourceRecord = this.SourceRecordID != null && this.SourceRecordID !== "";
|
|
8376
9194
|
if (hasSourceEntity !== hasSourceRecord) {
|
|
8377
9195
|
result.Errors.push(new ValidationErrorInfo("SourceEntityID", "Both Source Entity ID and Source Record ID must be provided together, or both must be left blank.", this.SourceEntityID, ValidationErrorType.Failure));
|
|
8378
9196
|
}
|
|
@@ -8552,14 +9370,13 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
8552
9370
|
}
|
|
8553
9371
|
/**
|
|
8554
9372
|
* Validate() method override for MJ_BizApps_Orders: Order Lines entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
8555
|
-
* * DiscountAmount:
|
|
9373
|
+
* * DiscountAmount: The discount amount must be greater than or equal to zero to prevent negative discounts from being applied.
|
|
8556
9374
|
* * DiscountPct: Discount percentage must be a value between 0 and 1 (inclusive), representing a range of 0% to 100%.
|
|
8557
9375
|
* * Quantity: The quantity specified for the line item must not be zero.
|
|
8558
9376
|
* * UnitPrice: The unit price for any item must be zero or greater. Negative prices are not allowed.
|
|
8559
9377
|
* * Table-Level: An order line cannot be its own parent. If a parent order line is specified, it must refer to a different order line.
|
|
8560
9378
|
* * Table-Level: If an order line's quantity is marked as overridden, it must be associated with a parent order line.
|
|
8561
|
-
* * Table-Level:
|
|
8562
|
-
* * Table-Level: If an order line is a rollup parent, its discount, charge, and tax amounts must all be zero.
|
|
9379
|
+
* * Table-Level: For rollup parent order lines, the discount amount, charge amount, and line tax must all be zero to ensure proper financial aggregation.
|
|
8563
9380
|
* * Table-Level: If both the service period start and end dates are provided, the end date must be on or after the start date.
|
|
8564
9381
|
* @public
|
|
8565
9382
|
* @method
|
|
@@ -8567,27 +9384,26 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
8567
9384
|
*/
|
|
8568
9385
|
Validate() {
|
|
8569
9386
|
const result = super.Validate();
|
|
8570
|
-
this.
|
|
9387
|
+
this.ValidateDiscountAmountGreaterThanOrEqualToZero(result);
|
|
8571
9388
|
this.ValidateDiscountPctRange(result);
|
|
8572
9389
|
this.ValidateQuantityNotZero(result);
|
|
8573
9390
|
this.ValidateUnitPriceIsNonNegative(result);
|
|
8574
9391
|
this.ValidateParentOrderLineIDNotEqualToID(result);
|
|
8575
9392
|
this.ValidateParentOrderLineRequiredWhenQuantityOverridden(result);
|
|
8576
|
-
this.
|
|
8577
|
-
this.ValidateRollupParentAmountsAreZero(result);
|
|
9393
|
+
this.ValidateRollupParentAmounts(result);
|
|
8578
9394
|
this.ValidateServicePeriodEndAfterStart(result);
|
|
8579
9395
|
result.Success = result.Success && (result.Errors.length === 0);
|
|
8580
9396
|
return result;
|
|
8581
9397
|
}
|
|
8582
9398
|
/**
|
|
8583
|
-
*
|
|
9399
|
+
* The discount amount must be greater than or equal to zero to prevent negative discounts from being applied.
|
|
8584
9400
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
8585
9401
|
* @public
|
|
8586
9402
|
* @method
|
|
8587
9403
|
*/
|
|
8588
|
-
|
|
8589
|
-
if (this.DiscountAmount < 0) {
|
|
8590
|
-
result.Errors.push(new ValidationErrorInfo("DiscountAmount", "Discount amount
|
|
9404
|
+
ValidateDiscountAmountGreaterThanOrEqualToZero(result) {
|
|
9405
|
+
if (this.DiscountAmount != null && this.DiscountAmount < 0) {
|
|
9406
|
+
result.Errors.push(new ValidationErrorInfo("DiscountAmount", "Discount amount must be greater than or equal to zero.", this.DiscountAmount, ValidationErrorType.Failure));
|
|
8591
9407
|
}
|
|
8592
9408
|
}
|
|
8593
9409
|
/**
|
|
@@ -8646,26 +9462,16 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
8646
9462
|
}
|
|
8647
9463
|
}
|
|
8648
9464
|
/**
|
|
8649
|
-
*
|
|
8650
|
-
* @param result - the ValidationResult object to add any errors or warnings to
|
|
8651
|
-
* @public
|
|
8652
|
-
* @method
|
|
8653
|
-
*/
|
|
8654
|
-
ValidateQuantityOverrideRequiresParent(result) {
|
|
8655
|
-
// If the quantity is overridden, a parent order line must be specified
|
|
8656
|
-
if (this.IsQuantityOverridden && this.ParentOrderLineID == null) {
|
|
8657
|
-
result.Errors.push(new ValidationErrorInfo("IsQuantityOverridden", "The quantity can only be overridden for order lines that have a parent order line.", this.IsQuantityOverridden, ValidationErrorType.Failure));
|
|
8658
|
-
}
|
|
8659
|
-
}
|
|
8660
|
-
/**
|
|
8661
|
-
* If an order line is a rollup parent, its discount, charge, and tax amounts must all be zero.
|
|
9465
|
+
* For rollup parent order lines, the discount amount, charge amount, and line tax must all be zero to ensure proper financial aggregation.
|
|
8662
9466
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
8663
9467
|
* @public
|
|
8664
9468
|
* @method
|
|
8665
9469
|
*/
|
|
8666
|
-
|
|
8667
|
-
if (this.IsRollupParent
|
|
8668
|
-
|
|
9470
|
+
ValidateRollupParentAmounts(result) {
|
|
9471
|
+
if (this.IsRollupParent) {
|
|
9472
|
+
if (this.DiscountAmount !== 0 || this.ChargeAmount !== 0 || this.LineTax !== 0) {
|
|
9473
|
+
result.Errors.push(new ValidationErrorInfo("IsRollupParent", "Rollup parent lines must have discount, charge, and tax amounts set to zero.", this.IsRollupParent, ValidationErrorType.Failure));
|
|
9474
|
+
}
|
|
8669
9475
|
}
|
|
8670
9476
|
}
|
|
8671
9477
|
/**
|
|
@@ -9126,7 +9932,7 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
9126
9932
|
}
|
|
9127
9933
|
/**
|
|
9128
9934
|
* * Field Name: __mj_Latitude
|
|
9129
|
-
* * Display Name: Latitude
|
|
9935
|
+
* * Display Name: Mj Latitude
|
|
9130
9936
|
* * SQL Data Type: decimal(10, 6)
|
|
9131
9937
|
*/
|
|
9132
9938
|
get __mj_Latitude() {
|
|
@@ -9134,7 +9940,7 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
9134
9940
|
}
|
|
9135
9941
|
/**
|
|
9136
9942
|
* * Field Name: __mj_Longitude
|
|
9137
|
-
* * Display Name: Longitude
|
|
9943
|
+
* * Display Name: Mj Longitude
|
|
9138
9944
|
* * SQL Data Type: decimal(10, 6)
|
|
9139
9945
|
*/
|
|
9140
9946
|
get __mj_Longitude() {
|
|
@@ -9150,7 +9956,7 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
9150
9956
|
}
|
|
9151
9957
|
/**
|
|
9152
9958
|
* * Field Name: ParentOrderLineIDDepth
|
|
9153
|
-
* * Display Name:
|
|
9959
|
+
* * Display Name: Hierarchy Depth
|
|
9154
9960
|
* * SQL Data Type: int
|
|
9155
9961
|
*/
|
|
9156
9962
|
get ParentOrderLineIDDepth() {
|
|
@@ -9158,7 +9964,7 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
9158
9964
|
}
|
|
9159
9965
|
/**
|
|
9160
9966
|
* * Field Name: ParentOrderLineIDPath
|
|
9161
|
-
* * Display Name:
|
|
9967
|
+
* * Display Name: Hierarchy Path
|
|
9162
9968
|
* * SQL Data Type: nvarchar(MAX)
|
|
9163
9969
|
*/
|
|
9164
9970
|
get ParentOrderLineIDPath() {
|
|
@@ -9166,7 +9972,7 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
9166
9972
|
}
|
|
9167
9973
|
/**
|
|
9168
9974
|
* * Field Name: ParentOrderLineIDIsLeaf
|
|
9169
|
-
* * Display Name:
|
|
9975
|
+
* * Display Name: Is Leaf Node
|
|
9170
9976
|
* * SQL Data Type: bit
|
|
9171
9977
|
*/
|
|
9172
9978
|
get ParentOrderLineIDIsLeaf() {
|
|
@@ -9174,7 +9980,7 @@ let mjBizAppsOrdersOrderLineEntity = class mjBizAppsOrdersOrderLineEntity extend
|
|
|
9174
9980
|
}
|
|
9175
9981
|
/**
|
|
9176
9982
|
* * Field Name: ParentOrderLineIDChildCount
|
|
9177
|
-
* * Display Name:
|
|
9983
|
+
* * Display Name: Child Count
|
|
9178
9984
|
* * SQL Data Type: int
|
|
9179
9985
|
*/
|
|
9180
9986
|
get ParentOrderLineIDChildCount() {
|
|
@@ -9216,7 +10022,7 @@ let mjBizAppsOrdersOrderSequenceEntity = class mjBizAppsOrdersOrderSequenceEntit
|
|
|
9216
10022
|
/**
|
|
9217
10023
|
* Validate() method override for MJ_BizApps_Orders: Order Sequences entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
9218
10024
|
* * ID: The ID of the record must be exactly 1, ensuring that only a single system configuration record exists in this table.
|
|
9219
|
-
* * NextSequenceNumber: The next sequence number must be a positive integer greater than zero.
|
|
10025
|
+
* * NextSequenceNumber: The next sequence number must be a positive integer greater than zero to ensure valid sequential ordering.
|
|
9220
10026
|
* @public
|
|
9221
10027
|
* @method
|
|
9222
10028
|
* @override
|
|
@@ -9240,13 +10046,13 @@ let mjBizAppsOrdersOrderSequenceEntity = class mjBizAppsOrdersOrderSequenceEntit
|
|
|
9240
10046
|
}
|
|
9241
10047
|
}
|
|
9242
10048
|
/**
|
|
9243
|
-
* The next sequence number must be a positive integer greater than zero.
|
|
10049
|
+
* The next sequence number must be a positive integer greater than zero to ensure valid sequential ordering.
|
|
9244
10050
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
9245
10051
|
* @public
|
|
9246
10052
|
* @method
|
|
9247
10053
|
*/
|
|
9248
10054
|
ValidateNextSequenceNumberGreaterThanZero(result) {
|
|
9249
|
-
if (this.NextSequenceNumber
|
|
10055
|
+
if (this.NextSequenceNumber != null && this.NextSequenceNumber <= 0) {
|
|
9250
10056
|
result.Errors.push(new ValidationErrorInfo("NextSequenceNumber", "The next sequence number must be greater than zero.", this.NextSequenceNumber, ValidationErrorType.Failure));
|
|
9251
10057
|
}
|
|
9252
10058
|
}
|
|
@@ -9327,7 +10133,7 @@ let mjBizAppsOrdersPaymentDetailEntity = class mjBizAppsOrdersPaymentDetailEntit
|
|
|
9327
10133
|
}
|
|
9328
10134
|
/**
|
|
9329
10135
|
* Validate() method override for MJ_BizApps_Orders: Payment Details entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
9330
|
-
* * ExpiryMonth: The expiry month
|
|
10136
|
+
* * ExpiryMonth: The expiry month must be a valid calendar month between 1 and 12, if it is provided.
|
|
9331
10137
|
* @public
|
|
9332
10138
|
* @method
|
|
9333
10139
|
* @override
|
|
@@ -9339,14 +10145,14 @@ let mjBizAppsOrdersPaymentDetailEntity = class mjBizAppsOrdersPaymentDetailEntit
|
|
|
9339
10145
|
return result;
|
|
9340
10146
|
}
|
|
9341
10147
|
/**
|
|
9342
|
-
* The expiry month
|
|
10148
|
+
* The expiry month must be a valid calendar month between 1 and 12, if it is provided.
|
|
9343
10149
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
9344
10150
|
* @public
|
|
9345
10151
|
* @method
|
|
9346
10152
|
*/
|
|
9347
10153
|
ValidateExpiryMonthRange(result) {
|
|
9348
10154
|
if (this.ExpiryMonth != null && (this.ExpiryMonth < 1 || this.ExpiryMonth > 12)) {
|
|
9349
|
-
result.Errors.push(new ValidationErrorInfo("ExpiryMonth", "Expiry month must be a
|
|
10155
|
+
result.Errors.push(new ValidationErrorInfo("ExpiryMonth", "Expiry month must be a number between 1 and 12.", this.ExpiryMonth, ValidationErrorType.Failure));
|
|
9350
10156
|
}
|
|
9351
10157
|
}
|
|
9352
10158
|
/**
|
|
@@ -9570,7 +10376,7 @@ let mjBizAppsOrdersPaymentDetailEntity = class mjBizAppsOrdersPaymentDetailEntit
|
|
|
9570
10376
|
}
|
|
9571
10377
|
/**
|
|
9572
10378
|
* * Field Name: SourceOrderHeaderID
|
|
9573
|
-
* * Display Name: Source Order
|
|
10379
|
+
* * Display Name: Source Order Header
|
|
9574
10380
|
* * SQL Data Type: uniqueidentifier
|
|
9575
10381
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
9576
10382
|
* * Description: ACCOUNT CREDIT tender (D68): the order whose NEGATIVE balance this payment draws down. A customer credit is not its own instrument the way a gift card is — it already lives on the over-paid order — so this points at that order rather than duplicating the balance onto a second record. NULL for every other tender type.
|
|
@@ -9652,7 +10458,7 @@ let mjBizAppsOrdersPaymentDetailEntity = class mjBizAppsOrdersPaymentDetailEntit
|
|
|
9652
10458
|
}
|
|
9653
10459
|
/**
|
|
9654
10460
|
* * Field Name: SourceOrderHeader
|
|
9655
|
-
* * Display Name: Source Order Name
|
|
10461
|
+
* * Display Name: Source Order Header Name
|
|
9656
10462
|
* * SQL Data Type: nvarchar(40)
|
|
9657
10463
|
*/
|
|
9658
10464
|
get SourceOrderHeader() {
|
|
@@ -9830,7 +10636,7 @@ let mjBizAppsOrdersPaymentHeaderEntity = class mjBizAppsOrdersPaymentHeaderEntit
|
|
|
9830
10636
|
}
|
|
9831
10637
|
/**
|
|
9832
10638
|
* * Field Name: ProcessingFeeAmount
|
|
9833
|
-
* * Display Name: Processing Fee
|
|
10639
|
+
* * Display Name: Processing Fee Amount
|
|
9834
10640
|
* * SQL Data Type: decimal(18, 2)
|
|
9835
10641
|
* * Default Value: 0
|
|
9836
10642
|
* * Description: Processor fee withheld from this payment.
|
|
@@ -10197,7 +11003,7 @@ let mjBizAppsOrdersPaymentIntentEntity = class mjBizAppsOrdersPaymentIntentEntit
|
|
|
10197
11003
|
}
|
|
10198
11004
|
/**
|
|
10199
11005
|
* * Field Name: OrderHeaderID
|
|
10200
|
-
* * Display Name: Order
|
|
11006
|
+
* * Display Name: Order Header
|
|
10201
11007
|
* * SQL Data Type: uniqueidentifier
|
|
10202
11008
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
10203
11009
|
*/
|
|
@@ -10284,7 +11090,7 @@ let mjBizAppsOrdersPaymentIntentEntity = class mjBizAppsOrdersPaymentIntentEntit
|
|
|
10284
11090
|
}
|
|
10285
11091
|
/**
|
|
10286
11092
|
* * Field Name: OrderHeader
|
|
10287
|
-
* * Display Name: Order Header
|
|
11093
|
+
* * Display Name: Order Header Name
|
|
10288
11094
|
* * SQL Data Type: nvarchar(40)
|
|
10289
11095
|
*/
|
|
10290
11096
|
get OrderHeader() {
|
|
@@ -10856,7 +11662,7 @@ let mjBizAppsOrdersPaymentSequenceEntity = class mjBizAppsOrdersPaymentSequenceE
|
|
|
10856
11662
|
/**
|
|
10857
11663
|
* Validate() method override for MJ_BizApps_Orders: Payment Sequences entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
10858
11664
|
* * ID: The ID must be exactly 1 to ensure the table only contains a single configuration or state record.
|
|
10859
|
-
* * NextSequenceNumber: The next sequence number must be a positive integer greater than zero to ensure
|
|
11665
|
+
* * NextSequenceNumber: The next sequence number must be a positive integer greater than zero to ensure valid sequencing.
|
|
10860
11666
|
* @public
|
|
10861
11667
|
* @method
|
|
10862
11668
|
* @override
|
|
@@ -10880,7 +11686,7 @@ let mjBizAppsOrdersPaymentSequenceEntity = class mjBizAppsOrdersPaymentSequenceE
|
|
|
10880
11686
|
}
|
|
10881
11687
|
}
|
|
10882
11688
|
/**
|
|
10883
|
-
* The next sequence number must be a positive integer greater than zero to ensure
|
|
11689
|
+
* The next sequence number must be a positive integer greater than zero to ensure valid sequencing.
|
|
10884
11690
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10885
11691
|
* @public
|
|
10886
11692
|
* @method
|
|
@@ -10968,7 +11774,7 @@ let mjBizAppsOrdersPaymentTermsTypeEntity = class mjBizAppsOrdersPaymentTermsTyp
|
|
|
10968
11774
|
}
|
|
10969
11775
|
/**
|
|
10970
11776
|
* Validate() method override for MJ_BizApps_Orders: Payment Terms Types entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
10971
|
-
* * NetDays:
|
|
11777
|
+
* * NetDays: Net days must be a non-negative number (0 or greater) to ensure valid payment terms.
|
|
10972
11778
|
* @public
|
|
10973
11779
|
* @method
|
|
10974
11780
|
* @override
|
|
@@ -10980,14 +11786,14 @@ let mjBizAppsOrdersPaymentTermsTypeEntity = class mjBizAppsOrdersPaymentTermsTyp
|
|
|
10980
11786
|
return result;
|
|
10981
11787
|
}
|
|
10982
11788
|
/**
|
|
10983
|
-
*
|
|
11789
|
+
* Net days must be a non-negative number (0 or greater) to ensure valid payment terms.
|
|
10984
11790
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10985
11791
|
* @public
|
|
10986
11792
|
* @method
|
|
10987
11793
|
*/
|
|
10988
11794
|
ValidateNetDaysGreaterThanOrEqualToZero(result) {
|
|
10989
11795
|
if (this.NetDays != null && this.NetDays < 0) {
|
|
10990
|
-
result.Errors.push(new ValidationErrorInfo("NetDays", "Net days
|
|
11796
|
+
result.Errors.push(new ValidationErrorInfo("NetDays", "Net days must be greater than or equal to 0.", this.NetDays, ValidationErrorType.Failure));
|
|
10991
11797
|
}
|
|
10992
11798
|
}
|
|
10993
11799
|
/**
|
|
@@ -11309,7 +12115,7 @@ let mjBizAppsOrdersPriceListAssignmentEntity = class mjBizAppsOrdersPriceListAss
|
|
|
11309
12115
|
/**
|
|
11310
12116
|
* Validate() method override for MJ_BizApps_Orders: Price List Assignments entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
11311
12117
|
* * Table-Level: If both a start date and an end date are specified, the end date must be later than the start date.
|
|
11312
|
-
* * Table-Level:
|
|
12118
|
+
* * Table-Level: Either an Organization or a Person must be specified, but not both. This ensures the record is associated with exactly one entity type.
|
|
11313
12119
|
* @public
|
|
11314
12120
|
* @method
|
|
11315
12121
|
* @override
|
|
@@ -11335,7 +12141,7 @@ let mjBizAppsOrdersPriceListAssignmentEntity = class mjBizAppsOrdersPriceListAss
|
|
|
11335
12141
|
}
|
|
11336
12142
|
}
|
|
11337
12143
|
/**
|
|
11338
|
-
*
|
|
12144
|
+
* Either an Organization or a Person must be specified, but not both. This ensures the record is associated with exactly one entity type.
|
|
11339
12145
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
11340
12146
|
* @public
|
|
11341
12147
|
* @method
|
|
@@ -11343,12 +12149,8 @@ let mjBizAppsOrdersPriceListAssignmentEntity = class mjBizAppsOrdersPriceListAss
|
|
|
11343
12149
|
ValidateExclusiveOrganizationOrPerson(result) {
|
|
11344
12150
|
const hasOrganization = this.OrganizationID != null;
|
|
11345
12151
|
const hasPerson = this.PersonID != null;
|
|
11346
|
-
if (hasOrganization && hasPerson) {
|
|
11347
|
-
result.Errors.push(new ValidationErrorInfo("OrganizationID", "
|
|
11348
|
-
result.Errors.push(new ValidationErrorInfo("PersonID", "Cannot associate with both an Organization and a Person. Please choose only one.", this.PersonID, ValidationErrorType.Failure));
|
|
11349
|
-
}
|
|
11350
|
-
else if (!hasOrganization && !hasPerson) {
|
|
11351
|
-
result.Errors.push(new ValidationErrorInfo("OrganizationID", "You must specify either an Organization or a Person.", null, ValidationErrorType.Failure));
|
|
12152
|
+
if ((hasOrganization && hasPerson) || (!hasOrganization && !hasPerson)) {
|
|
12153
|
+
result.Errors.push(new ValidationErrorInfo("OrganizationID", "You must specify either an Organization or a Person, but not both.", this.OrganizationID, ValidationErrorType.Failure));
|
|
11352
12154
|
}
|
|
11353
12155
|
}
|
|
11354
12156
|
/**
|
|
@@ -12070,7 +12872,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12070
12872
|
}
|
|
12071
12873
|
/**
|
|
12072
12874
|
* * Field Name: CompanyID
|
|
12073
|
-
* * Display Name: Company
|
|
12875
|
+
* * Display Name: Company ID
|
|
12074
12876
|
* * SQL Data Type: uniqueidentifier
|
|
12075
12877
|
* * Related Entity/Foreign Key: MJ: Companies (vwCompanies.ID)
|
|
12076
12878
|
* * Description: The company that owns this category tree (D7). No shared/global categories. FK to __mj.Company.
|
|
@@ -12107,7 +12909,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12107
12909
|
}
|
|
12108
12910
|
/**
|
|
12109
12911
|
* * Field Name: ParentProductCategoryID
|
|
12110
|
-
* * Display Name: Parent Category
|
|
12912
|
+
* * Display Name: Parent Category ID
|
|
12111
12913
|
* * SQL Data Type: uniqueidentifier
|
|
12112
12914
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Product Categories (vwProductCategories.ID)
|
|
12113
12915
|
*/
|
|
@@ -12131,7 +12933,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12131
12933
|
}
|
|
12132
12934
|
/**
|
|
12133
12935
|
* * Field Name: IsActive
|
|
12134
|
-
* * Display Name:
|
|
12936
|
+
* * Display Name: Active
|
|
12135
12937
|
* * SQL Data Type: bit
|
|
12136
12938
|
* * Default Value: 1
|
|
12137
12939
|
* * Description: Whether this category is active and selectable.
|
|
@@ -12168,7 +12970,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12168
12970
|
}
|
|
12169
12971
|
/**
|
|
12170
12972
|
* * Field Name: DefaultEntitlementGrantTiming
|
|
12171
|
-
* * Display Name: Entitlement Grant Timing
|
|
12973
|
+
* * Display Name: Default Entitlement Grant Timing
|
|
12172
12974
|
* * SQL Data Type: nvarchar(20)
|
|
12173
12975
|
* * Value List Type: List
|
|
12174
12976
|
* * Possible Values
|
|
@@ -12184,7 +12986,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12184
12986
|
}
|
|
12185
12987
|
/**
|
|
12186
12988
|
* * Field Name: DefaultEntitlementQuantityMode
|
|
12187
|
-
* * Display Name: Entitlement Quantity Mode
|
|
12989
|
+
* * Display Name: Default Entitlement Quantity Mode
|
|
12188
12990
|
* * SQL Data Type: nvarchar(20)
|
|
12189
12991
|
* * Value List Type: List
|
|
12190
12992
|
* * Possible Values
|
|
@@ -12199,7 +13001,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12199
13001
|
}
|
|
12200
13002
|
/**
|
|
12201
13003
|
* * Field Name: DefaultEntitlementValidityMode
|
|
12202
|
-
* * Display Name: Entitlement Validity Mode
|
|
13004
|
+
* * Display Name: Default Entitlement Validity Mode
|
|
12203
13005
|
* * SQL Data Type: nvarchar(20)
|
|
12204
13006
|
* * Value List Type: List
|
|
12205
13007
|
* * Possible Values
|
|
@@ -12246,7 +13048,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12246
13048
|
}
|
|
12247
13049
|
/**
|
|
12248
13050
|
* * Field Name: Company
|
|
12249
|
-
* * Display Name: Company
|
|
13051
|
+
* * Display Name: Company
|
|
12250
13052
|
* * SQL Data Type: nvarchar(50)
|
|
12251
13053
|
*/
|
|
12252
13054
|
get Company() {
|
|
@@ -12254,7 +13056,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12254
13056
|
}
|
|
12255
13057
|
/**
|
|
12256
13058
|
* * Field Name: ParentProductCategory
|
|
12257
|
-
* * Display Name: Parent Category
|
|
13059
|
+
* * Display Name: Parent Category
|
|
12258
13060
|
* * SQL Data Type: nvarchar(200)
|
|
12259
13061
|
*/
|
|
12260
13062
|
get ParentProductCategory() {
|
|
@@ -12262,7 +13064,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12262
13064
|
}
|
|
12263
13065
|
/**
|
|
12264
13066
|
* * Field Name: RootParentProductCategoryID
|
|
12265
|
-
* * Display Name: Root Category
|
|
13067
|
+
* * Display Name: Root Parent Category ID
|
|
12266
13068
|
* * SQL Data Type: uniqueidentifier
|
|
12267
13069
|
*/
|
|
12268
13070
|
get RootParentProductCategoryID() {
|
|
@@ -12270,7 +13072,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12270
13072
|
}
|
|
12271
13073
|
/**
|
|
12272
13074
|
* * Field Name: ParentProductCategoryIDDepth
|
|
12273
|
-
* * Display Name: Depth
|
|
13075
|
+
* * Display Name: Parent Product Category ID Depth
|
|
12274
13076
|
* * SQL Data Type: int
|
|
12275
13077
|
*/
|
|
12276
13078
|
get ParentProductCategoryIDDepth() {
|
|
@@ -12278,7 +13080,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12278
13080
|
}
|
|
12279
13081
|
/**
|
|
12280
13082
|
* * Field Name: ParentProductCategoryIDPath
|
|
12281
|
-
* * Display Name: Category Path
|
|
13083
|
+
* * Display Name: Parent Product Category ID Path
|
|
12282
13084
|
* * SQL Data Type: nvarchar(MAX)
|
|
12283
13085
|
*/
|
|
12284
13086
|
get ParentProductCategoryIDPath() {
|
|
@@ -12286,7 +13088,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12286
13088
|
}
|
|
12287
13089
|
/**
|
|
12288
13090
|
* * Field Name: ParentProductCategoryIDIsLeaf
|
|
12289
|
-
* * Display Name: Is Leaf
|
|
13091
|
+
* * Display Name: Parent Product Category ID Is Leaf
|
|
12290
13092
|
* * SQL Data Type: bit
|
|
12291
13093
|
*/
|
|
12292
13094
|
get ParentProductCategoryIDIsLeaf() {
|
|
@@ -12294,7 +13096,7 @@ let mjBizAppsOrdersProductCategoryEntity = class mjBizAppsOrdersProductCategoryE
|
|
|
12294
13096
|
}
|
|
12295
13097
|
/**
|
|
12296
13098
|
* * Field Name: ParentProductCategoryIDChildCount
|
|
12297
|
-
* * Display Name: Child Count
|
|
13099
|
+
* * Display Name: Parent Product Category ID Child Count
|
|
12298
13100
|
* * SQL Data Type: int
|
|
12299
13101
|
*/
|
|
12300
13102
|
get ParentProductCategoryIDChildCount() {
|
|
@@ -12336,8 +13138,8 @@ let mjBizAppsOrdersProductEntitlementEntity = class mjBizAppsOrdersProductEntitl
|
|
|
12336
13138
|
/**
|
|
12337
13139
|
* Validate() method override for MJ_BizApps_Orders: Product Entitlements entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
12338
13140
|
* * AccessLagHours: Access lag hours, if specified, must be a non-negative number (0 or greater).
|
|
12339
|
-
* * AccessLeadHours: Access lead hours, if specified, must be greater than or equal to
|
|
12340
|
-
* * Table-Level:
|
|
13141
|
+
* * AccessLeadHours: Access lead hours, if specified, must be greater than or equal to 0.
|
|
13142
|
+
* * Table-Level: If the validity mode is set to 'FixedDuration', then the validity duration must be greater than 0 days.
|
|
12341
13143
|
* @public
|
|
12342
13144
|
* @method
|
|
12343
13145
|
* @override
|
|
@@ -12345,8 +13147,8 @@ let mjBizAppsOrdersProductEntitlementEntity = class mjBizAppsOrdersProductEntitl
|
|
|
12345
13147
|
Validate() {
|
|
12346
13148
|
const result = super.Validate();
|
|
12347
13149
|
this.ValidateAccessLagHoursGreaterThanOrEqualToZero(result);
|
|
12348
|
-
this.
|
|
12349
|
-
this.
|
|
13150
|
+
this.ValidateAccessLeadHoursMinimum(result);
|
|
13151
|
+
this.ValidateValidityDurationForFixedDurationMode(result);
|
|
12350
13152
|
result.Success = result.Success && (result.Errors.length === 0);
|
|
12351
13153
|
return result;
|
|
12352
13154
|
}
|
|
@@ -12362,25 +13164,25 @@ let mjBizAppsOrdersProductEntitlementEntity = class mjBizAppsOrdersProductEntitl
|
|
|
12362
13164
|
}
|
|
12363
13165
|
}
|
|
12364
13166
|
/**
|
|
12365
|
-
* Access lead hours, if specified, must be greater than or equal to
|
|
13167
|
+
* Access lead hours, if specified, must be greater than or equal to 0.
|
|
12366
13168
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
12367
13169
|
* @public
|
|
12368
13170
|
* @method
|
|
12369
13171
|
*/
|
|
12370
|
-
|
|
13172
|
+
ValidateAccessLeadHoursMinimum(result) {
|
|
12371
13173
|
if (this.AccessLeadHours != null && this.AccessLeadHours < 0) {
|
|
12372
13174
|
result.Errors.push(new ValidationErrorInfo("AccessLeadHours", "Access lead hours must be greater than or equal to 0.", this.AccessLeadHours, ValidationErrorType.Failure));
|
|
12373
13175
|
}
|
|
12374
13176
|
}
|
|
12375
13177
|
/**
|
|
12376
|
-
*
|
|
13178
|
+
* If the validity mode is set to 'FixedDuration', then the validity duration must be greater than 0 days.
|
|
12377
13179
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
12378
13180
|
* @public
|
|
12379
13181
|
* @method
|
|
12380
13182
|
*/
|
|
12381
|
-
|
|
13183
|
+
ValidateValidityDurationForFixedDurationMode(result) {
|
|
12382
13184
|
if (this.ValidityMode === "FixedDuration" && (this.ValidityDurationDays == null || this.ValidityDurationDays <= 0)) {
|
|
12383
|
-
result.Errors.push(new ValidationErrorInfo("ValidityDurationDays", "Validity Duration Days must be greater than 0 when Validity Mode is
|
|
13185
|
+
result.Errors.push(new ValidationErrorInfo("ValidityDurationDays", "Validity Duration Days must be greater than 0 when Validity Mode is 'FixedDuration'.", this.ValidityDurationDays, ValidationErrorType.Failure));
|
|
12384
13186
|
}
|
|
12385
13187
|
}
|
|
12386
13188
|
/**
|
|
@@ -13144,7 +13946,7 @@ let mjBizAppsOrdersProductTypeEntity = class mjBizAppsOrdersProductTypeEntity ex
|
|
|
13144
13946
|
}
|
|
13145
13947
|
/**
|
|
13146
13948
|
* * Field Name: IsActive
|
|
13147
|
-
* * Display Name: Active
|
|
13949
|
+
* * Display Name: Is Active
|
|
13148
13950
|
* * SQL Data Type: bit
|
|
13149
13951
|
* * Default Value: 1
|
|
13150
13952
|
* * Description: Whether this type is active and selectable.
|
|
@@ -13237,6 +14039,18 @@ let mjBizAppsOrdersProductTypeEntity = class mjBizAppsOrdersProductTypeEntity ex
|
|
|
13237
14039
|
this.Set('PricingDriverClass', value);
|
|
13238
14040
|
}
|
|
13239
14041
|
/**
|
|
14042
|
+
* * Field Name: Configuration
|
|
14043
|
+
* * Display Name: Configuration
|
|
14044
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
14045
|
+
* * Description: Extensible JSON configuration for this product type including customUI (js, css, theme, componentOverrideKey), unitMode, allowQuantity, and fieldOverrides.
|
|
14046
|
+
*/
|
|
14047
|
+
get Configuration() {
|
|
14048
|
+
return this.Get('Configuration');
|
|
14049
|
+
}
|
|
14050
|
+
set Configuration(value) {
|
|
14051
|
+
this.Set('Configuration', value);
|
|
14052
|
+
}
|
|
14053
|
+
/**
|
|
13240
14054
|
* * Field Name: DefaultRevenueRecognitionType
|
|
13241
14055
|
* * Display Name: Default Revenue Recognition Type
|
|
13242
14056
|
* * SQL Data Type: nvarchar(200)
|
|
@@ -13307,7 +14121,7 @@ let mjBizAppsOrdersProductEntity = class mjBizAppsOrdersProductEntity extends Ba
|
|
|
13307
14121
|
}
|
|
13308
14122
|
/**
|
|
13309
14123
|
* Validate() method override for MJ_BizApps_Orders: Products entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
13310
|
-
* * MaxQuantityPerLine: The maximum quantity per line
|
|
14124
|
+
* * MaxQuantityPerLine: The maximum quantity allowed per line must be 1 or greater, if it is specified.
|
|
13311
14125
|
* * Table-Level: The availability end date must be on or after the availability start date when both dates are provided.
|
|
13312
14126
|
* * Table-Level: A product cannot be its own successor. If a successor product is specified, it must be a different product to prevent circular references.
|
|
13313
14127
|
* @public
|
|
@@ -13323,15 +14137,14 @@ let mjBizAppsOrdersProductEntity = class mjBizAppsOrdersProductEntity extends Ba
|
|
|
13323
14137
|
return result;
|
|
13324
14138
|
}
|
|
13325
14139
|
/**
|
|
13326
|
-
* The maximum quantity per line
|
|
14140
|
+
* The maximum quantity allowed per line must be 1 or greater, if it is specified.
|
|
13327
14141
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
13328
14142
|
* @public
|
|
13329
14143
|
* @method
|
|
13330
14144
|
*/
|
|
13331
14145
|
ValidateMaxQuantityPerLineMinimum(result) {
|
|
13332
|
-
// If a value is supplied, it must be greater than or equal to 1
|
|
13333
14146
|
if (this.MaxQuantityPerLine != null && this.MaxQuantityPerLine < 1) {
|
|
13334
|
-
result.Errors.push(new ValidationErrorInfo("MaxQuantityPerLine", "
|
|
14147
|
+
result.Errors.push(new ValidationErrorInfo("MaxQuantityPerLine", "The maximum quantity per line must be 1 or greater.", this.MaxQuantityPerLine, ValidationErrorType.Failure));
|
|
13335
14148
|
}
|
|
13336
14149
|
}
|
|
13337
14150
|
/**
|
|
@@ -13454,7 +14267,7 @@ let mjBizAppsOrdersProductEntity = class mjBizAppsOrdersProductEntity extends Ba
|
|
|
13454
14267
|
}
|
|
13455
14268
|
/**
|
|
13456
14269
|
* * Field Name: SuccessorProductID
|
|
13457
|
-
* * Display Name: Successor Product
|
|
14270
|
+
* * Display Name: Successor Product
|
|
13458
14271
|
* * SQL Data Type: uniqueidentifier
|
|
13459
14272
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Products (vwProducts.ID)
|
|
13460
14273
|
*/
|
|
@@ -13515,7 +14328,7 @@ let mjBizAppsOrdersProductEntity = class mjBizAppsOrdersProductEntity extends Ba
|
|
|
13515
14328
|
}
|
|
13516
14329
|
/**
|
|
13517
14330
|
* * Field Name: SubscriptionTypeID
|
|
13518
|
-
* * Display Name: Subscription Type
|
|
14331
|
+
* * Display Name: Subscription Type
|
|
13519
14332
|
* * SQL Data Type: uniqueidentifier
|
|
13520
14333
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Subscription Types (vwSubscriptionTypes.ID)
|
|
13521
14334
|
*/
|
|
@@ -13677,7 +14490,7 @@ let mjBizAppsOrdersProductEntity = class mjBizAppsOrdersProductEntity extends Ba
|
|
|
13677
14490
|
}
|
|
13678
14491
|
/**
|
|
13679
14492
|
* * Field Name: SuccessorProduct
|
|
13680
|
-
* * Display Name: Successor Product
|
|
14493
|
+
* * Display Name: Successor Product Name
|
|
13681
14494
|
* * SQL Data Type: nvarchar(200)
|
|
13682
14495
|
*/
|
|
13683
14496
|
get SuccessorProduct() {
|
|
@@ -13693,7 +14506,7 @@ let mjBizAppsOrdersProductEntity = class mjBizAppsOrdersProductEntity extends Ba
|
|
|
13693
14506
|
}
|
|
13694
14507
|
/**
|
|
13695
14508
|
* * Field Name: SubscriptionType
|
|
13696
|
-
* * Display Name: Subscription Type
|
|
14509
|
+
* * Display Name: Subscription Type Name
|
|
13697
14510
|
* * SQL Data Type: nvarchar(200)
|
|
13698
14511
|
*/
|
|
13699
14512
|
get SubscriptionType() {
|
|
@@ -13921,28 +14734,31 @@ let mjBizAppsOrdersPromotionTargetEntity = class mjBizAppsOrdersPromotionTargetE
|
|
|
13921
14734
|
}
|
|
13922
14735
|
/**
|
|
13923
14736
|
* Validate() method override for MJ_BizApps_Orders: Promotion Targets entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
13924
|
-
* * Table-Level: A promotion must target either a specific product or a product category, but not both, and
|
|
14737
|
+
* * Table-Level: A promotion must target either a specific product or a product category, but not both, and at least one must be selected.
|
|
13925
14738
|
* @public
|
|
13926
14739
|
* @method
|
|
13927
14740
|
* @override
|
|
13928
14741
|
*/
|
|
13929
14742
|
Validate() {
|
|
13930
14743
|
const result = super.Validate();
|
|
13931
|
-
this.
|
|
14744
|
+
this.ValidateProductOrCategorySelection(result);
|
|
13932
14745
|
result.Success = result.Success && (result.Errors.length === 0);
|
|
13933
14746
|
return result;
|
|
13934
14747
|
}
|
|
13935
14748
|
/**
|
|
13936
|
-
* A promotion must target either a specific product or a product category, but not both, and
|
|
14749
|
+
* A promotion must target either a specific product or a product category, but not both, and at least one must be selected.
|
|
13937
14750
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
13938
14751
|
* @public
|
|
13939
14752
|
* @method
|
|
13940
14753
|
*/
|
|
13941
|
-
|
|
14754
|
+
ValidateProductOrCategorySelection(result) {
|
|
13942
14755
|
const hasProduct = this.ProductID != null;
|
|
13943
14756
|
const hasCategory = this.ProductCategoryID != null;
|
|
13944
|
-
if (hasProduct
|
|
13945
|
-
result.Errors.push(new ValidationErrorInfo("ProductID", "
|
|
14757
|
+
if (hasProduct && hasCategory) {
|
|
14758
|
+
result.Errors.push(new ValidationErrorInfo("ProductID", "Cannot specify both a Product and a Product Category. Please choose only one.", this.ProductID, ValidationErrorType.Failure));
|
|
14759
|
+
}
|
|
14760
|
+
else if (!hasProduct && !hasCategory) {
|
|
14761
|
+
result.Errors.push(new ValidationErrorInfo("ProductID", "Either a Product or a Product Category must be specified.", this.ProductID, ValidationErrorType.Failure));
|
|
13946
14762
|
}
|
|
13947
14763
|
}
|
|
13948
14764
|
/**
|
|
@@ -15085,7 +15901,7 @@ let mjBizAppsOrdersStoredValueAccountEntity = class mjBizAppsOrdersStoredValueAc
|
|
|
15085
15901
|
}
|
|
15086
15902
|
/**
|
|
15087
15903
|
* Validate() method override for MJ_BizApps_Orders: Stored Value Accounts entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
15088
|
-
* * InitialAmount: The initial amount must be a positive value
|
|
15904
|
+
* * InitialAmount: The initial amount must be greater than zero to ensure that the record is created with a positive starting value.
|
|
15089
15905
|
* @public
|
|
15090
15906
|
* @method
|
|
15091
15907
|
* @override
|
|
@@ -15097,13 +15913,13 @@ let mjBizAppsOrdersStoredValueAccountEntity = class mjBizAppsOrdersStoredValueAc
|
|
|
15097
15913
|
return result;
|
|
15098
15914
|
}
|
|
15099
15915
|
/**
|
|
15100
|
-
* The initial amount must be a positive value
|
|
15916
|
+
* The initial amount must be greater than zero to ensure that the record is created with a positive starting value.
|
|
15101
15917
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15102
15918
|
* @public
|
|
15103
15919
|
* @method
|
|
15104
15920
|
*/
|
|
15105
15921
|
ValidateInitialAmountGreaterThanZero(result) {
|
|
15106
|
-
if (this.InitialAmount
|
|
15922
|
+
if (this.InitialAmount != null && this.InitialAmount <= 0) {
|
|
15107
15923
|
result.Errors.push(new ValidationErrorInfo("InitialAmount", "The initial amount must be greater than zero.", this.InitialAmount, ValidationErrorType.Failure));
|
|
15108
15924
|
}
|
|
15109
15925
|
}
|
|
@@ -15314,7 +16130,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15314
16130
|
}
|
|
15315
16131
|
/**
|
|
15316
16132
|
* Validate() method override for MJ_BizApps_Orders: Stored Value Transactions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
15317
|
-
* * Amount: The transaction amount cannot be zero. Every transaction must have a positive or negative value.
|
|
16133
|
+
* * Amount: The transaction amount cannot be zero. Every transaction must have a positive or negative value to be valid.
|
|
15318
16134
|
* @public
|
|
15319
16135
|
* @method
|
|
15320
16136
|
* @override
|
|
@@ -15326,14 +16142,14 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15326
16142
|
return result;
|
|
15327
16143
|
}
|
|
15328
16144
|
/**
|
|
15329
|
-
* The transaction amount cannot be zero. Every transaction must have a positive or negative value.
|
|
16145
|
+
* The transaction amount cannot be zero. Every transaction must have a positive or negative value to be valid.
|
|
15330
16146
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15331
16147
|
* @public
|
|
15332
16148
|
* @method
|
|
15333
16149
|
*/
|
|
15334
16150
|
ValidateAmountNotZero(result) {
|
|
15335
16151
|
if (this.Amount === 0) {
|
|
15336
|
-
result.Errors.push(new ValidationErrorInfo("Amount", "The transaction amount cannot be zero.
|
|
16152
|
+
result.Errors.push(new ValidationErrorInfo("Amount", "The transaction amount cannot be zero.", this.Amount, ValidationErrorType.Failure));
|
|
15337
16153
|
}
|
|
15338
16154
|
}
|
|
15339
16155
|
/**
|
|
@@ -15350,7 +16166,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15350
16166
|
}
|
|
15351
16167
|
/**
|
|
15352
16168
|
* * Field Name: StoredValueAccountID
|
|
15353
|
-
* * Display Name: Stored Value Account
|
|
16169
|
+
* * Display Name: Stored Value Account
|
|
15354
16170
|
* * SQL Data Type: uniqueidentifier
|
|
15355
16171
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Stored Value Accounts (vwStoredValueAccounts.ID)
|
|
15356
16172
|
*/
|
|
@@ -15405,7 +16221,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15405
16221
|
}
|
|
15406
16222
|
/**
|
|
15407
16223
|
* * Field Name: RelatedPaymentID
|
|
15408
|
-
* * Display Name: Related Payment
|
|
16224
|
+
* * Display Name: Related Payment
|
|
15409
16225
|
* * SQL Data Type: uniqueidentifier
|
|
15410
16226
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Headers (vwPaymentHeaders.ID)
|
|
15411
16227
|
*/
|
|
@@ -15417,7 +16233,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15417
16233
|
}
|
|
15418
16234
|
/**
|
|
15419
16235
|
* * Field Name: RelatedOrderHeaderID
|
|
15420
|
-
* * Display Name: Related Order
|
|
16236
|
+
* * Display Name: Related Order
|
|
15421
16237
|
* * SQL Data Type: uniqueidentifier
|
|
15422
16238
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
15423
16239
|
*/
|
|
@@ -15459,7 +16275,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15459
16275
|
}
|
|
15460
16276
|
/**
|
|
15461
16277
|
* * Field Name: StoredValueAccount
|
|
15462
|
-
* * Display Name: Stored Value Account
|
|
16278
|
+
* * Display Name: Stored Value Account Name
|
|
15463
16279
|
* * SQL Data Type: nvarchar(60)
|
|
15464
16280
|
*/
|
|
15465
16281
|
get StoredValueAccount() {
|
|
@@ -15467,7 +16283,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15467
16283
|
}
|
|
15468
16284
|
/**
|
|
15469
16285
|
* * Field Name: RelatedPayment
|
|
15470
|
-
* * Display Name: Related Payment
|
|
16286
|
+
* * Display Name: Related Payment Name
|
|
15471
16287
|
* * SQL Data Type: nvarchar(40)
|
|
15472
16288
|
*/
|
|
15473
16289
|
get RelatedPayment() {
|
|
@@ -15475,7 +16291,7 @@ let mjBizAppsOrdersStoredValueTransactionEntity = class mjBizAppsOrdersStoredVal
|
|
|
15475
16291
|
}
|
|
15476
16292
|
/**
|
|
15477
16293
|
* * Field Name: RelatedOrderHeader
|
|
15478
|
-
* * Display Name: Related Order
|
|
16294
|
+
* * Display Name: Related Order Name
|
|
15479
16295
|
* * SQL Data Type: nvarchar(40)
|
|
15480
16296
|
*/
|
|
15481
16297
|
get RelatedOrderHeader() {
|
|
@@ -15528,7 +16344,7 @@ let mjBizAppsOrdersSubscriptionEventEntity = class mjBizAppsOrdersSubscriptionEv
|
|
|
15528
16344
|
}
|
|
15529
16345
|
/**
|
|
15530
16346
|
* * Field Name: SubscriptionID
|
|
15531
|
-
* * Display Name: Subscription
|
|
16347
|
+
* * Display Name: Subscription ID
|
|
15532
16348
|
* * SQL Data Type: uniqueidentifier
|
|
15533
16349
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Subscriptions (vwSubscriptions.ID)
|
|
15534
16350
|
*/
|
|
@@ -15615,7 +16431,7 @@ let mjBizAppsOrdersSubscriptionEventEntity = class mjBizAppsOrdersSubscriptionEv
|
|
|
15615
16431
|
}
|
|
15616
16432
|
/**
|
|
15617
16433
|
* * Field Name: RelatedOrderHeaderID
|
|
15618
|
-
* * Display Name: Related Order ID
|
|
16434
|
+
* * Display Name: Related Order Header ID
|
|
15619
16435
|
* * SQL Data Type: uniqueidentifier
|
|
15620
16436
|
* * Related Entity/Foreign Key: MJ_BizApps_Orders: Order Headers (vwOrderHeaders.ID)
|
|
15621
16437
|
*/
|
|
@@ -15645,7 +16461,7 @@ let mjBizAppsOrdersSubscriptionEventEntity = class mjBizAppsOrdersSubscriptionEv
|
|
|
15645
16461
|
}
|
|
15646
16462
|
/**
|
|
15647
16463
|
* * Field Name: Subscription
|
|
15648
|
-
* * Display Name: Subscription
|
|
16464
|
+
* * Display Name: Subscription
|
|
15649
16465
|
* * SQL Data Type: nvarchar(40)
|
|
15650
16466
|
*/
|
|
15651
16467
|
get Subscription() {
|
|
@@ -15661,7 +16477,7 @@ let mjBizAppsOrdersSubscriptionEventEntity = class mjBizAppsOrdersSubscriptionEv
|
|
|
15661
16477
|
}
|
|
15662
16478
|
/**
|
|
15663
16479
|
* * Field Name: RelatedOrderHeader
|
|
15664
|
-
* * Display Name: Related Order
|
|
16480
|
+
* * Display Name: Related Order Header
|
|
15665
16481
|
* * SQL Data Type: nvarchar(40)
|
|
15666
16482
|
*/
|
|
15667
16483
|
get RelatedOrderHeader() {
|
|
@@ -15814,7 +16630,7 @@ let mjBizAppsOrdersSubscriptionTermEntity = class mjBizAppsOrdersSubscriptionTer
|
|
|
15814
16630
|
}
|
|
15815
16631
|
/**
|
|
15816
16632
|
* Validate() method override for MJ_BizApps_Orders: Subscription Terms entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
15817
|
-
* * TermNumber: The term number must be a positive
|
|
16633
|
+
* * TermNumber: The term number must be a positive value greater than zero.
|
|
15818
16634
|
* * Table-Level: The subscription term's end date must be on or after its start date to ensure a valid active period.
|
|
15819
16635
|
* * Table-Level: If an item is marked as prorated, a proration factor must be provided to ensure accurate financial calculations.
|
|
15820
16636
|
* @public
|
|
@@ -15830,13 +16646,13 @@ let mjBizAppsOrdersSubscriptionTermEntity = class mjBizAppsOrdersSubscriptionTer
|
|
|
15830
16646
|
return result;
|
|
15831
16647
|
}
|
|
15832
16648
|
/**
|
|
15833
|
-
* The term number must be a positive
|
|
16649
|
+
* The term number must be a positive value greater than zero.
|
|
15834
16650
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15835
16651
|
* @public
|
|
15836
16652
|
* @method
|
|
15837
16653
|
*/
|
|
15838
16654
|
ValidateTermNumberGreaterThanZero(result) {
|
|
15839
|
-
if (this.TermNumber
|
|
16655
|
+
if (this.TermNumber !== null && this.TermNumber !== undefined && this.TermNumber <= 0) {
|
|
15840
16656
|
result.Errors.push(new ValidationErrorInfo("TermNumber", "The term number must be greater than zero.", this.TermNumber, ValidationErrorType.Failure));
|
|
15841
16657
|
}
|
|
15842
16658
|
}
|
|
@@ -16607,8 +17423,8 @@ let mjBizAppsOrdersSubscriptionEntity = class mjBizAppsOrdersSubscriptionEntity
|
|
|
16607
17423
|
}
|
|
16608
17424
|
/**
|
|
16609
17425
|
* Validate() method override for MJ_BizApps_Orders: Subscriptions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
16610
|
-
* * RenewalLeadDays: Renewal lead days must be
|
|
16611
|
-
* * Table-Level: A subscription cannot migrate from itself. The
|
|
17426
|
+
* * RenewalLeadDays: Renewal lead days must be a non-negative number (0 or greater) if specified.
|
|
17427
|
+
* * Table-Level: A subscription cannot migrate from itself. The 'Migrates From Subscription' field must be different from the subscription's own ID.
|
|
16612
17428
|
* * Table-Level: A subscription cannot migrate to itself. This prevents logical errors where a subscription's migration destination is set as its own record.
|
|
16613
17429
|
* @public
|
|
16614
17430
|
* @method
|
|
@@ -16623,25 +17439,25 @@ let mjBizAppsOrdersSubscriptionEntity = class mjBizAppsOrdersSubscriptionEntity
|
|
|
16623
17439
|
return result;
|
|
16624
17440
|
}
|
|
16625
17441
|
/**
|
|
16626
|
-
* Renewal lead days must be
|
|
17442
|
+
* Renewal lead days must be a non-negative number (0 or greater) if specified.
|
|
16627
17443
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
16628
17444
|
* @public
|
|
16629
17445
|
* @method
|
|
16630
17446
|
*/
|
|
16631
17447
|
ValidateRenewalLeadDaysGreaterThanOrEqualToZero(result) {
|
|
16632
17448
|
if (this.RenewalLeadDays != null && this.RenewalLeadDays < 0) {
|
|
16633
|
-
result.Errors.push(new ValidationErrorInfo("RenewalLeadDays", "Renewal lead days must be
|
|
17449
|
+
result.Errors.push(new ValidationErrorInfo("RenewalLeadDays", "Renewal lead days must be 0 or greater.", this.RenewalLeadDays, ValidationErrorType.Failure));
|
|
16634
17450
|
}
|
|
16635
17451
|
}
|
|
16636
17452
|
/**
|
|
16637
|
-
* A subscription cannot migrate from itself. The
|
|
17453
|
+
* A subscription cannot migrate from itself. The 'Migrates From Subscription' field must be different from the subscription's own ID.
|
|
16638
17454
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
16639
17455
|
* @public
|
|
16640
17456
|
* @method
|
|
16641
17457
|
*/
|
|
16642
17458
|
ValidateMigratesFromSubscriptionIDNotEqualToID(result) {
|
|
16643
17459
|
if (this.MigratesFromSubscriptionID != null && this.MigratesFromSubscriptionID === this.ID) {
|
|
16644
|
-
result.Errors.push(new ValidationErrorInfo("MigratesFromSubscriptionID", "A subscription cannot migrate from itself. The
|
|
17460
|
+
result.Errors.push(new ValidationErrorInfo("MigratesFromSubscriptionID", "A subscription cannot migrate from itself. The source subscription must be a different record.", this.MigratesFromSubscriptionID, ValidationErrorType.Failure));
|
|
16645
17461
|
}
|
|
16646
17462
|
}
|
|
16647
17463
|
/**
|