ionic-vhframeworks 10.9.1 → 10.9.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.
@@ -0,0 +1,9 @@
1
+ export declare function addCustomer(data: any): Promise<any>;
2
+ export declare function insertCustomer(_id: string, data: any): Promise<any>;
3
+ export declare function addCustomers(list: any[]): Promise<void>;
4
+ export declare function updateCustomer(_id: string, data: any): Promise<any>;
5
+ export declare function deleteCustomer(id: string): Promise<any>;
6
+ export declare function hardDeleteProduct(_id: string): Promise<any>;
7
+ export declare function getAllCustomers(): Promise<any>;
8
+ export declare function getLiveAllCustomers(): import("rxjs").Observable<any>;
9
+ export declare function getCustomerById(_id: string): Promise<any>;
@@ -0,0 +1,11 @@
1
+ import Dexie from 'dexie';
2
+ export declare class AppDB extends Dexie {
3
+ products: any;
4
+ customers: any;
5
+ meta: any;
6
+ constructor(dbName: string);
7
+ }
8
+ export declare function initDB(userId: string): AppDB;
9
+ export declare function getDB(): AppDB;
10
+ export declare function closeDB(): void;
11
+ export declare function deleteDB(userId: string): Promise<void>;
@@ -2942,6 +2942,7 @@ export declare class VhQueryCafe {
2942
2942
  private callback1syncbilltype;
2943
2943
  private callback2syncbilltype;
2944
2944
  private sync_code;
2945
+ private colname_array;
2945
2946
  /**
2946
2947
  * @Nghiệp vụ tạo (bill_type 5->1), hủy đơn hàng bán món ăn (dùng hàm)
2947
2948
  * {createBill, getBill} -> {createBill_detail, updateBill_detail, deleteBill_detail} -> {saveBill_Billdetail, deleteBill_Billdetail}
@@ -3040,6 +3041,13 @@ export declare class VhQueryCafe {
3040
3041
  * @returns Promise bool = true or false
3041
3042
  */
3042
3043
  syncCollections_Sales365_Desktop(): Promise<unknown>;
3044
+ /**
3045
+ * vhQueryCafe
3046
+ * Hàm này lấy về tất cả các collections mà firebase lưu trong cache ứng dụng, dữ liệu trong cache này dùng ko mất phí
3047
+ * @returns
3048
+ */
3049
+ private getLocalLiveIndexDB;
3050
+ private getLocalLiveIndexDB2;
3043
3051
  private initSyncCollections;
3044
3052
  /**
3045
3053
  * @example:
@@ -3056,6 +3064,9 @@ export declare class VhQueryCafe {
3056
3064
  * @param obj
3057
3065
  */
3058
3066
  private syncRaw_Detail_ProductInsert;
3067
+ /**
3068
+ * VhQueryCafe
3069
+ */
3059
3070
  private syncRaw_Detail_ProductUpdate;
3060
3071
  /**
3061
3072
  * VhQueryCafe
@@ -7199,6 +7210,7 @@ export declare class VhQueryCafe {
7199
7210
  */
7200
7211
  getDebtSuppliers(starttime: any, endtime: any, IDsuppiler: string, IDbranch?: string): Promise<any>;
7201
7212
  /**
7213
+ * CÔNG NỢ KHÁCH HÀNG
7202
7214
  * @example:
7203
7215
  * let endtime = new Date();
7204
7216
  * let starttime = new Date('2020-07-01T05:24:00');
@@ -13337,6 +13349,7 @@ export declare class VhQuerySales {
13337
13349
  private callback1syncbilltype;
13338
13350
  private callback2syncbilltype;
13339
13351
  private sync_code;
13352
+ private colname_array;
13340
13353
  constructor(vhEinvoice: VhEinvoice, vhMGDB_auth: VhMGDB_auth, vhMGDB_rootdatabase: VhMGDB_rootdatabase, vhMGDB_database: VhMGDB_database, vhMGDB_socketMongoDB: VhMGDB_socketMongoDB, vhMGDB_tiki: VhMGDB_tiki, vhMGDB_sendo: VhMGDB_sendo, vhMGDB_lazada: VhMGDB_lazada, vhMGDB_socketFacebook: VhMGDB_socketFacebook, vhMGDB_paymentVNPAY: VhMGDB_paymentVNPAY, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, vhDisplayLEDService: VhDisplayLEDService, iap2: InAppPurchase2, platform: Platform);
13341
13354
  fix_loi_kieu_du_lieu_barcode(): Promise<unknown>;
13342
13355
  /**
@@ -14459,6 +14472,14 @@ export declare class VhQuerySales {
14459
14472
  * @returns Promise bool = true or false
14460
14473
  */
14461
14474
  syncCollections_Sales365_Desktop(): Promise<unknown>;
14475
+ private getLocalLiveIndexDB1;
14476
+ /**
14477
+ * vhQuerySales
14478
+ * Hàm này lấy về tất cả các collections mà firebase lưu trong cache ứng dụng, dữ liệu trong cache này dùng ko mất phí
14479
+ * @returns
14480
+ */
14481
+ private getLocalLiveIndexDB;
14482
+ private getLocalLiveIndexDB2;
14462
14483
  private checkExpireBranch_Sales;
14463
14484
  private checkExpireBranch_Sales365;
14464
14485
  private initSyncCollections;
@@ -14473,10 +14494,14 @@ export declare class VhQuerySales {
14473
14494
  * 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
14474
14495
  * (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
14475
14496
  * @example:
14476
- * this.syncRaw_Detail_ProductInsert(obj);
14497
+ * this.vhQuerySales.syncRaw_Detail_ProductInsert(obj);
14477
14498
  * @param obj
14478
14499
  */
14479
14500
  private syncRaw_Detail_ProductInsert;
14501
+ /**
14502
+ * vhQuerySales
14503
+ * @param obj
14504
+ */
14480
14505
  private syncRaw_Detail_ProductUpdate;
14481
14506
  /**
14482
14507
  * vhQuerySales
@@ -15177,7 +15202,7 @@ export declare class VhQuerySales {
15177
15202
  })
15178
15203
  * @return Promise => array(object) = [{},{},..]
15179
15204
  */
15180
- getCustomers(): Promise<unknown>;
15205
+ private getCustomers;
15181
15206
  /**
15182
15207
  * Hàm này dùng để xóa hoặc đặt lại điểm mới cho khách hàng
15183
15208
  * @example:
@@ -17250,6 +17275,7 @@ export declare class VhQuerySales {
17250
17275
  * @return — Array -> array = [{},{},...]
17251
17276
  */
17252
17277
  getBills_byFields(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
17278
+ getBills_byFields_fromCache(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
17253
17279
  /**
17254
17280
  * @example:
17255
17281
  * this.vhQuerySales.createBill({name:'Cuối tuần vui vẻ', type:2, active:true, date_start:new Date(), date_end: new Date()})
@@ -18792,6 +18818,7 @@ export declare class VhQuerySales {
18792
18818
  * @returns
18793
18819
  */
18794
18820
  private syncInventoryEveryDay_Stock1stDayOfMonth;
18821
+ private syncInventoryEveryDay_Stock1stDayOfMonth_old;
18795
18822
  /**
18796
18823
  * this.vhQuerySales.xoaduthuatronglots()
18797
18824
  .then((bool:any)=>{
@@ -19050,6 +19077,7 @@ export declare class VhQuerySales {
19050
19077
  * @returns
19051
19078
  */
19052
19079
  private get1stDayOfMonthArray;
19080
+ private get1stDayOfMonthArray_new;
19053
19081
  /**
19054
19082
  * Hàm này kiểm tra ngày tạo bill, sửa bill đã chọn có hợp lệ không
19055
19083
  * Ngày hợp lệ phải thỏa mãn:
@@ -19093,6 +19121,38 @@ export declare class VhQuerySales {
19093
19121
  */
19094
19122
  getDebtSuppliers(starttime: any, endtime: any, IDsuppiler: string, IDbranch?: string): Promise<any>;
19095
19123
  /**
19124
+ * CÔNG NỢ KHÁCH HÀNG
19125
+ * @example:
19126
+ * let endtime = new Date();
19127
+ * let starttime = new Date('2020-07-01T05:24:00');
19128
+ * this.vhQuerySales.getDebtCustomers('gtrtyery56646577456')
19129
+ .then((debts)=>{
19130
+ console.log('getDebtCustomers', debts);
19131
+ })
19132
+ * @param IDbranch: id_branch hoặc 'all'
19133
+ * @return JSON(Array) => json.docs = [{id, name, index, debt, payment, rest,...},{},....]
19134
+ * Lưu ý: giá trị này trả về dạng array
19135
+ */
19136
+ private getDebtCustomers_danglam;
19137
+ /**
19138
+ * CÔNG NỢ KHÁCH HÀNG
19139
+ * @example:
19140
+ * let endtime = new Date();
19141
+ * let starttime = new Date('2020-07-01T05:24:00');
19142
+ * this.vhQuerySales.getDebtCustomers(starttime, endtime, 'yewwg44667njdt443s', 'gtrtyery56646577456')
19143
+ .then((debts)=>{
19144
+ console.log('getDebtCustomers', debts);
19145
+ })
19146
+ * @param starttime
19147
+ * @param endtime
19148
+ * @param id_customer: id_customer
19149
+ * @param IDbranch: id_branch hoặc 'all'
19150
+ * @return JSON(Array) => json.docs = [{id, name, index, debt, payment, rest,...},{},....]
19151
+ * Lưu ý: giá trị này trả về dạng array
19152
+ */
19153
+ private getDebtCustomer_byTime;
19154
+ /**
19155
+ * CÔNG NỢ KHÁCH HÀNG
19096
19156
  * @example:
19097
19157
  * let endtime = new Date();
19098
19158
  * let starttime = new Date('2020-07-01T05:24:00');
@@ -19107,7 +19167,9 @@ export declare class VhQuerySales {
19107
19167
  * @return JSON(Array) => json.docs = [{id, name, index, debt, payment, rest,...},{},....]
19108
19168
  * Lưu ý: giá trị này trả về dạng array
19109
19169
  */
19170
+ getDebtCustomers1(starttime: any, endtime: any, IDcustomer: string, IDbranch?: string): Promise<any>;
19110
19171
  getDebtCustomers(starttime: any, endtime: any, IDcustomer: string, IDbranch?: string): Promise<any>;
19172
+ private syncDebtEveryDay_Debt1stDayOfMonth;
19111
19173
  /**
19112
19174
  * lấy về 1 bảng báo cáo kiểm kho (report) theo cấu trúc json ở dưới, nếu có cân bằng kho thì lấy về chung luôn
19113
19175
  * @example:
@@ -0,0 +1,3 @@
1
+ export declare function setMeta(key: string, value: any): Promise<any>;
2
+ export declare function getMeta(key: string): Promise<any>;
3
+ export declare function deleteMeta(key: string): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "10.9.1",
3
+ "version": "10.9.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"