ionic-vhframeworks 9.8.0 → 9.8.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.
|
@@ -2553,6 +2553,14 @@ export declare class VhQueryCafe {
|
|
|
2553
2553
|
* @returns void
|
|
2554
2554
|
*/
|
|
2555
2555
|
closeSyncCollections(): void;
|
|
2556
|
+
/**
|
|
2557
|
+
* Khi lấy obj từ database về, hàm syncRaw_Detail_ProductInsert sẽ đồng bộ obj vào 3 loại local rawproducts, detailproducts và products
|
|
2558
|
+
* (3 loại dữ liệu local đc fw sử dụng để tính toán hoặc trả về cho frontend khi cần), dùng cho type =3
|
|
2559
|
+
* @example:
|
|
2560
|
+
* this.syncRaw_Detail_ProductInsert(obj);
|
|
2561
|
+
* @param obj
|
|
2562
|
+
*/
|
|
2563
|
+
private syncRaw_Detail_ProductInsert;
|
|
2556
2564
|
/**
|
|
2557
2565
|
* VhQueryCafe
|
|
2558
2566
|
* @returns
|
|
@@ -3070,6 +3078,17 @@ export declare class VhQueryCafe {
|
|
|
3070
3078
|
* @return array(object) = [{},{},..]
|
|
3071
3079
|
*/
|
|
3072
3080
|
getProducts(): Promise<unknown>;
|
|
3081
|
+
/**
|
|
3082
|
+
* Hàm lấy chi tiết sản phẩm dựa vào id sản phẩm hoặc id sản phẩm con
|
|
3083
|
+
* @example
|
|
3084
|
+
* this.vhQueryCafe.getDetailProduct('5fb67fda87c0f21d484cbdf3')
|
|
3085
|
+
.then((product)=>{
|
|
3086
|
+
console.log('getDetailProduct', product);
|
|
3087
|
+
})
|
|
3088
|
+
* @param id_product
|
|
3089
|
+
* @return null or object
|
|
3090
|
+
*/
|
|
3091
|
+
private getDetailProduct;
|
|
3073
3092
|
/**
|
|
3074
3093
|
* Hàm này thêm topping vào món ăn/ thức uống
|
|
3075
3094
|
* @example:
|
|
@@ -3243,6 +3262,30 @@ export declare class VhQueryCafe {
|
|
|
3243
3262
|
* @return Object => obj = {} hoặc null
|
|
3244
3263
|
*/
|
|
3245
3264
|
getlocalDetailProduct(id_sub_or_product: string): any;
|
|
3265
|
+
/**
|
|
3266
|
+
* @example:
|
|
3267
|
+
* this.vhQueryCafe.getlocalDetailProduct_Async('ETxNu8exrvGtXFjkIhnc')
|
|
3268
|
+
.then((detailproduct)=>{
|
|
3269
|
+
}, error=>{
|
|
3270
|
+
console.log('error', error);
|
|
3271
|
+
})
|
|
3272
|
+
* @param data : object
|
|
3273
|
+
* @return Promise => object or null
|
|
3274
|
+
*/
|
|
3275
|
+
private getlocalDetailProduct_Async;
|
|
3276
|
+
/**
|
|
3277
|
+
* Hàm kiểm tra và đồng bộ các sản phẩm trong bill_details (chi tiết hóa đơn)
|
|
3278
|
+
* @example:
|
|
3279
|
+
* this.vhQueryCafe.syncBillDetails_Products(array)
|
|
3280
|
+
.then(()=>{
|
|
3281
|
+
}, error=>{
|
|
3282
|
+
console.log('error', error);
|
|
3283
|
+
})
|
|
3284
|
+
* @param bill_details : Array
|
|
3285
|
+
* @return Promise => null
|
|
3286
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là sync thành công, hoặc là báo lỗi error
|
|
3287
|
+
*/
|
|
3288
|
+
private syncBillDetails_Products;
|
|
3246
3289
|
/**
|
|
3247
3290
|
* Hàm này tìm, kiểm tra barcode bất kỳ có tồn tại không, nếu có thì trả về 1 detailproduct, nếu ko thì trả về null
|
|
3248
3291
|
* Hàm này dùng trong 2 trường hợp:
|
|
@@ -7206,6 +7249,7 @@ export declare class VhQueryCafe {
|
|
|
7206
7249
|
* @returns
|
|
7207
7250
|
*/
|
|
7208
7251
|
private syncInventoryEveryDay_Stock1stDayOfMonth;
|
|
7252
|
+
private syncInventoryEveryDay_Stock1stDayOfMonth_old;
|
|
7209
7253
|
/**
|
|
7210
7254
|
* Hàm này dùng trong page Tồn kho, giá trị tồn kho NGUYÊN LIỆU (type=3), doanh số, chi phí nhập hàng tại một thời điểm endtime nào đó
|
|
7211
7255
|
* @example:
|
|
@@ -23040,6 +23084,14 @@ export declare class VhQuerySales {
|
|
|
23040
23084
|
* @returns void
|
|
23041
23085
|
*/
|
|
23042
23086
|
closeSyncCollections(): void;
|
|
23087
|
+
/**
|
|
23088
|
+
* Khi lấy obj từ database về, hàm syncRaw_Detail_ProductInsert sẽ đồng bộ obj vào 3 loại local rawproducts, detailproducts và products
|
|
23089
|
+
* (3 loại dữ liệu local đc fw sử dụng để tính toán hoặc trả về cho frontend khi cần), dùng cho type =3
|
|
23090
|
+
* @example:
|
|
23091
|
+
* this.syncRaw_Detail_ProductInsert(obj);
|
|
23092
|
+
* @param obj
|
|
23093
|
+
*/
|
|
23094
|
+
private syncRaw_Detail_ProductInsert;
|
|
23043
23095
|
/**
|
|
23044
23096
|
* vhQuerySales
|
|
23045
23097
|
* @returns
|
|
@@ -23157,6 +23209,30 @@ export declare class VhQuerySales {
|
|
|
23157
23209
|
* @return Object => obj = {} hoặc null
|
|
23158
23210
|
*/
|
|
23159
23211
|
getlocalDetailProduct(id_sub_or_product: string): any;
|
|
23212
|
+
/**
|
|
23213
|
+
* @example:
|
|
23214
|
+
* this.vhQuerySales.getlocalDetailProduct_Async('ETxNu8exrvGtXFjkIhnc')
|
|
23215
|
+
.then((detailproduct)=>{
|
|
23216
|
+
}, error=>{
|
|
23217
|
+
console.log('error', error);
|
|
23218
|
+
})
|
|
23219
|
+
* @param data : object
|
|
23220
|
+
* @return Promise => object or null
|
|
23221
|
+
*/
|
|
23222
|
+
private getlocalDetailProduct_Async;
|
|
23223
|
+
/**
|
|
23224
|
+
* Hàm kiểm tra và đồng bộ các sản phẩm trong bill_details (chi tiết hóa đơn)
|
|
23225
|
+
* @example:
|
|
23226
|
+
* this.vhQuerySales.syncBillDetails_Products(array)
|
|
23227
|
+
.then(()=>{
|
|
23228
|
+
}, error=>{
|
|
23229
|
+
console.log('error', error);
|
|
23230
|
+
})
|
|
23231
|
+
* @param bill_details : Array
|
|
23232
|
+
* @return Promise => null
|
|
23233
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là sync thành công, hoặc là báo lỗi error
|
|
23234
|
+
*/
|
|
23235
|
+
private syncBillDetails_Products;
|
|
23160
23236
|
/**
|
|
23161
23237
|
* Hàm này tìm, kiểm tra barcode bất kỳ có tồn tại không, nếu có thì trả về 1 detailproduct, nếu ko thì trả về null
|
|
23162
23238
|
* Hàm này dùng trong 2 trường hợp:
|
|
@@ -23247,7 +23323,7 @@ export declare class VhQuerySales {
|
|
|
23247
23323
|
console.log('getProduct', product);
|
|
23248
23324
|
})
|
|
23249
23325
|
* @param id_product
|
|
23250
|
-
* @return
|
|
23326
|
+
* @return null or object
|
|
23251
23327
|
*/
|
|
23252
23328
|
private getProduct;
|
|
23253
23329
|
/**
|
|
@@ -23259,6 +23335,17 @@ export declare class VhQuerySales {
|
|
|
23259
23335
|
* @return array(object) = [{},{},..]
|
|
23260
23336
|
*/
|
|
23261
23337
|
private getProducts;
|
|
23338
|
+
/**
|
|
23339
|
+
* Hàm lấy chi tiết sản phẩm dựa vào id sản phẩm hoặc id sản phẩm con
|
|
23340
|
+
* @example
|
|
23341
|
+
* this.vhQuerySales.getDetailProduct('5fb67fda87c0f21d484cbdf3')
|
|
23342
|
+
.then((product)=>{
|
|
23343
|
+
console.log('getDetailProduct', product);
|
|
23344
|
+
})
|
|
23345
|
+
* @param id_product
|
|
23346
|
+
* @return null or object
|
|
23347
|
+
*/
|
|
23348
|
+
private getDetailProduct;
|
|
23262
23349
|
/**
|
|
23263
23350
|
* @example:
|
|
23264
23351
|
* this.vhQuerySales.addCombosProduct('5fb6780ca2148e',[{id_product:'rtw554b5634573456', id_subproduct: 'gty3456ygw454287', quantity:2, price: 20000, type: 1},{},..])
|