ionic-vhframeworks 3.9.8 → 4.0.3

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.
@@ -29,6 +29,19 @@ export declare class VhAlgorithm {
29
29
  private papa;
30
30
  private dom;
31
31
  constructor(platform: Platform, file: File, socialSharing: SocialSharing, papa: Papa, dom: DomSanitizer);
32
+ /**
33
+ * Hàm này so sanh sâu 2 object bằng nhau
34
+ * @param object1
35
+ * @param object2
36
+ * @returns
37
+ */
38
+ deepObjectEqual(object1: any, object2: any): boolean;
39
+ /**
40
+ * Hàm này kiểm tra có phải là object không
41
+ * @param object
42
+ * @returns
43
+ */
44
+ isObject(object: any): boolean;
32
45
  ObjectId(length?: number): string;
33
46
  /**
34
47
  * @example:
@@ -1097,6 +1110,8 @@ export declare class VhQueryCafe {
1097
1110
  private subjecttables;
1098
1111
  private subjectdiscount_bills;
1099
1112
  private callbackdispatcher;
1113
+ private callbacksyncopeningbill;
1114
+ private sync_code;
1100
1115
  /**
1101
1116
  * @Nghiệp vụ tạo (bill_type 5->1), hủy đơn hàng bán món ăn (dùng hàm)
1102
1117
  * {createBill, getBill} -> {createBill_detail, updateBill_detail, deleteBill_detail} -> {saveBill_Billdetail, deleteBill_Billdetail}
@@ -3325,15 +3340,56 @@ export declare class VhQueryCafe {
3325
3340
  * @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
3326
3341
  */
3327
3342
  deleteBill(id_bill: any): Promise<unknown>;
3343
+ /**
3344
+ * Hàm này dùng để đồng bộ hóa đơn đang mở ở 2 giao diện hoặc 2 thiết bị khác nhau
3345
+ * @example:
3346
+ * this.vhQueryCafe.observableSyncOpeningBill('5fb6780ca2148e09806c5b01', 5)
3347
+ .subscribe((bill)=> {
3348
+ console.log('observableSyncOpeningBill', bill);
3349
+ },(error:any) => {
3350
+ console.log(error);
3351
+ })
3352
+ * @param id_bill
3353
+ * @param bill_type
3354
+ * @returns Observable => bill hoặc null;
3355
+ * + trả về bill là hóa đơn đó đang được sử ở thiết bị khác;
3356
+ * + trả về null là hóa đơn đó đã bị xóa hoặc đã chuyển sang trạng thái bill_type khác
3357
+ * @notice : nhớ đóng closeSyncOpeningBill() khi thoát trang hiện tại
3358
+ */
3359
+ observableSyncOpeningBill(id_bill: string, bill_type: number): Observable<unknown>;
3360
+ /**
3361
+ * @example:
3362
+ * this.vhQueryCafe.closeSyncOpeningBill();
3363
+ * @returns void
3364
+ */
3365
+ closeSyncOpeningBill(): void;
3328
3366
  /**
3329
3367
  * @example:
3330
3368
  * this.vhQueryCafe.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
3331
3369
  * @param amount
3332
3370
  * @param orderDescription (lưu ý chữ không dấu)
3333
- * @param id_payment
3371
+ * @param id_payment : id của hóa đơn khách hàng cần thanh toán
3334
3372
  * @param backHref : lấy link mà chạy khởi động lại trang
3373
+ * @Return void
3335
3374
  */
3336
3375
  createPaymentVnpay(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
3376
+ /**
3377
+ * @example:
3378
+ * this.vhQueryCafe.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
3379
+ .then(link=>{
3380
+ //Nếu Desktop chạy luôn link này: window.location = response.data;
3381
+ // Nếu Mobile chạy link link này trong tag frame html
3382
+ },error=>{
3383
+ console.log('error', error);
3384
+ })
3385
+ * @param platform : "mobile"/"desktop"
3386
+ * @param amount
3387
+ * @param orderDescription (lưu ý chữ không dấu)
3388
+ * @param id_payment : id của hóa đơn khách hàng cần thanh toán
3389
+ * @param backHref : lấy link mà chạy khởi động lại trang
3390
+ * @Return Promise => trả về link thanh toán vnpay
3391
+ */
3392
+ createPaymentVnpay_Mobile(amount: number, orderDescription: string, id_payment: string, backHref: string, platform: string): any;
3337
3393
  /**
3338
3394
  * @example:
3339
3395
  * let data = {
@@ -7553,6 +7609,8 @@ export declare class VhQuerySales {
7553
7609
  private subjecttaxs;
7554
7610
  private subjectwarrantys;
7555
7611
  private subjectdiscount_bills;
7612
+ private callbacksyncopeningbill;
7613
+ private sync_code;
7556
7614
  constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, iap2: InAppPurchase2, platform: Platform);
7557
7615
  /**
7558
7616
  * @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)
@@ -10320,6 +10378,104 @@ export declare class VhQuerySales {
10320
10378
  * @return array(object) = [{},{},..]
10321
10379
  */
10322
10380
  getPrinters(): Promise<unknown>;
10381
+ /**
10382
+ * Hàm này dùng để thực hiện trừ hàng hóa trong Payment_Card
10383
+ * Hàm chạy ổn định anh sẽ thêm phần trừ số lượng hàng hóa đã sử dụng trong payment_card_code
10384
+ * @example
10385
+ let bill = {
10386
+ bill_type: 51,
10387
+ id_employee: '2rVieBQTubQ2hjUnpwU4w7qSlD83',
10388
+ id_branch: 'ADGNX9HFzffJ59yRtqNd',
10389
+ id_customer: 'cus001',
10390
+ id_wallet: 'wallet001',
10391
+ note: '',
10392
+ date: new Date(),
10393
+ bill_code: 'L46K0502'
10394
+ }
10395
+ let bill_details =[{
10396
+ id_payment_card: '7Q5BZVRlyySrhShngMDv',
10397
+ id_payment_card_code: '33cTgnd2xZo3OW9tsu1d',
10398
+ pctype: 1,
10399
+ id_product:'9tg6UxzK26DDVEVHsvq5'
10400
+ quantity: 2
10401
+ price: 200000
10402
+ ptype: 1
10403
+ },{
10404
+ id_payment_card: '7Q5BZVRlyySrhShngMDv',
10405
+ id_payment_card_code: '33cTgnd2xZo3OW9tsu1d',
10406
+ pctype: 1,
10407
+ id_product:'jUqd5bE6y2JhX0aCd5TF',
10408
+ quantity: 1
10409
+ price: 100000
10410
+ ptype: 2
10411
+ }]
10412
+ this.vhQuerySales.createBill_Billdetail_51(bill, bill_details)
10413
+ .then((bill:any)=>{
10414
+ console.log(bill._id);
10415
+ },(error:any)=>{
10416
+ console.log('error ', error);
10417
+ })
10418
+ * @param bill
10419
+ * @param bill_details
10420
+ * @returns Promise => object = {} or null
10421
+ */
10422
+ createBill_Billdetail_51(bill: any, bill_details: any): any;
10423
+ /**
10424
+ * Hàm này dùng để thực hiện đổi voucher lấy hàng hóa
10425
+ * @example
10426
+ let bill = {
10427
+ bill_type: 41,
10428
+ id_employee: '2rVieBQTubQ2hjUnpwU4w7qSlD83',
10429
+ id_branch: '2rVieBQTubQ2hjUnpwU4w7qSlD83',
10430
+ id_customer: 'cus001',
10431
+ id_wallet: 'wallet001',
10432
+ note: '',
10433
+ date: new Date(),
10434
+ bill_code: ''
10435
+ }
10436
+ let bill_details =[{
10437
+ id_voucher: 'voucher006',
10438
+ id_voucher_code: 'MHRD9N0531',
10439
+ vtype: 1,
10440
+ quantity: 2
10441
+ vouchers:[{
10442
+ id_product:'9tg6UxzK26DDVEVHsvq5'
10443
+ quantity: 5
10444
+ price: 100000
10445
+ ptype: 1
10446
+ },{
10447
+ id_product:'jUqd5bE6y2JhX0aCd5TF',
10448
+ quantity: 1
10449
+ price: 50000
10450
+ ptype: 2
10451
+ },{
10452
+ id_product,
10453
+ quantity,
10454
+ price,
10455
+ ptype: 5// bây giờ phần mềm chưa dùng voucher có combo
10456
+ combos:[{
10457
+ id_product,
10458
+ quantity,
10459
+ price,
10460
+ ptype: 1
10461
+ },{
10462
+ id_product,
10463
+ quantity,
10464
+ price,
10465
+ ptype: 2
10466
+ }]
10467
+ }]
10468
+ this.vhQuerySales.createBill_Billdetail_41(bill, bill_details)
10469
+ .then((bill:any)=>{
10470
+ console.log(bill._id);
10471
+ },(error:any)=>{
10472
+ console.log('error ', error);
10473
+ })
10474
+ * @param bill
10475
+ * @param bill_details
10476
+ * @returns Promise => object = {} or null
10477
+ */
10478
+ createBill_Billdetail_41(bill: any, bill_details: any): any;
10323
10479
  /**
10324
10480
  * * Hàm này dùng cho những bill nào được tao ra thêm bill_detail vào và lưu lên database luôn
10325
10481
  * @example
@@ -10495,15 +10651,56 @@ export declare class VhQuerySales {
10495
10651
  * @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
10496
10652
  */
10497
10653
  deleteBill(id_bill: any): Promise<unknown>;
10654
+ /**
10655
+ * Hàm này dùng để đồng bộ hóa đơn đang mở ở 2 giao diện hoặc 2 thiết bị khác nhau
10656
+ * @example:
10657
+ * this.vhQuerySales.observableSyncOpeningBill('5fb6780ca2148e09806c5b01', 5)
10658
+ .subscribe((bill)=> {
10659
+ console.log('observableSyncOpeningBill', bill);
10660
+ },(error:any) => {
10661
+ console.log(error);
10662
+ })
10663
+ * @param id_bill
10664
+ * @param bill_type
10665
+ * @returns Observable => bill hoặc null;
10666
+ * + trả về bill là hóa đơn đó đang được sử ở thiết bị khác;
10667
+ * + trả về null là hóa đơn đó đã bị xóa hoặc đã chuyển sang trạng thái bill_type khác
10668
+ * @notice : nhớ đóng closeSyncOpeningBill() khi thoát trang hiện tại
10669
+ */
10670
+ observableSyncOpeningBill(id_bill: string, bill_type: number): Observable<unknown>;
10671
+ /**
10672
+ * @example:
10673
+ * this.vhQuerySales.closeSyncOpeningBill();
10674
+ * @returns void
10675
+ */
10676
+ closeSyncOpeningBill(): void;
10498
10677
  /**
10499
10678
  * @example:
10500
10679
  * this.vhQuerySales.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
10501
10680
  * @param amount
10502
10681
  * @param orderDescription (lưu ý chữ không dấu)
10503
- * @param id_payment
10682
+ * @param id_payment : id của hóa đơn khách hàng cần thanh toán
10504
10683
  * @param backHref : lấy link mà chạy khởi động lại trang
10684
+ * @Return void
10505
10685
  */
10506
10686
  createPaymentVnpay(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
10687
+ /**
10688
+ * Hàm này dùng trong trường hợp dùng iFrame chạy ulr của vnpay, hoặc có nhiều thanh toán như vnpay, momo... cho khách chọn trước khi thanh toán
10689
+ * @example:
10690
+ * this.vhQuerySales.createPaymentVnpay_iFrame(10000, 'Thanh toan hoa don so A7TG2004', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
10691
+ .then(link=>{
10692
+ //Nếu Desktop chạy luôn link này: window.location = response.data;
10693
+ // Nếu Mobile chạy link link này trong tag frame html
10694
+ },error=>{
10695
+ console.log('error', error);
10696
+ })
10697
+ * @param amount
10698
+ * @param orderDescription (lưu ý chữ không dấu)
10699
+ * @param id_payment : id của hóa đơn khách hàng cần thanh toán
10700
+ * @param backHref : lấy link mà chạy khởi động lại trang
10701
+ * @Return Promise => trả về link thanh toán vnpay
10702
+ */
10703
+ createPaymentVnpay_iFrame(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
10507
10704
  /**
10508
10705
  * @example:
10509
10706
  * let data = {
@@ -11372,6 +11569,7 @@ export declare class VhQuerySales {
11372
11569
  * @Notice bill_type = [1,10,15,30,2,3,9,31]
11373
11570
  */
11374
11571
  getReportInputOutputInventory_byTime_byIDProduct(starttime: any, endtime: any, IDproduct: any, IDbranch?: any): Promise<any>;
11572
+ private makeCorrectStock1stDayOfMonth;
11375
11573
  /**
11376
11574
  * Hàm này dùng trong page Tồn kho, giá trị tồn kho, doanh số, chi phí nhập hàng tại một thời điểm endtime nào đó
11377
11575
  * @example:
@@ -11466,15 +11664,18 @@ export declare class VhQuerySales {
11466
11664
  private getReportInputOutputInventory_byTime_byIDProduct1;
11467
11665
  syncInventoryEveryDay_StockBeginning(): Promise<any>;
11468
11666
  /**
11667
+ * Hàm này kiểm tra, tính toán tồn kho cho sản phẩm theo thuật toán 60days lúc khởi động Desktop hoặc Mobile:
11668
+ * + Nếu sản phẩm nào mà tháng gần nhất chưa tính thì hàm sẽ tính
11669
+ * + Nếu sản phẩm mới thêm vào thì hàm sẽ tính
11469
11670
  * vhQuerySales
11470
11671
  * @returns
11471
11672
  */
11472
11673
  private syncInventoryEveryDay_Stock1stDayOfMonth;
11473
11674
  private syncInventoryEveryDay1;
11474
11675
  /**
11475
- * Hàm này dùng trong page XUẤT-NHẬP-TỒN -> Xuất nhập tồn
11676
+ * Hàm này dùng động bộ dữ liệu theo thuật toán 60day
11476
11677
  * @example:
11477
- * this.vhQuerySales.getReportInputOutputInventory_byTime_byIDProduct(starttime , endtime, 'all', 'tj1iYodbVoShwtEetACx')
11678
+ * this.vhQuerySales.makeCorrectQuantityProducts_60days()
11478
11679
  .then((json)=>{
11479
11680
  console.log('json', json);
11480
11681
  })
@@ -11767,6 +11968,1299 @@ export declare class VhQuerySales {
11767
11968
  * @param id_product
11768
11969
  */
11769
11970
  getReportProduct_byID(starttime: any, endtime: any, id_product: any): Promise<any>;
11971
+ /*****************************************************************************************************
11972
+ ******************************* CHƯƠNG TRÌNH BÁN HÀNG ***********************************************
11973
+ *****************************************************************************************************/
11974
+ /******************************************TÍCH ĐIỂM THEO HÓA ĐƠN*************************************/
11975
+ /**
11976
+ * @example:
11977
+ * let data ={
11978
+ name : 'chương trình tích điểm hóa đơn',
11979
+ exchange :{
11980
+ money : 100000,
11981
+ points : 1
11982
+ },
11983
+ bill_total_minimum :0,
11984
+ payment :{
11985
+ enable : true,
11986
+ money : 100000,
11987
+ points : 1
11988
+ },
11989
+ include_discount: false,
11990
+ include_promotion_product : false,
11991
+ include_paid_points : false,
11992
+ include_tax : false,
11993
+ include_fee : false,
11994
+ id_branch : '5fb6780ca2148e09806c5b01',
11995
+ earned_points_clear_auto:{
11996
+ enable,
11997
+ months_of_year: 1
11998
+ }
11999
+ }
12000
+ this.vhQuerySales.addEarningPointsBill(data)
12001
+ .then((earningpoint)=>{
12002
+ console.log('addEarningPointsBill', earningpoint);
12003
+ },error=>{
12004
+ console.log('error', error);
12005
+ })
12006
+ * @param data
12007
+ * @return Promise => obj = {}
12008
+ */
12009
+ addEarningPointsBill(data: any): Promise<unknown>;
12010
+ /**
12011
+ * @example:
12012
+ let data ={
12013
+ name : 'chương trình tích điểm hóa đơn',
12014
+ exchange :{
12015
+ money : 100000,
12016
+ points : 1
12017
+ },
12018
+ bill_total_minimum :0,
12019
+ payment :{
12020
+ enable : true,
12021
+ money : 100000,
12022
+ points : 1
12023
+ },
12024
+ include_discount: false,
12025
+ include_promotion_product : false,
12026
+ include_paid_points : false,
12027
+ include_tax : false,
12028
+ include_fee : false,
12029
+ id_branch : '5fb6780ca2148e09806c5b01'
12030
+ }
12031
+ * @param id_earning_points_bill
12032
+ * @param data
12033
+ * @return Promise => bool = true or false
12034
+ */
12035
+ updateEarningPointsBill(id_earning_points_bill: string, data: object): Promise<unknown>;
12036
+ /**
12037
+ * @example:
12038
+ * this.vhQuerySales.deleteEarningPointsBill('5fb67fda87c0f21d484cbdf3')
12039
+ .then((bool)=>{
12040
+ console.log('deleteEarningPointsBill', bool);
12041
+ })
12042
+ * @param id_earning_points_bill
12043
+ * @return Promise => bool = true or false
12044
+ */
12045
+ deleteEarningPointsBill(id_earning_points_bill: string): Promise<unknown>;
12046
+ /**
12047
+ * @example
12048
+ * this.vhQuerySales.getEarningPointsBill('5fb67fda87c0f21d484cbdf3')
12049
+ .then((earning_points_bill)=>{
12050
+ console.log('getEarningPointsBill', earning_points_bills);
12051
+ },error=>{
12052
+ reject(error);
12053
+ })
12054
+ * @param id_earning_points_bill
12055
+ * @return Promise => obj ={} or null
12056
+ */
12057
+ getEarningPointsBill(id_earning_points_bill: string): Promise<unknown>;
12058
+ /**
12059
+ * @example
12060
+ * this.vhQuerySales.getEarningPointsBills()
12061
+ .then((earning_points_bills)=>{
12062
+ console.log('getEarningPointsBills', earning_points_bills);
12063
+ })
12064
+ * @return Promise => array(object) = [{},{},..]
12065
+ */
12066
+ getEarningPointsBills(): Promise<unknown>;
12067
+ /**
12068
+ * @example:
12069
+ * let data ={
12070
+ name : 'chương trình tích điểm sản phẩm',
12071
+ exchange :{
12072
+ money : 100000,
12073
+ points : 1
12074
+ },
12075
+ payment :{
12076
+ enable : true,
12077
+ money : 100000,
12078
+ points : 1
12079
+ },
12080
+ include_promotion_product : false,
12081
+ include_paid_points : false,
12082
+ id_branch : '5fb6780ca2148e09806c5b01'
12083
+ }
12084
+ this.vhQuerySales.addEarningPointsProduct(data)
12085
+ .then((res)=>{
12086
+ console.log('addEarningPointsProduct', res);
12087
+ }, error=>{
12088
+ console.log('error', error);
12089
+ })
12090
+ * @param data
12091
+ * @return Promise => object or error
12092
+ */
12093
+ addEarningPointsProduct(data: any): Promise<unknown>;
12094
+ /**
12095
+ * @example:
12096
+ let data ={
12097
+ name : 'chương trình tích điểm sản phẩm',
12098
+ exchange :{
12099
+ money : 100000,
12100
+ points : 1
12101
+ },
12102
+ payment :{
12103
+ enable : true,
12104
+ money : 100000,
12105
+ points : 1
12106
+ },
12107
+ include_promotion_product : false,
12108
+ include_paid_points : false,
12109
+ id_branch : '5fb6780ca2148e09806c5b01'
12110
+ }
12111
+ * this.vhQuerySales.updateEarningPointsProduct(id_earning_points_product,data)
12112
+ .then((bool)=>{
12113
+ console.log('updateEarningPointsProduct', bool);
12114
+ }, error=>{
12115
+ console.log('error', error);
12116
+ })
12117
+ * @param id_earning_points_product
12118
+ * @param data
12119
+ * @return Promise => bool = true or false
12120
+ */
12121
+ updateEarningPointsProduct(id_earning_points_product: any, data: any): Promise<unknown>;
12122
+ /**
12123
+ * @example:
12124
+ * this.vhQuerySales.deleteEarningPointsProduct('654QFNMOIYUENC321')
12125
+ .then((bool)=>{
12126
+ console.log('deleteEarningPointsProduct', bool);
12127
+ }, error=>{
12128
+ console.log('error', error);
12129
+ })
12130
+ * @param id_earning_points_product
12131
+ * @return Promise => bool = true or false
12132
+ */
12133
+ deleteEarningPointsProduct(id_earning_points_product: any): Promise<unknown>;
12134
+ /**
12135
+ * @example:
12136
+ * this.vhQuerySales.getEarningPointsProduct('654QFNMOIYUENC321')
12137
+ .then((res)=>{
12138
+ console.log('getEarningPointsProduct', res);
12139
+ }, error=>{
12140
+ console.log('error', error);
12141
+ })
12142
+ * @param id_earning_points_product
12143
+ * @return Promise => object or null
12144
+ */
12145
+ getEarningPointsProduct(id_earning_points_product: any): Promise<unknown>;
12146
+ /**
12147
+ * @example:
12148
+ * this.vhQuerySales.getEarningPointsProducts()
12149
+ .then((arr)=>{
12150
+ console.log('getEarningPointsProducts', arr);
12151
+ }, error=>{
12152
+ console.log('error', error);
12153
+ })
12154
+ * @return Promise => Array<object>
12155
+ */
12156
+ getEarningPointsProducts(): Promise<unknown>;
12157
+ /**
12158
+ * @example:
12159
+ * this.vhQuerySales.addCustomerClass({name : "Gold"})
12160
+ .then((res)=>{
12161
+ console.log('addCustomerClass', res);
12162
+ }, error=>{
12163
+ console.log('error', error);
12164
+ })
12165
+ * @param data
12166
+ * @return Promise => bool = object or error
12167
+ */
12168
+ addCustomerClass(data: any): Promise<unknown>;
12169
+ /**
12170
+ * @example:
12171
+ * this.vhQuerySales.updateCustomerClass('KNOVIYWKN135468',{name : "Gold"})
12172
+ .then((bool)=>{
12173
+ console.log('updateCustomerClass', bool);
12174
+ }, error=>{
12175
+ console.log('error', error);
12176
+ })
12177
+ * @param id_customer_class
12178
+ * @return Promise => bool = true or false
12179
+ */
12180
+ updateCustomerClass(id_customer_class: any, data: any): Promise<unknown>;
12181
+ /**
12182
+ * @example:
12183
+ * this.vhQuerySales.deleteCustomerClass('KNOVIYWKN135468')
12184
+ .then((bool)=>{
12185
+ console.log('deleteCustomerClass', bool);
12186
+ }, error=>{
12187
+ console.log('error', error);
12188
+ })
12189
+ * @param id_customer_class
12190
+ * @return Promise => bool = true or false
12191
+ */
12192
+ deleteCustomerClass(id_customer_class: any): Promise<unknown>;
12193
+ /**
12194
+ * @example:
12195
+ * this.vhQuerySales.getCustomerClass('KNOVIYWKN135468DWS')
12196
+ .then((res)=>{
12197
+ console.log('getCustomerClass', res);
12198
+ }, error=>{
12199
+ console.log('error', error);
12200
+ })
12201
+ * @param id_customer_class
12202
+ * @return Promise => object or null
12203
+ */
12204
+ getCustomerClass(id_customer_class: any): Promise<unknown>;
12205
+ /**
12206
+ * @example:
12207
+ * this.vhQuerySales.getCustomerClasss()
12208
+ .then((array)=>{
12209
+ console.log('getCustomerClasss', array);
12210
+ }, error=>{
12211
+ console.log('error', error);
12212
+ })
12213
+ * @param data
12214
+ * @return Promise => Array<object>
12215
+ */
12216
+ getCustomerClasss(): Promise<unknown>;
12217
+ /**
12218
+ * trong local chưa có
12219
+ * @example:
12220
+ * let customer_class = this.vhQuerySales.getCustomerClasss()
12221
+ * @param data
12222
+ * @return Array<object>
12223
+ */
12224
+ getlocalCustomerClasss(): void;
12225
+ /**
12226
+ * trong local chưa có
12227
+ * @example:
12228
+ * let customer_class = this.vhQuerySales.getCustomerClass('321987965DOIUEHN')
12229
+ * @param id_customer_class
12230
+ * @return object or null
12231
+ */
12232
+ getlocalCustomerClass(id_customer_class: any): void;
12233
+ /**
12234
+ * @example:
12235
+ * this.vhQuerySales.addEmployeeClass({name : "Gold"})
12236
+ .then((res)=>{
12237
+ console.log('addEmployeeClass', res);
12238
+ }, error=>{
12239
+ console.log('error', error);
12240
+ })
12241
+ * @param data
12242
+ * @return Promise => object or error
12243
+ */
12244
+ addEmployeeClass(data: any): Promise<unknown>;
12245
+ /**
12246
+ * @example:
12247
+ * this.vhQuerySales.updateEmployeeClass('KNOVIYWKN135468',{id_commission : "321SDWC65DWSVDFS"})
12248
+ .then((bool)=>{
12249
+ console.log('updateEmployeeClass', bool);
12250
+ }, error=>{
12251
+ console.log('error', error);
12252
+ })
12253
+ * @param id_employee_class
12254
+ * @param data
12255
+ * @return Promise => bool = true or false
12256
+ */
12257
+ updateEmployeeClass(id_employee_class: any, data: any): Promise<unknown>;
12258
+ /**
12259
+ * @example:
12260
+ * this.vhQuerySales.deleteEmployeeClass('KNOVIYWKN135468')
12261
+ .then((bool)=>{
12262
+ console.log('deleteEmployeeClass', bool);
12263
+ }, error=>{
12264
+ console.log('error', error);
12265
+ })
12266
+ * @param id_employee_class
12267
+ * @return Promise => bool = true or false
12268
+ */
12269
+ deleteEmployeeClass(id_employee_class: any): Promise<unknown>;
12270
+ /**
12271
+ * @example:
12272
+ * this.vhQuerySales.getEmployeeClass('KNOVIYWKN135468')
12273
+ .then((res)=>{
12274
+ console.log('getEmployeeClass', res);
12275
+ }, error=>{
12276
+ console.log('error', error);
12277
+ })
12278
+ * @param id_employee_class
12279
+ * @return Promise => object or null
12280
+ */
12281
+ getEmployeeClass(id_employee_class: any): Promise<unknown>;
12282
+ /**
12283
+ * @example:
12284
+ * this.vhQuerySales.getEmployeeClasss()
12285
+ .then((array)=>{
12286
+ console.log('getEmployeeClasss', array);
12287
+ }, error=>{
12288
+ console.log('error', error);
12289
+ })
12290
+ * @param id_employee_class
12291
+ * @return Promise => Array<object>
12292
+ */
12293
+ getEmployeeClasss(): Promise<unknown>;
12294
+ /**
12295
+ * trong local chưa có
12296
+ * @example:
12297
+ * let employee_classs = this.vhQuerySales.getlocalEmployeeClasss()
12298
+ * @param data
12299
+ * @return Array<object>
12300
+ */
12301
+ getlocalEmployeeClasss(): void;
12302
+ /**
12303
+ * trong local chưa có
12304
+ * @example:
12305
+ * let employee_class = this.vhQuerySales.getlocalEmployeeClass('321987965DOIUEHN')
12306
+ * @param id_employee_class
12307
+ * @return object or null
12308
+ */
12309
+ getlocalEmployeeClass(id_customer_class: any): void;
12310
+ /**
12311
+ * @example:
12312
+ * let data = {
12313
+ * name:"Phiếu thanh toán 100k",
12314
+ * value : 100000,
12315
+ * point : 1000,
12316
+ * id_design_barcode : "",
12317
+ * id_branch :" 316OIUHLKMLSDYW235"
12318
+ * }
12319
+ * this.vhQuerySales.addCoupon(data)
12320
+ .then((res)=>{
12321
+ console.log('addCoupon', res);
12322
+ }, error=>{
12323
+ console.log('error', error);
12324
+ })
12325
+ * @param data
12326
+ * @return Promise => object or error
12327
+ */
12328
+ addCoupon(data: any): Promise<unknown>;
12329
+ /**
12330
+ * @example:
12331
+ * let data = {
12332
+ * name:"Phiếu thanh toán 100k",
12333
+ * value : 100000,
12334
+ * point : 1000,
12335
+ * id_design_barcode : "",
12336
+ * }
12337
+ * this.vhQuerySales.updateCoupon('FBHYWIBDNIUH1321687',data)
12338
+ .then((bool)=>{
12339
+ console.log('updateCoupon', bool);
12340
+ }, error=>{
12341
+ console.log('error', error);
12342
+ })
12343
+ * @param data
12344
+ * @param id_coupon
12345
+ * @return Promise => bool = true or false
12346
+ */
12347
+ updateCoupon(id_coupon: any, data: any): Promise<unknown>;
12348
+ /**
12349
+ * @example:
12350
+ *
12351
+ * this.vhQuerySales.deleteCoupon('FBHYWIBDNIUH1321687')
12352
+ .then((bool)=>{
12353
+ console.log('deleteCoupon', bool);
12354
+ }, error=>{
12355
+ console.log('error', error);
12356
+ })
12357
+ * @param id_coupon
12358
+ * @return Promise => bool = true or false
12359
+ */
12360
+ deleteCoupon(id_coupon: any): Promise<unknown>;
12361
+ /**
12362
+ * @example:
12363
+ *
12364
+ * this.vhQuerySales.getCoupon('FBHYWIBDNIUH1321687')
12365
+ .then((res)=>{
12366
+ console.log('getCoupon', res);
12367
+ }, error=>{
12368
+ console.log('error', error);
12369
+ })
12370
+ * @param id_coupon
12371
+ * @return Promise => object or null
12372
+ */
12373
+ getCoupon(id_coupon: any): Promise<unknown>;
12374
+ /**
12375
+ * @example:
12376
+ * this.vhQuerySales.getCoupons()
12377
+ .then((res)=>{
12378
+ console.log('getCoupons', res);
12379
+ }, error=>{
12380
+ console.log('error', error);
12381
+ })
12382
+ * @return Promise => Array<object>
12383
+ */
12384
+ getCoupons(): Promise<unknown>;
12385
+ /**
12386
+ * @example:
12387
+ * this.vhQuerySales.addCouponRelease({name : "Đợt phát hành phiếu thanh toán 100k",id_branch :'OHFNEIOUH6549846'})
12388
+ .then((res)=>{
12389
+ console.log('addCouponRelease', res);
12390
+ }, error=>{
12391
+ console.log('error', error);
12392
+ })
12393
+ * @param data
12394
+ * @return Promise => object or error
12395
+ */
12396
+ addCouponRelease(data: any): Promise<unknown>;
12397
+ /**
12398
+ * @example:
12399
+ * this.vhQuerySales.updateCouponRelease('ANOFIEUPOIUJ49861',{name : "Đợt phát hành phiếu thanh toán 100k"})
12400
+ .then((bool)=>{
12401
+ console.log('updateCouponRelease', bool);
12402
+ }, error=>{
12403
+ console.log('error', error);
12404
+ })
12405
+ * @param data
12406
+ * @param id_coupon_release
12407
+ * @return Promise => bool = true or false
12408
+ */
12409
+ updateCouponRelease(id_coupon_release: any, data: any): Promise<unknown>;
12410
+ /**
12411
+ * @example:
12412
+ * this.vhQuerySales.deleteCouponRelease('ANOFIEUPOIUJ49861')
12413
+ .then((bool)=>{
12414
+ console.log('deleteCouponRelease', bool);
12415
+ }, error=>{
12416
+ console.log('error', error);
12417
+ })
12418
+ * @param id_coupon_release
12419
+ * @return Promise => bool = true or false
12420
+ */
12421
+ deleteCouponRelease(id_coupon_release: any): Promise<unknown>;
12422
+ /**
12423
+ * @example:
12424
+ *
12425
+ * this.vhQuerySales.getCouponRelease('FBHYWIBDNIUH1321687')
12426
+ .then((res)=>{
12427
+ console.log('getCouponRelease', res);
12428
+ }, error=>{
12429
+ console.log('error', error);
12430
+ })
12431
+ * @param id_coupon_release
12432
+ * @return Promise => object or null
12433
+ */
12434
+ getCouponRelease(id_coupon_release: any): Promise<unknown>;
12435
+ /**
12436
+ * @example:
12437
+ *
12438
+ * this.vhQuerySales.getCouponReleases()
12439
+ .then((arr)=>{
12440
+ console.log('getCouponReleases', arr);
12441
+ }, error=>{
12442
+ console.log('error', error);
12443
+ })
12444
+ * @return Promise => Array< object >
12445
+ */
12446
+ getCouponReleases(): Promise<unknown>;
12447
+ /**
12448
+ * @example:
12449
+ let data = {
12450
+ id_coupon : "9841654DOIWSDYW235",
12451
+ id_coupon_release :" 316OIUHLKMLSDYW235"
12452
+ }
12453
+ this.vhQuerySales.addCouponReleaseDetail(data)
12454
+ .then((res)=>{
12455
+ console.log('addCouponReleaseDetail', res);
12456
+ }, error=>{
12457
+ console.log('error', error);
12458
+ })
12459
+ * @param data
12460
+ * @param id_coupon
12461
+ * @return Promise => bool = true or false
12462
+ */
12463
+ addCouponReleaseDetail(data: any): Promise<unknown>;
12464
+ /**
12465
+ * @example:
12466
+ * this.vhQuerySales.deleteCouponReleaseDetail("9841654DOIWSDYW235")
12467
+ .then((bool)=>{
12468
+ console.log('deleteCouponReleaseDetail', bool);
12469
+ }, error=>{
12470
+ console.log('error', error);
12471
+ })
12472
+ * @param id_coupon_release_detail
12473
+ * @return Promise => bool = true or false
12474
+ */
12475
+ deleteCouponReleaseDetail(id_coupon_release_detail: any): Promise<unknown>;
12476
+ /**
12477
+ * hàm này trả về những Coupon Release Detail của đợt coupon đó
12478
+ * @example:
12479
+ * this.vhQuerySales.getCouponRelaseDetail_byIdCouponRelease("9841654DOIWSDYW235")
12480
+ .then((array)=>{
12481
+ console.log('getCouponRelaseDetail_byIdCouponRelease', array);
12482
+ }, error=>{
12483
+ console.log('error', error);
12484
+ })
12485
+ * @param id_coupon_release
12486
+ * @return Promise => Array<any> = [{id_coupon_relase, id_coupon, coupon_name, coupon_value, coupon_code_numbers}]
12487
+ */
12488
+ getCouponRelaseDetail_byIdCouponRelease(id_coupon_release: any): Promise<unknown>;
12489
+ /**
12490
+ * hàm này để phát hành 1 coupon_code
12491
+ * @example:
12492
+ let data = {
12493
+ status :1,
12494
+ date_validity: new Date(),
12495
+ date_expire : new Date(),
12496
+ id_coupon_release_detail :"315KHIUHWNIUHCIYUW3187",
12497
+ date_used : '',
12498
+ date_sold : '',
12499
+ id_branch :"OIIOUHDWU1654984NQYUH",
12500
+ }
12501
+ * this.vhQuerySales.createCouponCode(data)
12502
+ .then((coupon_code)=>{
12503
+ console.log('createCouponCode', coupon_code);
12504
+ }, error=>{
12505
+ console.log('error', error);
12506
+ })
12507
+ * @param data
12508
+ * @return Promise => Object
12509
+ */
12510
+ private createCouponCode;
12511
+ /**
12512
+ * hàm này để phát hành nhiều coupon_code theo số lượng truyền vào
12513
+ * @example:
12514
+ let data = {
12515
+ status :1,
12516
+ date_validity: new Date(),
12517
+ date_expire : new Date(),
12518
+ id_coupon_release_detail :"315KHIUHWNIUHCIYUW3187",
12519
+ date_used : '',
12520
+ date_sold : '',
12521
+ id_branch :"OIIOUHDWU1654984NQYUH",
12522
+ }
12523
+ * this.vhQuerySales.createCouponCodes(data, 10)
12524
+ .then((coupon_codes)=>{
12525
+ console.log('createCouponCodes', coupon_codes);
12526
+ }, error=>{
12527
+ console.log('error', error);
12528
+ })
12529
+ * @param data
12530
+ * @return Promise => Array(object)
12531
+ */
12532
+ createCouponCodes(data: any, quantity: number): Promise<unknown>;
12533
+ /**
12534
+ * @example:
12535
+ *
12536
+ * this.vhQuerySales.updateCouponCode('OUHEOIWUYGHIQNIDOUW1359478',{date_expire : new Date()})
12537
+ .then((bool)=>{
12538
+ console.log('updateCouponCode', bool);
12539
+ }, error=>{
12540
+ console.log('error', error);
12541
+ })
12542
+ * @param id_coupon_code
12543
+ * @param data
12544
+ * @return Promise => boolean = true or false
12545
+ */
12546
+ updateCouponCode(id_coupon_code: any, data: any): Promise<unknown>;
12547
+ /**
12548
+ * @example:
12549
+ *
12550
+ * this.vhQuerySales.deleteCouponCode('OUHEOIWUYGHIQNIDOUW1359478'})
12551
+ .then((bool)=>{
12552
+ console.log('deleteCouponCode', bool);
12553
+ }, error=>{
12554
+ console.log('error', error);
12555
+ })
12556
+ * @param id_coupon_code
12557
+ * @return Promise => boolean = true or false
12558
+ */
12559
+ deleteCouponCode(id_coupon_code: any): Promise<unknown>;
12560
+ /**
12561
+ * hàm này trả về danh sách coupon code đã phát hành theo mỗi đợt
12562
+ * @example:
12563
+ *
12564
+ * this.vhQuerySales.getCouponCodes_byIdCouponReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
12565
+ .then((array)=>{
12566
+ console.log('getCouponCodes_byIdCouponReleaseDetail', array);
12567
+ }, error=>{
12568
+ console.log('error', error);
12569
+ })
12570
+ * @param id_coupon_release_detail
12571
+ * @return Promise => Array<any>
12572
+ */
12573
+ getCouponCodes_byIdCouponReleaseDetail(id_coupon_release_detail: any): Promise<unknown>;
12574
+ /**
12575
+ * hàm này trả về danh sách coupon code đã phát hành theo điều kiện query
12576
+ * @example:
12577
+ * this.vhQuerySales.getCouponCodes_byFields({status:{$eq: 1}}, {}, {}, 0)
12578
+ .then((res)=>{
12579
+ console.log('getCouponCodes_byFields', res);
12580
+ }, error=>{
12581
+ console.log('error', error);
12582
+ })
12583
+ * @param query
12584
+ * @param projection
12585
+ * @param sort
12586
+ * @param limit
12587
+ * @return Promise => array(object) = [{},{},..]
12588
+ */
12589
+ getCouponCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
12590
+ /**
12591
+ * 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
12592
+ * @example:
12593
+ *
12594
+ * this.vhQuerySales.getCouponCode('OUHEDW0512'})
12595
+ .then((res)=>{
12596
+ console.log('getCouponCode', res);
12597
+ }, error=>{
12598
+ console.log('error', error);
12599
+ })
12600
+ * @param id_coupon_code: cũng chính là code
12601
+ * @return Promise => Array<any>
12602
+ */
12603
+ getCouponCode(id_coupon_code: any): Promise<unknown>;
12604
+ /**
12605
+ * 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
12606
+ * @example:
12607
+ * this.vhQuerySales.exchangeCouponCode_byEarningPoints(['OUIYWGUDBYWUHEDW0512','1984QIHBSYGWDIOUHIQFE'], 'INBIFDYWUGUHNI65498', 1000})
12608
+ .then((bool)=>{
12609
+ console.log('exchangeCouponCode_byEarningPoints', bool);
12610
+ }, error=>{
12611
+ console.log('error', error);
12612
+ })
12613
+ * @param array_id_coupon_code
12614
+ * @param id_customer
12615
+ * @param earning_points
12616
+ * @return Promise => boolean = true or false
12617
+ */
12618
+ exchangeCouponCode_byEarningPoints(array_id_coupon_code: any, id_customer: any, points: any): Promise<unknown>;
12619
+ /**
12620
+ * @example:
12621
+ * let data = {
12622
+ name : "Siêu khuyến mãi",
12623
+ id_design_barcode :"316OIUHLKMLSDYW235",
12624
+ products: [{
12625
+ id_product : "NIDOUHWIOLDNOIU1142748",
12626
+ price : 1000000,
12627
+ quantity: 1,
12628
+ ptype: 1
12629
+ }],
12630
+ point: 10,
12631
+ price_origin: 9300000,
12632
+ price: 9200000,
12633
+ id_branch: 4zFGhVUAZyj5d09r01xZ
12634
+ }
12635
+ * this.vhQuerySales.addVoucher(data)
12636
+ .then((res)=>{
12637
+ console.log('addVoucher', res);
12638
+ }, error=>{
12639
+ console.log('error', error);
12640
+ })
12641
+ * @param data
12642
+ * @return object or error
12643
+ */
12644
+ addVoucher(data: any): Promise<unknown>;
12645
+ /**
12646
+ * @example:
12647
+ * let data = {
12648
+ point: 23,
12649
+ price_origin: 9400000,
12650
+ id_branch: 4zFGhVUAZyj5d09r01xZ
12651
+ }
12652
+ * this.vhQuerySales.updateVoucher("fuMS21I6othUm34385WV", data)
12653
+ .then((bool)=>{
12654
+ console.log('updateVoucher', bool);
12655
+ }, error=>{
12656
+ console.log('error', error);
12657
+ })
12658
+ * @param id_voucher
12659
+ * @param data
12660
+ * @return Promise Boolean => true or false
12661
+ */
12662
+ updateVoucher(id_voucher: any, data: any): Promise<unknown>;
12663
+ /**
12664
+ * @example:
12665
+ * this.vhQuerySales.deleteVoucher("fuMS21I6othUm34385WV")
12666
+ .then((bool)=>{
12667
+ console.log('deleteVoucher', bool);
12668
+ }, error=>{
12669
+ console.log('error', error);
12670
+ })
12671
+ * @param id_voucher
12672
+ * @return Promise Boolean => true or false
12673
+ */
12674
+ deleteVoucher(id_voucher: any): Promise<unknown>;
12675
+ /**
12676
+ * @example:
12677
+ * this.vhQuerySales.getVoucher(id_voucher)
12678
+ .then((res)=>{
12679
+ console.log('addVoucher', res);
12680
+ }, error=>{
12681
+ console.log('error', error);
12682
+ })
12683
+ * @param id_voucher
12684
+ * @return Promise => object or null
12685
+ */
12686
+ getVoucher(id_voucher: any): Promise<unknown>;
12687
+ /**
12688
+ * @example:
12689
+ * this.vhQuerySales.getVouchers()
12690
+ .then((arr)=>{
12691
+ console.log('getVouchers', arr);
12692
+ }, error=>{
12693
+ console.log('error', error);
12694
+ })
12695
+ * @return Promise => array(object) =[{},{},...]
12696
+ */
12697
+ getVouchers(): Promise<unknown>;
12698
+ /**
12699
+ * @example:
12700
+ * let data = {
12701
+ name : "Tháng 6 bùng nổ",
12702
+ id_branch: 4zFGhVUAZyj5d09r01xZ
12703
+ }
12704
+ * this.vhQuerySales.addVoucherRelease(data)
12705
+ .then((res)=>{
12706
+ console.log('addVoucherRelease', res);
12707
+ }, error=>{
12708
+ console.log('error', error);
12709
+ })
12710
+ * @param data
12711
+ * @return object or error
12712
+ */
12713
+ addVoucherRelease(data: any): Promise<unknown>;
12714
+ /**
12715
+ * @example:
12716
+ * let data = {
12717
+ name : "Tháng 6 bùng nổ"
12718
+ }
12719
+ * this.vhQuerySales.updateVoucherRelease("fuMS21I6othUm34385WV", data)
12720
+ .then((bool)=>{
12721
+ console.log('updateVoucherRelease', bool);
12722
+ }, error=>{
12723
+ console.log('error', error);
12724
+ })
12725
+ * @param id_voucher_release
12726
+ * @param data
12727
+ * @return Promise Boolean => true or false
12728
+ */
12729
+ updateVoucherRelease(id_voucher_release: any, data: any): Promise<unknown>;
12730
+ /**
12731
+ * @example:
12732
+ * this.vhQuerySales.deleteVoucherRelease("fuMS21I6othUm34385WV")
12733
+ .then((bool)=>{
12734
+ console.log('deleteVoucherRelease', bool);
12735
+ }, error=>{
12736
+ console.log('error', error);
12737
+ })
12738
+ * @param id_voucher_release
12739
+ * @return Promise Boolean => true or false
12740
+ */
12741
+ deleteVoucherRelease(id_voucher_release: any): Promise<unknown>;
12742
+ /**
12743
+ * @example:
12744
+ * this.vhQuerySales.getVoucherRelease("fuMS21I6othUm34385WV")
12745
+ .then((res)=>{
12746
+ console.log('getVoucherRelease', res);
12747
+ }, error=>{
12748
+ console.log('error', error);
12749
+ })
12750
+ * @param id_voucher_release
12751
+ * @return Promise => object or null
12752
+ */
12753
+ getVoucherRelease(id_voucher_release: any): Promise<unknown>;
12754
+ /**
12755
+ * @example:
12756
+ * this.vhQuerySales.getVoucherRelases()
12757
+ .then((res)=>{
12758
+ console.log('getVoucherRelases', res);
12759
+ }, error=>{
12760
+ console.log('error', error);
12761
+ })
12762
+ * @return Promise => array(object) =[{},{},...]
12763
+ */
12764
+ getVoucherRelases(): Promise<unknown>;
12765
+ /**
12766
+ * @example:
12767
+ * let data = {
12768
+ id_voucher : "fuMS21I6othUm34385WV",
12769
+ id_voucher_release: "4zFGhVUAZyj5d09r01xZ"
12770
+ }
12771
+ * this.vhQuerySales.addVoucherReleaseDetail(data)
12772
+ .then((res)=>{
12773
+ console.log('addVoucherReleaseDetail', res);
12774
+ }, error=>{
12775
+ console.log('error', error);
12776
+ })
12777
+ * @param data
12778
+ * @return object or error
12779
+ */
12780
+ addVoucherReleaseDetail(data: any): Promise<unknown>;
12781
+ /**
12782
+ * @example:
12783
+ * this.vhQuerySales.deleteVoucherReleaseDetail("fuMS21I6othUm34385WV")
12784
+ .then((bool)=>{
12785
+ console.log('deleteVoucherReleaseDetail', bool);
12786
+ }, error=>{
12787
+ console.log('error', error);
12788
+ })
12789
+ * @param id_voucher_release_detail
12790
+ * @return Promise Boolean => true or false
12791
+ */
12792
+ deleteVoucherReleaseDetail(id_voucher_release_detail: any): Promise<unknown>;
12793
+ /**
12794
+ * @example:
12795
+ * this.vhQuerySales.getVoucherRelaseDetail_byFields( {id_voucher:{$eq: "316OIUHLKMLSDYW235"}}, {}, {}, 0)
12796
+ .then((res)=>{
12797
+ console.log('getVoucherRelaseDetail_byFields', res);
12798
+ }, error=>{
12799
+ console.log('error', error);
12800
+ })
12801
+ * @param query
12802
+ * @param projection
12803
+ * @param sort
12804
+ * @param limit
12805
+ * @return Promise => array(object) = [{},{},..]
12806
+ */
12807
+ getVoucherRelaseDetail_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
12808
+ /**
12809
+ * hàm này để phát hành 1 voucher_code
12810
+ * @example:
12811
+ let data = {
12812
+ code: '3VU4JW0517',
12813
+ date_validity: new Date(),
12814
+ date_expire: new Date(),
12815
+ status: 1,
12816
+ id_voucher_release_detail: "fuMS21I6othUm34385WV",
12817
+ id_branch: "4zFGhVUAZyj5d09r01xZ"
12818
+ }
12819
+ * this.vhQuerySales.createVoucherCode(data)
12820
+ .then((coupon_code)=>{
12821
+ console.log('createVoucherCode', coupon_code);
12822
+ }, error=>{
12823
+ console.log('error', error);
12824
+ })
12825
+ * @param data
12826
+ * @return Promise => Object
12827
+ */
12828
+ private createVoucherCode;
12829
+ /**
12830
+ * hàm này để phát hành nhiều voucher_code theo số lượng truyền vào
12831
+ * @example:
12832
+ let data = {
12833
+ code: '3VU4JW0517',
12834
+ date_validity: new Date(),
12835
+ date_expire: new Date(),
12836
+ status: 1,
12837
+ id_voucher_release_detail: "fuMS21I6othUm34385WV",
12838
+ id_branch: "4zFGhVUAZyj5d09r01xZ"
12839
+ }
12840
+ * this.vhQuerySales.createVoucherCodes(data, 10)
12841
+ .then((voucher_codes)=>{
12842
+ console.log('createVoucherCodes', voucher_codes);
12843
+ }, error=>{
12844
+ console.log('error', error);
12845
+ })
12846
+ * @param data
12847
+ * @param quantity
12848
+ * @return Promise => Array(object)
12849
+ */
12850
+ createVoucherCodes(data: any, quantity: number): Promise<unknown>;
12851
+ /**
12852
+ * @example:
12853
+ *
12854
+ * this.vhQuerySales.updateVoucherCode('OUHEOIWUYGHIQNIDOUW1359478',{date_expire : new Date()})
12855
+ .then((bool)=>{
12856
+ console.log('updateCouponCode', bool);
12857
+ }, error=>{
12858
+ console.log('error', error);
12859
+ })
12860
+ * @param id_voucher_code
12861
+ * @param data
12862
+ * @return Promise => boolean = true or false
12863
+ */
12864
+ updateVoucherCode(id_voucher_code: any, data: any): Promise<unknown>;
12865
+ /**
12866
+ * @example:
12867
+ *
12868
+ * this.vhQuerySales.deleteVoucherCode('OUHEOIWUYGHIQNIDOUW1359478'})
12869
+ .then((bool)=>{
12870
+ console.log('deleteVoucherCode', bool);
12871
+ }, error=>{
12872
+ console.log('error', error);
12873
+ })
12874
+ * @param id_voucher_code
12875
+ * @return Promise => boolean = true or false
12876
+ */
12877
+ deleteVoucherCode(id_voucher_code: any): Promise<unknown>;
12878
+ /**
12879
+ * hàm này trả về danh sách voucher_codes đã phát hành theo mỗi đợt
12880
+ * @example:
12881
+ * this.vhQuerySales.getVoucherCodes_byIdCouponReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
12882
+ .then((array)=>{
12883
+ console.log('getVoucherCodes_byIdCouponReleaseDetail', array);
12884
+ }, error=>{
12885
+ console.log('error', error);
12886
+ })
12887
+ * @param id_voucher_release_detail
12888
+ * @return Promise => Array<any>
12889
+ */
12890
+ getVoucherCodes_byIdCouponReleaseDetail(id_voucher_release_detail: any): Promise<unknown>;
12891
+ /**
12892
+ * hàm này trả về danh sách voucher code đã phát hành theo điều kiện query
12893
+ * @example:
12894
+ * this.vhQuerySales.getVoucherCodes_byFields({status:{$eq: 1}}, {}, {}, 0)
12895
+ .then((res)=>{
12896
+ console.log('getVoucherCodes_byFields', res);
12897
+ }, error=>{
12898
+ console.log('error', error);
12899
+ })
12900
+ * @param query
12901
+ * @param projection
12902
+ * @param sort
12903
+ * @param limit
12904
+ * @return Promise => array(object) = [{},{},..]
12905
+ */
12906
+ getVoucherCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
12907
+ /**
12908
+ * 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
12909
+ * @example:
12910
+ *
12911
+ * this.vhQuerySales.getVoucherCode('OUHEDW0512'})
12912
+ .then((res)=>{
12913
+ console.log('getVoucherCode', res);
12914
+ }, error=>{
12915
+ console.log('error', error);
12916
+ })
12917
+ * @param id_voucher_code: cũng chính là code
12918
+ * @return Promise => Array<any>
12919
+ */
12920
+ getVoucherCode(id_voucher_code: any): Promise<unknown>;
12921
+ /** 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
12922
+ * @example:
12923
+ * let data = [id_voucher_code]
12924
+ * this.vhQuerySales.exchangeVoucherCode_byEarningPoints(data, "fuMS21I6othUm34385WV", 10)
12925
+ .then((bool)=>{
12926
+ console.log('exchangeVoucherCode_byEarningPoints', bool);
12927
+ }, error=>{
12928
+ console.log('error', error);
12929
+ })
12930
+ * @param array_id_voucher_code
12931
+ * @param id_customer
12932
+ * @param points
12933
+ * @return Promise Boolean => true or false
12934
+ */
12935
+ exchangeVoucherCode_byEarningPoints(array_id_voucher_code: any, id_customer: any, points: any): Promise<unknown>;
12936
+ /**
12937
+ * @example:
12938
+ * let data = {
12939
+ * name :"Thẻ trả trước",
12940
+ * price :1000000,
12941
+ * products : [
12942
+ * {
12943
+ * id_product : 'MOIUHWDWIUHG1345674',
12944
+ * price : 100000,
12945
+ * quantity: 5,
12946
+ * quantity_valid : 5,
12947
+ * type : 1
12948
+ * },{
12949
+ * id_product : 'NJIDUEWNBIJUWGHD135',
12950
+ * price : 100000,
12951
+ * quantity: 5,
12952
+ * quantity_valid : 5,
12953
+ * type : 2
12954
+ * }]
12955
+ * }
12956
+ * this.vhQuerySales.addPaymentCard(data)
12957
+ .then((res)=>{
12958
+ console.log('addPaymentCard', res);
12959
+ }, error=>{
12960
+ console.log('error', error);
12961
+ })
12962
+ * @param data
12963
+ * @return Promise => Array<any>
12964
+ */
12965
+ addPaymentCard(data: any): Promise<unknown>;
12966
+ /**
12967
+ * @example:
12968
+ * let data = {
12969
+ * name :"Thẻ trả trước",
12970
+ * price :1000000,
12971
+ * products : [
12972
+ * {
12973
+ * id_product : 'MOIUHWDWIUHG1345674',
12974
+ * price : 100000,
12975
+ * quantity: 5,
12976
+ * quantity_valid : 5,
12977
+ * type : 1
12978
+ * },{
12979
+ * id_product : 'NJIDUEWNBIJUWGHD135',
12980
+ * price : 100000,
12981
+ * quantity: 5,
12982
+ * quantity_valid : 5,
12983
+ * type : 2
12984
+ * }]
12985
+ * }
12986
+ * this.vhQuerySales.updatePaymentCard(data)
12987
+ .then((bool)=>{
12988
+ console.log('updatePaymentCard', bool);
12989
+ }, error=>{
12990
+ console.log('error', error);
12991
+ })
12992
+ * @param data
12993
+ * @param id_payment_card
12994
+ * @return Promise => bool = true or false
12995
+ */
12996
+ updatePaymentCard(id_payment_card: any, data: any): Promise<unknown>;
12997
+ /**
12998
+ * @example:
12999
+ * this.vhQuerySales.deletePaymentCard('FDNOIUWDHIWH21564DWQ')
13000
+ .then((bool)=>{
13001
+ console.log('deletePaymentCard', bool);
13002
+ }, error=>{
13003
+ console.log('error', error);
13004
+ })
13005
+ * @param id_payment_card
13006
+ * @return Promise => bool = true or false
13007
+ */
13008
+ deletePaymentCard(id_payment_card: any): Promise<unknown>;
13009
+ /**
13010
+ * @example:
13011
+ * this.vhQuerySales.getPaymentCard('FDNOIUWDHIWH21564DWQ')
13012
+ .then((res)=>{
13013
+ console.log('getPaymentCard', res);
13014
+ }, error=>{
13015
+ console.log('error', error);
13016
+ })
13017
+ * @param id_payment_card
13018
+ * @return Promise => object or null
13019
+ */
13020
+ getPaymentCard(id_payment_card: any): Promise<unknown>;
13021
+ /**
13022
+ * @example:
13023
+ * this.vhQuerySales.getPaymentCards()
13024
+ .then((res)=>{
13025
+ console.log('getPaymentCards', res);
13026
+ }, error=>{
13027
+ console.log('error', error);
13028
+ })
13029
+ * @return Promise => Array<any>
13030
+ */
13031
+ getPaymentCards(): Promise<unknown>;
13032
+ /**
13033
+ * @example:
13034
+ * this.vhQuerySales.addPaymentCardRelease({name : "Đợt phát hành thẻ 1", id_branch :"NIOUHDWLJUNBHIU16549"})
13035
+ .then((res)=>{
13036
+ console.log('addPaymentCardRelease', res);
13037
+ }, error=>{
13038
+ console.log('error', error);
13039
+ })
13040
+ * @param data
13041
+ * @return Promise => object or error
13042
+ */
13043
+ addPaymentCardRelease(data: any): Promise<unknown>;
13044
+ /**
13045
+ * @example:
13046
+ * this.vhQuerySales.updatePaymentCardRelease({name : "Đợt phát hành thẻ 1"})
13047
+ .then((bool)=>{
13048
+ console.log('updatePaymentCardRelease', bool);
13049
+ }, error=>{
13050
+ console.log('error', error);
13051
+ })
13052
+ * @param id_payment_card_release
13053
+ * @param data
13054
+ * @return Promise => object or error
13055
+ */
13056
+ updatePaymentCardRelease(id_payment_card_release: any, data: any): Promise<unknown>;
13057
+ /**
13058
+ * @example:
13059
+ * this.vhQuerySales.deletePaymentCardRelease("OIHIDUWNIDOLW123456")
13060
+ .then((bool)=>{
13061
+ console.log('deletePaymentCardRelease', bool);
13062
+ }, error=>{
13063
+ console.log('error', error);
13064
+ })
13065
+ * @param id_payment_card_release
13066
+ * @param data
13067
+ * @return Promise => boolean = true or false
13068
+ */
13069
+ deletePaymentCardRelease(id_payment_card_release: any): Promise<unknown>;
13070
+ /**
13071
+ * @example:
13072
+ * this.vhQuerySales.getPaymentCardRelease("OIHIDUWNIDOLW123456")
13073
+ .then((res)=>{
13074
+ console.log('getPaymentCardRelease', res);
13075
+ }, error=>{
13076
+ console.log('error', error);
13077
+ })
13078
+ * @param id_payment_card_release
13079
+ * @return Promise => object or null
13080
+ */
13081
+ getPaymentCardRelease(id_payment_card_release: any): Promise<unknown>;
13082
+ /**
13083
+ * @example:
13084
+ * this.vhQuerySales.getPaymentCardReleases()
13085
+ .then((res)=>{
13086
+ console.log('getPaymentCardReleases', res);
13087
+ }, error=>{
13088
+ console.log('error', error);
13089
+ })
13090
+ * @return Promise => Array<any>
13091
+ */
13092
+ getPaymentCardReleases(): Promise<unknown>;
13093
+ /**
13094
+ * @example:
13095
+ * this.vhQuerySales.addPaymentCardReleaseDetail({id_payment_card : "OIUHFIUWHGGU41698496", id_payment_card_release :"NIOUHDWLJUNBHIU16549"})
13096
+ .then((res)=>{
13097
+ console.log('addPaymentCardReleaseDetail', res);
13098
+ }, error=>{
13099
+ console.log('error', error);
13100
+ })
13101
+ * @param data
13102
+ * @return Promise => object or error
13103
+ */
13104
+ addPaymentCardReleaseDetail(data: any): Promise<unknown>;
13105
+ /**
13106
+ * @example:
13107
+ * this.vhQuerySales.deletePaymentCardReleaseDetail("OIUHFIUWHGGU41698496")
13108
+ .then((bool)=>{
13109
+ console.log('deletePaymentCardReleaseDetail', bool);
13110
+ }, error=>{
13111
+ console.log('error', error);
13112
+ })
13113
+ * @param id_payment_card_release_detail
13114
+ * @return Promise => bool = true or false
13115
+ */
13116
+ deletePaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13117
+ /**
13118
+ * @example:
13119
+ * this.vhQuerySales.getVoucherRelaseDetail_byFields( {id_payment_card:{$eq: "316OIUHLKMLSDYW235"}}, {}, {}, 0)
13120
+ .then((res)=>{
13121
+ console.log('getVoucherRelaseDetail_byFields', res);
13122
+ }, error=>{
13123
+ console.log('error', error);
13124
+ })
13125
+ * @param query
13126
+ * @param projection
13127
+ * @param sort
13128
+ * @param limit
13129
+ * @return Promise => array(object) = [{},{},..]
13130
+ */
13131
+ getPaymentCardRelaseDetail_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
13132
+ /**
13133
+ * hàm này để phát hành 1 payment_card_code
13134
+ * @example:
13135
+ let data = {
13136
+ date_validity: new Date(),
13137
+ date_expire: new Date(),
13138
+ status: 1,
13139
+ id_payment_card_release_detail: "fuMS21I6othUm34385WV",
13140
+ id_branch: "4zFGhVUAZyj5d09r01xZ"
13141
+ }
13142
+ * this.vhQuerySales.createPaymentCardCode(data)
13143
+ .then((coupon_code)=>{
13144
+ console.log('createPaymentCardCode', coupon_code);
13145
+ }, error=>{
13146
+ console.log('error', error);
13147
+ })
13148
+ * @param data
13149
+ * @return Promise => Object
13150
+ */
13151
+ private createPaymentCardCode;
13152
+ /**
13153
+ * hàm này để phát hành nhiều payment_card_code theo số lượng truyền vào
13154
+ * @example:
13155
+ let data = {
13156
+ date_validity: new Date(),
13157
+ date_expire: new Date(),
13158
+ status: 1,
13159
+ id_payment_card_release_detail: "fuMS21I6othUm34385WV",
13160
+ id_branch: "4zFGhVUAZyj5d09r01xZ"
13161
+ }
13162
+ * this.vhQuerySales.createPaymentCardCodes(data, 10)
13163
+ .then((voucher_codes)=>{
13164
+ console.log('createPaymentCardCodes', voucher_codes);
13165
+ }, error=>{
13166
+ console.log('error', error);
13167
+ })
13168
+ * @param data
13169
+ * @param quantity
13170
+ * @return Promise => Array(object)
13171
+ */
13172
+ createPaymentCardCodes(data: any, quantity: number): Promise<unknown>;
13173
+ /**
13174
+ * @example:
13175
+ * let data = {
13176
+ date_validity: new Date(),
13177
+ date_expire: new Date(),
13178
+ id_branch: "4zFGhVUAZyj5d09r01xZ"
13179
+ }
13180
+ * this.vhQuerySales.updatePaymentCardCode('OUHEOIWUYGHIQNIDOUW1359478',data)
13181
+ .then((bool)=>{
13182
+ console.log('updateCouponCode', bool);
13183
+ }, error=>{
13184
+ console.log('error', error);
13185
+ })
13186
+ * @param id_payment_card_code
13187
+ * @param data
13188
+ * @return Promise => boolean = true or false
13189
+ */
13190
+ updatePaymentCardCode(id_payment_card_code: any, data: any): Promise<unknown>;
13191
+ /**
13192
+ * @example:
13193
+ *
13194
+ * this.vhQuerySales.deletePaymentCardCode('OUHEOIWUYGHIQNIDOUW1359478'})
13195
+ .then((bool)=>{
13196
+ console.log('deletePaymentCardCode', bool);
13197
+ }, error=>{
13198
+ console.log('error', error);
13199
+ })
13200
+ * @param id_payment_card_code
13201
+ * @return Promise => boolean = true or false
13202
+ */
13203
+ deletePaymentCardCode(id_payment_card_code: any): Promise<unknown>;
13204
+ /**
13205
+ * hàm này trả về danh sách payment_card_codes đã phát hành theo mỗi đợt
13206
+ * @example:
13207
+ *
13208
+ * this.vhQuerySales.getPaymentCardCodes_byIdPaymentCardReleaseDetail('OUHEOIWUYGHIQNIDOUW1359478'})
13209
+ .then((array)=>{
13210
+ console.log('getPaymentCardCodes_byIdPaymentCardReleaseDetail', array);
13211
+ }, error=>{
13212
+ console.log('error', error);
13213
+ })
13214
+ * @param id_payment_card_release_detail
13215
+ * @return Promise => Array<any>
13216
+ */
13217
+ getPaymentCardCodes_byIdPaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13218
+ /**
13219
+ * hàm này trả về danh sách payment_card code đã phát hành theo điều kiện query
13220
+ * @example:
13221
+ * this.vhQuerySales.getPaymentCardCodes_byFields({status:{$eq: 1}}, {}, {}, 0)
13222
+ .then((res)=>{
13223
+ console.log('getPaymentCardCodes_byFields', res);
13224
+ }, error=>{
13225
+ console.log('error', error);
13226
+ })
13227
+ * @param query
13228
+ * @param projection
13229
+ * @param sort
13230
+ * @param limit
13231
+ * @return Promise => array(object) = [{},{},..]
13232
+ */
13233
+ getPaymentCardCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
13234
+ /**
13235
+ * 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
13236
+ * @example:
13237
+ *
13238
+ * this.vhQuerySales.getPaymentCardCode('OUHEDW0512'})
13239
+ .then((res)=>{
13240
+ console.log('getPaymentCardCode', res);
13241
+ }, error=>{
13242
+ console.log('error', error);
13243
+ })
13244
+ * @param id_payment_card_code: cũng chính là code
13245
+ * @return Promise => Array<any>
13246
+ */
13247
+ getPaymentCardCode(id_payment_card_code: any): Promise<unknown>;
13248
+ /**
13249
+ * không cần hàm này vì khi tạo phiếu bill_type51 đã được cập nhật
13250
+ * hàm này dùng để cập nhật số lượng sản phẩm trong Payment Card khi đổi thẻ
13251
+ * @example:
13252
+ * this.vhQuerySales.getPaymentCardCode_byCode("ONHDIWUHIODUWN","NDPIUWUHIOUYEW",{quantity_valid: 0})
13253
+ .then((res)=>{
13254
+ console.log('getPaymentCardCode_byCode', res);
13255
+ }, error=>{
13256
+ console.log('error', error);
13257
+ })
13258
+ * @param id_payment_card
13259
+ * @param id_comboproduct
13260
+ * @param data
13261
+ * @return Promise object or null
13262
+ */
13263
+ updateComboPaymentCard(id_payment_card: any, id_comboproduct: any, data: any): void;
11770
13264
  }
11771
13265
  export declare class VhQuerySCclient {
11772
13266
  private vhmongo_firebase;