@trusted-solutions/sdit.models 0.57.3 → 0.57.4-alpha.1

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.
@@ -194,14 +194,14 @@ export interface SOGetStoreInfoResponse {
194
194
  brand?: any;
195
195
  /** 加入購物車時,是否與相同品相合併 */
196
196
  mergeSameItem?: boolean;
197
- /** 內用服務費 0~100(%) */
197
+ /** 內用服務費 1~100(%) undefined為關閉 */
198
198
  dineInServiceChargePercent?: number;
199
- /** 外帶服務費 0~100(%) */
199
+ /** 外帶服務費 1~100(%) undefined為關閉 */
200
200
  takeoutServiceChargePercent?: number;
201
201
  /**
202
202
  * 服務費計算基準,無值時預設subtotal
203
- * "subtotal": 先折扣再服務費
204
- * "subtotal+discount": 先服務費再折扣。
203
+ * "subtotal": serviceCharge = (subtotal * servicePercent)
204
+ * "subtotal+discount": serviceCharge = ((subtotal+discount) * servicePercent)
205
205
  */
206
206
  serviceBase?: "subtotal" | "subtotal+discount";
207
207
  }
@@ -271,6 +271,11 @@ export interface SOValidateMutationResponse {
271
271
  * undefined=沒有此收費名目
272
272
  */
273
273
  serviceCharge?: number;
274
+ /**
275
+ * 服務費費率
276
+ * undefined=沒有此收費名目
277
+ */
278
+ serviceChargePercent?: number;
274
279
  /**
275
280
  * 點數折抵前總金額=小計+折扣+外送費+服務費
276
281
  */
@@ -115,6 +115,8 @@ export interface SOOrder {
115
115
  totalDiscountAmount: number;
116
116
  deliveryCharge?: number;
117
117
  serviceCharge?: number;
118
+ /** 服務費費率undefined=沒有此收費名目 */
119
+ serviceChargePercent?: number;
118
120
  totalBeforePoints: number;
119
121
  taxAmount: number;
120
122
  salesAmountExcludeTax: number;
@@ -1 +1 @@
1
- {"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAmBX;AAnBD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,qDAAiC,CAAA;IACjC,eAAe;IACf,iEAA6C,CAAA;IAC7C,WAAW;IACX,+CAA2B,CAAA;IAC3B,aAAa;IACb,mDAA+B,CAAA;IAC/B,YAAY;IACZ,uDAAmC,CAAA;IACnC,gBAAgB;IAChB,uDAAmC,CAAA;IACnC,YAAY;IACZ,6DAAyC,CAAA;IACzC,YAAY;IACZ,2DAAuC,CAAA;IACvC,cAAc;IACd,2DAAuC,CAAA;AACzC,CAAC,EAnBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAmB3B;AAmDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAgHD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AAkCD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
1
+ {"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAmBX;AAnBD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,qDAAiC,CAAA;IACjC,eAAe;IACf,iEAA6C,CAAA;IAC7C,WAAW;IACX,+CAA2B,CAAA;IAC3B,aAAa;IACb,mDAA+B,CAAA;IAC/B,YAAY;IACZ,uDAAmC,CAAA;IACnC,gBAAgB;IAChB,uDAAmC,CAAA;IACnC,YAAY;IACZ,6DAAyC,CAAA;IACzC,YAAY;IACZ,2DAAuC,CAAA;IACvC,cAAc;IACd,2DAAuC,CAAA;AACzC,CAAC,EAnBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAmB3B;AAmDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAkHD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AAkCD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
package/models/order.d.ts CHANGED
@@ -102,6 +102,8 @@ export interface Order extends BaseOrder {
102
102
  * undefined=沒有此收費名目
103
103
  */
104
104
  serviceCharge?: number;
105
+ /** 服務費費率undefined=沒有此收費名目 */
106
+ serviceChargePercent?: number;
105
107
  /** subtotal - sigma(discount.discountReferences.orderItemId === null) + deliveryCharge */
106
108
  totalAmount: number;
107
109
  salesAmountExcludeTax: number;
package/models/store.d.ts CHANGED
@@ -227,14 +227,14 @@ export interface Store {
227
227
  brandNo?: string;
228
228
  /** 加入購物車時,是否與相同品相合併 */
229
229
  onlineMergeSameItem?: boolean;
230
- /** 內用服務費 0~100(%) */
230
+ /** 內用服務費 1~100(%) undefined為關閉 */
231
231
  dineInServiceChargePercent?: number;
232
- /** 外帶服務費 0~100(%) */
232
+ /** 外帶服務費 1~100(%) undefined為關閉 */
233
233
  takeoutServiceChargePercent?: number;
234
234
  /**
235
235
  * 服務費計算基準,無值時預設subtotal
236
- * "subtotal": 先折扣再服務費
237
- * "subtotal+discount": 先服務費再折扣。
236
+ * "subtotal": serviceCharge = (subtotal * servicePercent)
237
+ * "subtotal+discount": serviceCharge = ((subtotal+discount) * servicePercent)
238
238
  */
239
239
  serviceBase?: "subtotal" | "subtotal+discount";
240
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.57.3",
3
+ "version": "0.57.4-alpha.1",
4
4
  "description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
5
5
  "main": "index.js",
6
6
  "scripts": {