ionic-vhframeworks 3.6.9 → 3.7.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 +233 -6
- package/package.json +1 -1
|
@@ -6972,6 +6972,9 @@ export declare class VhQuerySales {
|
|
|
6972
6972
|
private categorys;
|
|
6973
6973
|
private inventorytimes;
|
|
6974
6974
|
private warrantys;
|
|
6975
|
+
private discount_bills;
|
|
6976
|
+
private discount_saless;
|
|
6977
|
+
private commissions;
|
|
6975
6978
|
private deliverys;
|
|
6976
6979
|
private addresss;
|
|
6977
6980
|
private incoming_groups;
|
|
@@ -6995,11 +6998,50 @@ export declare class VhQuerySales {
|
|
|
6995
6998
|
private subjectsuppliers;
|
|
6996
6999
|
private subjecttaxs;
|
|
6997
7000
|
private subjectwarrantys;
|
|
7001
|
+
private subjectdiscount_bills;
|
|
6998
7002
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, iap2: InAppPurchase2, platform: Platform);
|
|
7003
|
+
/**
|
|
7004
|
+
* Hàm callback BÌNH LUẬN trên fanpage có id là id_fanpage
|
|
7005
|
+
* @example:
|
|
7006
|
+
* this.vhQuerySales.observableWebhookFeedFacebook('102622138931525').subscribe((entry:any) => {
|
|
7007
|
+
console.log('entry', entry);
|
|
7008
|
+
})
|
|
7009
|
+
|
|
7010
|
+
ngOnDestroy(){
|
|
7011
|
+
this.vhQuerySales.unsubscribeWebhookFeedFacebook('102622138931525');
|
|
7012
|
+
}
|
|
7013
|
+
* @returns Observerble (Object) => obj = {id, time, changes}
|
|
7014
|
+
*/
|
|
7015
|
+
observableWebhookFeedFacebook(id_fanpage: string): Observable<unknown>;
|
|
7016
|
+
/**
|
|
7017
|
+
* hàm disable calback BÌNH LUẬN
|
|
7018
|
+
* @example:
|
|
7019
|
+
* this.vhQuerySales.unsubscribeWebhookFeedFacebook('102622138931525');
|
|
7020
|
+
*/
|
|
7021
|
+
unsubscribeWebhookFeedFacebook(id_fanpage: string): void;
|
|
7022
|
+
/**
|
|
7023
|
+
* Hàm callback TIN NHẮN trên fanpage có id là id_fanpage
|
|
7024
|
+
* @example:
|
|
7025
|
+
* this.vhQuerySales.observableWebhookMessagesFacebook('102622138931525').subscribe((entry:any) => {
|
|
7026
|
+
console.log('entry', entry);
|
|
7027
|
+
})
|
|
7028
|
+
|
|
7029
|
+
ngOnDestroy(){
|
|
7030
|
+
this.vhQuerySales.unsubscribeWebhookMessagesFacebook('102622138931525');
|
|
7031
|
+
}
|
|
7032
|
+
* @returns Observerble (Object) => obj = {id, time, messaging}
|
|
7033
|
+
*/
|
|
7034
|
+
observableWebhookMessagesFacebook(id_fanpage: string): Observable<unknown>;
|
|
7035
|
+
/**
|
|
7036
|
+
* hàm disable calback TÍN NHẮN
|
|
7037
|
+
* @example:
|
|
7038
|
+
* this.vhQuerySales.unsubscribeWebhookMessagesFacebook('102622138931525');
|
|
7039
|
+
*/
|
|
7040
|
+
unsubscribeWebhookMessagesFacebook(id_fanpage: string): void;
|
|
6999
7041
|
/**------------------------TIKI Ecommerce-------------------------- */
|
|
7000
7042
|
/**
|
|
7001
7043
|
* @example:
|
|
7002
|
-
* this.vhQuerySales.GetShippingStampForDropshipTiki(
|
|
7044
|
+
* this.vhQuerySales.GetShippingStampForDropshipTiki('243842207, 'B6', access_token).then((result)=>{
|
|
7003
7045
|
console.log('result', result);
|
|
7004
7046
|
},error=>{
|
|
7005
7047
|
console.log('error', error);
|
|
@@ -7008,7 +7050,7 @@ export declare class VhQuerySales {
|
|
|
7008
7050
|
* @param access_token :string
|
|
7009
7051
|
* @returns Promise
|
|
7010
7052
|
*/
|
|
7011
|
-
GetShippingStampForDropshipTiki(code: string, access_token: string): Promise<unknown>;
|
|
7053
|
+
GetShippingStampForDropshipTiki(code: string, size: string, access_token: string): Promise<unknown>;
|
|
7012
7054
|
/**
|
|
7013
7055
|
* @example:
|
|
7014
7056
|
* this.vhQuerySales.getSellerInventoriesForConfirmationTiki(access_token).then((result)=>{
|
|
@@ -8825,6 +8867,176 @@ export declare class VhQuerySales {
|
|
|
8825
8867
|
* @return Promise => array(object) = [{},{},..]
|
|
8826
8868
|
*/
|
|
8827
8869
|
getWarrantys(): Promise<unknown>;
|
|
8870
|
+
private publishObservableEventDiscount_bills;
|
|
8871
|
+
private observableLocalDiscount_bills;
|
|
8872
|
+
/**
|
|
8873
|
+
* @example:
|
|
8874
|
+
* this.observableDiscount_bills = this.vhQuerySales.getObservableLocalDiscount_bills().subscribe((localDiscount_bills:any) => {
|
|
8875
|
+
do something...
|
|
8876
|
+
})
|
|
8877
|
+
|
|
8878
|
+
ngOnDestroy(){
|
|
8879
|
+
this.observableDiscount_bills.unsubscribe();
|
|
8880
|
+
}
|
|
8881
|
+
* @returns Observerble (Array) => Array(object) => array = [{},{},...]
|
|
8882
|
+
*/
|
|
8883
|
+
private getObservableLocalDiscount_bills;
|
|
8884
|
+
/**
|
|
8885
|
+
* @example:
|
|
8886
|
+
* let discount_bill = this.vhQuerySales.getlocalDiscount_bill('5fb6780ca2148e09806c5b01');
|
|
8887
|
+
* @param id_discount_bill
|
|
8888
|
+
* @return Object => obj = {} or null
|
|
8889
|
+
*/
|
|
8890
|
+
getlocalDiscount_bill(id_discount_bill: any): any;
|
|
8891
|
+
/**
|
|
8892
|
+
* @example:
|
|
8893
|
+
* let discount_bills = this.vhQuerySales.getlocalDiscount_bills();
|
|
8894
|
+
* @return Array(object) => array = [{},{},...]
|
|
8895
|
+
*/
|
|
8896
|
+
getlocalDiscount_bills(): any;
|
|
8897
|
+
/**
|
|
8898
|
+
* @example:
|
|
8899
|
+
* this.vhQuerySales.addDiscount_bill({name:'camera 2', quantity:20, price:200000})
|
|
8900
|
+
.then((discount_bill)=>{
|
|
8901
|
+
console.log('addDiscount_bill', discount_bill);
|
|
8902
|
+
},error=>{
|
|
8903
|
+
console.log('error', error);
|
|
8904
|
+
})
|
|
8905
|
+
* @param colname
|
|
8906
|
+
* @param data
|
|
8907
|
+
* @return Promise => obj = {}
|
|
8908
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
8909
|
+
*/
|
|
8910
|
+
addDiscount_bill(data: object): Promise<unknown>;
|
|
8911
|
+
/**
|
|
8912
|
+
* @example:
|
|
8913
|
+
* this.vhQuerySales.updateDiscount_bill('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8914
|
+
.then((bool)=>{
|
|
8915
|
+
console.log('updateDiscount_bill', bool);
|
|
8916
|
+
})
|
|
8917
|
+
* @param id_discount_bill
|
|
8918
|
+
* @param data
|
|
8919
|
+
* @return Promise => bool = true or false
|
|
8920
|
+
*/
|
|
8921
|
+
updateDiscount_bill(id_discount_bill: string, data: object): Promise<unknown>;
|
|
8922
|
+
/**
|
|
8923
|
+
* @example:
|
|
8924
|
+
* this.vhQuerySales.deleteDiscount_bill('5fb67fda87c0f21d484cbdf3')
|
|
8925
|
+
.then((bool)=>{
|
|
8926
|
+
console.log('deleteDiscount_bill', bool);
|
|
8927
|
+
})
|
|
8928
|
+
* @param id_discount_bill
|
|
8929
|
+
* @return Promise => bool = true or false
|
|
8930
|
+
*/
|
|
8931
|
+
deleteDiscount_bill(id_discount_bill: string): Promise<unknown>;
|
|
8932
|
+
/**
|
|
8933
|
+
* @example:
|
|
8934
|
+
* this.vhQuerySales.addDiscount_sales({name:'camera 2', quantity:20, price:200000})
|
|
8935
|
+
.then((discount_saless)=>{
|
|
8936
|
+
console.log('addDiscount_sales', discount_sales);
|
|
8937
|
+
},error=>{
|
|
8938
|
+
console.log('error', error);
|
|
8939
|
+
})
|
|
8940
|
+
* @param colname
|
|
8941
|
+
* @param data
|
|
8942
|
+
* @return Promise => obj = {}
|
|
8943
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
8944
|
+
*/
|
|
8945
|
+
addDiscount_sales(data: object): Promise<unknown>;
|
|
8946
|
+
/**
|
|
8947
|
+
* @example:
|
|
8948
|
+
* this.vhQuerySales.updateDiscount_sales('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8949
|
+
.then((bool)=>{
|
|
8950
|
+
console.log('updateDiscount_sales', bool);
|
|
8951
|
+
})
|
|
8952
|
+
* @param id_discount_sales
|
|
8953
|
+
* @param data
|
|
8954
|
+
* @return Promise => bool = true or false
|
|
8955
|
+
*/
|
|
8956
|
+
updateDiscount_sales(id_discount_sales: string, data: object): Promise<unknown>;
|
|
8957
|
+
/**
|
|
8958
|
+
* @example:
|
|
8959
|
+
* this.vhQuerySales.deleteDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
8960
|
+
.then((bool)=>{
|
|
8961
|
+
console.log('deleteDiscount_sales', bool);
|
|
8962
|
+
})
|
|
8963
|
+
* @param id_discount_saless
|
|
8964
|
+
* @return Promise => bool = true or false
|
|
8965
|
+
*/
|
|
8966
|
+
deleteDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
8967
|
+
/**
|
|
8968
|
+
* @example
|
|
8969
|
+
* this.vhQuerySales.getDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
8970
|
+
.then((discount_sales)=>{
|
|
8971
|
+
console.log('getDiscount_sales', discount_sales);
|
|
8972
|
+
})
|
|
8973
|
+
* @param id_discount_sales
|
|
8974
|
+
* @return Promise => obj ={} or null
|
|
8975
|
+
*/
|
|
8976
|
+
getDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
8977
|
+
/**
|
|
8978
|
+
* @example
|
|
8979
|
+
* this.vhQuerySales.getDiscount_saless()
|
|
8980
|
+
.then((discount_saless)=>{
|
|
8981
|
+
console.log('getDiscount_saless', discount_saless);
|
|
8982
|
+
})
|
|
8983
|
+
* @return Promise => array(object) = [{},{},..]
|
|
8984
|
+
*/
|
|
8985
|
+
getDiscount_saless(): Promise<unknown>;
|
|
8986
|
+
/**
|
|
8987
|
+
* @example:
|
|
8988
|
+
* this.vhQuerySales.addCommission({name:'camera 2', quantity:20, price:200000})
|
|
8989
|
+
.then((commissions)=>{
|
|
8990
|
+
console.log('addCommission', commissions);
|
|
8991
|
+
},error=>{
|
|
8992
|
+
console.log('error', error);
|
|
8993
|
+
})
|
|
8994
|
+
* @param colname
|
|
8995
|
+
* @param data
|
|
8996
|
+
* @return Promise => obj = {}
|
|
8997
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
8998
|
+
*/
|
|
8999
|
+
addCommission(data: object): Promise<unknown>;
|
|
9000
|
+
/**
|
|
9001
|
+
* @example:
|
|
9002
|
+
* this.vhQuerySales.updateCommission('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
9003
|
+
.then((bool)=>{
|
|
9004
|
+
console.log('updateCommission', bool);
|
|
9005
|
+
})
|
|
9006
|
+
* @param id_commission
|
|
9007
|
+
* @param data
|
|
9008
|
+
* @return Promise => bool = true or false
|
|
9009
|
+
*/
|
|
9010
|
+
updateCommission(id_commission: string, data: object): Promise<unknown>;
|
|
9011
|
+
/**
|
|
9012
|
+
* @example:
|
|
9013
|
+
* this.vhQuerySales.deleteCommission('5fb67fda87c0f21d484cbdf3')
|
|
9014
|
+
.then((bool)=>{
|
|
9015
|
+
console.log('deleteCommission', bool);
|
|
9016
|
+
})
|
|
9017
|
+
* @param id_commission
|
|
9018
|
+
* @return Promise => bool = true or false
|
|
9019
|
+
*/
|
|
9020
|
+
deleteCommission(id_commission: string): Promise<unknown>;
|
|
9021
|
+
/**
|
|
9022
|
+
* @example
|
|
9023
|
+
* this.vhQuerySales.getCommission('5fb67fda87c0f21d484cbdf3')
|
|
9024
|
+
.then((commission)=>{
|
|
9025
|
+
console.log('getCommission', commission);
|
|
9026
|
+
})
|
|
9027
|
+
* @param id_commission
|
|
9028
|
+
* @return Promise => obj ={} or null
|
|
9029
|
+
*/
|
|
9030
|
+
getCommission(id_commission: string): Promise<unknown>;
|
|
9031
|
+
/**
|
|
9032
|
+
* @example
|
|
9033
|
+
* this.vhQuerySales.getCommissions()
|
|
9034
|
+
.then((commissions)=>{
|
|
9035
|
+
console.log('getCommissions', commissions);
|
|
9036
|
+
})
|
|
9037
|
+
* @return Promise => array(object) = [{},{},..]
|
|
9038
|
+
*/
|
|
9039
|
+
getCommissions(): Promise<unknown>;
|
|
8828
9040
|
/**
|
|
8829
9041
|
* @example:
|
|
8830
9042
|
* let delivery = this.vhQuerySales.getlocalDelivery('5fb6780ca2148e09806c5b01');
|
|
@@ -8834,7 +9046,7 @@ export declare class VhQuerySales {
|
|
|
8834
9046
|
getlocalDelivery(id_delivery: any): any;
|
|
8835
9047
|
/**
|
|
8836
9048
|
* @example:
|
|
8837
|
-
* let deliverys = this.vhQuerySales.
|
|
9049
|
+
* let deliverys = this.vhQuerySales.getlocalDeliverys();
|
|
8838
9050
|
* @return Array(object) => array = [{},{},...]
|
|
8839
9051
|
*/
|
|
8840
9052
|
getlocalDeliverys(): any;
|
|
@@ -10112,13 +10324,26 @@ export declare class VhQuerySales {
|
|
|
10112
10324
|
* @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, barcode, unit, img, date, quantity, price, tax, id_bill, id_product, salesman}
|
|
10113
10325
|
*/
|
|
10114
10326
|
getReportSales_Products_byProduct(starttime: any, endtime: any, id_product: any, IDbranch?: string): Promise<any>;
|
|
10327
|
+
/**
|
|
10328
|
+
* @Usage : Hàm này lấy về tiền chiết khấu trên tổng giá trị hàng hóa bán ra của mỗi đơn hàng theo khách mua hàng
|
|
10329
|
+
* @example :
|
|
10330
|
+
* let discount = this.vhQuerySales.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
|
|
10331
|
+
* @param total_price : Tổng giá
|
|
10332
|
+
* @param id_customer
|
|
10333
|
+
* @returns Object or null => obj = {type, discount}, type ==1 là chiết khấu %, type == 2 là chiết khấu money, discount là số tiền đc chiết khấu,
|
|
10334
|
+
* trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
|
|
10335
|
+
*/
|
|
10336
|
+
getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
|
|
10115
10337
|
/**
|
|
10116
10338
|
* @Usage :Hàm này dùng trong page CHIẾT KHẤU KHÁCH HÀNG -> Chọn TẤT CẢ hoặc MỘT khách hàng
|
|
10117
10339
|
* @notice : Mỗi công thức chiết khấu có 5 mức (level1, level2, level3, level4, level5), giá trị doanh số (sales) level sau phải lơn hơn level trước
|
|
10340
|
+
* type : 1 chiết khấu %, 2 chiết khấu tiền
|
|
10341
|
+
* method : 1 phương pháp tính theo từng mức, 2 phương pháp tính theo mức cuối
|
|
10342
|
+
* usage: 1 chiết khấu trên hóa đơn, 2 chiết khấu trên doanh số
|
|
10118
10343
|
* @example :
|
|
10119
10344
|
* let endtime = new Date();
|
|
10120
10345
|
let starttime = new Date('2020-07-01T05:24:00');
|
|
10121
|
-
this.vhQuerySales.
|
|
10346
|
+
this.vhQuerySales.getReportDiscount_sales_Customers(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
|
|
10122
10347
|
.then((discounts)=>{
|
|
10123
10348
|
console.log('discounts', discounts);
|
|
10124
10349
|
console.log('discounts.docs[0]', discounts.docs[0]);
|
|
@@ -10129,10 +10354,12 @@ export declare class VhQuerySales {
|
|
|
10129
10354
|
* @param IDbranch : 'all' or id_branch
|
|
10130
10355
|
* @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, discount_name,sales_btax, discount_btax, sales_atax, discount_atax}
|
|
10131
10356
|
*/
|
|
10132
|
-
|
|
10357
|
+
getReportDiscount_sales_Customers(starttime: any, endtime: any, IDcustomer: any, IDbranch?: string): Promise<any>;
|
|
10133
10358
|
/**
|
|
10134
10359
|
* @Usage :Hàm này dùng trong page HOA HỒNG NHÂN VIÊN -> Chọn TẤT CẢ hoặc MỘT nhân viên
|
|
10135
10360
|
* @notice : Mỗi công thức chiết khấu có 5 mức (level1, level2, level3, level4, level5), giá trị doanh số (sales) level sau phải lơn hơn level trước
|
|
10361
|
+
* type : 1 chiết khấu %, 2 chiết khấu tiền
|
|
10362
|
+
* method : 1 phương pháp tính theo từng mức, 2 phương pháp tính theo mức cuối
|
|
10136
10363
|
* @example :
|
|
10137
10364
|
* let endtime = new Date();
|
|
10138
10365
|
let starttime = new Date('2020-07-01T05:24:00');
|
|
@@ -10652,7 +10879,7 @@ export declare class VhQuerySales {
|
|
|
10652
10879
|
*/
|
|
10653
10880
|
getDebtCustomers(starttime: any, endtime: any, IDcustomer: string, IDbranch?: string): Promise<any>;
|
|
10654
10881
|
/**
|
|
10655
|
-
* lấy về 1 bảng báo cáo (report) theo cấu trúc json ở dưới
|
|
10882
|
+
* lấy về 1 bảng báo cáo kiểm kho (report) theo cấu trúc json ở dưới
|
|
10656
10883
|
* @example:
|
|
10657
10884
|
* this.vhQuerySales.getReportInventoryTime_byTimes('hNCda0obCvrX6qC3PZ0N')
|
|
10658
10885
|
.then((reports)=>{
|