ionic-vhframeworks 3.8.0 → 3.8.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 +241 -0
- package/package.json +1 -1
|
@@ -983,6 +983,9 @@ export declare class VhQueryCafe {
|
|
|
983
983
|
private promotions;
|
|
984
984
|
private patternmenus;
|
|
985
985
|
private printers;
|
|
986
|
+
private discount_bills;
|
|
987
|
+
private discount_saless;
|
|
988
|
+
private commissions;
|
|
986
989
|
private hwinfo;
|
|
987
990
|
private appsettingstations;
|
|
988
991
|
private appsettingbranchs;
|
|
@@ -1003,6 +1006,7 @@ export declare class VhQueryCafe {
|
|
|
1003
1006
|
private subjecttaxs;
|
|
1004
1007
|
private subjectareas;
|
|
1005
1008
|
private subjecttables;
|
|
1009
|
+
private subjectdiscount_bills;
|
|
1006
1010
|
private callbackdispatcher;
|
|
1007
1011
|
/**
|
|
1008
1012
|
* @Nghiệp vụ tạo (bill_type 5->1), hủy đơn hàng bán món ăn (dùng hàm)
|
|
@@ -2240,6 +2244,176 @@ export declare class VhQueryCafe {
|
|
|
2240
2244
|
* @return Promise => array(object) = [{},{},..]
|
|
2241
2245
|
*/
|
|
2242
2246
|
getInventorytimes(): Promise<unknown>;
|
|
2247
|
+
private publishObservableEventDiscount_bills;
|
|
2248
|
+
private observableLocalDiscount_bills;
|
|
2249
|
+
/**
|
|
2250
|
+
* @example:
|
|
2251
|
+
* this.observableDiscount_bills = this.vhQueryCafe.getObservableLocalDiscount_bills().subscribe((localDiscount_bills:any) => {
|
|
2252
|
+
do something...
|
|
2253
|
+
})
|
|
2254
|
+
|
|
2255
|
+
ngOnDestroy(){
|
|
2256
|
+
this.observableDiscount_bills.unsubscribe();
|
|
2257
|
+
}
|
|
2258
|
+
* @returns Observerble (Array) => Array(object) => array = [{},{},...]
|
|
2259
|
+
*/
|
|
2260
|
+
private getObservableLocalDiscount_bills;
|
|
2261
|
+
/**
|
|
2262
|
+
* @example:
|
|
2263
|
+
* let discount_bill = this.vhQueryCafe.getlocalDiscount_bill('5fb6780ca2148e09806c5b01');
|
|
2264
|
+
* @param id_discount_bill
|
|
2265
|
+
* @return Object => obj = {} or null
|
|
2266
|
+
*/
|
|
2267
|
+
getlocalDiscount_bill(id_discount_bill: any): any;
|
|
2268
|
+
/**
|
|
2269
|
+
* @example:
|
|
2270
|
+
* let discount_bills = this.vhQueryCafe.getlocalDiscount_bills();
|
|
2271
|
+
* @return Array(object) => array = [{},{},...]
|
|
2272
|
+
*/
|
|
2273
|
+
getlocalDiscount_bills(): any;
|
|
2274
|
+
/**
|
|
2275
|
+
* @example:
|
|
2276
|
+
* this.vhQueryCafe.addDiscount_bill({name:'camera 2', quantity:20, price:200000})
|
|
2277
|
+
.then((discount_bill)=>{
|
|
2278
|
+
console.log('addDiscount_bill', discount_bill);
|
|
2279
|
+
},error=>{
|
|
2280
|
+
console.log('error', error);
|
|
2281
|
+
})
|
|
2282
|
+
* @param colname
|
|
2283
|
+
* @param data
|
|
2284
|
+
* @return Promise => obj = {}
|
|
2285
|
+
* 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
|
|
2286
|
+
*/
|
|
2287
|
+
addDiscount_bill(data: object): Promise<unknown>;
|
|
2288
|
+
/**
|
|
2289
|
+
* @example:
|
|
2290
|
+
* this.vhQueryCafe.updateDiscount_bill('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
2291
|
+
.then((bool)=>{
|
|
2292
|
+
console.log('updateDiscount_bill', bool);
|
|
2293
|
+
})
|
|
2294
|
+
* @param id_discount_bill
|
|
2295
|
+
* @param data
|
|
2296
|
+
* @return Promise => bool = true or false
|
|
2297
|
+
*/
|
|
2298
|
+
updateDiscount_bill(id_discount_bill: string, data: object): Promise<unknown>;
|
|
2299
|
+
/**
|
|
2300
|
+
* @example:
|
|
2301
|
+
* this.vhQueryCafe.deleteDiscount_bill('5fb67fda87c0f21d484cbdf3')
|
|
2302
|
+
.then((bool)=>{
|
|
2303
|
+
console.log('deleteDiscount_bill', bool);
|
|
2304
|
+
})
|
|
2305
|
+
* @param id_discount_bill
|
|
2306
|
+
* @return Promise => bool = true or false
|
|
2307
|
+
*/
|
|
2308
|
+
deleteDiscount_bill(id_discount_bill: string): Promise<unknown>;
|
|
2309
|
+
/**
|
|
2310
|
+
* @example:
|
|
2311
|
+
* this.vhQueryCafe.addDiscount_sales({name:'camera 2', quantity:20, price:200000})
|
|
2312
|
+
.then((discount_saless)=>{
|
|
2313
|
+
console.log('addDiscount_sales', discount_sales);
|
|
2314
|
+
},error=>{
|
|
2315
|
+
console.log('error', error);
|
|
2316
|
+
})
|
|
2317
|
+
* @param colname
|
|
2318
|
+
* @param data
|
|
2319
|
+
* @return Promise => obj = {}
|
|
2320
|
+
* 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
|
|
2321
|
+
*/
|
|
2322
|
+
addDiscount_sales(data: object): Promise<unknown>;
|
|
2323
|
+
/**
|
|
2324
|
+
* @example:
|
|
2325
|
+
* this.vhQueryCafe.updateDiscount_sales('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
2326
|
+
.then((bool)=>{
|
|
2327
|
+
console.log('updateDiscount_sales', bool);
|
|
2328
|
+
})
|
|
2329
|
+
* @param id_discount_sales
|
|
2330
|
+
* @param data
|
|
2331
|
+
* @return Promise => bool = true or false
|
|
2332
|
+
*/
|
|
2333
|
+
updateDiscount_sales(id_discount_sales: string, data: object): Promise<unknown>;
|
|
2334
|
+
/**
|
|
2335
|
+
* @example:
|
|
2336
|
+
* this.vhQueryCafe.deleteDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
2337
|
+
.then((bool)=>{
|
|
2338
|
+
console.log('deleteDiscount_sales', bool);
|
|
2339
|
+
})
|
|
2340
|
+
* @param id_discount_saless
|
|
2341
|
+
* @return Promise => bool = true or false
|
|
2342
|
+
*/
|
|
2343
|
+
deleteDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
2344
|
+
/**
|
|
2345
|
+
* @example
|
|
2346
|
+
* this.vhQueryCafe.getDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
2347
|
+
.then((discount_sales)=>{
|
|
2348
|
+
console.log('getDiscount_sales', discount_sales);
|
|
2349
|
+
})
|
|
2350
|
+
* @param id_discount_sales
|
|
2351
|
+
* @return Promise => obj ={} or null
|
|
2352
|
+
*/
|
|
2353
|
+
getDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
2354
|
+
/**
|
|
2355
|
+
* @example
|
|
2356
|
+
* this.vhQueryCafe.getDiscount_saless()
|
|
2357
|
+
.then((discount_saless)=>{
|
|
2358
|
+
console.log('getDiscount_saless', discount_saless);
|
|
2359
|
+
})
|
|
2360
|
+
* @return Promise => array(object) = [{},{},..]
|
|
2361
|
+
*/
|
|
2362
|
+
getDiscount_saless(): Promise<unknown>;
|
|
2363
|
+
/**
|
|
2364
|
+
* @example:
|
|
2365
|
+
* this.vhQueryCafe.addCommission({name:'camera 2', quantity:20, price:200000})
|
|
2366
|
+
.then((commissions)=>{
|
|
2367
|
+
console.log('addCommission', commissions);
|
|
2368
|
+
},error=>{
|
|
2369
|
+
console.log('error', error);
|
|
2370
|
+
})
|
|
2371
|
+
* @param colname
|
|
2372
|
+
* @param data
|
|
2373
|
+
* @return Promise => obj = {}
|
|
2374
|
+
* 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
|
|
2375
|
+
*/
|
|
2376
|
+
addCommission(data: object): Promise<unknown>;
|
|
2377
|
+
/**
|
|
2378
|
+
* @example:
|
|
2379
|
+
* this.vhQueryCafe.updateCommission('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
2380
|
+
.then((bool)=>{
|
|
2381
|
+
console.log('updateCommission', bool);
|
|
2382
|
+
})
|
|
2383
|
+
* @param id_commission
|
|
2384
|
+
* @param data
|
|
2385
|
+
* @return Promise => bool = true or false
|
|
2386
|
+
*/
|
|
2387
|
+
updateCommission(id_commission: string, data: object): Promise<unknown>;
|
|
2388
|
+
/**
|
|
2389
|
+
* @example:
|
|
2390
|
+
* this.vhQueryCafe.deleteCommission('5fb67fda87c0f21d484cbdf3')
|
|
2391
|
+
.then((bool)=>{
|
|
2392
|
+
console.log('deleteCommission', bool);
|
|
2393
|
+
})
|
|
2394
|
+
* @param id_commission
|
|
2395
|
+
* @return Promise => bool = true or false
|
|
2396
|
+
*/
|
|
2397
|
+
deleteCommission(id_commission: string): Promise<unknown>;
|
|
2398
|
+
/**
|
|
2399
|
+
* @example
|
|
2400
|
+
* this.vhQueryCafe.getCommission('5fb67fda87c0f21d484cbdf3')
|
|
2401
|
+
.then((commission)=>{
|
|
2402
|
+
console.log('getCommission', commission);
|
|
2403
|
+
})
|
|
2404
|
+
* @param id_commission
|
|
2405
|
+
* @return Promise => obj ={} or null
|
|
2406
|
+
*/
|
|
2407
|
+
getCommission(id_commission: string): Promise<unknown>;
|
|
2408
|
+
/**
|
|
2409
|
+
* @example
|
|
2410
|
+
* this.vhQueryCafe.getCommissions()
|
|
2411
|
+
.then((commissions)=>{
|
|
2412
|
+
console.log('getCommissions', commissions);
|
|
2413
|
+
})
|
|
2414
|
+
* @return Promise => array(object) = [{},{},..]
|
|
2415
|
+
*/
|
|
2416
|
+
getCommissions(): Promise<unknown>;
|
|
2243
2417
|
/**
|
|
2244
2418
|
* @example:
|
|
2245
2419
|
* let delivery = this.vhQueryCafe.getlocalDelivery('5fb6780ca2148e09806c5b01');
|
|
@@ -3414,6 +3588,57 @@ export declare class VhQueryCafe {
|
|
|
3414
3588
|
* @return Promise Boolean => bool = true or false
|
|
3415
3589
|
*/
|
|
3416
3590
|
deleteAppSettingNameBranch(appsetting_name: any): Promise<unknown>;
|
|
3591
|
+
/**
|
|
3592
|
+
* @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
|
|
3593
|
+
* @example :
|
|
3594
|
+
* let discount = this.vhQueryCafe.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
|
|
3595
|
+
* @param total_price : Tổng giá
|
|
3596
|
+
* @param id_customer
|
|
3597
|
+
* @returns Object or null => obj = {discount}, discount là số tiền đc chiết khấu,
|
|
3598
|
+
* trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
|
|
3599
|
+
*/
|
|
3600
|
+
getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
|
|
3601
|
+
/**
|
|
3602
|
+
* @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
|
|
3603
|
+
* @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
|
|
3604
|
+
* type : 1 chiết khấu %, 2 chiết khấu tiền
|
|
3605
|
+
* 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
|
|
3606
|
+
* usage: 1 chiết khấu trên hóa đơn, 2 chiết khấu trên doanh số
|
|
3607
|
+
* @example :
|
|
3608
|
+
* let endtime = new Date();
|
|
3609
|
+
let starttime = new Date('2020-07-01T05:24:00');
|
|
3610
|
+
this.vhQueryCafe.getReportDiscount_sales_Customers(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
|
|
3611
|
+
.then((discounts)=>{
|
|
3612
|
+
console.log('discounts', discounts);
|
|
3613
|
+
console.log('discounts.docs[0]', discounts.docs[0]);
|
|
3614
|
+
})
|
|
3615
|
+
* @param starttime
|
|
3616
|
+
* @param endtime
|
|
3617
|
+
* @param IDcustomer : 'all' or id_customer
|
|
3618
|
+
* @param IDbranch : 'all' or id_branch
|
|
3619
|
+
* @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, discount_name,sales_btax, discount_btax, sales_atax, discount_atax}
|
|
3620
|
+
*/
|
|
3621
|
+
getReportDiscount_sales_Customers(starttime: any, endtime: any, IDcustomer: any, IDbranch?: string): Promise<any>;
|
|
3622
|
+
/**
|
|
3623
|
+
* @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
|
|
3624
|
+
* @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
|
|
3625
|
+
* type : 1 chiết khấu %, 2 chiết khấu tiền
|
|
3626
|
+
* 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
|
|
3627
|
+
* @example :
|
|
3628
|
+
* let endtime = new Date();
|
|
3629
|
+
let starttime = new Date('2020-07-01T05:24:00');
|
|
3630
|
+
this.vhQueryCafe.getReportCommission_Employees(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
|
|
3631
|
+
.then((commissions)=>{
|
|
3632
|
+
console.log('commissions', commissions);
|
|
3633
|
+
console.log('commissions.docs[0]', commissions.docs[0]);
|
|
3634
|
+
})
|
|
3635
|
+
* @param starttime
|
|
3636
|
+
* @param endtime
|
|
3637
|
+
* @param IDemployee : 'all' or id_employee
|
|
3638
|
+
* @param IDbranch : 'all' or id_branch
|
|
3639
|
+
* @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, commission_name, sales_btax, commission_btax, sales_atax, commission_atax}
|
|
3640
|
+
*/
|
|
3641
|
+
getReportCommission_Employees(starttime: any, endtime: any, IDemployee: any, IDbranch?: string): Promise<any>;
|
|
3417
3642
|
/**
|
|
3418
3643
|
* VhQueryCafe:
|
|
3419
3644
|
* cashbook_first: tiền mặt đầu kỳ (starttime),
|
|
@@ -10555,6 +10780,7 @@ export declare class VhQuerySales {
|
|
|
10555
10780
|
* @Notice id_product = 'all' or id_product;
|
|
10556
10781
|
* @Notice bill_type = [1,10,15,30,2,3,9,31]
|
|
10557
10782
|
*/
|
|
10783
|
+
private getReportInputOutputInventory_byEndTime_byIDProduct_allRecords;
|
|
10558
10784
|
getReportInputOutputInventory_byEndTime_byIDProduct(endtime: any, IDproduct: any, IDbranch?: string): Promise<any>;
|
|
10559
10785
|
/**
|
|
10560
10786
|
* Hàm này dùng trong page Tồn kho, giá trị tồn kho, doanh số, chi phí nhập hàng tại một thời điểm endtime nào đó -> chi tiết của một sản phẩm nào đó
|
|
@@ -10638,6 +10864,21 @@ export declare class VhQuerySales {
|
|
|
10638
10864
|
*/
|
|
10639
10865
|
private syncInventoryEveryDay_Stock1stDayOfMonth;
|
|
10640
10866
|
private syncInventoryEveryDay1;
|
|
10867
|
+
/**
|
|
10868
|
+
* Hàm này dùng trong page XUẤT-NHẬP-TỒN -> Xuất nhập tồn
|
|
10869
|
+
* @example:
|
|
10870
|
+
* this.vhQuerySales.getReportInputOutputInventory_byTime_byIDProduct(starttime , endtime, 'all', 'tj1iYodbVoShwtEetACx')
|
|
10871
|
+
.then((json)=>{
|
|
10872
|
+
console.log('json', json);
|
|
10873
|
+
})
|
|
10874
|
+
* @param starttime
|
|
10875
|
+
* @param endtime
|
|
10876
|
+
* @param IDproduct: 'all' or id_product;
|
|
10877
|
+
* @param IDbranch: 'all' or id_branch;
|
|
10878
|
+
* @return Promise Array *
|
|
10879
|
+
* @Notice bill_type = [1,10,15,30,2,3,9,31]
|
|
10880
|
+
*/
|
|
10881
|
+
makeCorrectQuantityProducts_60days(): Promise<any>;
|
|
10641
10882
|
/**
|
|
10642
10883
|
* @example:
|
|
10643
10884
|
* this.vhQuerySales.makeCorrectQuantityProducts()
|