ionic-vhframeworks 10.10.7 → 10.10.9
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.
|
@@ -654,6 +654,11 @@ export declare class VhForFirstTime {
|
|
|
654
654
|
constructor(vhMGDB_auth: VhMGDB_auth, vhMGDB_database: VhMGDB_database, vhMGDB_f3rdclouds: VhMGDB_f3rdclouds, http: HttpClient, vhAlgorithm: VhAlgorithm);
|
|
655
655
|
addAPPdatabase_forFirstTime(): Promise<unknown>;
|
|
656
656
|
addAPPdatabase_forFirstTime_Sales_Cafe(): Promise<unknown>;
|
|
657
|
+
/**
|
|
658
|
+
* VhForFirstTime
|
|
659
|
+
* @param main_sector
|
|
660
|
+
* @returns
|
|
661
|
+
*/
|
|
657
662
|
addAPPdatabase_forFirstTime_Sales365(main_sector: string): Promise<unknown>;
|
|
658
663
|
private addSales_id_retail;
|
|
659
664
|
private addSales_tax;
|
|
@@ -2975,6 +2980,9 @@ export declare class VhQueryCafeMenu {
|
|
|
2975
2980
|
* @returns Promise bool = true or false
|
|
2976
2981
|
*/
|
|
2977
2982
|
syncCollections_Sales365_Web(): Promise<unknown>;
|
|
2983
|
+
/**
|
|
2984
|
+
* vhQueryCafeMenu
|
|
2985
|
+
*/
|
|
2978
2986
|
private getLocalLiveIndexDB;
|
|
2979
2987
|
/**
|
|
2980
2988
|
* 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
|
|
@@ -3047,7 +3055,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3047
3055
|
getlocalDetailProduct(id_sub_or_product: string): any;
|
|
3048
3056
|
/**
|
|
3049
3057
|
* @example new
|
|
3050
|
-
* let products = this.
|
|
3058
|
+
* let products = this.vhQueryCafeMenu.getlocalProducts();
|
|
3051
3059
|
* @param type = 1 là sản phẩm, = 2 là dịch vụ, = 3 nguyên liệu, = 5 là combo, =12 là sản phẩm và dịch vụ, giá trị khác là cả 3
|
|
3052
3060
|
* @return Array(object) => array = [{},{},...]
|
|
3053
3061
|
*/
|
|
@@ -3055,7 +3063,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3055
3063
|
/**
|
|
3056
3064
|
* Hàm này lấy về 1 unit của sản phẩm theo ratio truyền vào
|
|
3057
3065
|
* @example
|
|
3058
|
-
* let unit = this.
|
|
3066
|
+
* let unit = this.vhQueryCafeMenu.getUnit_byRatio(1);
|
|
3059
3067
|
* @param units
|
|
3060
3068
|
* @param ratio
|
|
3061
3069
|
* @return Object => obj = {} hoặc null
|
|
@@ -3064,7 +3072,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3064
3072
|
/**
|
|
3065
3073
|
* Hàm này dùng lấy về phân quyền ở cấp độ chi nhánh
|
|
3066
3074
|
* @example:
|
|
3067
|
-
let appsetting = this.
|
|
3075
|
+
let appsetting = this.vhQueryCafeMenu.getLocalAppSettingNameBranch('info_header_footer_bill');
|
|
3068
3076
|
console.log(appsetting);
|
|
3069
3077
|
* @param appsetting_name
|
|
3070
3078
|
* @return object => {title:'title',name:'name', quantity: 10}
|
|
@@ -3092,7 +3100,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3092
3100
|
price: 12000000,
|
|
3093
3101
|
quantity: 1
|
|
3094
3102
|
}]
|
|
3095
|
-
this.
|
|
3103
|
+
this.vhQueryCafeMenu.createBill_Billdetail(bill, bill_details)
|
|
3096
3104
|
.then((bill:any)=>{
|
|
3097
3105
|
console.log(bill._id);
|
|
3098
3106
|
},(error:any)=>{
|
|
@@ -3106,7 +3114,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3106
3114
|
/**
|
|
3107
3115
|
* Hàm này tạo bill_code theo số thứ tự (trong ngày) của từng loại bill_type
|
|
3108
3116
|
* @example:
|
|
3109
|
-
* this.
|
|
3117
|
+
* this.vhQueryCafeMenu.createBillCode(new Date(), 7)
|
|
3110
3118
|
.then((bill_code)=>{
|
|
3111
3119
|
console.log('createBillCode', bill_code);
|
|
3112
3120
|
})
|
|
@@ -3136,7 +3144,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3136
3144
|
* @example:
|
|
3137
3145
|
* let time = new Date();
|
|
3138
3146
|
* time.setDate(time.getDate()-7);
|
|
3139
|
-
* this.
|
|
3147
|
+
* this.vhQueryCafeMenu.getBills_byFields({date:{$gte:time}, {bill_type:{$eq:5}}, {},{date:1},0)
|
|
3140
3148
|
.then((bills)=>{
|
|
3141
3149
|
console.log('getBills', bills);
|
|
3142
3150
|
})
|
|
@@ -3148,7 +3156,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3148
3156
|
*/
|
|
3149
3157
|
getBills_byFields(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
3150
3158
|
/**
|
|
3151
|
-
*
|
|
3159
|
+
* vhQueryCafeMenu
|
|
3152
3160
|
* @param bill_details
|
|
3153
3161
|
* @returns
|
|
3154
3162
|
*/
|
|
@@ -3156,7 +3164,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3156
3164
|
/**
|
|
3157
3165
|
* Hàm này cập nhật lại giá nhập, dùng trong trường hợp createbill_billdetail và updatebill_billdetail với bill_type2
|
|
3158
3166
|
* @example
|
|
3159
|
-
this.
|
|
3167
|
+
this.vhQueryCafeMenu.calculateUpdateImportPrice(bill_details,'SzyEYNN39Mq90NkzUFpz')
|
|
3160
3168
|
.then(()=>{
|
|
3161
3169
|
console.log("success");
|
|
3162
3170
|
})
|
|
@@ -3169,7 +3177,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3169
3177
|
date_expire: new Date(),
|
|
3170
3178
|
id_branch: "4zFGhVUAZyj5d09r01xZ"
|
|
3171
3179
|
}
|
|
3172
|
-
* this.
|
|
3180
|
+
* this.vhQueryCafeMenu.updatePaymentCardCode('OUHEOIWUYGHIQNIDOUW1359478',data)
|
|
3173
3181
|
.then((bool:any)=>{
|
|
3174
3182
|
console.log('updateCouponCode', bool);
|
|
3175
3183
|
}, error=>{
|
|
@@ -3183,7 +3191,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3183
3191
|
/**
|
|
3184
3192
|
* @example:
|
|
3185
3193
|
*
|
|
3186
|
-
* this.
|
|
3194
|
+
* this.vhQueryCafeMenu.updateVoucherCode('OUHEOIWUYGHIQNIDOUW1359478',{date_expire : new Date()})
|
|
3187
3195
|
.then((bool:any)=>{
|
|
3188
3196
|
console.log('updateCouponCode', bool);
|
|
3189
3197
|
}, error=>{
|
|
@@ -3198,7 +3206,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3198
3206
|
* hàm này trả về payment_card_code đã phát hành theo trường _id của payment_card_code. dùng trong trang bán hàng thanh toán bằng payment_card (chỉ lấy được hàng hóa có và còn trong card)
|
|
3199
3207
|
* @example:
|
|
3200
3208
|
*
|
|
3201
|
-
* this.
|
|
3209
|
+
* this.vhQueryCafeMenu.getPaymentCardCode('OUHEDW0512'})
|
|
3202
3210
|
.then((res)=>{
|
|
3203
3211
|
console.log('getPaymentCardCode', res);
|
|
3204
3212
|
}, error=>{
|
|
@@ -3232,7 +3240,7 @@ export declare class VhQueryCafeMenu {
|
|
|
3232
3240
|
private getBill;
|
|
3233
3241
|
/**
|
|
3234
3242
|
* @example:
|
|
3235
|
-
* this.
|
|
3243
|
+
* this.vhQueryCafeMenu.getBill_details_byID({id_bill:{$eq:id_bill}, bill_type:{$eq:5}}, {},{date:1},0)
|
|
3236
3244
|
.then((bill_details)=>{
|
|
3237
3245
|
console.log('bill_details', bill_details);
|
|
3238
3246
|
})
|