ionic-vhframeworks 4.2.1 → 4.2.4
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.
- package/bundles/ionic-vhframeworks.umd.js +1 -1
- package/bundles/ionic-vhframeworks.umd.js.map +1 -1
- package/bundles/ionic-vhframeworks.umd.min.js +1 -1
- package/bundles/ionic-vhframeworks.umd.min.js.map +1 -1
- package/fesm2015/ionic-vhframeworks.js.map +1 -1
- package/ionic-vhframeworks.metadata.json +1 -1
- package/lib/ionic-vhframeworks.service.d.ts +141 -17
- package/package.json +1 -1
|
@@ -10764,7 +10764,7 @@ export declare class VhQuerySales {
|
|
|
10764
10764
|
*/
|
|
10765
10765
|
getPrinters(): Promise<unknown>;
|
|
10766
10766
|
/**
|
|
10767
|
-
* Hàm này dùng để thực hiện trừ hàng hóa trong Payment_Card
|
|
10767
|
+
* Hàm này dùng để thực hiện trừ hàng hóa trong nhiều Payment_Card
|
|
10768
10768
|
* 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
|
|
10769
10769
|
* @example
|
|
10770
10770
|
let bill = {
|
|
@@ -10777,6 +10777,33 @@ export declare class VhQuerySales {
|
|
|
10777
10777
|
date: new Date(),
|
|
10778
10778
|
bill_code: 'L46K0502'
|
|
10779
10779
|
}
|
|
10780
|
+
let bill_details =[{
|
|
10781
|
+
id_payment_card: '7Q5BZVRlyySrhShngMDv',
|
|
10782
|
+
id_payment_card_code: '33cTgnd2xZo3OW9tsu1d',
|
|
10783
|
+
pctype: 1,
|
|
10784
|
+
products:[{
|
|
10785
|
+
id_product:'9tg6UxzK26DDVEVHsvq5'
|
|
10786
|
+
quantity: 5
|
|
10787
|
+
price: 100000
|
|
10788
|
+
ptype: 1,
|
|
10789
|
+
unit: 'cái',
|
|
10790
|
+
ratio:1
|
|
10791
|
+
},{
|
|
10792
|
+
id_product:'jUqd5bE6y2JhX0aCd5TF',
|
|
10793
|
+
quantity: 1
|
|
10794
|
+
price: 50000
|
|
10795
|
+
ptype: 2,
|
|
10796
|
+
unit: 'cái',
|
|
10797
|
+
ratio:1
|
|
10798
|
+
},{
|
|
10799
|
+
id_product,
|
|
10800
|
+
quantity,
|
|
10801
|
+
price,
|
|
10802
|
+
ptype: 1,
|
|
10803
|
+
unit: 'cái',
|
|
10804
|
+
ratio:1
|
|
10805
|
+
}]
|
|
10806
|
+
//dưới là cái cũ, sẽ bỏ đi
|
|
10780
10807
|
let bill_details =[{
|
|
10781
10808
|
id_payment_card: '7Q5BZVRlyySrhShngMDv',
|
|
10782
10809
|
id_payment_card_code: '33cTgnd2xZo3OW9tsu1d',
|
|
@@ -10822,17 +10849,21 @@ export declare class VhQuerySales {
|
|
|
10822
10849
|
id_voucher: 'voucher006',
|
|
10823
10850
|
id_voucher_code: 'MHRD9N0531',
|
|
10824
10851
|
vtype: 1,
|
|
10825
|
-
quantity: 2
|
|
10826
|
-
|
|
10852
|
+
quantity: 2//bỏ đi
|
|
10853
|
+
products:[{
|
|
10827
10854
|
id_product:'9tg6UxzK26DDVEVHsvq5'
|
|
10828
10855
|
quantity: 5
|
|
10829
10856
|
price: 100000
|
|
10830
|
-
ptype: 1
|
|
10857
|
+
ptype: 1,
|
|
10858
|
+
unit: 'cái',
|
|
10859
|
+
ratio:1
|
|
10831
10860
|
},{
|
|
10832
10861
|
id_product:'jUqd5bE6y2JhX0aCd5TF',
|
|
10833
10862
|
quantity: 1
|
|
10834
10863
|
price: 50000
|
|
10835
|
-
ptype: 2
|
|
10864
|
+
ptype: 2,
|
|
10865
|
+
unit: 'cái',
|
|
10866
|
+
ratio:1
|
|
10836
10867
|
},{
|
|
10837
10868
|
id_product,
|
|
10838
10869
|
quantity,
|
|
@@ -10842,12 +10873,16 @@ export declare class VhQuerySales {
|
|
|
10842
10873
|
id_product,
|
|
10843
10874
|
quantity,
|
|
10844
10875
|
price,
|
|
10845
|
-
ptype: 1
|
|
10876
|
+
ptype: 1,
|
|
10877
|
+
unit: 'cái',
|
|
10878
|
+
ratio:1
|
|
10846
10879
|
},{
|
|
10847
10880
|
id_product,
|
|
10848
10881
|
quantity,
|
|
10849
10882
|
price,
|
|
10850
|
-
ptype: 2
|
|
10883
|
+
ptype: 2,
|
|
10884
|
+
unit: 'cái',
|
|
10885
|
+
ratio:1
|
|
10851
10886
|
}]
|
|
10852
10887
|
}]
|
|
10853
10888
|
this.vhQuerySales.createBill_Billdetail_41(bill, bill_details)
|
|
@@ -10968,9 +11003,39 @@ export declare class VhQuerySales {
|
|
|
10968
11003
|
* @return Promise => null or orror
|
|
10969
11004
|
*/
|
|
10970
11005
|
deleteBill_Billdetail(id_bill: any): any;
|
|
11006
|
+
private _getBill_details_byId_bill;
|
|
11007
|
+
/**
|
|
11008
|
+
* VhQuerySales:
|
|
11009
|
+
* @example
|
|
11010
|
+
this.vhQuerySales.getBill_details_byId_bill('RcECbNgU9BdYQo37s30p')
|
|
11011
|
+
.then((bill_details)=>{
|
|
11012
|
+
console.log('getBill_details_byId_bill', bill_details);
|
|
11013
|
+
},(error:any)=>{
|
|
11014
|
+
console.log('error ', error);
|
|
11015
|
+
})
|
|
11016
|
+
* @param id_bill
|
|
11017
|
+
* @return Promise => array / orror
|
|
11018
|
+
*/
|
|
10971
11019
|
getBill_details_byId_bill(id_bill: any): any;
|
|
10972
11020
|
getBill_detail(id_bill_detail: any): any;
|
|
10973
|
-
getBill_details
|
|
11021
|
+
private getBill_details;
|
|
11022
|
+
/**
|
|
11023
|
+
* @example:
|
|
11024
|
+
* let time = new Date();
|
|
11025
|
+
* time.setDate(time.getDate()-7);
|
|
11026
|
+
* this.vhQuerySales.getBill_details_byFields({bill_type:{$eq:1}}, {},{date:1},2)
|
|
11027
|
+
.then((bill_details)=>{
|
|
11028
|
+
console.log('getBills', bill_details);
|
|
11029
|
+
},(error:any)=>{
|
|
11030
|
+
console.log('error ', error);
|
|
11031
|
+
})
|
|
11032
|
+
* @param query
|
|
11033
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
11034
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
11035
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
11036
|
+
* @return — Array -> array = [{},{},...]
|
|
11037
|
+
*/
|
|
11038
|
+
private getBill_details_byFields;
|
|
10974
11039
|
/**
|
|
10975
11040
|
* @example:
|
|
10976
11041
|
* this.vhQuerySales.getBill('5fb67fda87c0f21d484cbdf3')
|
|
@@ -10994,7 +11059,7 @@ export declare class VhQuerySales {
|
|
|
10994
11059
|
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
10995
11060
|
* @return — Array -> array = [{},{},...]
|
|
10996
11061
|
*/
|
|
10997
|
-
getBills
|
|
11062
|
+
private getBills;
|
|
10998
11063
|
/**
|
|
10999
11064
|
* @example:
|
|
11000
11065
|
* let time = new Date();
|
|
@@ -13005,7 +13070,7 @@ export declare class VhQuerySales {
|
|
|
13005
13070
|
*/
|
|
13006
13071
|
getCouponCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
|
|
13007
13072
|
/**
|
|
13008
|
-
* hàm này trả về
|
|
13073
|
+
* hàm này trả về coupon_code đã phát hành theo trường _id của Coupon_code
|
|
13009
13074
|
* @example:
|
|
13010
13075
|
*
|
|
13011
13076
|
* this.vhQuerySales.getCouponCode('OUHEDW0512'})
|
|
@@ -13019,8 +13084,21 @@ export declare class VhQuerySales {
|
|
|
13019
13084
|
*/
|
|
13020
13085
|
getCouponCode(id_coupon_code: any): Promise<unknown>;
|
|
13021
13086
|
/**
|
|
13022
|
-
*
|
|
13023
|
-
*
|
|
13087
|
+
* hàm này trả về coupon_code đã phát hành theo trường code của Coupon_code.
|
|
13088
|
+
* @example:
|
|
13089
|
+
*
|
|
13090
|
+
* this.vhQuerySales.getCouponCode('OUHEDW0512'})
|
|
13091
|
+
.then((res)=>{
|
|
13092
|
+
console.log('getCouponCode', res);
|
|
13093
|
+
}, error=>{
|
|
13094
|
+
console.log('error', error);
|
|
13095
|
+
})
|
|
13096
|
+
* @param id_coupon_code: cũng chính là code
|
|
13097
|
+
* @return Promise => obj ={} or null
|
|
13098
|
+
*/
|
|
13099
|
+
getCouponCode_byCode(code: any): Promise<unknown>;
|
|
13100
|
+
/**
|
|
13101
|
+
* hàm này trả về coupon_code đã phát hành theo trường _id của voucher_code.
|
|
13024
13102
|
* @example:
|
|
13025
13103
|
*
|
|
13026
13104
|
* this.vhQuerySales.getCoupon_Code_Name_Release('OUHEDW0512'})
|
|
@@ -13034,6 +13112,21 @@ export declare class VhQuerySales {
|
|
|
13034
13112
|
*/
|
|
13035
13113
|
getCoupon_Code_Name_Release(id_coupon_code: any): Promise<unknown>;
|
|
13036
13114
|
/**
|
|
13115
|
+
* hàm này trả về coupon_code đã phát hành theo trường code của voucher_code. dùng trong thanh toán bằng phiếu,
|
|
13116
|
+
* trả về có cả code, name_coupon, name_coupon_release
|
|
13117
|
+
* @example:
|
|
13118
|
+
*
|
|
13119
|
+
* this.vhQuerySales.getCoupon_Code_Name_Release_byCode('OUHEDW0512'})
|
|
13120
|
+
.then((res)=>{
|
|
13121
|
+
console.log('getCoupon_Code_Name_Release_byCode', res);
|
|
13122
|
+
}, error=>{
|
|
13123
|
+
console.log('error', error);
|
|
13124
|
+
})
|
|
13125
|
+
* @param id_coupon_code: cũng chính là code
|
|
13126
|
+
* @return Promise => obj ={} or null
|
|
13127
|
+
*/
|
|
13128
|
+
getCoupon_Code_Name_Release_byCode(code: any): Promise<unknown>;
|
|
13129
|
+
/**
|
|
13037
13130
|
* 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
|
|
13038
13131
|
* hàm này đã cập nhật lại trường status, id_customer, date_points_exchanged cho coupon_codes
|
|
13039
13132
|
* hàm này đã cập nhật lại trường earned_points, id_customer, branch_earned_points cho customers
|
|
@@ -13283,15 +13376,15 @@ export declare class VhQuerySales {
|
|
|
13283
13376
|
id_voucher: '9841654DOIWSDYW235'
|
|
13284
13377
|
}
|
|
13285
13378
|
* this.vhQuerySales.createVoucherCode(data)
|
|
13286
|
-
.then((
|
|
13287
|
-
console.log('createVoucherCode',
|
|
13379
|
+
.then((voucher_code)=>{
|
|
13380
|
+
console.log('createVoucherCode', voucher_code);
|
|
13288
13381
|
}, error=>{
|
|
13289
13382
|
console.log('error', error);
|
|
13290
13383
|
})
|
|
13291
13384
|
* @param data
|
|
13292
13385
|
* @return Promise => Object
|
|
13293
13386
|
*/
|
|
13294
|
-
|
|
13387
|
+
createVoucherCode(data: any): Promise<unknown>;
|
|
13295
13388
|
/**
|
|
13296
13389
|
* 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
|
|
13297
13390
|
* trong collection voucher_release_details
|
|
@@ -13386,7 +13479,7 @@ export declare class VhQuerySales {
|
|
|
13386
13479
|
*/
|
|
13387
13480
|
getVoucherCode(id_voucher_code: any): Promise<unknown>;
|
|
13388
13481
|
/**
|
|
13389
|
-
* hàm này trả về voucher code đã phát hành theo trường _id của voucher code.
|
|
13482
|
+
* hàm này trả về voucher code đã phát hành theo trường _id của voucher code.
|
|
13390
13483
|
* trả về có cả code, name_voucher, name_voucher_release
|
|
13391
13484
|
* @example:
|
|
13392
13485
|
*
|
|
@@ -13400,6 +13493,21 @@ export declare class VhQuerySales {
|
|
|
13400
13493
|
* @return Promise => obj ={} or null
|
|
13401
13494
|
*/
|
|
13402
13495
|
getVoucher_Code_Name_Release(id_voucher_code: any): Promise<unknown>;
|
|
13496
|
+
/**
|
|
13497
|
+
* 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,
|
|
13498
|
+
* trả về có cả code, name_voucher, name_voucher_release
|
|
13499
|
+
* @example:
|
|
13500
|
+
*
|
|
13501
|
+
* this.vhQuerySales.getVoucher_Code_Name_Release_byCode('OUHEDW0512'})
|
|
13502
|
+
.then((res)=>{
|
|
13503
|
+
console.log('getVoucher_Code_Name_Release_byCode', res);
|
|
13504
|
+
}, error=>{
|
|
13505
|
+
console.log('error', error);
|
|
13506
|
+
})
|
|
13507
|
+
* @param code: cũng chính là code
|
|
13508
|
+
* @return Promise => obj ={} or null
|
|
13509
|
+
*/
|
|
13510
|
+
getVoucher_Code_Name_Release_byCode(code: any): Promise<unknown>;
|
|
13403
13511
|
exchangeVoucherCode_byEarningPoints(array_id_voucher_code_and_points_and_products: any, id_customer: any, points: any): Promise<unknown>;
|
|
13404
13512
|
/**
|
|
13405
13513
|
* @example:
|
|
@@ -13748,7 +13856,7 @@ export declare class VhQuerySales {
|
|
|
13748
13856
|
*/
|
|
13749
13857
|
getPaymentCardCode(id_payment_card_code: any): Promise<unknown>;
|
|
13750
13858
|
/**
|
|
13751
|
-
* hàm này trả về payment_card code đã phát hành theo trường _id của payment_card code
|
|
13859
|
+
* hàm này trả về payment_card code đã phát hành theo trường _id của payment_card code
|
|
13752
13860
|
* trả về có cả code, name_payment_card, name_payment_card_release
|
|
13753
13861
|
* @example:
|
|
13754
13862
|
*
|
|
@@ -13762,6 +13870,22 @@ export declare class VhQuerySales {
|
|
|
13762
13870
|
* @return Promise => obj ={} or null
|
|
13763
13871
|
*/
|
|
13764
13872
|
getPaymentCard_Code_Name_Release(id_payment_card_code: any): Promise<unknown>;
|
|
13873
|
+
/**
|
|
13874
|
+
* hàm này trả về payment_card code đã phát hành theo trường code của payment_card code. dùng trong đưa thẻ mua trước lấy sản phẩm
|
|
13875
|
+
* trả về có cả code, name_payment_card, name_payment_card_release
|
|
13876
|
+
* @example:
|
|
13877
|
+
*
|
|
13878
|
+
* this.vhQuerySales.getPaymentCard_Code_Name_Release_byCode('OUHEDW0512'})
|
|
13879
|
+
.then((res)=>{
|
|
13880
|
+
console.log('getPaymentCard_Code_Name_Release_byCode', res);
|
|
13881
|
+
}, error=>{
|
|
13882
|
+
console.log('error', error);
|
|
13883
|
+
})
|
|
13884
|
+
* @param code: cũng chính là code
|
|
13885
|
+
* @return Promise => obj ={} or null
|
|
13886
|
+
*/
|
|
13887
|
+
getPaymentCard_Code_Name_Release_byCode(code: any): Promise<unknown>;
|
|
13888
|
+
exchangePaymentCardCode_byEarningPoints(array_id_payment_card_code_and_points_and_products: any, id_customer: any, points: any): Promise<unknown>;
|
|
13765
13889
|
/**
|
|
13766
13890
|
* không cần hàm này vì khi tạo phiếu bill_type51 đã được cập nhật
|
|
13767
13891
|
* hàm này dùng để cập nhật số lượng sản phẩm trong Payment Card khi đổi thẻ
|