ionic-vhframeworks 3.8.2 → 3.8.6

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.
@@ -81,6 +81,20 @@ export declare class VhAlgorithm {
81
81
  * @return String -----> "3YU0409"
82
82
  */
83
83
  createBillCode(billdate?: any): any;
84
+ /**
85
+ * @example
86
+ let payment_code = this.ordinaryAlgorithm.createPaymentCode();
87
+ console.log(payment_code);
88
+ * @return String -----> "R3YU0409"
89
+ */
90
+ createPaymentCode(paymentdate?: any): any;
91
+ /**
92
+ * @example
93
+ let card_code = this.ordinaryAlgorithm.createCardCode();
94
+ console.log(card_code);
95
+ * @return String -----> "1KR3YU0409"
96
+ */
97
+ createCardCode(carddate?: any): any;
84
98
  /**
85
99
  * @example:
86
100
  * 0 -> 0
@@ -202,13 +216,14 @@ export declare class VhAuth {
202
216
  /**
203
217
  * @example:
204
218
  * this.vhAuth.signInWithEmailAndPassword('emp11@gmail.com', '123456')
205
- .then((res)=>{
206
- console.log('res', res);
219
+ .then((user)=>{
220
+ console.log('user', user);
207
221
  },error=>{
208
222
  console.log('error', error);
209
223
  })
210
224
  * @param email
211
225
  * @param password
226
+ * @return Promise => user = {}
212
227
  */
213
228
  signInWithEmailAndPassword(email: string, password: string): Promise<unknown>;
214
229
  /**
@@ -222,6 +237,30 @@ export declare class VhAuth {
222
237
  * @return Promise => user = {}
223
238
  */
224
239
  onAuthStateChanged(): Promise<unknown>;
240
+ /**
241
+ * @example:
242
+ * this.vhAuth.signInWithEmailAndPassword_Sales('emp11@gmail.com', '123456')
243
+ .then((user)=>{
244
+ console.log('user', user);
245
+ },error=>{
246
+ console.log('error', error);
247
+ })
248
+ * @param email
249
+ * @param password
250
+ * @return Promise => user = {}
251
+ */
252
+ signInWithEmailAndPassword_Sales(email: string, password: string): Promise<unknown>;
253
+ /**
254
+ * @example:
255
+ * this.vhAuth.onAuthStateChanged_Sales()
256
+ .then((user)=>{
257
+ console.log('onAuthStateChanged_Sales', user);
258
+ },error=>{
259
+ console.log('onAuthStateChanged_Sales', error);
260
+ })
261
+ * @return Promise => user = {}
262
+ */
263
+ onAuthStateChanged_Sales(): Promise<unknown>;
225
264
  /**
226
265
  * @example:
227
266
  * this.vhAuth.signOut()
@@ -983,6 +1022,9 @@ export declare class VhQueryCafe {
983
1022
  private promotions;
984
1023
  private patternmenus;
985
1024
  private printers;
1025
+ private discount_bills;
1026
+ private discount_saless;
1027
+ private commissions;
986
1028
  private hwinfo;
987
1029
  private appsettingstations;
988
1030
  private appsettingbranchs;
@@ -1003,6 +1045,7 @@ export declare class VhQueryCafe {
1003
1045
  private subjecttaxs;
1004
1046
  private subjectareas;
1005
1047
  private subjecttables;
1048
+ private subjectdiscount_bills;
1006
1049
  private callbackdispatcher;
1007
1050
  /**
1008
1051
  * @Nghiệp vụ tạo (bill_type 5->1), hủy đơn hàng bán món ăn (dùng hàm)
@@ -2240,6 +2283,176 @@ export declare class VhQueryCafe {
2240
2283
  * @return Promise => array(object) = [{},{},..]
2241
2284
  */
2242
2285
  getInventorytimes(): Promise<unknown>;
2286
+ private publishObservableEventDiscount_bills;
2287
+ private observableLocalDiscount_bills;
2288
+ /**
2289
+ * @example:
2290
+ * this.observableDiscount_bills = this.vhQueryCafe.getObservableLocalDiscount_bills().subscribe((localDiscount_bills:any) => {
2291
+ do something...
2292
+ })
2293
+
2294
+ ngOnDestroy(){
2295
+ this.observableDiscount_bills.unsubscribe();
2296
+ }
2297
+ * @returns Observerble (Array) => Array(object) => array = [{},{},...]
2298
+ */
2299
+ private getObservableLocalDiscount_bills;
2300
+ /**
2301
+ * @example:
2302
+ * let discount_bill = this.vhQueryCafe.getlocalDiscount_bill('5fb6780ca2148e09806c5b01');
2303
+ * @param id_discount_bill
2304
+ * @return Object => obj = {} or null
2305
+ */
2306
+ getlocalDiscount_bill(id_discount_bill: any): any;
2307
+ /**
2308
+ * @example:
2309
+ * let discount_bills = this.vhQueryCafe.getlocalDiscount_bills();
2310
+ * @return Array(object) => array = [{},{},...]
2311
+ */
2312
+ getlocalDiscount_bills(): any;
2313
+ /**
2314
+ * @example:
2315
+ * this.vhQueryCafe.addDiscount_bill({name:'camera 2', quantity:20, price:200000})
2316
+ .then((discount_bill)=>{
2317
+ console.log('addDiscount_bill', discount_bill);
2318
+ },error=>{
2319
+ console.log('error', error);
2320
+ })
2321
+ * @param colname
2322
+ * @param data
2323
+ * @return Promise => obj = {}
2324
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
2325
+ */
2326
+ addDiscount_bill(data: object): Promise<unknown>;
2327
+ /**
2328
+ * @example:
2329
+ * this.vhQueryCafe.updateDiscount_bill('5fb6780ca2148e09806c5b01', {quantity:400})
2330
+ .then((bool)=>{
2331
+ console.log('updateDiscount_bill', bool);
2332
+ })
2333
+ * @param id_discount_bill
2334
+ * @param data
2335
+ * @return Promise => bool = true or false
2336
+ */
2337
+ updateDiscount_bill(id_discount_bill: string, data: object): Promise<unknown>;
2338
+ /**
2339
+ * @example:
2340
+ * this.vhQueryCafe.deleteDiscount_bill('5fb67fda87c0f21d484cbdf3')
2341
+ .then((bool)=>{
2342
+ console.log('deleteDiscount_bill', bool);
2343
+ })
2344
+ * @param id_discount_bill
2345
+ * @return Promise => bool = true or false
2346
+ */
2347
+ deleteDiscount_bill(id_discount_bill: string): Promise<unknown>;
2348
+ /**
2349
+ * @example:
2350
+ * this.vhQueryCafe.addDiscount_sales({name:'camera 2', quantity:20, price:200000})
2351
+ .then((discount_saless)=>{
2352
+ console.log('addDiscount_sales', discount_sales);
2353
+ },error=>{
2354
+ console.log('error', error);
2355
+ })
2356
+ * @param colname
2357
+ * @param data
2358
+ * @return Promise => obj = {}
2359
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
2360
+ */
2361
+ addDiscount_sales(data: object): Promise<unknown>;
2362
+ /**
2363
+ * @example:
2364
+ * this.vhQueryCafe.updateDiscount_sales('5fb6780ca2148e09806c5b01', {quantity:400})
2365
+ .then((bool)=>{
2366
+ console.log('updateDiscount_sales', bool);
2367
+ })
2368
+ * @param id_discount_sales
2369
+ * @param data
2370
+ * @return Promise => bool = true or false
2371
+ */
2372
+ updateDiscount_sales(id_discount_sales: string, data: object): Promise<unknown>;
2373
+ /**
2374
+ * @example:
2375
+ * this.vhQueryCafe.deleteDiscount_sales('5fb67fda87c0f21d484cbdf3')
2376
+ .then((bool)=>{
2377
+ console.log('deleteDiscount_sales', bool);
2378
+ })
2379
+ * @param id_discount_saless
2380
+ * @return Promise => bool = true or false
2381
+ */
2382
+ deleteDiscount_sales(id_discount_sales: string): Promise<unknown>;
2383
+ /**
2384
+ * @example
2385
+ * this.vhQueryCafe.getDiscount_sales('5fb67fda87c0f21d484cbdf3')
2386
+ .then((discount_sales)=>{
2387
+ console.log('getDiscount_sales', discount_sales);
2388
+ })
2389
+ * @param id_discount_sales
2390
+ * @return Promise => obj ={} or null
2391
+ */
2392
+ getDiscount_sales(id_discount_sales: string): Promise<unknown>;
2393
+ /**
2394
+ * @example
2395
+ * this.vhQueryCafe.getDiscount_saless()
2396
+ .then((discount_saless)=>{
2397
+ console.log('getDiscount_saless', discount_saless);
2398
+ })
2399
+ * @return Promise => array(object) = [{},{},..]
2400
+ */
2401
+ getDiscount_saless(): Promise<unknown>;
2402
+ /**
2403
+ * @example:
2404
+ * this.vhQueryCafe.addCommission({name:'camera 2', quantity:20, price:200000})
2405
+ .then((commissions)=>{
2406
+ console.log('addCommission', commissions);
2407
+ },error=>{
2408
+ console.log('error', error);
2409
+ })
2410
+ * @param colname
2411
+ * @param data
2412
+ * @return Promise => obj = {}
2413
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
2414
+ */
2415
+ addCommission(data: object): Promise<unknown>;
2416
+ /**
2417
+ * @example:
2418
+ * this.vhQueryCafe.updateCommission('5fb6780ca2148e09806c5b01', {quantity:400})
2419
+ .then((bool)=>{
2420
+ console.log('updateCommission', bool);
2421
+ })
2422
+ * @param id_commission
2423
+ * @param data
2424
+ * @return Promise => bool = true or false
2425
+ */
2426
+ updateCommission(id_commission: string, data: object): Promise<unknown>;
2427
+ /**
2428
+ * @example:
2429
+ * this.vhQueryCafe.deleteCommission('5fb67fda87c0f21d484cbdf3')
2430
+ .then((bool)=>{
2431
+ console.log('deleteCommission', bool);
2432
+ })
2433
+ * @param id_commission
2434
+ * @return Promise => bool = true or false
2435
+ */
2436
+ deleteCommission(id_commission: string): Promise<unknown>;
2437
+ /**
2438
+ * @example
2439
+ * this.vhQueryCafe.getCommission('5fb67fda87c0f21d484cbdf3')
2440
+ .then((commission)=>{
2441
+ console.log('getCommission', commission);
2442
+ })
2443
+ * @param id_commission
2444
+ * @return Promise => obj ={} or null
2445
+ */
2446
+ getCommission(id_commission: string): Promise<unknown>;
2447
+ /**
2448
+ * @example
2449
+ * this.vhQueryCafe.getCommissions()
2450
+ .then((commissions)=>{
2451
+ console.log('getCommissions', commissions);
2452
+ })
2453
+ * @return Promise => array(object) = [{},{},..]
2454
+ */
2455
+ getCommissions(): Promise<unknown>;
2243
2456
  /**
2244
2457
  * @example:
2245
2458
  * let delivery = this.vhQueryCafe.getlocalDelivery('5fb6780ca2148e09806c5b01');
@@ -3414,6 +3627,57 @@ export declare class VhQueryCafe {
3414
3627
  * @return Promise Boolean => bool = true or false
3415
3628
  */
3416
3629
  deleteAppSettingNameBranch(appsetting_name: any): Promise<unknown>;
3630
+ /**
3631
+ * @Usage : Hàm này lấy về tiền chiết khấu trên tổng giá trị hàng hóa bán ra của mỗi đơn hàng theo khách mua hàng
3632
+ * @example :
3633
+ * let discount = this.vhQueryCafe.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
3634
+ * @param total_price : Tổng giá
3635
+ * @param id_customer
3636
+ * @returns Object or null => obj = {discount}, discount là số tiền đc chiết khấu,
3637
+ * trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
3638
+ */
3639
+ getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
3640
+ /**
3641
+ * @Usage :Hàm này dùng trong page CHIẾT KHẤU KHÁCH HÀNG -> Chọn TẤT CẢ hoặc MỘT khách hàng
3642
+ * @notice : Mỗi công thức chiết khấu có 5 mức (level1, level2, level3, level4, level5), giá trị doanh số (sales) level sau phải lơn hơn level trước
3643
+ * type : 1 chiết khấu %, 2 chiết khấu tiền
3644
+ * method : 1 phương pháp tính theo từng mức, 2 phương pháp tính theo mức cuối
3645
+ * usage: 1 chiết khấu trên hóa đơn, 2 chiết khấu trên doanh số
3646
+ * @example :
3647
+ * let endtime = new Date();
3648
+ let starttime = new Date('2020-07-01T05:24:00');
3649
+ this.vhQueryCafe.getReportDiscount_sales_Customers(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
3650
+ .then((discounts)=>{
3651
+ console.log('discounts', discounts);
3652
+ console.log('discounts.docs[0]', discounts.docs[0]);
3653
+ })
3654
+ * @param starttime
3655
+ * @param endtime
3656
+ * @param IDcustomer : 'all' or id_customer
3657
+ * @param IDbranch : 'all' or id_branch
3658
+ * @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, discount_name,sales_btax, discount_btax, sales_atax, discount_atax}
3659
+ */
3660
+ getReportDiscount_sales_Customers(starttime: any, endtime: any, IDcustomer: any, IDbranch?: string): Promise<any>;
3661
+ /**
3662
+ * @Usage :Hàm này dùng trong page HOA HỒNG NHÂN VIÊN -> Chọn TẤT CẢ hoặc MỘT nhân viên
3663
+ * @notice : Mỗi công thức chiết khấu có 5 mức (level1, level2, level3, level4, level5), giá trị doanh số (sales) level sau phải lơn hơn level trước
3664
+ * type : 1 chiết khấu %, 2 chiết khấu tiền
3665
+ * method : 1 phương pháp tính theo từng mức, 2 phương pháp tính theo mức cuối
3666
+ * @example :
3667
+ * let endtime = new Date();
3668
+ let starttime = new Date('2020-07-01T05:24:00');
3669
+ this.vhQueryCafe.getReportCommission_Employees(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
3670
+ .then((commissions)=>{
3671
+ console.log('commissions', commissions);
3672
+ console.log('commissions.docs[0]', commissions.docs[0]);
3673
+ })
3674
+ * @param starttime
3675
+ * @param endtime
3676
+ * @param IDemployee : 'all' or id_employee
3677
+ * @param IDbranch : 'all' or id_branch
3678
+ * @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, commission_name, sales_btax, commission_btax, sales_atax, commission_atax}
3679
+ */
3680
+ getReportCommission_Employees(starttime: any, endtime: any, IDemployee: any, IDbranch?: string): Promise<any>;
3417
3681
  /**
3418
3682
  * VhQueryCafe:
3419
3683
  * cashbook_first: tiền mặt đầu kỳ (starttime),
@@ -6965,6 +7229,9 @@ export declare class VhQuerySales {
6965
7229
  private vhAlgorithm;
6966
7230
  private iap2;
6967
7231
  private platform;
7232
+ private restriction_main_package;
7233
+ private restriction_ecommerce_package;
7234
+ private restriction_facebook_package;
6968
7235
  private productlistsendo;
6969
7236
  private shoplistsendo;
6970
7237
  private productlistlazada;
@@ -7007,6 +7274,57 @@ export declare class VhQuerySales {
7007
7274
  private subjectwarrantys;
7008
7275
  private subjectdiscount_bills;
7009
7276
  constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, iap2: InAppPurchase2, platform: Platform);
7277
+ /**
7278
+ * @description: hàm này lấy về những hạn chế của gói main_package (khách trả phí mua gói sử dụng các chức năng CHÍNH, mỗi gói sẽ có nhưng hạn chế khác nhau về user_number, show_report_duration)
7279
+ * @example
7280
+ * this.refreshRestrictionMainPackage()
7281
+ .then((bool)=>{
7282
+ console.log('bool', bool);
7283
+ })
7284
+ * @return Promise => null
7285
+ */
7286
+ private refreshRestrictionMainPackage;
7287
+ /**
7288
+ * @description: hàm này lấy về những hạn chế của gói main_package trong localstorage
7289
+ * @example
7290
+ * let restriction_main_package = this.vhQuerySales.getLocalRestrictionMainPackage();
7291
+ * @return Object => obj ={} or null
7292
+ */
7293
+ getLocalRestrictionMainPackage(): any;
7294
+ /**
7295
+ * @description: hàm này lấy về những hạn chế của gói ecommerce_package (khách trả phí mua gói sử dụng TMĐT, mỗi gói sẽ có nhưng hạn chế khác nhau về shop_number, show_report_duration)
7296
+ * @example
7297
+ * this.refreshRestrictionEcommercePackage()
7298
+ .then((bool)=>{
7299
+ console.log('bool', bool);
7300
+ })
7301
+ * @return Promise => null
7302
+ */
7303
+ private refreshRestrictionEcommercePackage;
7304
+ /**
7305
+ * @description: hàm này lấy về những hạn chế của gói ecommerce_package trong localstorage
7306
+ * @example
7307
+ * let restriction_ecommerce_package = this.vhQuerySales.getLocalRestrictionEcommercePackage();
7308
+ * @return Object => obj ={} or null
7309
+ */
7310
+ getLocalRestrictionEcommercePackage(): any;
7311
+ /**
7312
+ * @description: hàm này lấy về những hạn chế của gói facebook_package (khách trả phí mua gói sử dụng facebook, mỗi gói sẽ có nhưng hạn chế khác nhau về fanpage_number, show_report_duration)
7313
+ * @example
7314
+ * this.refreshRestrictionFacebookPackage()
7315
+ .then((bool)=>{
7316
+ console.log('bool', bool);
7317
+ })
7318
+ * @return Promise => null
7319
+ */
7320
+ private refreshRestrictionFacebookPackage;
7321
+ /**
7322
+ * @description: hàm này lấy về những hạn chế của gói facebook_package trong localstorage
7323
+ * @example
7324
+ * let restriction_facebook_package = this.vhQuerySales.getLocalRestrictionFacebookPackage();
7325
+ * @return Object => obj ={} or null
7326
+ */
7327
+ getLocalRestrictionFacebookPackage(): any;
7010
7328
  /**
7011
7329
  * Hàm callback BÌNH LUẬN trên fanpage có id là id_fanpage
7012
7330
  * @example:
@@ -8012,6 +8330,7 @@ export declare class VhQuerySales {
8012
8330
  * @returns Promise bool = true or false
8013
8331
  */
8014
8332
  syncCollections_Desktop(): Promise<unknown>;
8333
+ private checkExpireBranch_Sales;
8015
8334
  private fixBill;
8016
8335
  private initSyncCollections;
8017
8336
  /**
@@ -9738,31 +10057,31 @@ export declare class VhQuerySales {
9738
10057
  */
9739
10058
  createBill_Billdetail(bill: any, bill_details: any): any;
9740
10059
  /**
9741
- * @example:
9742
- * this.vhQuerySales.createBill_Detail({})
9743
- .then((vhbill_detail)=>{
9744
- console.log('vhQuerySales', vhbill_detail);
9745
- },error=>{
9746
- console.log('error', error);
9747
- })
9748
- * @param colname
9749
- * @param data
9750
- * @return Promise => obj = {}
9751
- * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
9752
- */
10060
+ * @example:
10061
+ * this.vhQuerySales.createBill_Detail({})
10062
+ .then((vhbill_detail)=>{
10063
+ console.log('vhQuerySales', vhbill_detail);
10064
+ },error=>{
10065
+ console.log('error', error);
10066
+ })
10067
+ * @param colname
10068
+ * @param data
10069
+ * @return Promise => obj = {}
10070
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
10071
+ */
9753
10072
  createBill_Detail(data: any): any;
9754
10073
  /**
9755
- * @example:
9756
- * this.vhQuerySales.updateBill_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
9757
- .then((bool)=>{
9758
- console.log('updateBill_Detail', bool);
9759
- }, error=>{
9760
- console.log('error', error);
9761
- })
9762
- * @param id_bill
9763
- * @param data
9764
- * @return Promise => bool = true or false
9765
- */
10074
+ * @example:
10075
+ * this.vhQuerySales.updateBill_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
10076
+ .then((bool)=>{
10077
+ console.log('updateBill_Detail', bool);
10078
+ }, error=>{
10079
+ console.log('error', error);
10080
+ })
10081
+ * @param id_bill
10082
+ * @param data
10083
+ * @return Promise => bool = true or false
10084
+ */
9766
10085
  updateBill_Detail(id_bill_detail: string, value: object): Promise<unknown>;
9767
10086
  /**
9768
10087
  * @example:
@@ -9879,6 +10198,194 @@ export declare class VhQuerySales {
9879
10198
  * @notice : hàm này chỉ dùng xóa những bill_type (7,8,11,12) mà không có phát sinh bill_detail
9880
10199
  */
9881
10200
  deleteBill(id_bill: any): Promise<unknown>;
10201
+ /**
10202
+ * @example:
10203
+ * let data = {
10204
+ date: new Date(),
10205
+ payment_type: 5, //1 lưu (khách đã thanh toán cho vnpay); 5 lưu tạm (khách chưa thanh toán vnpay), hệ thống sẽ tự động xóa những payment này hoặc trên giao diện hiện ra cho khách tự xóa
10206
+ payment: 990.000,
10207
+ tax: 0,
10208
+ total: 990.000
10209
+ }
10210
+ * this.vhQuerySales.createPayment(data)
10211
+ .then((payment)=>{
10212
+ console.log('createPayment', payment);
10213
+ },error=>{
10214
+ console.log('error', error);
10215
+ })
10216
+ * payment = {
10217
+ _id,
10218
+ payment_code,
10219
+ id_store,
10220
+ invalid,
10221
+
10222
+ date
10223
+ payment_type,
10224
+ payment,
10225
+ tax,
10226
+ total
10227
+ }
10228
+ * @param payment : object
10229
+ * @return Promise => payment = {} / error
10230
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
10231
+ * @notice : hàm này chỉ dùng tạo những bill_type mà không có phát sinh bill_detail
10232
+ */
10233
+ createPayment(data: any): Promise<unknown>;
10234
+ /**
10235
+ * @example:
10236
+ * this.vhQuerySales.updatePayment('5fb6780ca2148e09806c5b01', {total:990000})
10237
+ .then((response)=>{
10238
+ console.log('updatePayment', response);
10239
+ }, error=>{
10240
+ console.log('error', error);
10241
+ })
10242
+ * @param id_payment
10243
+ * @param value
10244
+ * @return Promise => response = undefined / error
10245
+ */
10246
+ updatePayment(id_payment: string, value: any): Promise<unknown>;
10247
+ /**
10248
+ * @example:
10249
+ * this.vhQuerySales.deletePayment('5fb67fda87c0f21d484cbdf3')
10250
+ .then((response)=>{
10251
+ console.log('deleteBill', response);
10252
+ }, error=>{
10253
+ console.log(error, error);
10254
+ })
10255
+ * @param id_payment
10256
+ * @return Promise => response = undefined / error
10257
+ */
10258
+ deletePayment(id_payment: any): Promise<unknown>;
10259
+ /**
10260
+ * @example:
10261
+ * let time = new Date();
10262
+ * time.setDate(time.getDate()-7);
10263
+ * this.vhQuerySales.getPayments({id_store:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
10264
+ .then((payments)=>{
10265
+ console.log('getPayments', payments);
10266
+ })
10267
+ * @param query
10268
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
10269
+ * @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
10270
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
10271
+ * @return — Array -> array = [{},{},...]
10272
+ */
10273
+ getPayments(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
10274
+ /**
10275
+ * @example:
10276
+ * this.vhQuerySales.getPayment('5fb67fda87c0f21d484cbdf3')
10277
+ .then((payment)=>{
10278
+ console.log('getPayment', payment);
10279
+ })
10280
+ * @param id_payment
10281
+ * @return Promise => payment ={} or null / error
10282
+ */
10283
+ getPayment(id_payment: any): Promise<unknown>;
10284
+ /**
10285
+ * @example:
10286
+ let payment_detail_main = {
10287
+ id_branch: 'AEUWSWZXA4iHv8BmCNz2', //khách chọn
10288
+ id_payment: '5D4XGdZ2q5XLnOUa0mMx', //payment._id
10289
+ id_restriction: 'main_package_advanced', //package.id_restriction
10290
+ id_package: 'main_package_advanced_1month', //có được khi khách chọn gói để mua
10291
+ package_type: 1, //package.package_type,
10292
+ day: 31, //package.day,
10293
+ tax: 0, package.tax,
10294
+ price: 99000, package.price,
10295
+ quantity: 1, //khách chọn
10296
+ payment_detail_type: 1, //1: gói gia hạng mới, 2: gói nâng cấp, 3: gói kéo dài thêm thời gian
10297
+ }
10298
+ this.vhQuerySales.createPayment_Detail({})
10299
+ .then((payment_detail)=>{
10300
+ console.log('createPayment_Detail', payment_detail);
10301
+ },error=>{
10302
+ console.log('error', error);
10303
+ })
10304
+ payment_detail = {
10305
+ _id,
10306
+ id_store,
10307
+ payment_type,
10308
+ activating,
10309
+ invalid,
10310
+ date,
10311
+
10312
+ id_branch,
10313
+ id_payment,
10314
+ id_restriction,
10315
+ id_package,
10316
+ package_type,
10317
+ payment_type,
10318
+ payment_detail_type,
10319
+ day,
10320
+ tax,
10321
+ price,
10322
+ quantity
10323
+ }
10324
+ * @param data
10325
+ * @return Promise => response = {} / error
10326
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
10327
+ */
10328
+ createPayment_Detail(data: any): any;
10329
+ /**
10330
+ * @example:
10331
+ * this.vhQuerySales.updatePayment_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
10332
+ .then((response)=>{
10333
+ console.log('updatePayment_Detail', response);
10334
+ },error=>{
10335
+ reject(error);
10336
+ })
10337
+ * @param id_payment_detail
10338
+ * @param value
10339
+ * @return Promise => response = undefined / error
10340
+ */
10341
+ updatePayment_Detail(id_payment_detail: string, value: object): Promise<unknown>;
10342
+ /**
10343
+ * @example:
10344
+ * let time = new Date();
10345
+ * time.setDate(time.getDate()-7);
10346
+ * this.vhQuerySales.getPayment_details({id_payment:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
10347
+ .then((payment_details)=>{
10348
+ console.log('getPayment_details', payment_details);
10349
+ })
10350
+ * @param query
10351
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
10352
+ * @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
10353
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
10354
+ * @return Promise Array => array = [{},{},...] / error
10355
+ */
10356
+ getPayment_details(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
10357
+ /**
10358
+ * @example:
10359
+ * this.vhQuerySales.getPayment_detail('5fb67fda87c0f21d484cbdf3')
10360
+ .then((payment_detail)=>{
10361
+ console.log('getPayment_detail', payment_detail);
10362
+ })
10363
+ * @param id_payment_detail
10364
+ * @return Promise => payment_detail ={} or null / error
10365
+ */
10366
+ getPayment_detail(id_payment_detail: any): Promise<unknown>;
10367
+ /**
10368
+ * @example:
10369
+ * this.vhQuerySales.deletePayment_Detail('5fb67fda87c0f21d484cbdf3')
10370
+ .then((bool)=>{
10371
+ console.log('deletePayment_Detail', bool);
10372
+ },error=>{
10373
+ reject(error);
10374
+ })
10375
+ * @param id_payment_detail
10376
+ * @return Promise => Promise => response = undefined / error
10377
+ */
10378
+ deletePayment_Detail(id_payment_detail: string): Promise<unknown>;
10379
+ /**
10380
+ * @example:
10381
+ * this.vhQuerySales.getPackage('5fb67fda87c0f21d484cbdf3')
10382
+ .then((package)=>{
10383
+ console.log('getPackage', package);
10384
+ })
10385
+ * @param id_package
10386
+ * @return Promise => package ={} or null / error
10387
+ */
10388
+ getPackage(id_package: any): Promise<unknown>;
9882
10389
  private publishObservableEventPromotions;
9883
10390
  private observableLocalPromotions;
9884
10391
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "3.8.2",
3
+ "version": "3.8.6",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"