ionic-vhframeworks 3.6.8 → 3.7.2
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 +195 -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,12 @@ 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);
|
|
6999
7003
|
/**------------------------TIKI Ecommerce-------------------------- */
|
|
7000
7004
|
/**
|
|
7001
7005
|
* @example:
|
|
7002
|
-
* this.vhQuerySales.GetShippingStampForDropshipTiki(
|
|
7006
|
+
* this.vhQuerySales.GetShippingStampForDropshipTiki('243842207, 'B6', access_token).then((result)=>{
|
|
7003
7007
|
console.log('result', result);
|
|
7004
7008
|
},error=>{
|
|
7005
7009
|
console.log('error', error);
|
|
@@ -7008,7 +7012,7 @@ export declare class VhQuerySales {
|
|
|
7008
7012
|
* @param access_token :string
|
|
7009
7013
|
* @returns Promise
|
|
7010
7014
|
*/
|
|
7011
|
-
GetShippingStampForDropshipTiki(code: string, access_token: string): Promise<unknown>;
|
|
7015
|
+
GetShippingStampForDropshipTiki(code: string, size: string, access_token: string): Promise<unknown>;
|
|
7012
7016
|
/**
|
|
7013
7017
|
* @example:
|
|
7014
7018
|
* this.vhQuerySales.getSellerInventoriesForConfirmationTiki(access_token).then((result)=>{
|
|
@@ -8825,6 +8829,176 @@ export declare class VhQuerySales {
|
|
|
8825
8829
|
* @return Promise => array(object) = [{},{},..]
|
|
8826
8830
|
*/
|
|
8827
8831
|
getWarrantys(): Promise<unknown>;
|
|
8832
|
+
private publishObservableEventDiscount_bills;
|
|
8833
|
+
private observableLocalDiscount_bills;
|
|
8834
|
+
/**
|
|
8835
|
+
* @example:
|
|
8836
|
+
* this.observableDiscount_bills = this.vhQuerySales.getObservableLocalDiscount_bills().subscribe((localDiscount_bills:any) => {
|
|
8837
|
+
do something...
|
|
8838
|
+
})
|
|
8839
|
+
|
|
8840
|
+
ngOnDestroy(){
|
|
8841
|
+
this.observableDiscount_bills.unsubscribe();
|
|
8842
|
+
}
|
|
8843
|
+
* @returns Observerble (Array) => Array(object) => array = [{},{},...]
|
|
8844
|
+
*/
|
|
8845
|
+
private getObservableLocalDiscount_bills;
|
|
8846
|
+
/**
|
|
8847
|
+
* @example:
|
|
8848
|
+
* let discount_bill = this.vhQuerySales.getlocalDiscount_bill('5fb6780ca2148e09806c5b01');
|
|
8849
|
+
* @param id_discount_bill
|
|
8850
|
+
* @return Object => obj = {} or null
|
|
8851
|
+
*/
|
|
8852
|
+
getlocalDiscount_bill(id_discount_bill: any): any;
|
|
8853
|
+
/**
|
|
8854
|
+
* @example:
|
|
8855
|
+
* let discount_bills = this.vhQuerySales.getlocalDiscount_bills();
|
|
8856
|
+
* @return Array(object) => array = [{},{},...]
|
|
8857
|
+
*/
|
|
8858
|
+
getlocalDiscount_bills(): any;
|
|
8859
|
+
/**
|
|
8860
|
+
* @example:
|
|
8861
|
+
* this.vhQuerySales.addDiscount_bill({name:'camera 2', quantity:20, price:200000})
|
|
8862
|
+
.then((discount_bill)=>{
|
|
8863
|
+
console.log('addDiscount_bill', discount_bill);
|
|
8864
|
+
},error=>{
|
|
8865
|
+
console.log('error', error);
|
|
8866
|
+
})
|
|
8867
|
+
* @param colname
|
|
8868
|
+
* @param data
|
|
8869
|
+
* @return Promise => obj = {}
|
|
8870
|
+
* 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
|
|
8871
|
+
*/
|
|
8872
|
+
addDiscount_bill(data: object): Promise<unknown>;
|
|
8873
|
+
/**
|
|
8874
|
+
* @example:
|
|
8875
|
+
* this.vhQuerySales.updateDiscount_bill('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8876
|
+
.then((bool)=>{
|
|
8877
|
+
console.log('updateDiscount_bill', bool);
|
|
8878
|
+
})
|
|
8879
|
+
* @param id_discount_bill
|
|
8880
|
+
* @param data
|
|
8881
|
+
* @return Promise => bool = true or false
|
|
8882
|
+
*/
|
|
8883
|
+
updateDiscount_bill(id_discount_bill: string, data: object): Promise<unknown>;
|
|
8884
|
+
/**
|
|
8885
|
+
* @example:
|
|
8886
|
+
* this.vhQuerySales.deleteDiscount_bill('5fb67fda87c0f21d484cbdf3')
|
|
8887
|
+
.then((bool)=>{
|
|
8888
|
+
console.log('deleteDiscount_bill', bool);
|
|
8889
|
+
})
|
|
8890
|
+
* @param id_discount_bill
|
|
8891
|
+
* @return Promise => bool = true or false
|
|
8892
|
+
*/
|
|
8893
|
+
deleteDiscount_bill(id_discount_bill: string): Promise<unknown>;
|
|
8894
|
+
/**
|
|
8895
|
+
* @example:
|
|
8896
|
+
* this.vhQuerySales.addDiscount_sales({name:'camera 2', quantity:20, price:200000})
|
|
8897
|
+
.then((discount_saless)=>{
|
|
8898
|
+
console.log('addDiscount_sales', discount_sales);
|
|
8899
|
+
},error=>{
|
|
8900
|
+
console.log('error', error);
|
|
8901
|
+
})
|
|
8902
|
+
* @param colname
|
|
8903
|
+
* @param data
|
|
8904
|
+
* @return Promise => obj = {}
|
|
8905
|
+
* 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
|
|
8906
|
+
*/
|
|
8907
|
+
addDiscount_sales(data: object): Promise<unknown>;
|
|
8908
|
+
/**
|
|
8909
|
+
* @example:
|
|
8910
|
+
* this.vhQuerySales.updateDiscount_sales('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8911
|
+
.then((bool)=>{
|
|
8912
|
+
console.log('updateDiscount_sales', bool);
|
|
8913
|
+
})
|
|
8914
|
+
* @param id_discount_sales
|
|
8915
|
+
* @param data
|
|
8916
|
+
* @return Promise => bool = true or false
|
|
8917
|
+
*/
|
|
8918
|
+
updateDiscount_sales(id_discount_sales: string, data: object): Promise<unknown>;
|
|
8919
|
+
/**
|
|
8920
|
+
* @example:
|
|
8921
|
+
* this.vhQuerySales.deleteDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
8922
|
+
.then((bool)=>{
|
|
8923
|
+
console.log('deleteDiscount_sales', bool);
|
|
8924
|
+
})
|
|
8925
|
+
* @param id_discount_saless
|
|
8926
|
+
* @return Promise => bool = true or false
|
|
8927
|
+
*/
|
|
8928
|
+
deleteDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
8929
|
+
/**
|
|
8930
|
+
* @example
|
|
8931
|
+
* this.vhQuerySales.getDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
8932
|
+
.then((discount_sales)=>{
|
|
8933
|
+
console.log('getDiscount_sales', discount_sales);
|
|
8934
|
+
})
|
|
8935
|
+
* @param id_discount_sales
|
|
8936
|
+
* @return Promise => obj ={} or null
|
|
8937
|
+
*/
|
|
8938
|
+
getDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
8939
|
+
/**
|
|
8940
|
+
* @example
|
|
8941
|
+
* this.vhQuerySales.getDiscount_saless()
|
|
8942
|
+
.then((discount_saless)=>{
|
|
8943
|
+
console.log('getDiscount_saless', discount_saless);
|
|
8944
|
+
})
|
|
8945
|
+
* @return Promise => array(object) = [{},{},..]
|
|
8946
|
+
*/
|
|
8947
|
+
getDiscount_saless(): Promise<unknown>;
|
|
8948
|
+
/**
|
|
8949
|
+
* @example:
|
|
8950
|
+
* this.vhQuerySales.addCommission({name:'camera 2', quantity:20, price:200000})
|
|
8951
|
+
.then((commissions)=>{
|
|
8952
|
+
console.log('addCommission', commissions);
|
|
8953
|
+
},error=>{
|
|
8954
|
+
console.log('error', error);
|
|
8955
|
+
})
|
|
8956
|
+
* @param colname
|
|
8957
|
+
* @param data
|
|
8958
|
+
* @return Promise => obj = {}
|
|
8959
|
+
* 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
|
|
8960
|
+
*/
|
|
8961
|
+
addCommission(data: object): Promise<unknown>;
|
|
8962
|
+
/**
|
|
8963
|
+
* @example:
|
|
8964
|
+
* this.vhQuerySales.updateCommission('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8965
|
+
.then((bool)=>{
|
|
8966
|
+
console.log('updateCommission', bool);
|
|
8967
|
+
})
|
|
8968
|
+
* @param id_commission
|
|
8969
|
+
* @param data
|
|
8970
|
+
* @return Promise => bool = true or false
|
|
8971
|
+
*/
|
|
8972
|
+
updateCommission(id_commission: string, data: object): Promise<unknown>;
|
|
8973
|
+
/**
|
|
8974
|
+
* @example:
|
|
8975
|
+
* this.vhQuerySales.deleteCommission('5fb67fda87c0f21d484cbdf3')
|
|
8976
|
+
.then((bool)=>{
|
|
8977
|
+
console.log('deleteCommission', bool);
|
|
8978
|
+
})
|
|
8979
|
+
* @param id_commission
|
|
8980
|
+
* @return Promise => bool = true or false
|
|
8981
|
+
*/
|
|
8982
|
+
deleteCommission(id_commission: string): Promise<unknown>;
|
|
8983
|
+
/**
|
|
8984
|
+
* @example
|
|
8985
|
+
* this.vhQuerySales.getCommission('5fb67fda87c0f21d484cbdf3')
|
|
8986
|
+
.then((commission)=>{
|
|
8987
|
+
console.log('getCommission', commission);
|
|
8988
|
+
})
|
|
8989
|
+
* @param id_commission
|
|
8990
|
+
* @return Promise => obj ={} or null
|
|
8991
|
+
*/
|
|
8992
|
+
getCommission(id_commission: string): Promise<unknown>;
|
|
8993
|
+
/**
|
|
8994
|
+
* @example
|
|
8995
|
+
* this.vhQuerySales.getCommissions()
|
|
8996
|
+
.then((commissions)=>{
|
|
8997
|
+
console.log('getCommissions', commissions);
|
|
8998
|
+
})
|
|
8999
|
+
* @return Promise => array(object) = [{},{},..]
|
|
9000
|
+
*/
|
|
9001
|
+
getCommissions(): Promise<unknown>;
|
|
8828
9002
|
/**
|
|
8829
9003
|
* @example:
|
|
8830
9004
|
* let delivery = this.vhQuerySales.getlocalDelivery('5fb6780ca2148e09806c5b01');
|
|
@@ -8834,7 +9008,7 @@ export declare class VhQuerySales {
|
|
|
8834
9008
|
getlocalDelivery(id_delivery: any): any;
|
|
8835
9009
|
/**
|
|
8836
9010
|
* @example:
|
|
8837
|
-
* let deliverys = this.vhQuerySales.
|
|
9011
|
+
* let deliverys = this.vhQuerySales.getlocalDeliverys();
|
|
8838
9012
|
* @return Array(object) => array = [{},{},...]
|
|
8839
9013
|
*/
|
|
8840
9014
|
getlocalDeliverys(): any;
|
|
@@ -10112,13 +10286,26 @@ export declare class VhQuerySales {
|
|
|
10112
10286
|
* @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
10287
|
*/
|
|
10114
10288
|
getReportSales_Products_byProduct(starttime: any, endtime: any, id_product: any, IDbranch?: string): Promise<any>;
|
|
10289
|
+
/**
|
|
10290
|
+
* @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
|
|
10291
|
+
* @example :
|
|
10292
|
+
* let discount = this.vhQuerySales.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
|
|
10293
|
+
* @param total_price : Tổng giá
|
|
10294
|
+
* @param id_customer
|
|
10295
|
+
* @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,
|
|
10296
|
+
* trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
|
|
10297
|
+
*/
|
|
10298
|
+
getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
|
|
10115
10299
|
/**
|
|
10116
10300
|
* @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
10301
|
* @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
|
|
10302
|
+
* type : 1 chiết khấu %, 2 chiết khấu tiền
|
|
10303
|
+
* 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
|
|
10304
|
+
* usage: 1 chiết khấu trên hóa đơn, 2 chiết khấu trên doanh số
|
|
10118
10305
|
* @example :
|
|
10119
10306
|
* let endtime = new Date();
|
|
10120
10307
|
let starttime = new Date('2020-07-01T05:24:00');
|
|
10121
|
-
this.vhQuerySales.
|
|
10308
|
+
this.vhQuerySales.getReportDiscount_sales_Customers(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
|
|
10122
10309
|
.then((discounts)=>{
|
|
10123
10310
|
console.log('discounts', discounts);
|
|
10124
10311
|
console.log('discounts.docs[0]', discounts.docs[0]);
|
|
@@ -10129,10 +10316,12 @@ export declare class VhQuerySales {
|
|
|
10129
10316
|
* @param IDbranch : 'all' or id_branch
|
|
10130
10317
|
* @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, discount_name,sales_btax, discount_btax, sales_atax, discount_atax}
|
|
10131
10318
|
*/
|
|
10132
|
-
|
|
10319
|
+
getReportDiscount_sales_Customers(starttime: any, endtime: any, IDcustomer: any, IDbranch?: string): Promise<any>;
|
|
10133
10320
|
/**
|
|
10134
10321
|
* @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
10322
|
* @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
|
|
10323
|
+
* type : 1 chiết khấu %, 2 chiết khấu tiền
|
|
10324
|
+
* 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
10325
|
* @example :
|
|
10137
10326
|
* let endtime = new Date();
|
|
10138
10327
|
let starttime = new Date('2020-07-01T05:24:00');
|
|
@@ -10652,7 +10841,7 @@ export declare class VhQuerySales {
|
|
|
10652
10841
|
*/
|
|
10653
10842
|
getDebtCustomers(starttime: any, endtime: any, IDcustomer: string, IDbranch?: string): Promise<any>;
|
|
10654
10843
|
/**
|
|
10655
|
-
* lấy về 1 bảng báo cáo (report) theo cấu trúc json ở dưới
|
|
10844
|
+
* lấy về 1 bảng báo cáo kiểm kho (report) theo cấu trúc json ở dưới
|
|
10656
10845
|
* @example:
|
|
10657
10846
|
* this.vhQuerySales.getReportInventoryTime_byTimes('hNCda0obCvrX6qC3PZ0N')
|
|
10658
10847
|
.then((reports)=>{
|