ionic-vhframeworks 4.2.2 → 4.2.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.
- 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 +123 -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,22 @@ 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;
|
|
10974
11022
|
/**
|
|
10975
11023
|
* @example:
|
|
10976
11024
|
* this.vhQuerySales.getBill('5fb67fda87c0f21d484cbdf3')
|
|
@@ -10994,7 +11042,7 @@ export declare class VhQuerySales {
|
|
|
10994
11042
|
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
10995
11043
|
* @return — Array -> array = [{},{},...]
|
|
10996
11044
|
*/
|
|
10997
|
-
getBills
|
|
11045
|
+
private getBills;
|
|
10998
11046
|
/**
|
|
10999
11047
|
* @example:
|
|
11000
11048
|
* let time = new Date();
|
|
@@ -13005,7 +13053,7 @@ export declare class VhQuerySales {
|
|
|
13005
13053
|
*/
|
|
13006
13054
|
getCouponCodes_byFields(query: object, projection: object, sort: object, limit: number): Promise<unknown>;
|
|
13007
13055
|
/**
|
|
13008
|
-
* hàm này trả về
|
|
13056
|
+
* hàm này trả về coupon_code đã phát hành theo trường _id của Coupon_code
|
|
13009
13057
|
* @example:
|
|
13010
13058
|
*
|
|
13011
13059
|
* this.vhQuerySales.getCouponCode('OUHEDW0512'})
|
|
@@ -13019,8 +13067,21 @@ export declare class VhQuerySales {
|
|
|
13019
13067
|
*/
|
|
13020
13068
|
getCouponCode(id_coupon_code: any): Promise<unknown>;
|
|
13021
13069
|
/**
|
|
13022
|
-
*
|
|
13023
|
-
*
|
|
13070
|
+
* hàm này trả về coupon_code đã phát hành theo trường code của Coupon_code.
|
|
13071
|
+
* @example:
|
|
13072
|
+
*
|
|
13073
|
+
* this.vhQuerySales.getCouponCode('OUHEDW0512'})
|
|
13074
|
+
.then((res)=>{
|
|
13075
|
+
console.log('getCouponCode', res);
|
|
13076
|
+
}, error=>{
|
|
13077
|
+
console.log('error', error);
|
|
13078
|
+
})
|
|
13079
|
+
* @param id_coupon_code: cũng chính là code
|
|
13080
|
+
* @return Promise => obj ={} or null
|
|
13081
|
+
*/
|
|
13082
|
+
getCouponCode_byCode(code: any): Promise<unknown>;
|
|
13083
|
+
/**
|
|
13084
|
+
* hàm này trả về coupon_code đã phát hành theo trường _id của voucher_code.
|
|
13024
13085
|
* @example:
|
|
13025
13086
|
*
|
|
13026
13087
|
* this.vhQuerySales.getCoupon_Code_Name_Release('OUHEDW0512'})
|
|
@@ -13034,6 +13095,21 @@ export declare class VhQuerySales {
|
|
|
13034
13095
|
*/
|
|
13035
13096
|
getCoupon_Code_Name_Release(id_coupon_code: any): Promise<unknown>;
|
|
13036
13097
|
/**
|
|
13098
|
+
* 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,
|
|
13099
|
+
* trả về có cả code, name_coupon, name_coupon_release
|
|
13100
|
+
* @example:
|
|
13101
|
+
*
|
|
13102
|
+
* this.vhQuerySales.getCoupon_Code_Name_Release_byCode('OUHEDW0512'})
|
|
13103
|
+
.then((res)=>{
|
|
13104
|
+
console.log('getCoupon_Code_Name_Release_byCode', res);
|
|
13105
|
+
}, error=>{
|
|
13106
|
+
console.log('error', error);
|
|
13107
|
+
})
|
|
13108
|
+
* @param id_coupon_code: cũng chính là code
|
|
13109
|
+
* @return Promise => obj ={} or null
|
|
13110
|
+
*/
|
|
13111
|
+
getCoupon_Code_Name_Release_byCode(code: any): Promise<unknown>;
|
|
13112
|
+
/**
|
|
13037
13113
|
* 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
13114
|
* hàm này đã cập nhật lại trường status, id_customer, date_points_exchanged cho coupon_codes
|
|
13039
13115
|
* hàm này đã cập nhật lại trường earned_points, id_customer, branch_earned_points cho customers
|
|
@@ -13283,15 +13359,15 @@ export declare class VhQuerySales {
|
|
|
13283
13359
|
id_voucher: '9841654DOIWSDYW235'
|
|
13284
13360
|
}
|
|
13285
13361
|
* this.vhQuerySales.createVoucherCode(data)
|
|
13286
|
-
.then((
|
|
13287
|
-
console.log('createVoucherCode',
|
|
13362
|
+
.then((voucher_code)=>{
|
|
13363
|
+
console.log('createVoucherCode', voucher_code);
|
|
13288
13364
|
}, error=>{
|
|
13289
13365
|
console.log('error', error);
|
|
13290
13366
|
})
|
|
13291
13367
|
* @param data
|
|
13292
13368
|
* @return Promise => Object
|
|
13293
13369
|
*/
|
|
13294
|
-
|
|
13370
|
+
createVoucherCode(data: any): Promise<unknown>;
|
|
13295
13371
|
/**
|
|
13296
13372
|
* 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
13373
|
* trong collection voucher_release_details
|
|
@@ -13386,7 +13462,7 @@ export declare class VhQuerySales {
|
|
|
13386
13462
|
*/
|
|
13387
13463
|
getVoucherCode(id_voucher_code: any): Promise<unknown>;
|
|
13388
13464
|
/**
|
|
13389
|
-
* hàm này trả về voucher code đã phát hành theo trường _id của voucher code.
|
|
13465
|
+
* hàm này trả về voucher code đã phát hành theo trường _id của voucher code.
|
|
13390
13466
|
* trả về có cả code, name_voucher, name_voucher_release
|
|
13391
13467
|
* @example:
|
|
13392
13468
|
*
|
|
@@ -13400,6 +13476,21 @@ export declare class VhQuerySales {
|
|
|
13400
13476
|
* @return Promise => obj ={} or null
|
|
13401
13477
|
*/
|
|
13402
13478
|
getVoucher_Code_Name_Release(id_voucher_code: any): Promise<unknown>;
|
|
13479
|
+
/**
|
|
13480
|
+
* 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,
|
|
13481
|
+
* trả về có cả code, name_voucher, name_voucher_release
|
|
13482
|
+
* @example:
|
|
13483
|
+
*
|
|
13484
|
+
* this.vhQuerySales.getVoucher_Code_Name_Release_byCode('OUHEDW0512'})
|
|
13485
|
+
.then((res)=>{
|
|
13486
|
+
console.log('getVoucher_Code_Name_Release_byCode', res);
|
|
13487
|
+
}, error=>{
|
|
13488
|
+
console.log('error', error);
|
|
13489
|
+
})
|
|
13490
|
+
* @param code: cũng chính là code
|
|
13491
|
+
* @return Promise => obj ={} or null
|
|
13492
|
+
*/
|
|
13493
|
+
getVoucher_Code_Name_Release_byCode(code: any): Promise<unknown>;
|
|
13403
13494
|
exchangeVoucherCode_byEarningPoints(array_id_voucher_code_and_points_and_products: any, id_customer: any, points: any): Promise<unknown>;
|
|
13404
13495
|
/**
|
|
13405
13496
|
* @example:
|
|
@@ -13748,7 +13839,7 @@ export declare class VhQuerySales {
|
|
|
13748
13839
|
*/
|
|
13749
13840
|
getPaymentCardCode(id_payment_card_code: any): Promise<unknown>;
|
|
13750
13841
|
/**
|
|
13751
|
-
* hàm này trả về payment_card code đã phát hành theo trường _id của payment_card code
|
|
13842
|
+
* hàm này trả về payment_card code đã phát hành theo trường _id của payment_card code
|
|
13752
13843
|
* trả về có cả code, name_payment_card, name_payment_card_release
|
|
13753
13844
|
* @example:
|
|
13754
13845
|
*
|
|
@@ -13762,6 +13853,21 @@ export declare class VhQuerySales {
|
|
|
13762
13853
|
* @return Promise => obj ={} or null
|
|
13763
13854
|
*/
|
|
13764
13855
|
getPaymentCard_Code_Name_Release(id_payment_card_code: any): Promise<unknown>;
|
|
13856
|
+
/**
|
|
13857
|
+
* 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
|
|
13858
|
+
* trả về có cả code, name_payment_card, name_payment_card_release
|
|
13859
|
+
* @example:
|
|
13860
|
+
*
|
|
13861
|
+
* this.vhQuerySales.getPaymentCard_Code_Name_Release_byCode('OUHEDW0512'})
|
|
13862
|
+
.then((res)=>{
|
|
13863
|
+
console.log('getPaymentCard_Code_Name_Release_byCode', res);
|
|
13864
|
+
}, error=>{
|
|
13865
|
+
console.log('error', error);
|
|
13866
|
+
})
|
|
13867
|
+
* @param code: cũng chính là code
|
|
13868
|
+
* @return Promise => obj ={} or null
|
|
13869
|
+
*/
|
|
13870
|
+
getPaymentCard_Code_Name_Release_byCode(code: any): Promise<unknown>;
|
|
13765
13871
|
exchangePaymentCardCode_byEarningPoints(array_id_payment_card_code_and_points_and_products: any, id_customer: any, points: any): Promise<unknown>;
|
|
13766
13872
|
/**
|
|
13767
13873
|
* không cần hàm này vì khi tạo phiếu bill_type51 đã được cập nhật
|