ionic-vhframeworks 4.0.2 → 4.0.5

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.
@@ -12189,7 +12189,7 @@ export declare class VhQuerySales {
12189
12189
  * @param id_customer_class
12190
12190
  * @return Promise => bool = true or false
12191
12191
  */
12192
- deleteCustomerClass(id_customer_class: any, data: any): Promise<unknown>;
12192
+ deleteCustomerClass(id_customer_class: any): Promise<unknown>;
12193
12193
  /**
12194
12194
  * @example:
12195
12195
  * this.vhQuerySales.getCustomerClass('KNOVIYWKN135468DWS')
@@ -12473,6 +12473,19 @@ export declare class VhQuerySales {
12473
12473
  * @return Promise => bool = true or false
12474
12474
  */
12475
12475
  deleteCouponReleaseDetail(id_coupon_release_detail: any): Promise<unknown>;
12476
+ /**
12477
+ * @example:
12478
+ *
12479
+ * this.vhQuerySales.getCouponReleaseDetail('FBHYWIBDNIUH1321687')
12480
+ .then((res)=>{
12481
+ console.log('getCouponReleaseDetail', res);
12482
+ }, error=>{
12483
+ console.log('error', error);
12484
+ })
12485
+ * @param id_coupon_release_detail
12486
+ * @return Promise => object or null
12487
+ */
12488
+ getCouponReleaseDetail(id_coupon_release_detail: any): Promise<unknown>;
12476
12489
  /**
12477
12490
  * hàm này trả về những Coupon Release Detail của đợt coupon đó
12478
12491
  * @example:
@@ -12509,7 +12522,8 @@ export declare class VhQuerySales {
12509
12522
  */
12510
12523
  private createCouponCode;
12511
12524
  /**
12512
- * hàm này để phát hành nhiều coupon_code theo số lượng truyền vào
12525
+ * hàm này để phát hành nhiều coupon_code theo số lượng truyền vào, và tự động cập nhật trường số lượng đã phát hành (quantity_released) tăng lên
12526
+ * trong collection coupon_release_details
12513
12527
  * @example:
12514
12528
  let data = {
12515
12529
  status :1,
@@ -12529,7 +12543,7 @@ export declare class VhQuerySales {
12529
12543
  * @param data
12530
12544
  * @return Promise => Array(object)
12531
12545
  */
12532
- createCouponCodes(data: object, quantity: number): Promise<unknown>;
12546
+ createCouponCodes(data: any, quantity: number): Promise<unknown>;
12533
12547
  /**
12534
12548
  * @example:
12535
12549
  *
@@ -12545,8 +12559,9 @@ export declare class VhQuerySales {
12545
12559
  */
12546
12560
  updateCouponCode(id_coupon_code: any, data: any): Promise<unknown>;
12547
12561
  /**
12562
+ * Hàm này chỉ cho phép xóa coupon_code đang ở trạng thái đã phát hành (status ==1),
12563
+ * và cập nhật giảm trường số lượng quantity_released bớt một trong collection coupon_release_details
12548
12564
  * @example:
12549
- *
12550
12565
  * this.vhQuerySales.deleteCouponCode('OUHEOIWUYGHIQNIDOUW1359478'})
12551
12566
  .then((bool)=>{
12552
12567
  console.log('deleteCouponCode', bool);
@@ -12554,9 +12569,10 @@ export declare class VhQuerySales {
12554
12569
  console.log('error', error);
12555
12570
  })
12556
12571
  * @param id_coupon_code
12572
+ * @param id_coupon_release_detail
12557
12573
  * @return Promise => boolean = true or false
12558
12574
  */
12559
- deleteCouponCode(id_coupon_code: any): Promise<unknown>;
12575
+ deleteCouponCode(id_coupon_code: string, id_coupon_release_detail: string): Promise<unknown>;
12560
12576
  /**
12561
12577
  * hàm này trả về danh sách coupon code đã phát hành theo mỗi đợt
12562
12578
  * @example:
@@ -12572,7 +12588,23 @@ export declare class VhQuerySales {
12572
12588
  */
12573
12589
  getCouponCodes_byIdCouponReleaseDetail(id_coupon_release_detail: any): Promise<unknown>;
12574
12590
  /**
12575
- * hàm này trả về coupon code đã phát hành theo trường code của Coupon code. dùng trong trang bán hàng để đổi phiếu
12591
+ * hàm này trả về danh sách coupon code đã phát hành theo điều kiện query
12592
+ * @example:
12593
+ * this.vhQuerySales.getCouponCodes_byFields({status:{$eq: 1}}, {}, {}, 0)
12594
+ .then((res)=>{
12595
+ console.log('getCouponCodes_byFields', res);
12596
+ }, error=>{
12597
+ console.log('error', error);
12598
+ })
12599
+ * @param query
12600
+ * @param projection
12601
+ * @param sort
12602
+ * @param limit
12603
+ * @return Promise => array(object) = [{},{},..]
12604
+ */
12605
+ getCouponCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
12606
+ /**
12607
+ * hàm này trả về coupon code đã phát hành theo trường _id của Coupon code. dùng trong trang bán hàng thanh toán bằng phiếu
12576
12608
  * @example:
12577
12609
  *
12578
12610
  * this.vhQuerySales.getCouponCode('OUHEDW0512'})
@@ -12582,9 +12614,24 @@ export declare class VhQuerySales {
12582
12614
  console.log('error', error);
12583
12615
  })
12584
12616
  * @param id_coupon_code: cũng chính là code
12585
- * @return Promise => Array<any>
12617
+ * @return Promise => obj ={} or null
12586
12618
  */
12587
12619
  getCouponCode(id_coupon_code: any): Promise<unknown>;
12620
+ /**
12621
+ * hàm này trả về coupon code đã phát hành theo trường _id của voucher code. dùng trong thanh toán bằng phiếu,
12622
+ * trả về có cả code, name_coupon, name_coupon_release
12623
+ * @example:
12624
+ *
12625
+ * this.vhQuerySales.getCoupon_Code_Name_Release('OUHEDW0512'})
12626
+ .then((res)=>{
12627
+ console.log('getCoupon_Code_Name_Release', res);
12628
+ }, error=>{
12629
+ console.log('error', error);
12630
+ })
12631
+ * @param id_coupon_code: cũng chính là code
12632
+ * @return Promise => obj ={} or null
12633
+ */
12634
+ getCoupon_Code_Name_Release(id_coupon_code: any): Promise<unknown>;
12588
12635
  /**
12589
12636
  * hàm này để đổi phiếu từ điểm của khách hàng. Đổi thành công tự động tạo lịch sử đổi điểm của khách hàng
12590
12637
  * @example:
@@ -12774,6 +12821,18 @@ export declare class VhQuerySales {
12774
12821
  * @return Promise Boolean => true or false
12775
12822
  */
12776
12823
  deleteVoucherReleaseDetail(id_voucher_release_detail: any): Promise<unknown>;
12824
+ /**
12825
+ * @example:
12826
+ * this.vhQuerySales.getVoucherReleaseDetail("fuMS21I6othUm34385WV")
12827
+ .then((res)=>{
12828
+ console.log('getVoucherReleaseDetail', res);
12829
+ }, error=>{
12830
+ console.log('error', error);
12831
+ })
12832
+ * @param (id_voucher_release_detail)
12833
+ * @return Promise => object or null
12834
+ */
12835
+ getVoucherReleaseDetail(id_voucher_release_detail: string): Promise<unknown>;
12777
12836
  /**
12778
12837
  * @example:
12779
12838
  * this.vhQuerySales.getVoucherRelaseDetail_byFields( {id_voucher:{$eq: "316OIUHLKMLSDYW235"}}, {}, {}, 0)
@@ -12811,7 +12870,8 @@ export declare class VhQuerySales {
12811
12870
  */
12812
12871
  private createVoucherCode;
12813
12872
  /**
12814
- * hàm này để phát hành nhiều voucher_code theo số lượng truyền vào
12873
+ * hàm này để phát hành nhiều voucher_code theo số lượng truyền vào, và tự động cập nhật trường số lượng đã phát hành (quantity_released) tăng lên
12874
+ * trong collection voucher_release_details
12815
12875
  * @example:
12816
12876
  let data = {
12817
12877
  code: '3VU4JW0517',
@@ -12831,7 +12891,7 @@ export declare class VhQuerySales {
12831
12891
  * @param quantity
12832
12892
  * @return Promise => Array(object)
12833
12893
  */
12834
- createVoucherCodes(data: object, quantity: number): Promise<unknown>;
12894
+ createVoucherCodes(data: any, quantity: number): Promise<unknown>;
12835
12895
  /**
12836
12896
  * @example:
12837
12897
  *
@@ -12847,34 +12907,51 @@ export declare class VhQuerySales {
12847
12907
  */
12848
12908
  updateVoucherCode(id_voucher_code: any, data: any): Promise<unknown>;
12849
12909
  /**
12910
+ * Hàm này chỉ cho phép xóa voucher_code đang ở trạng thái đã phát hành (status ==1),
12911
+ * và cập nhật giảm trường số lượng quantity_released bớt một trong collection voucher_release_details
12850
12912
  * @example:
12851
- *
12852
- * this.vhQuerySales.deleteVoucherCode('OUHEOIWUYGHIQNIDOUW1359478'})
12913
+ * this.vhQuerySales.deleteVoucherCode('BjHxEYPWrB0rPwfj2L9R', 'CBrcRQIL11lwcHBljliW'})
12853
12914
  .then((bool)=>{
12854
12915
  console.log('deleteVoucherCode', bool);
12855
12916
  }, error=>{
12856
12917
  console.log('error', error);
12857
12918
  })
12858
12919
  * @param id_voucher_code
12920
+ * @param id_voucher_release_detail
12859
12921
  * @return Promise => boolean = true or false
12860
12922
  */
12861
- deleteVoucherCode(id_voucher_code: any): Promise<unknown>;
12923
+ deleteVoucherCode(id_voucher_code: string, id_voucher_release_detail: string): Promise<unknown>;
12862
12924
  /**
12863
12925
  * hàm này trả về danh sách voucher_codes đã phát hành theo mỗi đợt
12864
12926
  * @example:
12865
- *
12866
- * this.vhQuerySales.getVoucherCode_byIdCouponReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
12927
+ * this.vhQuerySales.getVoucherCodes_byIdCouponReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
12867
12928
  .then((array)=>{
12868
- console.log('getVoucherCode_byIdCouponReleaseDetail', array);
12929
+ console.log('getVoucherCodes_byIdCouponReleaseDetail', array);
12869
12930
  }, error=>{
12870
12931
  console.log('error', error);
12871
12932
  })
12872
12933
  * @param id_voucher_release_detail
12873
12934
  * @return Promise => Array<any>
12874
12935
  */
12875
- getVoucherCode_byIdCouponReleaseDetail(id_voucher_release_detail: any): Promise<unknown>;
12936
+ getVoucherCodes_byIdCouponReleaseDetail(id_voucher_release_detail: any): Promise<unknown>;
12876
12937
  /**
12877
- * hàm này trả về voucher code đã phát hành theo trường code của voucher code. dùng trong trang bán hàng để đổi phiếu
12938
+ * hàm này trả về danh sách voucher code đã phát hành theo điều kiện query
12939
+ * @example:
12940
+ * this.vhQuerySales.getVoucherCodes_byFields({status:{$eq: 1}}, {}, {}, 0)
12941
+ .then((res)=>{
12942
+ console.log('getVoucherCodes_byFields', res);
12943
+ }, error=>{
12944
+ console.log('error', error);
12945
+ })
12946
+ * @param query
12947
+ * @param projection
12948
+ * @param sort
12949
+ * @param limit
12950
+ * @return Promise => array(object) = [{},{},..]
12951
+ */
12952
+ getVoucherCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
12953
+ /**
12954
+ * hàm này trả về voucher code đã phát hành theo trường _id của voucher code. dùng trong trang bán hàng để đổi phiếu
12878
12955
  * @example:
12879
12956
  *
12880
12957
  * this.vhQuerySales.getVoucherCode('OUHEDW0512'})
@@ -12884,9 +12961,24 @@ export declare class VhQuerySales {
12884
12961
  console.log('error', error);
12885
12962
  })
12886
12963
  * @param id_voucher_code: cũng chính là code
12887
- * @return Promise => Array<any>
12964
+ * @return Promise => obj ={} or null
12888
12965
  */
12889
12966
  getVoucherCode(id_voucher_code: any): Promise<unknown>;
12967
+ /**
12968
+ * hàm này trả về voucher code đã phát hành theo trường _id của voucher code. dùng trong trang bán hàng để đổi phiếu,
12969
+ * trả về có cả code, name_voucher, name_voucher_release
12970
+ * @example:
12971
+ *
12972
+ * this.vhQuerySales.getVoucher_Code_Name_Release('OUHEDW0512'})
12973
+ .then((res)=>{
12974
+ console.log('getVoucher_Code_Name_Release', res);
12975
+ }, error=>{
12976
+ console.log('error', error);
12977
+ })
12978
+ * @param id_voucher_code: cũng chính là code
12979
+ * @return Promise => obj ={} or null
12980
+ */
12981
+ getVoucher_Code_Name_Release(id_voucher_code: any): Promise<unknown>;
12890
12982
  /** Hàm này để đổi voucher từ điểm của khách hàng. Đổi thành công tự động tạo lịch sử đổi điểm của khách hàng
12891
12983
  * @example:
12892
12984
  * let data = [id_voucher_code]
@@ -13083,6 +13175,19 @@ export declare class VhQuerySales {
13083
13175
  * @return Promise => bool = true or false
13084
13176
  */
13085
13177
  deletePaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13178
+ /**
13179
+ * @example:
13180
+ *
13181
+ * this.vhQuerySales.getPaymentCardReleaseDetail('FBHYWIBDNIUH1321687')
13182
+ .then((res)=>{
13183
+ console.log('getPaymentCardReleaseDetail', res);
13184
+ }, error=>{
13185
+ console.log('error', error);
13186
+ })
13187
+ * @param id_payment_card_release_detail
13188
+ * @return Promise => object or null
13189
+ */
13190
+ getPaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13086
13191
  /**
13087
13192
  * @example:
13088
13193
  * this.vhQuerySales.getVoucherRelaseDetail_byFields( {id_payment_card:{$eq: "316OIUHLKMLSDYW235"}}, {}, {}, 0)
@@ -13119,14 +13224,16 @@ export declare class VhQuerySales {
13119
13224
  */
13120
13225
  private createPaymentCardCode;
13121
13226
  /**
13122
- * hàm này để phát hành nhiều payment_card_code theo số lượng truyền vào
13227
+ * hàm này để phát hành nhiều payment_card_code theo số lượng truyền vào, và tự động cập nhật trường số lượng đã phát hành (quantity_released) tăng lên
13228
+ * trong collection payment_card_release_details
13123
13229
  * @example:
13124
13230
  let data = {
13125
13231
  date_validity: new Date(),
13126
13232
  date_expire: new Date(),
13127
13233
  status: 1,
13128
13234
  id_payment_card_release_detail: "fuMS21I6othUm34385WV",
13129
- id_branch: "4zFGhVUAZyj5d09r01xZ"
13235
+ id_branch: "4zFGhVUAZyj5d09r01xZ",
13236
+ products:[{id_product, price, ptype, quantity, outquantity:0}, {id_product, price, ptype, quantity, outquantity:0}]
13130
13237
  }
13131
13238
  * this.vhQuerySales.createPaymentCardCodes(data, 10)
13132
13239
  .then((voucher_codes)=>{
@@ -13138,7 +13245,7 @@ export declare class VhQuerySales {
13138
13245
  * @param quantity
13139
13246
  * @return Promise => Array(object)
13140
13247
  */
13141
- createPaymentCardCodes(data: object, quantity: number): Promise<unknown>;
13248
+ createPaymentCardCodes(data: any, quantity: number): Promise<unknown>;
13142
13249
  /**
13143
13250
  * @example:
13144
13251
  * let data = {
@@ -13158,34 +13265,52 @@ export declare class VhQuerySales {
13158
13265
  */
13159
13266
  updatePaymentCardCode(id_payment_card_code: any, data: any): Promise<unknown>;
13160
13267
  /**
13268
+ * Hàm này chỉ cho phép xóa payment_card đang ở trạng thái đã phát hành (status ==1),
13269
+ * và cập nhật giảm trường số lượng quantity_released bớt một trong collection payment_card_release_details
13161
13270
  * @example:
13162
- *
13163
- * this.vhQuerySales.deletePaymentCardCode('OUHEOIWUYGHIQNIDOUW1359478'})
13271
+ * this.vhQuerySales.deletePaymentCardCode('OUHEOIWUYGHIQNIDOUW1359478', 'qKgt3cRPRXtw75JV9URp'})
13164
13272
  .then((bool)=>{
13165
13273
  console.log('deletePaymentCardCode', bool);
13166
13274
  }, error=>{
13167
13275
  console.log('error', error);
13168
13276
  })
13169
13277
  * @param id_payment_card_code
13278
+ * @param id_payment_card_release_detail
13170
13279
  * @return Promise => boolean = true or false
13171
13280
  */
13172
- deletePaymentCardCode(id_payment_card_code: any): Promise<unknown>;
13281
+ deletePaymentCardCode(id_payment_card_code: string, id_payment_card_release_detail: string): Promise<unknown>;
13173
13282
  /**
13174
13283
  * hàm này trả về danh sách payment_card_codes đã phát hành theo mỗi đợt
13175
13284
  * @example:
13176
13285
  *
13177
- * this.vhQuerySales.getPaymentCardCode_byIdPaymentCardReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
13286
+ * this.vhQuerySales.getPaymentCardCodes_byIdPaymentCardReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
13178
13287
  .then((array)=>{
13179
- console.log('getPaymentCardCode_byIdPaymentCardReleaseDetail', array);
13288
+ console.log('getPaymentCardCodes_byIdPaymentCardReleaseDetail', array);
13180
13289
  }, error=>{
13181
13290
  console.log('error', error);
13182
13291
  })
13183
13292
  * @param id_payment_card_release_detail
13184
13293
  * @return Promise => Array<any>
13185
13294
  */
13186
- getPaymentCardCode_byIdPaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13295
+ getPaymentCardCodes_byIdPaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13296
+ /**
13297
+ * hàm này trả về danh sách payment_card code đã phát hành theo điều kiện query
13298
+ * @example:
13299
+ * this.vhQuerySales.getPaymentCardCodes_byFields({status:{$eq: 1}}, {}, {}, 0)
13300
+ .then((res)=>{
13301
+ console.log('getPaymentCardCodes_byFields', res);
13302
+ }, error=>{
13303
+ console.log('error', error);
13304
+ })
13305
+ * @param query
13306
+ * @param projection
13307
+ * @param sort
13308
+ * @param limit
13309
+ * @return Promise => array(object) = [{},{},..]
13310
+ */
13311
+ getPaymentCardCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
13187
13312
  /**
13188
- * hàm này trả về payment_card_code đã phát hành theo trường _id của payment_card_code. dùng trong trang bán hàng để đổi phiếu
13313
+ * hàm này trả về payment_card_code đã phát hành theo trường _id của payment_card_code. dùng trong trang bán hàng thanh toán bằng payment_card (chỉ lấy được hàng hóa có và còn trong card)
13189
13314
  * @example:
13190
13315
  *
13191
13316
  * this.vhQuerySales.getPaymentCardCode('OUHEDW0512'})
@@ -13195,9 +13320,24 @@ export declare class VhQuerySales {
13195
13320
  console.log('error', error);
13196
13321
  })
13197
13322
  * @param id_payment_card_code: cũng chính là code
13198
- * @return Promise => Array<any>
13323
+ * @return Promise => obj = {} or null
13199
13324
  */
13200
13325
  getPaymentCardCode(id_payment_card_code: any): Promise<unknown>;
13326
+ /**
13327
+ * hàm này trả về payment_card code đã phát hành theo trường _id của payment_card code. dùng trong đưa thẻ mua trước lấy sản phẩm
13328
+ * trả về có cả code, name_payment_card, name_payment_card_release
13329
+ * @example:
13330
+ *
13331
+ * this.vhQuerySales.getPaymentCard_Code_Name_Release('OUHEDW0512'})
13332
+ .then((res)=>{
13333
+ console.log('getPaymentCard_Code_Name_Release', res);
13334
+ }, error=>{
13335
+ console.log('error', error);
13336
+ })
13337
+ * @param id_payment_card_code: cũng chính là code
13338
+ * @return Promise => obj ={} or null
13339
+ */
13340
+ getPaymentCard_Code_Name_Release(id_payment_card_code: any): Promise<unknown>;
13201
13341
  /**
13202
13342
  * không cần hàm này vì khi tạo phiếu bill_type51 đã được cập nhật
13203
13343
  * hàm này dùng để cập nhật số lượng sản phẩm trong Payment Card khi đổi thẻ
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "4.0.2",
3
+ "version": "4.0.5",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"