ionic-vhframeworks 4.1.9 → 4.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.
@@ -3582,7 +3582,7 @@ export declare class VhQueryCafe {
3582
3582
  createPaymentVnpay_Mobile(amount: number, orderDescription: string, id_payment: string, backHref: string, platform: string): any;
3583
3583
  /**
3584
3584
  * @example:
3585
- * let data = {
3585
+ * let data = {//truyền vào
3586
3586
  date: new Date(),
3587
3587
  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
3588
3588
  payment: 990.000,
@@ -3595,7 +3595,7 @@ export declare class VhQueryCafe {
3595
3595
  },error=>{
3596
3596
  console.log('error', error);
3597
3597
  })
3598
- * payment = {
3598
+ * payment = {//trả về
3599
3599
  _id,
3600
3600
  payment_code,
3601
3601
  id_store,
@@ -3610,7 +3610,7 @@ export declare class VhQueryCafe {
3610
3610
  * @param payment : object
3611
3611
  * @return Promise => payment = {} / error
3612
3612
  * 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
3613
- * @notice : hàm này chỉ dùng tạo những bill_type mà không có phát sinh bill_detail
3613
+ * @notice : hàm này chỉ dùng tạo những payment_type mà không có phát sinh payment_detail
3614
3614
  */
3615
3615
  createPayment(data: any): Promise<unknown>;
3616
3616
  /**
@@ -9186,7 +9186,7 @@ export declare class VhQuerySales {
9186
9186
  * @return Promise => object ={}
9187
9187
  * 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
9188
9188
  */
9189
- addCustomer(data: object): Promise<unknown>;
9189
+ addCustomer(data: any): Promise<unknown>;
9190
9190
  /**
9191
9191
  * @example:
9192
9192
  * this.vhQuerySales.addCustomers([{name:'Khách hàng 1', address: 'HCM'},{},...])
@@ -9243,9 +9243,9 @@ export declare class VhQuerySales {
9243
9243
  /**
9244
9244
  * Hàm này dùng để xóa hoặc đặt lại điểm mới cho khách hàng
9245
9245
  * @example:
9246
- * this.vhQuerySales.updateCustomer_byEarnedPoints('5fb6780ca2148e09806c5b01', 1000)
9246
+ * this.vhQuerySales.updateCustomer_byPoints('5fb6780ca2148e09806c5b01', 1000)
9247
9247
  .then((bool)=>{
9248
- console.log('updateCustomer_byEarnedPoints', bool);
9248
+ console.log('updateCustomer_byPoints', bool);
9249
9249
  })
9250
9250
  * @param _id
9251
9251
  * @param points
@@ -9322,7 +9322,7 @@ export declare class VhQuerySales {
9322
9322
  * @return Promise => obj = {}
9323
9323
  * 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
9324
9324
  */
9325
- addSupplier(data: object): Promise<unknown>;
9325
+ addSupplier(data: any): Promise<unknown>;
9326
9326
  /**
9327
9327
  * @example:
9328
9328
  * this.vhQuerySales.addSuppliers([{name:'Nhà cung cấp 1', address: 'HCM'},{},...])
@@ -9441,7 +9441,7 @@ export declare class VhQuerySales {
9441
9441
  * @return Promise => obj = {}
9442
9442
  * 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
9443
9443
  */
9444
- addWallet(data: object): Promise<unknown>;
9444
+ addWallet(data: any): Promise<unknown>;
9445
9445
  /**
9446
9446
  * @example:
9447
9447
  * this.vhQuerySales.updateWallet('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -9532,7 +9532,7 @@ export declare class VhQuerySales {
9532
9532
  * @return Promise => obj = {}
9533
9533
  * 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
9534
9534
  */
9535
- addTax(data: object): Promise<unknown>;
9535
+ addTax(data: any): Promise<unknown>;
9536
9536
  /**
9537
9537
  * @example:
9538
9538
  * this.vhQuerySales.updateTax('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -9625,7 +9625,7 @@ export declare class VhQuerySales {
9625
9625
  * @return Promise => obj = {}
9626
9626
  * 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
9627
9627
  */
9628
- addCategory(data: object): Promise<unknown>;
9628
+ addCategory(data: any): Promise<unknown>;
9629
9629
  /**
9630
9630
  * @example:
9631
9631
  * this.vhQuerySales.addCategorys([{name:'Danh mục 1'},{},...])
@@ -9678,7 +9678,7 @@ export declare class VhQuerySales {
9678
9678
  })
9679
9679
  * @return Promise => array(object) = [{},{},..]
9680
9680
  */
9681
- getCategorys(): Promise<unknown>;
9681
+ private getCategorys;
9682
9682
  private publishObservableEventInventorytimes;
9683
9683
  private observableLocalInventorytimes;
9684
9684
  /**
@@ -9729,7 +9729,7 @@ export declare class VhQuerySales {
9729
9729
  * @return Promise => obj = {}
9730
9730
  * 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
9731
9731
  */
9732
- addInventorytime(data: object): Promise<unknown>;
9732
+ addInventorytime(data: any): Promise<unknown>;
9733
9733
  /**
9734
9734
  * @example:
9735
9735
  * this.vhQuerySales.updateInventorytime('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -9820,7 +9820,7 @@ export declare class VhQuerySales {
9820
9820
  * @return Promise => obj = {}
9821
9821
  * 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
9822
9822
  */
9823
- addWarranty(data: object): Promise<unknown>;
9823
+ addWarranty(data: any): Promise<unknown>;
9824
9824
  /**
9825
9825
  * @example:
9826
9826
  * this.vhQuerySales.updateWarranty('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -9907,7 +9907,7 @@ export declare class VhQuerySales {
9907
9907
  * @return Promise => obj = {}
9908
9908
  * 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
9909
9909
  */
9910
- addCustomerClass(data: object): Promise<unknown>;
9910
+ addCustomerClass(data: any): Promise<unknown>;
9911
9911
  /**
9912
9912
  * @example:
9913
9913
  * this.vhQuerySales.updateCustomerClass('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -9975,7 +9975,7 @@ export declare class VhQuerySales {
9975
9975
  * @return Promise => obj = {}
9976
9976
  * 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
9977
9977
  */
9978
- addDiscount_bill(data: object): Promise<unknown>;
9978
+ addDiscount_bill(data: any): Promise<unknown>;
9979
9979
  /**
9980
9980
  * @example:
9981
9981
  * this.vhQuerySales.updateDiscount_bill('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -10010,7 +10010,7 @@ export declare class VhQuerySales {
10010
10010
  * @return Promise => obj = {}
10011
10011
  * 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
10012
10012
  */
10013
- addDiscount_sales(data: object): Promise<unknown>;
10013
+ addDiscount_sales(data: any): Promise<unknown>;
10014
10014
  /**
10015
10015
  * @example:
10016
10016
  * this.vhQuerySales.updateDiscount_sales('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -10064,7 +10064,7 @@ export declare class VhQuerySales {
10064
10064
  * @return Promise => obj = {}
10065
10065
  * 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
10066
10066
  */
10067
- addCommission(data: object): Promise<unknown>;
10067
+ addCommission(data: any): Promise<unknown>;
10068
10068
  /**
10069
10069
  * @example:
10070
10070
  * this.vhQuerySales.updateCommission('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -10141,7 +10141,7 @@ export declare class VhQuerySales {
10141
10141
  * @return Promise => obj = {}
10142
10142
  * 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
10143
10143
  */
10144
- addDelivery(data: object): Promise<unknown>;
10144
+ addDelivery(data: any): Promise<unknown>;
10145
10145
  /**
10146
10146
  * @example:
10147
10147
  * this.vhQuerySales.updateDelivery('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -10376,7 +10376,7 @@ export declare class VhQuerySales {
10376
10376
  * @return Promise => obj = {}
10377
10377
  * 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
10378
10378
  */
10379
- addIncoming_group(data: object): Promise<unknown>;
10379
+ addIncoming_group(data: any): Promise<unknown>;
10380
10380
  /**
10381
10381
  * @example:
10382
10382
  * this.vhQuerySales.updateIncoming_group('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -10442,7 +10442,7 @@ export declare class VhQuerySales {
10442
10442
  * @return Promise => obj = {}
10443
10443
  * 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
10444
10444
  */
10445
- addSpending_group(data: object): Promise<unknown>;
10445
+ addSpending_group(data: any): Promise<unknown>;
10446
10446
  /**
10447
10447
  * @example:
10448
10448
  * this.vhQuerySales.updateSpending_group('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -10516,13 +10516,14 @@ export declare class VhQuerySales {
10516
10516
  */
10517
10517
  private getDebtAtBeginningCustomers_byIDcustomer_byIDbranch;
10518
10518
  /**
10519
- * @example
10520
- * this.vhQuerySales.getDebtAtBeginningCustomers()
10521
- .then((debtatbeginnings)=>{
10522
- console.log('getDebtAtBeginningCustomers', debtatbeginnings);
10523
- })
10524
- * @return Promise => array(object) = [{},{},..]
10525
- */
10519
+ * Hàm lấy về những khách hàng có công nợ đầu kỳ
10520
+ * @example
10521
+ * this.vhQuerySales.getDebtAtBeginningCustomers()
10522
+ .then((debtatbeginnings)=>{
10523
+ console.log('getDebtAtBeginningCustomers', debtatbeginnings);
10524
+ })
10525
+ * @return Promise => array(object) = [{},{},..]
10526
+ */
10526
10527
  private getDebtAtBeginningCustomers;
10527
10528
  /**
10528
10529
  * @example:
@@ -10719,7 +10720,7 @@ export declare class VhQuerySales {
10719
10720
  * @param data
10720
10721
  * Promise => object = {} 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
10721
10722
  */
10722
- addPrinter(data: object): Promise<unknown>;
10723
+ addPrinter(data: any): Promise<unknown>;
10723
10724
  /**
10724
10725
  * @example:
10725
10726
  * this.vhQuerySales.updatePrinter('5fb6780ca2148e09806c5b01', {quantity:400})
@@ -11348,7 +11349,7 @@ export declare class VhQuerySales {
11348
11349
  * @return Promise => obj = {}
11349
11350
  * 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
11350
11351
  */
11351
- addPromotion(data: object): Promise<unknown>;
11352
+ addPromotion(data: any): Promise<unknown>;
11352
11353
  /**
11353
11354
  * @example:
11354
11355
  * this.vhQuerySales.updatePromotion('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
@@ -12288,9 +12289,23 @@ export declare class VhQuerySales {
12288
12289
  * @notice : ở giao diện APP, chọn IDbranch rồi mới hiện ra những IDwallet của chi nhánh đó để chọn tiếp. Nếu IDbranch = 'all' thì IDwallet phải là 'all'
12289
12290
  */
12290
12291
  getReportCashBook(starttime: any, endtime: any, IDwallet: any, IDbranch?: string): Promise<unknown>;
12292
+ /**
12293
+ * VhQuerySales:
12294
+ * @param starttime
12295
+ * @param endtime
12296
+ * @param IDwallet
12297
+ * @param IDbranch
12298
+ * @returns
12299
+ */
12291
12300
  private getReportCashBook_old;
12301
+ /**
12302
+ * VhQuerySales:
12303
+ * @param id_branch
12304
+ * @returns
12305
+ */
12292
12306
  private syncCashBook;
12293
12307
  /**
12308
+ * VhQuerySales:
12294
12309
  * Hàm này chỉ chạy trên giao diện Desktop
12295
12310
  * @returns Promise
12296
12311
  */
@@ -12413,7 +12428,7 @@ export declare class VhQuerySales {
12413
12428
  include_paid_points : false,
12414
12429
  include_tax : false,
12415
12430
  include_fee : false,
12416
- id_branch : '5fb6780ca2148e09806c5b01',
12431
+ //id_branch : '5fb6780ca2148e09806c5b01', //trong hàm đã thêm vào
12417
12432
  earned_points_clear_auto:{
12418
12433
  enable,
12419
12434
  months_of_year: 1
@@ -12499,9 +12514,10 @@ export declare class VhQuerySales {
12499
12514
  money : 100000,
12500
12515
  points : 1
12501
12516
  },
12517
+ products:['05ztAR5h3UslYo70Amut','0S8NOcG8wEUYWVo1weHV','0tmbM5SyGe5O1mvuh61l',...],
12502
12518
  include_promotion_product : false,
12503
12519
  include_paid_points : false,
12504
- id_branch : '5fb6780ca2148e09806c5b01'
12520
+ //id_branch : '5fb6780ca2148e09806c5b01' //trong hàm đã thêm vào
12505
12521
  }
12506
12522
  this.vhQuerySales.addEarningPointsProduct(data)
12507
12523
  .then((res)=>{
@@ -12660,7 +12676,7 @@ export declare class VhQuerySales {
12660
12676
  * value : 100000,
12661
12677
  * point : 1000,
12662
12678
  * id_design_barcode : "",
12663
- * id_branch :" 316OIUHLKMLSDYW235"
12679
+ * //id_branch :" 316OIUHLKMLSDYW235" //trong hàm đã có thêm vào
12664
12680
  * }
12665
12681
  * this.vhQuerySales.addCoupon(data)
12666
12682
  .then((res)=>{
@@ -12849,13 +12865,10 @@ export declare class VhQuerySales {
12849
12865
  * hàm này để phát hành 1 coupon_code
12850
12866
  * @example:
12851
12867
  let data = {
12852
- status :1,
12853
12868
  date_validity: new Date(),
12854
12869
  date_expire : new Date(),
12855
12870
  id_coupon_release_detail :"315KHIUHWNIUHCIYUW3187",
12856
- date_used : '',
12857
- date_sold : '',
12858
- id_branch :"OIIOUHDWU1654984NQYUH",
12871
+ id_coupon: '9841654DOIWSDYW235'
12859
12872
  }
12860
12873
  * this.vhQuerySales.createCouponCode(data)
12861
12874
  .then((coupon_code)=>{
@@ -12872,13 +12885,10 @@ export declare class VhQuerySales {
12872
12885
  * trong collection coupon_release_details
12873
12886
  * @example:
12874
12887
  let data = {
12875
- status :1,
12876
12888
  date_validity: new Date(),
12877
12889
  date_expire : new Date(),
12878
12890
  id_coupon_release_detail :"315KHIUHWNIUHCIYUW3187",
12879
- date_used : '',
12880
- date_sold : '',
12881
- id_branch :"OIIOUHDWU1654984NQYUH",
12891
+ id_coupon: '9841654DOIWSDYW235'
12882
12892
  }
12883
12893
  * this.vhQuerySales.createCouponCodes(data, 10)
12884
12894
  .then((coupon_codes)=>{
@@ -12983,18 +12993,19 @@ export declare class VhQuerySales {
12983
12993
  * hàm này đã cập nhật lại trường status, id_customer, date_points_exchanged cho coupon_codes
12984
12994
  * hàm này đã cập nhật lại trường earned_points, id_customer, branch_earned_points cho customers
12985
12995
  * @example:
12986
- * this.vhQuerySales.exchangeCouponCode_byEarningPoints(['OUIYWGUDBYWUHEDW0512','1984QIHBSYGWDIOUHIQFE'], 'INBIFDYWUGUHNI65498', 1000})
12996
+ * let array = [{id_coupon_code, points, value},{}...]
12997
+ * this.vhQuerySales.exchangeCouponCode_byEarningPoints([array,'1984QIHBSYGWDIOUHIQFE'], 'INBIFDYWUGUHNI65498', 1000})
12987
12998
  .then((bool)=>{
12988
12999
  console.log('exchangeCouponCode_byEarningPoints', bool);
12989
13000
  }, error=>{
12990
13001
  console.log('error', error);
12991
13002
  })
12992
- * @param array_id_coupon_code
13003
+ * @param array_id_coupon_code_and_points_and_value : [{id_coupon_code, points, value}]
12993
13004
  * @param id_customer
12994
- * @param earning_points
13005
+ * @param total_points_exchanged: tổng điểm của các phiếu đã quy đổi
12995
13006
  * @return Promise => boolean = true or false
12996
13007
  */
12997
- exchangeCouponCode_byEarningPoints(array_id_coupon_code: any, id_customer: any, points: any): Promise<unknown>;
13008
+ exchangeCouponCode_byEarningPoints(array_id_coupon_code_and_points_and_value: any, id_customer: any, total_points_exchanged: any): Promise<unknown>;
12998
13009
  /**
12999
13010
  * @example:
13000
13011
  * let data = {
@@ -13200,12 +13211,10 @@ export declare class VhQuerySales {
13200
13211
  * hàm này để phát hành 1 voucher_code
13201
13212
  * @example:
13202
13213
  let data = {
13203
- code: '3VU4JW0517',
13204
13214
  date_validity: new Date(),
13205
13215
  date_expire: new Date(),
13206
- status: 1,
13207
13216
  id_voucher_release_detail: "fuMS21I6othUm34385WV",
13208
- id_branch: "4zFGhVUAZyj5d09r01xZ"
13217
+ id_voucher: '9841654DOIWSDYW235'
13209
13218
  }
13210
13219
  * this.vhQuerySales.createVoucherCode(data)
13211
13220
  .then((coupon_code)=>{
@@ -13222,12 +13231,10 @@ export declare class VhQuerySales {
13222
13231
  * trong collection voucher_release_details
13223
13232
  * @example:
13224
13233
  let data = {
13225
- code: '3VU4JW0517',
13226
- date_validity: new Date(),
13227
- date_expire: new Date(),
13228
- status: 1,
13229
- id_voucher_release_detail: "fuMS21I6othUm34385WV",
13230
- id_branch: "4zFGhVUAZyj5d09r01xZ"
13234
+ date_validity: new Date(),
13235
+ date_expire: new Date(),
13236
+ id_voucher_release_detail: "fuMS21I6othUm34385WV",
13237
+ id_voucher: '9841654DOIWSDYW235'
13231
13238
  }
13232
13239
  * this.vhQuerySales.createVoucherCodes(data, 10)
13233
13240
  .then((voucher_codes)=>{
@@ -13327,7 +13334,7 @@ export declare class VhQuerySales {
13327
13334
  * @return Promise => obj ={} or null
13328
13335
  */
13329
13336
  getVoucher_Code_Name_Release(id_voucher_code: any): Promise<unknown>;
13330
- exchangeVoucherCode_byEarningPoints(array_id_voucher_code: any, id_customer: any, points: any): Promise<unknown>;
13337
+ exchangeVoucherCode_byEarningPoints(array_id_voucher_code_and_points_and_products: any, id_customer: any, points: any): Promise<unknown>;
13331
13338
  /**
13332
13339
  * @example:
13333
13340
  * let data = {
@@ -13541,11 +13548,10 @@ export declare class VhQuerySales {
13541
13548
  * hàm này để phát hành 1 payment_card_code
13542
13549
  * @example:
13543
13550
  let data = {
13544
- date_validity: new Date(),
13545
- date_expire: new Date(),
13546
- status: 1,
13547
- id_payment_card_release_detail: "fuMS21I6othUm34385WV",
13548
- id_branch: "4zFGhVUAZyj5d09r01xZ"
13551
+ date_validity: new Date(),
13552
+ date_expire: new Date(),
13553
+ id_payment_card_release_detail: "fuMS21I6othUm34385WV",
13554
+ id_payment_card: '9841654DOIWSDYW235'
13549
13555
  }
13550
13556
  * this.vhQuerySales.createPaymentCardCode(data)
13551
13557
  .then((coupon_code)=>{
@@ -13564,10 +13570,8 @@ export declare class VhQuerySales {
13564
13570
  let data = {
13565
13571
  date_validity: new Date(),
13566
13572
  date_expire: new Date(),
13567
- status: 1,
13568
13573
  id_payment_card_release_detail: "fuMS21I6othUm34385WV",
13569
- id_branch: "4zFGhVUAZyj5d09r01xZ",
13570
- products:[{id_product, price, ptype, quantity, outquantity:0}, {id_product, price, ptype, quantity, outquantity:0}]
13574
+ id_payment_card: '9841654DOIWSDYW235'
13571
13575
  }
13572
13576
  * this.vhQuerySales.createPaymentCardCodes(data, 10)
13573
13577
  .then((voucher_codes)=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "4.1.9",
3
+ "version": "4.2.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"