@social-mail/social-mail-client 1.2.704 → 1.2.705
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/admin/AdminAppIndex.pack.js +310 -25
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +3 -3
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/pages/stores/products/ProductEditor.js +1 -1
- package/dist/common/pages/stores/products/ProductEditor.js.map +1 -1
- package/dist/model/model.d.ts +60 -5
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +307 -22
- package/dist/model/model.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +307 -22
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +1 -1
- package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
- package/dist/public/preview/zip/DownloadZip.pack.js +307 -22
- package/dist/public/preview/zip/DownloadZip.pack.js.map +1 -1
- package/dist/public/preview/zip/DownloadZip.pack.min.js +1 -1
- package/dist/public/preview/zip/DownloadZip.pack.min.js.map +1 -1
- package/dist/public/store/Store.pack.js +307 -22
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/public/store/Store.pack.min.js +1 -1
- package/dist/public/store/Store.pack.min.js.map +1 -1
- package/dist/public/store/StoreApp.pack.js +307 -22
- package/dist/public/store/StoreApp.pack.js.map +1 -1
- package/dist/public/store/StoreApp.pack.min.js +1 -1
- package/dist/public/store/StoreApp.pack.min.js.map +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.js +307 -22
- package/dist/public/store/cart/ShoppingCart.pack.js.map +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.min.js +1 -1
- package/dist/public/store/cart/ShoppingCart.pack.min.js.map +1 -1
- package/dist/services/store/StoreItemService.js +2 -2
- package/dist/services/store/StoreItemService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +310 -25
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +3 -3
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/stores/products/ProductEditor.tsx +1 -1
- package/src/model/model.ts +78 -12
- package/src/services/store/StoreItemService.ts +2 -2
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@ export default class ProductEditor extends AtomControl {
|
|
|
199
199
|
<CollectionEditorEx
|
|
200
200
|
label="Taxes"
|
|
201
201
|
model={this.model}
|
|
202
|
-
field={(x) => x.
|
|
202
|
+
field={(x) => x.applicableTaxes}
|
|
203
203
|
addItemDefaults={({ taxItem: null, storeItem: null })}
|
|
204
204
|
saveAfterAdd={false}
|
|
205
205
|
inlineAddRenderer={(item: IStoreItemTax) => <div>
|
package/src/model/model.ts
CHANGED
|
@@ -1095,6 +1095,8 @@ export interface IStoreItem extends IClrEntity {
|
|
|
1095
1095
|
internalNotes?: string | null;
|
|
1096
1096
|
description?: string | null;
|
|
1097
1097
|
itemType?: "product" | "e-product" | "shipping" | "service" | "tax" | "fee" | "commission" | "variant" | "size";
|
|
1098
|
+
itemUnitType?: "product" | "e-product" | "shipping" | "service" | "tax" | "fee" | "commission" | "variant" | "size" | null;
|
|
1099
|
+
itemUnit?: number;
|
|
1098
1100
|
folderID?: number | null;
|
|
1099
1101
|
sizeForID?: number | null;
|
|
1100
1102
|
variantForID?: number | null;
|
|
@@ -1113,25 +1115,77 @@ export interface IStoreItem extends IClrEntity {
|
|
|
1113
1115
|
variantFor?: IStoreItem;
|
|
1114
1116
|
variants?: ICollection<IStoreItem>;
|
|
1115
1117
|
vendor?: IStoreAccount;
|
|
1118
|
+
itemCoupons?: ICollection<IStoreCoupon>;
|
|
1119
|
+
lineItems?: ICollection<IStoreJournalLineItem>;
|
|
1116
1120
|
storeItemPrices?: ICollection<IStoreItemPrice>;
|
|
1117
1121
|
mediaFiles?: ICollection<IStoreMediaFile>;
|
|
1118
1122
|
insights?: ICollection<IStoreInsight>;
|
|
1119
|
-
|
|
1120
|
-
taxes?: ICollection<IStoreItemTax>;
|
|
1123
|
+
applicableTaxes?: ICollection<IStoreItemTax>;
|
|
1121
1124
|
taxItems?: ICollection<IStoreItemTax>;
|
|
1122
1125
|
storeItemTags?: ICollection<IStoreItemTag>;
|
|
1123
1126
|
}
|
|
1124
1127
|
|
|
1125
1128
|
export const StoreItemItemTypeArray = [{"label":"product","value":"product"},{"label":"e-product","value":"e-product"},{"label":"shipping","value":"shipping"},{"label":"service","value":"service"},{"label":"tax","value":"tax"},{"label":"fee","value":"fee"},{"label":"commission","value":"commission"},{"label":"variant","value":"variant"},{"label":"size","value":"size"}];
|
|
1129
|
+
export const StoreItemItemUnitTypeArray = [{"label":"product","value":"product"},{"label":"e-product","value":"e-product"},{"label":"shipping","value":"shipping"},{"label":"service","value":"service"},{"label":"tax","value":"tax"},{"label":"fee","value":"fee"},{"label":"commission","value":"commission"},{"label":"variant","value":"variant"},{"label":"size","value":"size"}];
|
|
1126
1130
|
|
|
1127
1131
|
export const StoreItem: IModel<IStoreItem,{"storeQuery":"external"},any> = new Model<IStoreItem>(
|
|
1128
1132
|
"StoreItem",
|
|
1129
1133
|
["storeItemID"],
|
|
1130
|
-
{ name: "",active: false,itemType: "product",dateCreated: new DefaultFactory(() => new DateTime()),dateUpdated: new DefaultFactory(() => new DateTime()),price: 0,maxPrice: 0 },
|
|
1131
|
-
{"name":"store_items","keys":[{"name":"storeItemID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"itemFolderID","type":"number","dataType":"BigInt"},{"name":"name","type":"string","dataType":"Char","length":200,"default":["name","\"\""]},{"name":"active","type":"boolean","dataType":"Boolean","default":["active","false"]},{"name":"internalNotes","type":"string","dataType":"Char","default":["internalNotes","\"\""]},{"name":"description","type":"string","dataType":"Char","default":["description","\"\""]},{"name":"itemType","type":"string","dataType":"Char","length":20,"default":["itemType","\"product\""]},{"name":"folderID","type":"number","dataType":"BigInt"},{"name":"sizeForID","type":"number","dataType":"BigInt"},{"name":"variantForID","type":"number","dataType":"BigInt"},{"name":"dateCreated","type":"DateTime","dataType":"DateTime","default":["dateCreated","new DefaultFactory(() => new DateTime())"]},{"name":"dateUpdated","type":"DateTime","dataType":"DateTime","default":["dateUpdated","new DefaultFactory(() => new DateTime())"]},{"name":"vendorID","type":"number","dataType":"BigInt"},{"name":"price","type":"number","dataType":"Decimal","default":["price","0"]},{"name":"maxPrice","type":"number","dataType":"Decimal","default":["maxPrice","0"]}],"relations":[{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"itemFolder","fkMap":[{"fk":"itemFolderID","relatedKey":"itemFolderID"}],"relatedName":"StoreItemFolder"},{"name":"fileFolder","fkMap":[{"fk":"folderID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"sizeFor","fkMap":[{"fk":"sizeForID","relatedKey":"storeItemID"}],"relatedName":"StoreItem"},{"name":"sizes","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"variantFor","fkMap":[{"fk":"variantForID","relatedKey":"storeItemID"}],"relatedName":"StoreItem"},{"name":"variants","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"vendor","fkMap":[{"fk":"vendorID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"
|
|
1134
|
+
{ name: "",active: false,itemType: "product",itemUnit: 0,dateCreated: new DefaultFactory(() => new DateTime()),dateUpdated: new DefaultFactory(() => new DateTime()),price: 0,maxPrice: 0 },
|
|
1135
|
+
{"name":"store_items","keys":[{"name":"storeItemID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"itemFolderID","type":"number","dataType":"BigInt"},{"name":"name","type":"string","dataType":"Char","length":200,"default":["name","\"\""]},{"name":"active","type":"boolean","dataType":"Boolean","default":["active","false"]},{"name":"internalNotes","type":"string","dataType":"Char","default":["internalNotes","\"\""]},{"name":"description","type":"string","dataType":"Char","default":["description","\"\""]},{"name":"itemType","type":"string","dataType":"Char","length":20,"default":["itemType","\"product\""]},{"name":"itemUnitType","type":"string","dataType":"Char","length":50,"default":["itemUnitType","\"product\""]},{"name":"itemUnit","type":"number","dataType":"Decimal","default":["itemUnit","0"]},{"name":"folderID","type":"number","dataType":"BigInt"},{"name":"sizeForID","type":"number","dataType":"BigInt"},{"name":"variantForID","type":"number","dataType":"BigInt"},{"name":"dateCreated","type":"DateTime","dataType":"DateTime","default":["dateCreated","new DefaultFactory(() => new DateTime())"]},{"name":"dateUpdated","type":"DateTime","dataType":"DateTime","default":["dateUpdated","new DefaultFactory(() => new DateTime())"]},{"name":"vendorID","type":"number","dataType":"BigInt"},{"name":"price","type":"number","dataType":"Decimal","default":["price","0"]},{"name":"maxPrice","type":"number","dataType":"Decimal","default":["maxPrice","0"]}],"relations":[{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"itemFolder","fkMap":[{"fk":"itemFolderID","relatedKey":"itemFolderID"}],"relatedName":"StoreItemFolder"},{"name":"fileFolder","fkMap":[{"fk":"folderID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"sizeFor","fkMap":[{"fk":"sizeForID","relatedKey":"storeItemID"}],"relatedName":"StoreItem"},{"name":"sizes","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"variantFor","fkMap":[{"fk":"variantForID","relatedKey":"storeItemID"}],"relatedName":"StoreItem"},{"name":"variants","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"vendor","fkMap":[{"fk":"vendorID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"itemCoupons","isCollection":true,"isInverse":true,"relatedName":"StoreCoupon"},{"name":"lineItems","isCollection":true,"isInverse":true,"relatedName":"StoreJournalLineItem"},{"name":"storeItemPrices","isCollection":true,"isInverse":true,"relatedName":"StoreItemPrice"},{"name":"mediaFiles","isCollection":true,"isInverse":true,"relatedName":"StoreMediaFile"},{"name":"insights","isCollection":true,"isInverse":true,"relatedName":"StoreInsight"},{"name":"applicableTaxes","isCollection":true,"isInverse":true,"relatedName":"StoreItemTax"},{"name":"taxItems","isCollection":true,"isInverse":true,"relatedName":"StoreItemTax"},{"name":"storeItemTags","isCollection":true,"isInverse":true,"relatedName":"StoreItemTag"}],"queries":{"storeQuery":"external"}}
|
|
1132
1136
|
);
|
|
1133
1137
|
modelEntitySchemas["StoreItem"] = StoreItem;
|
|
1134
1138
|
|
|
1139
|
+
export interface IStoreCoupon extends IClrEntity {
|
|
1140
|
+
readonly couponID?: number;
|
|
1141
|
+
storeID?: number;
|
|
1142
|
+
code?: string;
|
|
1143
|
+
active?: boolean;
|
|
1144
|
+
hidden?: boolean;
|
|
1145
|
+
itemID?: number | null;
|
|
1146
|
+
startDate?: DateTime;
|
|
1147
|
+
endDate?: DateTime | null;
|
|
1148
|
+
exclusive?: boolean;
|
|
1149
|
+
minOrderAmount?: number;
|
|
1150
|
+
maxOrderAmount?: number;
|
|
1151
|
+
minQuantity?: number;
|
|
1152
|
+
maxQuantity?: number;
|
|
1153
|
+
amount?: number;
|
|
1154
|
+
type?: "discount" | "subtract";
|
|
1155
|
+
store?: IWebSiteFolder;
|
|
1156
|
+
item?: IStoreItem;
|
|
1157
|
+
orders?: ICollection<IStoreJournalCoupon>;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
export const StoreCouponTypeArray = [{"label":"discount","value":"discount"},{"label":"subtract","value":"subtract"}];
|
|
1161
|
+
|
|
1162
|
+
export const StoreCoupon: IModel<IStoreCoupon,any,any> = new Model<IStoreCoupon>(
|
|
1163
|
+
"StoreCoupon",
|
|
1164
|
+
["couponID"],
|
|
1165
|
+
{ code: "",active: false,hidden: false,startDate: new DefaultFactory(() => new DateTime()),exclusive: false,minOrderAmount: 0,maxOrderAmount: 0,minQuantity: 0,maxQuantity: 0,amount: 0,type: "discount" },
|
|
1166
|
+
{"name":"store_coupons","keys":[{"name":"couponID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"code","type":"string","dataType":"Char","length":100,"default":["code","\"\""]},{"name":"active","type":"boolean","dataType":"Boolean","default":["active","false"]},{"name":"hidden","type":"boolean","dataType":"Boolean","default":["hidden","false"]},{"name":"itemID","type":"number","dataType":"BigInt"},{"name":"startDate","type":"DateTime","dataType":"DateTime","default":["startDate","new DefaultFactory(() => new DateTime())"]},{"name":"endDate","type":"DateTime","dataType":"DateTime","default":["endDate","new DefaultFactory(() => new DateTime())"]},{"name":"exclusive","type":"boolean","dataType":"Boolean","default":["exclusive","false"]},{"name":"minOrderAmount","type":"number","dataType":"Decimal","default":["minOrderAmount","0"]},{"name":"maxOrderAmount","type":"number","dataType":"Decimal","default":["maxOrderAmount","0"]},{"name":"minQuantity","type":"number","dataType":"Int","default":["minQuantity","0"]},{"name":"maxQuantity","type":"number","dataType":"Int","default":["maxQuantity","0"]},{"name":"amount","type":"number","dataType":"Int","default":["amount","0"]},{"name":"type","type":"string","dataType":"Char","length":50,"default":["type","\"discount\""]}],"relations":[{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"item","fkMap":[{"fk":"itemID","relatedKey":"storeItemID"}],"relatedName":"StoreItem"},{"name":"orders","isCollection":true,"isInverse":true,"relatedName":"StoreJournalCoupon"}]}
|
|
1167
|
+
);
|
|
1168
|
+
modelEntitySchemas["StoreCoupon"] = StoreCoupon;
|
|
1169
|
+
|
|
1170
|
+
export interface IStoreJournalCoupon extends IClrEntity {
|
|
1171
|
+
readonly appliedCouponID?: number;
|
|
1172
|
+
couponID?: number;
|
|
1173
|
+
orderID?: number;
|
|
1174
|
+
lineItemID?: number | null;
|
|
1175
|
+
couponCode?: string;
|
|
1176
|
+
coupon?: IStoreCoupon;
|
|
1177
|
+
order?: IStoreJournal;
|
|
1178
|
+
lineItem?: IStoreJournalLineItem;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
export const StoreJournalCoupon: IModel<IStoreJournalCoupon,any,any> = new Model<IStoreJournalCoupon>(
|
|
1182
|
+
"StoreJournalCoupon",
|
|
1183
|
+
["appliedCouponID"],
|
|
1184
|
+
{ couponCode: "" },
|
|
1185
|
+
{"name":"store_journal_coupons","keys":[{"name":"appliedCouponID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"couponID","type":"number","dataType":"BigInt"},{"name":"orderID","type":"number","dataType":"BigInt"},{"name":"lineItemID","type":"number","dataType":"BigInt"},{"name":"couponCode","type":"string","dataType":"Char","length":200,"default":["couponCode","\"\""]}],"relations":[{"name":"coupon","fkMap":[{"fk":"couponID","relatedKey":"couponID"}],"relatedName":"StoreCoupon"},{"name":"order","fkMap":[{"fk":"orderID","relatedKey":"journalID"}],"relatedName":"StoreJournal"},{"name":"lineItem","fkMap":[{"fk":"lineItemID","relatedKey":"lineItemID"}],"relatedName":"StoreJournalLineItem"}]}
|
|
1186
|
+
);
|
|
1187
|
+
modelEntitySchemas["StoreJournalCoupon"] = StoreJournalCoupon;
|
|
1188
|
+
|
|
1135
1189
|
export interface IStoreItemFolder extends IClrEntity {
|
|
1136
1190
|
readonly itemFolderID?: number;
|
|
1137
1191
|
storeID?: number;
|
|
@@ -1276,18 +1330,18 @@ export interface IStoreAccount extends IClrEntity {
|
|
|
1276
1330
|
soldInvoices?: ICollection<IStoreJournal>;
|
|
1277
1331
|
boughtInvoices?: ICollection<IStoreJournal>;
|
|
1278
1332
|
addresses?: ICollection<IStoreAccountAddress>;
|
|
1333
|
+
soldItems?: ICollection<IStoreJournalLineItem>;
|
|
1279
1334
|
storePaymentGateway?: IStorePaymentGateway;
|
|
1280
1335
|
emails?: ICollection<IStoreAccountEmail>;
|
|
1281
1336
|
phones?: ICollection<IStoreAccountPhone>;
|
|
1282
1337
|
entries?: ICollection<IStoreJournalEntry>;
|
|
1283
|
-
soldItems?: ICollection<IStoreJournalLineItem>;
|
|
1284
1338
|
}
|
|
1285
1339
|
|
|
1286
1340
|
export const StoreAccount: IModel<IStoreAccount,any,any> = new Model<IStoreAccount>(
|
|
1287
1341
|
"StoreAccount",
|
|
1288
1342
|
["accountID"],
|
|
1289
1343
|
{ dateCreated: new DefaultFactory(() => new DateTime()),ledgerType: "",name: "",balance: 0 },
|
|
1290
|
-
{"name":"store_accounts","keys":[{"name":"accountID","type":"number","dataType":"BigInt"}],"properties":[{"name":"path","type":"string","dataType":"Char","length":400,"default":["path","\"\""]},{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"parentID","type":"number","dataType":"BigInt"},{"name":"head","type":"string","dataType":"Char","length":50,"default":["head","\"\""]},{"name":"dateCreated","type":"DateTime","dataType":"DateTime","default":["dateCreated","new DefaultFactory(() => new DateTime())"]},{"name":"ledgerType","type":"string","dataType":"Char","length":50,"default":["ledgerType","\"\""]},{"name":"name","type":"string","dataType":"Char","length":400,"default":["name","\"\""]},{"name":"description","type":"string","dataType":"Char","default":["description","\"\""]},{"name":"balance","type":"number","dataType":"Decimal","default":["balance","0"]},{"name":"billingAddressID","type":"number","dataType":"BigInt","default":["billingAddressID","0"]},{"name":"shippingAddressID","type":"number","dataType":"BigInt","default":["shippingAddressID","0"]}],"relations":[{"name":"user","fkMap":[{"fk":"accountID","relatedKey":"userID"}],"relatedName":"User"},{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"parent","fkMap":[{"fk":"parentID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"children","isCollection":true,"isInverse":true,"relatedName":"StoreAccount"},{"name":"vendorItems","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"soldInvoices","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"boughtInvoices","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"addresses","isCollection":true,"isInverse":true,"relatedName":"StoreAccountAddress"},{"name":"
|
|
1344
|
+
{"name":"store_accounts","keys":[{"name":"accountID","type":"number","dataType":"BigInt"}],"properties":[{"name":"path","type":"string","dataType":"Char","length":400,"default":["path","\"\""]},{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"parentID","type":"number","dataType":"BigInt"},{"name":"head","type":"string","dataType":"Char","length":50,"default":["head","\"\""]},{"name":"dateCreated","type":"DateTime","dataType":"DateTime","default":["dateCreated","new DefaultFactory(() => new DateTime())"]},{"name":"ledgerType","type":"string","dataType":"Char","length":50,"default":["ledgerType","\"\""]},{"name":"name","type":"string","dataType":"Char","length":400,"default":["name","\"\""]},{"name":"description","type":"string","dataType":"Char","default":["description","\"\""]},{"name":"balance","type":"number","dataType":"Decimal","default":["balance","0"]},{"name":"billingAddressID","type":"number","dataType":"BigInt","default":["billingAddressID","0"]},{"name":"shippingAddressID","type":"number","dataType":"BigInt","default":["shippingAddressID","0"]}],"relations":[{"name":"user","fkMap":[{"fk":"accountID","relatedKey":"userID"}],"relatedName":"User"},{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"parent","fkMap":[{"fk":"parentID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"children","isCollection":true,"isInverse":true,"relatedName":"StoreAccount"},{"name":"vendorItems","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"soldInvoices","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"boughtInvoices","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"addresses","isCollection":true,"isInverse":true,"relatedName":"StoreAccountAddress"},{"name":"soldItems","isCollection":true,"isInverse":true,"relatedName":"StoreJournalLineItem"},{"name":"storePaymentGateway","isCollection":false,"isInverse":true,"relatedName":"StorePaymentGateway"},{"name":"emails","isCollection":true,"isInverse":true,"relatedName":"StoreAccountEmail"},{"name":"phones","isCollection":true,"isInverse":true,"relatedName":"StoreAccountPhone"},{"name":"entries","isCollection":true,"isInverse":true,"relatedName":"StoreJournalEntry"}]}
|
|
1291
1345
|
);
|
|
1292
1346
|
modelEntitySchemas["StoreAccount"] = StoreAccount;
|
|
1293
1347
|
|
|
@@ -1413,9 +1467,10 @@ export interface IStoreJournal extends IClrEntity {
|
|
|
1413
1467
|
reference?: IStoreJournal;
|
|
1414
1468
|
references?: ICollection<IStoreJournal>;
|
|
1415
1469
|
folder?: IAppFile;
|
|
1470
|
+
orderCoupons?: ICollection<IStoreJournalCoupon>;
|
|
1471
|
+
lineItems?: ICollection<IStoreJournalLineItem>;
|
|
1416
1472
|
paymentAttempts?: ICollection<IStorePaymentAttempt>;
|
|
1417
1473
|
entries?: ICollection<IStoreJournalEntry>;
|
|
1418
|
-
lineItems?: ICollection<IStoreJournalLineItem>;
|
|
1419
1474
|
}
|
|
1420
1475
|
|
|
1421
1476
|
export const StoreJournalJournalTypeArray = [{"label":"order","value":"order"},{"label":"purchase-order","value":"purchase-order"},{"label":"sales-invoice","value":"sales-invoice"},{"label":"journal","value":"journal"},{"label":"purchase-bill","value":"purchase-bill"},{"label":"payment","value":"payment"}];
|
|
@@ -1424,7 +1479,7 @@ export const StoreJournal: IModel<IStoreJournal,any,any> = new Model<IStoreJourn
|
|
|
1424
1479
|
"StoreJournal",
|
|
1425
1480
|
["journalID"],
|
|
1426
1481
|
{ dateCreated: new DefaultFactory(() => new DateTime()),dateUpdated: new DefaultFactory(() => new DateTime()),journalType: "order",posted: false,status: "",total: 0,balance: 0,taxExempt: false },
|
|
1427
|
-
{"name":"store_journals","keys":[{"name":"journalID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"dateCreated","type":"DateTime","dataType":"DateTime","default":["dateCreated","new DefaultFactory(() => new DateTime())"]},{"name":"dateUpdated","type":"DateTime","dataType":"DateTime","default":["dateUpdated","new DefaultFactory(() => new DateTime())"]},{"name":"journalType","type":"string","dataType":"AsciiChar","length":50,"default":["journalType","\"order\""]},{"name":"description","type":"string","dataType":"Char","default":["description","\"\""]},{"name":"posted","type":"boolean","dataType":"Boolean","default":["posted","false"]},{"name":"status","type":"string","dataType":"Char","length":50,"default":["status","\"\""]},{"name":"sellerID","type":"number","dataType":"BigInt"},{"name":"buyerID","type":"number","dataType":"BigInt"},{"name":"buyerBillingAddressID","type":"number","dataType":"BigInt"},{"name":"buyerShippingAddressID","type":"number","dataType":"BigInt"},{"name":"total","type":"number","dataType":"Decimal","default":["total","0"]},{"name":"balance","type":"number","dataType":"Decimal","default":["balance","0"]},{"name":"referenceID","type":"number","dataType":"BigInt"},{"name":"folderID","type":"number","dataType":"BigInt"},{"name":"taxExempt","type":"boolean","dataType":"Boolean","default":["taxExempt","false"]},{"name":"taxExemptNotes","type":"string","dataType":"Char","default":["taxExemptNotes","\"\""]},{"name":"taxExemptTaxID","type":"string","dataType":"Char","default":["taxExemptTaxID","\"\""]}],"relations":[{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"seller","fkMap":[{"fk":"sellerID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"buyer","fkMap":[{"fk":"buyerID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"buyerBillingAddress","fkMap":[{"fk":"buyerBillingAddressID","relatedKey":"addressID"}],"relatedName":"StoreAccountAddress"},{"name":"buyerShippingAddress","fkMap":[{"fk":"buyerShippingAddressID","relatedKey":"addressID"}],"relatedName":"StoreAccountAddress"},{"name":"reference","fkMap":[{"fk":"referenceID","relatedKey":"journalID"}],"relatedName":"StoreJournal"},{"name":"references","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"folder","fkMap":[{"fk":"folderID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"
|
|
1482
|
+
{"name":"store_journals","keys":[{"name":"journalID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"storeID","type":"number","dataType":"BigInt"},{"name":"dateCreated","type":"DateTime","dataType":"DateTime","default":["dateCreated","new DefaultFactory(() => new DateTime())"]},{"name":"dateUpdated","type":"DateTime","dataType":"DateTime","default":["dateUpdated","new DefaultFactory(() => new DateTime())"]},{"name":"journalType","type":"string","dataType":"AsciiChar","length":50,"default":["journalType","\"order\""]},{"name":"description","type":"string","dataType":"Char","default":["description","\"\""]},{"name":"posted","type":"boolean","dataType":"Boolean","default":["posted","false"]},{"name":"status","type":"string","dataType":"Char","length":50,"default":["status","\"\""]},{"name":"sellerID","type":"number","dataType":"BigInt"},{"name":"buyerID","type":"number","dataType":"BigInt"},{"name":"buyerBillingAddressID","type":"number","dataType":"BigInt"},{"name":"buyerShippingAddressID","type":"number","dataType":"BigInt"},{"name":"total","type":"number","dataType":"Decimal","default":["total","0"]},{"name":"balance","type":"number","dataType":"Decimal","default":["balance","0"]},{"name":"referenceID","type":"number","dataType":"BigInt"},{"name":"folderID","type":"number","dataType":"BigInt"},{"name":"taxExempt","type":"boolean","dataType":"Boolean","default":["taxExempt","false"]},{"name":"taxExemptNotes","type":"string","dataType":"Char","default":["taxExemptNotes","\"\""]},{"name":"taxExemptTaxID","type":"string","dataType":"Char","default":["taxExemptTaxID","\"\""]}],"relations":[{"name":"store","fkMap":[{"fk":"storeID","relatedKey":"folderID"}],"relatedName":"WebSiteFolder"},{"name":"seller","fkMap":[{"fk":"sellerID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"buyer","fkMap":[{"fk":"buyerID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"buyerBillingAddress","fkMap":[{"fk":"buyerBillingAddressID","relatedKey":"addressID"}],"relatedName":"StoreAccountAddress"},{"name":"buyerShippingAddress","fkMap":[{"fk":"buyerShippingAddressID","relatedKey":"addressID"}],"relatedName":"StoreAccountAddress"},{"name":"reference","fkMap":[{"fk":"referenceID","relatedKey":"journalID"}],"relatedName":"StoreJournal"},{"name":"references","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"folder","fkMap":[{"fk":"folderID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"orderCoupons","isCollection":true,"isInverse":true,"relatedName":"StoreJournalCoupon"},{"name":"lineItems","isCollection":true,"isInverse":true,"relatedName":"StoreJournalLineItem"},{"name":"paymentAttempts","isCollection":true,"isInverse":true,"relatedName":"StorePaymentAttempt"},{"name":"entries","isCollection":true,"isInverse":true,"relatedName":"StoreJournalEntry"}]}
|
|
1428
1483
|
);
|
|
1429
1484
|
modelEntitySchemas["StoreJournal"] = StoreJournal;
|
|
1430
1485
|
|
|
@@ -1455,20 +1510,30 @@ export interface IStoreJournalLineItem extends IClrEntity {
|
|
|
1455
1510
|
journalID?: number;
|
|
1456
1511
|
itemID?: number;
|
|
1457
1512
|
itemPriceID?: number | null;
|
|
1513
|
+
price?: number;
|
|
1514
|
+
discountPercentage?: number;
|
|
1515
|
+
discount?: number;
|
|
1516
|
+
priceAfterDiscount?: number;
|
|
1517
|
+
couponDiscount?: number;
|
|
1518
|
+
quantity?: number;
|
|
1458
1519
|
amount?: number;
|
|
1520
|
+
taxes?: number;
|
|
1459
1521
|
total?: number;
|
|
1460
|
-
quantity?: number;
|
|
1461
1522
|
inclusive?: boolean;
|
|
1462
1523
|
itemType?: "product" | "e-product" | "shipping" | "service" | "tax" | "fee" | "commission" | "variant" | "size" | null;
|
|
1463
1524
|
hide?: boolean;
|
|
1464
1525
|
vendorID?: number | null;
|
|
1465
1526
|
sourceID?: number | null;
|
|
1527
|
+
taxForID?: number | null;
|
|
1466
1528
|
journal?: IStoreJournal;
|
|
1467
1529
|
item?: IStoreItem;
|
|
1468
1530
|
itemPrice?: IStoreItemPrice;
|
|
1469
1531
|
vendor?: IStoreAccount;
|
|
1470
1532
|
source?: IStoreJournalLineItem;
|
|
1471
1533
|
relatedItems?: ICollection<IStoreJournalLineItem>;
|
|
1534
|
+
taxFor?: IStoreJournalLineItem;
|
|
1535
|
+
taxLineItems?: ICollection<IStoreJournalLineItem>;
|
|
1536
|
+
coupons?: ICollection<IStoreJournalCoupon>;
|
|
1472
1537
|
entries?: ICollection<IStoreJournalEntry>;
|
|
1473
1538
|
}
|
|
1474
1539
|
|
|
@@ -1477,8 +1542,8 @@ export const StoreJournalLineItemItemTypeArray = [{"label":"product","value":"pr
|
|
|
1477
1542
|
export const StoreJournalLineItem: IModel<IStoreJournalLineItem,any,any> = new Model<IStoreJournalLineItem>(
|
|
1478
1543
|
"StoreJournalLineItem",
|
|
1479
1544
|
["lineItemID"],
|
|
1480
|
-
{
|
|
1481
|
-
{"name":"store_journal_line_items","keys":[{"name":"lineItemID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"journalID","type":"number","dataType":"BigInt"},{"name":"itemID","type":"number","dataType":"BigInt"},{"name":"itemPriceID","type":"number","dataType":"BigInt"},{"name":"
|
|
1545
|
+
{ price: 0,discountPercentage: 0,discount: 0,priceAfterDiscount: 0,couponDiscount: 0,quantity: 0,amount: 0,taxes: 0,total: 0,inclusive: false,hide: false },
|
|
1546
|
+
{"name":"store_journal_line_items","keys":[{"name":"lineItemID","type":"number","generated":"identity","dataType":"BigInt"}],"properties":[{"name":"journalID","type":"number","dataType":"BigInt"},{"name":"itemID","type":"number","dataType":"BigInt"},{"name":"itemPriceID","type":"number","dataType":"BigInt"},{"name":"price","type":"number","dataType":"Decimal","default":["price","0"]},{"name":"discountPercentage","type":"number","dataType":"Decimal","default":["discountPercentage","0"]},{"name":"discount","type":"number","dataType":"Decimal","default":["discount","0"]},{"name":"priceAfterDiscount","type":"number","dataType":"Decimal","default":["priceAfterDiscount","0"]},{"name":"couponDiscount","type":"number","dataType":"Decimal","default":["couponDiscount","0"]},{"name":"quantity","type":"number","dataType":"Decimal","default":["quantity","0"]},{"name":"amount","type":"number","dataType":"Decimal","default":["amount","0"]},{"name":"taxes","type":"number","dataType":"Decimal","default":["taxes","0"]},{"name":"total","type":"number","dataType":"Decimal","default":["total","0"]},{"name":"inclusive","type":"boolean","dataType":"Boolean","default":["inclusive","false"]},{"name":"itemType","type":"string","dataType":"Char","length":50,"default":["itemType","\"product\""]},{"name":"hide","type":"boolean","dataType":"Boolean","default":["hide","false"]},{"name":"vendorID","type":"number","dataType":"BigInt"},{"name":"sourceID","type":"number","dataType":"BigInt"},{"name":"taxForID","type":"number","dataType":"BigInt"}],"relations":[{"name":"journal","fkMap":[{"fk":"journalID","relatedKey":"journalID"}],"relatedName":"StoreJournal"},{"name":"item","fkMap":[{"fk":"itemID","relatedKey":"storeItemID"}],"relatedName":"StoreItem"},{"name":"itemPrice","fkMap":[{"fk":"itemPriceID","relatedKey":"priceID"}],"relatedName":"StoreItemPrice"},{"name":"vendor","fkMap":[{"fk":"vendorID","relatedKey":"accountID"}],"relatedName":"StoreAccount"},{"name":"source","fkMap":[{"fk":"sourceID","relatedKey":"lineItemID"}],"relatedName":"StoreJournalLineItem"},{"name":"relatedItems","isCollection":true,"isInverse":true,"relatedName":"StoreJournalLineItem"},{"name":"taxFor","fkMap":[{"fk":"taxForID","relatedKey":"lineItemID"}],"relatedName":"StoreJournalLineItem"},{"name":"taxLineItems","isCollection":true,"isInverse":true,"relatedName":"StoreJournalLineItem"},{"name":"coupons","isCollection":true,"isInverse":true,"relatedName":"StoreJournalCoupon"},{"name":"entries","isCollection":true,"isInverse":true,"relatedName":"StoreJournalEntry"}]}
|
|
1482
1547
|
);
|
|
1483
1548
|
modelEntitySchemas["StoreJournalLineItem"] = StoreJournalLineItem;
|
|
1484
1549
|
|
|
@@ -1693,6 +1758,7 @@ export interface IWebSiteFolder extends IClrEntity {
|
|
|
1693
1758
|
storeItems?: ICollection<IStoreItem>;
|
|
1694
1759
|
itemFolders?: ICollection<IStoreItemFolder>;
|
|
1695
1760
|
storeAccounts?: ICollection<IStoreAccount>;
|
|
1761
|
+
coupons?: ICollection<IStoreCoupon>;
|
|
1696
1762
|
journals?: ICollection<IStoreJournal>;
|
|
1697
1763
|
insights?: ICollection<IStoreInsight>;
|
|
1698
1764
|
tags?: ICollection<IStoreTag>;
|
|
@@ -1705,7 +1771,7 @@ export const WebSiteFolder: IModel<IWebSiteFolder,{"templates":"external"},any>
|
|
|
1705
1771
|
"WebSiteFolder",
|
|
1706
1772
|
["folderID"],
|
|
1707
1773
|
{ isStatic: false,isTemplate: false,storeEnabled: false,isModified: false,snapshotStorage: 0,currency: "" },
|
|
1708
|
-
{"name":"web_site_folders","keys":[{"name":"folderID","type":"number","dataType":"BigInt"}],"properties":[{"name":"currentVersionID","type":"number","dataType":"BigInt"},{"name":"isStatic","type":"boolean","dataType":"Boolean","default":["isStatic","false"]},{"name":"isTemplate","type":"boolean","dataType":"Boolean","default":["isTemplate","false"]},{"name":"storeEnabled","type":"boolean","dataType":"Boolean","default":["storeEnabled","false"]},{"name":"isModified","type":"boolean","dataType":"Boolean","default":["isModified","false"]},{"name":"snapshotStorage","type":"number","dataType":"BigInt","default":["snapshotStorage","0"]},{"name":"supportEmail","type":"string","dataType":"Char","length":200,"default":["supportEmail","\"\""]},{"name":"fromEmail","type":"string","dataType":"Char","length":200,"default":["fromEmail","\"\""]},{"name":"currency","type":"string","dataType":"Char","length":10,"default":["currency","\"\""]}],"relations":[{"name":"folder","fkMap":[{"fk":"folderID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"currentVersion","fkMap":[{"fk":"currentVersionID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"activities","isCollection":true,"isInverse":true,"relatedName":"ServerActivity"},{"name":"configs","isCollection":true,"isInverse":true,"relatedName":"StoreConfig"},{"name":"storeItems","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"itemFolders","isCollection":true,"isInverse":true,"relatedName":"StoreItemFolder"},{"name":"storeAccounts","isCollection":true,"isInverse":true,"relatedName":"StoreAccount"},{"name":"journals","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"insights","isCollection":true,"isInverse":true,"relatedName":"StoreInsight"},{"name":"tags","isCollection":true,"isInverse":true,"relatedName":"StoreTag"},{"name":"hosts","isCollection":true,"isInverse":true,"relatedName":"WebSiteFolderHost"},{"name":"versions","isCollection":true,"isInverse":true,"relatedName":"WebSiteFolderVersion"},{"name":"channels","isCollection":true,"isInverse":true,"relatedName":"WebSiteChannel"}],"queries":{"templates":"external"}}
|
|
1774
|
+
{"name":"web_site_folders","keys":[{"name":"folderID","type":"number","dataType":"BigInt"}],"properties":[{"name":"currentVersionID","type":"number","dataType":"BigInt"},{"name":"isStatic","type":"boolean","dataType":"Boolean","default":["isStatic","false"]},{"name":"isTemplate","type":"boolean","dataType":"Boolean","default":["isTemplate","false"]},{"name":"storeEnabled","type":"boolean","dataType":"Boolean","default":["storeEnabled","false"]},{"name":"isModified","type":"boolean","dataType":"Boolean","default":["isModified","false"]},{"name":"snapshotStorage","type":"number","dataType":"BigInt","default":["snapshotStorage","0"]},{"name":"supportEmail","type":"string","dataType":"Char","length":200,"default":["supportEmail","\"\""]},{"name":"fromEmail","type":"string","dataType":"Char","length":200,"default":["fromEmail","\"\""]},{"name":"currency","type":"string","dataType":"Char","length":10,"default":["currency","\"\""]}],"relations":[{"name":"folder","fkMap":[{"fk":"folderID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"currentVersion","fkMap":[{"fk":"currentVersionID","relatedKey":"appFileID"}],"relatedName":"AppFile"},{"name":"activities","isCollection":true,"isInverse":true,"relatedName":"ServerActivity"},{"name":"configs","isCollection":true,"isInverse":true,"relatedName":"StoreConfig"},{"name":"storeItems","isCollection":true,"isInverse":true,"relatedName":"StoreItem"},{"name":"itemFolders","isCollection":true,"isInverse":true,"relatedName":"StoreItemFolder"},{"name":"storeAccounts","isCollection":true,"isInverse":true,"relatedName":"StoreAccount"},{"name":"coupons","isCollection":true,"isInverse":true,"relatedName":"StoreCoupon"},{"name":"journals","isCollection":true,"isInverse":true,"relatedName":"StoreJournal"},{"name":"insights","isCollection":true,"isInverse":true,"relatedName":"StoreInsight"},{"name":"tags","isCollection":true,"isInverse":true,"relatedName":"StoreTag"},{"name":"hosts","isCollection":true,"isInverse":true,"relatedName":"WebSiteFolderHost"},{"name":"versions","isCollection":true,"isInverse":true,"relatedName":"WebSiteFolderVersion"},{"name":"channels","isCollection":true,"isInverse":true,"relatedName":"WebSiteChannel"}],"queries":{"templates":"external"}}
|
|
1709
1775
|
);
|
|
1710
1776
|
modelEntitySchemas["WebSiteFolder"] = WebSiteFolder;
|
|
1711
1777
|
|
|
@@ -36,7 +36,7 @@ export default class StoreItemService {
|
|
|
36
36
|
x.storeItemPrices,
|
|
37
37
|
x.variantFor,
|
|
38
38
|
x.sizeFor,
|
|
39
|
-
x.
|
|
39
|
+
x.applicableTaxes.forEach((t) => t.taxItem.storeItemPrices),
|
|
40
40
|
x.mediaFiles.forEach((m) => m.appFile),
|
|
41
41
|
x.storeItemTags.forEach((t) => t.tag)
|
|
42
42
|
])
|
|
@@ -75,7 +75,7 @@ export default class StoreItemService {
|
|
|
75
75
|
async save(storeItem: IStoreItem) {
|
|
76
76
|
await this.entityService.save(storeItem, (c) =>
|
|
77
77
|
c.include((x) => x.storeItemPrices)
|
|
78
|
-
.include((x) => x.
|
|
78
|
+
.include((x) => x.applicableTaxes)
|
|
79
79
|
.include((x) => x.storeItemTags)
|
|
80
80
|
.thenInclude((x) => x.tag)
|
|
81
81
|
.include((x) => x.mediaFiles)
|