asv-hlps 1.4.10 → 1.4.12
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/lib/cjs/auth/models/AuthTag.d.ts +2 -0
- package/lib/cjs/auth/models/AuthTagGrp.d.ts +3 -0
- package/lib/cjs/auth/models/AuthTagGrp.js +2 -0
- package/lib/cjs/auth/models/AuthTagSub.d.ts +3 -0
- package/lib/cjs/auth/models/AuthTagSub.js +2 -0
- package/lib/cjs/auth/models/index.d.ts +2 -0
- package/lib/cjs/auth/storageService.js +0 -23
- package/lib/cjs/buys/models/Buy.d.ts +9 -9
- package/lib/cjs/cashs/models/PaymentMode.d.ts +5 -0
- package/lib/cjs/cashs/models/PaymentMode.js +2 -0
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -1
- package/lib/cjs/markets/index.d.ts +5 -0
- package/lib/cjs/markets/index.js +21 -0
- package/lib/cjs/markets/models/Market.d.ts +8 -0
- package/lib/cjs/markets/models/Market.js +2 -0
- package/lib/cjs/markets/models/UMarket.d.ts +11 -0
- package/lib/cjs/markets/models/UMarket.js +2 -0
- package/lib/cjs/markets/models/index.d.ts +2 -0
- package/lib/cjs/markets/models/index.js +2 -0
- package/lib/cjs/markets/products/hlpProduct.d.ts +13 -0
- package/lib/cjs/markets/products/hlpProduct.js +49 -0
- package/lib/cjs/markets/products/index.d.ts +2 -0
- package/lib/cjs/markets/products/index.js +23 -0
- package/lib/cjs/markets/products/models/Product.d.ts +39 -0
- package/lib/cjs/markets/products/models/Product.js +2 -0
- package/lib/cjs/markets/products/models/ProductAsset.d.ts +8 -0
- package/lib/cjs/markets/products/models/ProductAsset.js +2 -0
- package/lib/cjs/markets/products/models/ProductCat.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductCat.js +2 -0
- package/lib/cjs/markets/products/models/ProductCollection.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductCollection.js +2 -0
- package/lib/cjs/markets/products/models/ProductDepot.d.ts +11 -0
- package/lib/cjs/markets/products/models/ProductDepot.js +2 -0
- package/lib/cjs/markets/products/models/ProductElt.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductElt.js +2 -0
- package/lib/cjs/markets/products/models/ProductGrp.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductGrp.js +2 -0
- package/lib/cjs/markets/products/models/ProductImage.d.ts +5 -0
- package/lib/cjs/markets/products/models/ProductImage.js +2 -0
- package/lib/cjs/markets/products/models/ProductIn.d.ts +42 -0
- package/lib/cjs/markets/products/models/ProductIn.js +2 -0
- package/lib/cjs/markets/products/models/ProductState.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductState.js +2 -0
- package/lib/cjs/markets/products/models/ProductStock.d.ts +6 -0
- package/lib/cjs/markets/products/models/ProductStock.js +2 -0
- package/lib/cjs/markets/products/models/ProductTag.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductTag.js +2 -0
- package/lib/cjs/markets/products/models/ProductVariant.d.ts +6 -0
- package/lib/cjs/markets/products/models/ProductVariant.js +2 -0
- package/lib/cjs/markets/products/models/index.d.ts +13 -0
- package/lib/cjs/markets/products/models/index.js +29 -0
- package/lib/cjs/markets/sales/index.d.ts +1 -0
- package/lib/cjs/markets/sales/index.js +17 -0
- package/lib/cjs/markets/sales/models/Sale.d.ts +8 -0
- package/lib/cjs/markets/sales/models/Sale.js +2 -0
- package/lib/cjs/markets/sales/models/SalePayment.d.ts +23 -0
- package/lib/cjs/markets/sales/models/SalePayment.js +2 -0
- package/lib/cjs/markets/sales/models/SaleProduct.d.ts +8 -0
- package/lib/cjs/markets/sales/models/SaleProduct.js +2 -0
- package/lib/cjs/markets/sales/models/index.d.ts +3 -0
- package/lib/cjs/markets/sales/models/index.js +19 -0
- package/lib/cjs/markets/shops/index.d.ts +1 -0
- package/lib/cjs/markets/shops/index.js +17 -0
- package/lib/cjs/markets/shops/models/Shop.d.ts +13 -0
- package/lib/cjs/markets/shops/models/Shop.js +2 -0
- package/lib/cjs/markets/shops/models/index.d.ts +1 -0
- package/lib/cjs/markets/shops/models/index.js +2 -0
- package/lib/cjs/markets/users/index.d.ts +1 -0
- package/lib/cjs/markets/users/index.js +17 -0
- package/lib/cjs/markets/users/models/User.d.ts +7 -0
- package/lib/cjs/markets/users/models/User.js +2 -0
- package/lib/cjs/markets/users/models/index.d.ts +1 -0
- package/lib/cjs/markets/users/models/index.js +2 -0
- package/lib/cjs/services/index.d.ts +1 -0
- package/lib/cjs/services/index.js +17 -0
- package/lib/cjs/services/storage.d.ts +3 -0
- package/lib/cjs/services/storage.js +22 -0
- package/lib/cjs/shared/models/IIcon.d.ts +4 -0
- package/lib/cjs/shared/models/IIcon.js +2 -0
- package/lib/cjs/shared/models/NaAcIc.d.ts +7 -0
- package/lib/cjs/shared/models/NaAcIc.js +2 -0
- package/lib/cjs/shared/models/NaCoAcIc.d.ts +4 -0
- package/lib/cjs/shared/models/NaCoAcIc.js +2 -0
- package/lib/cjs/shared/models/TVariant.d.ts +2 -0
- package/lib/cjs/shared/models/TVariant.js +2 -0
- package/lib/cjs/shared/models/index.d.ts +4 -3
- package/lib/esm/auth/models/AuthTag.d.ts +2 -0
- package/lib/esm/auth/models/AuthTagGrp.d.ts +3 -0
- package/lib/esm/auth/models/AuthTagGrp.js +1 -0
- package/lib/esm/auth/models/AuthTagSub.d.ts +3 -0
- package/lib/esm/auth/models/AuthTagSub.js +1 -0
- package/lib/esm/auth/models/index.d.ts +2 -0
- package/lib/esm/auth/storageService.js +0 -23
- package/lib/esm/buys/models/Buy.d.ts +9 -9
- package/lib/esm/cashs/models/PaymentMode.d.ts +5 -0
- package/lib/esm/cashs/models/PaymentMode.js +1 -0
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -1
- package/lib/esm/markets/index.d.ts +5 -0
- package/lib/esm/markets/index.js +5 -0
- package/lib/esm/markets/models/Market.d.ts +8 -0
- package/lib/esm/markets/models/Market.js +1 -0
- package/lib/esm/markets/models/UMarket.d.ts +11 -0
- package/lib/esm/markets/models/UMarket.js +1 -0
- package/lib/esm/markets/models/index.d.ts +2 -0
- package/lib/esm/markets/models/index.js +1 -0
- package/lib/esm/markets/products/hlpProduct.d.ts +13 -0
- package/lib/esm/markets/products/hlpProduct.js +47 -0
- package/lib/esm/markets/products/index.d.ts +2 -0
- package/lib/esm/markets/products/index.js +2 -0
- package/lib/esm/markets/products/models/Product.d.ts +39 -0
- package/lib/esm/markets/products/models/Product.js +1 -0
- package/lib/esm/markets/products/models/ProductAsset.d.ts +8 -0
- package/lib/esm/markets/products/models/ProductAsset.js +1 -0
- package/lib/esm/markets/products/models/ProductCat.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductCat.js +1 -0
- package/lib/esm/markets/products/models/ProductCollection.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductCollection.js +1 -0
- package/lib/esm/markets/products/models/ProductDepot.d.ts +11 -0
- package/lib/esm/markets/products/models/ProductDepot.js +1 -0
- package/lib/esm/markets/products/models/ProductElt.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductElt.js +1 -0
- package/lib/esm/markets/products/models/ProductGrp.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductGrp.js +1 -0
- package/lib/esm/markets/products/models/ProductImage.d.ts +5 -0
- package/lib/esm/markets/products/models/ProductImage.js +1 -0
- package/lib/esm/markets/products/models/ProductIn.d.ts +42 -0
- package/lib/esm/markets/products/models/ProductIn.js +1 -0
- package/lib/esm/markets/products/models/ProductState.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductState.js +1 -0
- package/lib/esm/markets/products/models/ProductStock.d.ts +6 -0
- package/lib/esm/markets/products/models/ProductStock.js +1 -0
- package/lib/esm/markets/products/models/ProductTag.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductTag.js +1 -0
- package/lib/esm/markets/products/models/ProductVariant.d.ts +6 -0
- package/lib/esm/markets/products/models/ProductVariant.js +1 -0
- package/lib/esm/markets/products/models/index.d.ts +13 -0
- package/lib/esm/markets/products/models/index.js +13 -0
- package/lib/esm/markets/sales/index.d.ts +1 -0
- package/lib/esm/markets/sales/index.js +1 -0
- package/lib/esm/markets/sales/models/Sale.d.ts +8 -0
- package/lib/esm/markets/sales/models/Sale.js +1 -0
- package/lib/esm/markets/sales/models/SalePayment.d.ts +23 -0
- package/lib/esm/markets/sales/models/SalePayment.js +1 -0
- package/lib/esm/markets/sales/models/SaleProduct.d.ts +8 -0
- package/lib/esm/markets/sales/models/SaleProduct.js +1 -0
- package/lib/esm/markets/sales/models/index.d.ts +3 -0
- package/lib/esm/markets/sales/models/index.js +3 -0
- package/lib/esm/markets/shops/index.d.ts +1 -0
- package/lib/esm/markets/shops/index.js +1 -0
- package/lib/esm/markets/shops/models/Shop.d.ts +13 -0
- package/lib/esm/markets/shops/models/Shop.js +1 -0
- package/lib/esm/markets/shops/models/index.d.ts +1 -0
- package/lib/esm/markets/shops/models/index.js +1 -0
- package/lib/esm/markets/users/index.d.ts +1 -0
- package/lib/esm/markets/users/index.js +1 -0
- package/lib/esm/markets/users/models/User.d.ts +7 -0
- package/lib/esm/markets/users/models/User.js +1 -0
- package/lib/esm/markets/users/models/index.d.ts +1 -0
- package/lib/esm/markets/users/models/index.js +1 -0
- package/lib/esm/services/index.d.ts +1 -0
- package/lib/esm/services/index.js +1 -0
- package/lib/esm/services/storage.d.ts +3 -0
- package/lib/esm/services/storage.js +16 -0
- package/lib/esm/shared/models/IIcon.d.ts +4 -0
- package/lib/esm/shared/models/IIcon.js +1 -0
- package/lib/esm/shared/models/NaAcIc.d.ts +7 -0
- package/lib/esm/shared/models/NaAcIc.js +1 -0
- package/lib/esm/shared/models/NaCoAcIc.d.ts +4 -0
- package/lib/esm/shared/models/NaCoAcIc.js +1 -0
- package/lib/esm/shared/models/TVariant.d.ts +2 -0
- package/lib/esm/shared/models/TVariant.js +1 -0
- package/lib/esm/shared/models/index.d.ts +4 -3
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Sale"), exports);
|
|
18
|
+
__exportStar(require("./SalePayment"), exports);
|
|
19
|
+
__exportStar(require("./SaleProduct"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./models"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import UMarket from "../../models/UMarket";
|
|
2
|
+
import Product from "../../products/models/Product";
|
|
3
|
+
export default interface Shop {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
logo: string;
|
|
9
|
+
banner: string;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
products: Product[];
|
|
12
|
+
umarket: UMarket;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Shop } from "./Shop";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./models"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as User } from "./User";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./storage";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./storage"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeStorage = exports.setStorage = exports.getStorage = void 0;
|
|
4
|
+
const getStorage = (key, local = false) => {
|
|
5
|
+
if (!key) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
return !local ? sessionStorage.getItem(key) : localStorage.getItem(key);
|
|
9
|
+
};
|
|
10
|
+
exports.getStorage = getStorage;
|
|
11
|
+
const setStorage = (key, value, local = false) => {
|
|
12
|
+
/* if (!key) {
|
|
13
|
+
return null;
|
|
14
|
+
} */
|
|
15
|
+
!local ? sessionStorage.setItem(key, value) : localStorage.setItem(key, value);
|
|
16
|
+
};
|
|
17
|
+
exports.setStorage = setStorage;
|
|
18
|
+
const removeStorage = (key) => {
|
|
19
|
+
localStorage.removeItem(key);
|
|
20
|
+
sessionStorage.removeItem(key);
|
|
21
|
+
};
|
|
22
|
+
exports.removeStorage = removeStorage;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { IParam } from "./IParam";
|
|
2
|
+
export { default as Color } from "./Color";
|
|
2
3
|
export { default as EInOutMotive } from "./EInOutMotive";
|
|
3
4
|
export { default as IPath } from "./IPath";
|
|
5
|
+
export { default as Matter } from "./Matter";
|
|
6
|
+
export { default as Measure } from "./Measure";
|
|
4
7
|
export { default as NaAc } from "./NaAc";
|
|
5
8
|
export { default as NaCoAc } from "./NaCoAc";
|
|
6
9
|
export { default as NaCoShortAc } from "./NaCoShortAc";
|
|
7
10
|
export { default as OpDate } from "./OpDate";
|
|
8
|
-
export { default as Matter } from "./Matter";
|
|
9
|
-
export { default as Measure } from "./Measure";
|
|
10
11
|
export { default as Size } from "./Size";
|
|
11
|
-
export { default as
|
|
12
|
+
export { default as TVariant } from "./TVariant";
|
|
12
13
|
export { IParam };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -37,26 +37,3 @@ class StorageService {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
export default new StorageService();
|
|
40
|
-
/* class StorageService {
|
|
41
|
-
getStorage = (key: string, local = false) => {
|
|
42
|
-
if (!key) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
return !local ? sessionStorage.getItem(key) : localStorage.getItem(key);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
setStorage = (key: string, value: string, local = false): any => {
|
|
49
|
-
if (!key) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
!local ? sessionStorage.setItem(key, value) : localStorage.setItem(key, value);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
removeStorage = (key: string) => {
|
|
56
|
-
localStorage.removeItem(key);
|
|
57
|
-
sessionStorage.removeItem(key);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export default new StorageService();
|
|
62
|
-
*/
|
|
@@ -2,18 +2,18 @@ import User from "../../users/models/User";
|
|
|
2
2
|
import BuyItem from "./BuyItem";
|
|
3
3
|
export default interface Buy {
|
|
4
4
|
id: number;
|
|
5
|
-
|
|
6
|
-
createdAt: any;
|
|
5
|
+
author?: User;
|
|
7
6
|
buyDate: any;
|
|
8
|
-
totalAmount?: number;
|
|
9
|
-
totalAmountTva?: number;
|
|
10
|
-
totalQtity?: number;
|
|
11
|
-
nbProducts?: number;
|
|
12
|
-
isValided: boolean;
|
|
13
|
-
isReceipt: boolean;
|
|
14
7
|
buyProducts?: BuyItem[];
|
|
15
8
|
comment: string;
|
|
9
|
+
createdAt: any;
|
|
10
|
+
isReceipt: boolean;
|
|
11
|
+
isValided: boolean;
|
|
12
|
+
nbProducts?: number;
|
|
16
13
|
pvd?: User;
|
|
17
|
-
|
|
14
|
+
ref: string;
|
|
15
|
+
totalAmount?: number;
|
|
16
|
+
totalAmountTva?: number;
|
|
17
|
+
totalQtity?: number;
|
|
18
18
|
get getQtity(): void;
|
|
19
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/index.d.ts
CHANGED
package/lib/esm/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Product from "./models/Product";
|
|
2
|
+
import { ProductStock } from "./models/ProductStock";
|
|
3
|
+
declare class HlpProduct {
|
|
4
|
+
stock: (product: Product, param: "salable" | "packs" | "units") => number;
|
|
5
|
+
extraFiilters: (row: Product) => string;
|
|
6
|
+
qtityInAllDepots(stock: ProductStock, prms?: {
|
|
7
|
+
exceptDepots?: string[];
|
|
8
|
+
main?: "master" | "slave";
|
|
9
|
+
}): number;
|
|
10
|
+
getStockSalable(product: Product): number;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: HlpProduct;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
class HlpProduct {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.stock = (product, param) => {
|
|
4
|
+
const salable = (+product.stock.sumIns || 0) - (+product.stock.sumOuts || 0);
|
|
5
|
+
const packs = Math.trunc(salable / product.stock.qtityPerPackaging || 0);
|
|
6
|
+
const units = salable % product.stock.qtityPerPackaging || 0;
|
|
7
|
+
switch (param) {
|
|
8
|
+
case "salable":
|
|
9
|
+
return salable;
|
|
10
|
+
case "packs":
|
|
11
|
+
return packs;
|
|
12
|
+
case "units":
|
|
13
|
+
return units;
|
|
14
|
+
default:
|
|
15
|
+
return salable;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
this.extraFiilters = (row) => row.designation; /* +
|
|
19
|
+
row.codeCompta +
|
|
20
|
+
(row.tva > 0 ? "@tva" : "") +
|
|
21
|
+
(row.isAvailable ? "@dispo" : "") +
|
|
22
|
+
(!row.isAvailable ? "@indispo" : "") +
|
|
23
|
+
(row.isActive ? "@actif" : "") +
|
|
24
|
+
(!row.isActive ? "@inactif" : "") +
|
|
25
|
+
(row.isPrivate ? "@private" : "") +
|
|
26
|
+
(!row.isPrivate ? "@noprivate" : ""); */
|
|
27
|
+
}
|
|
28
|
+
qtityInAllDepots(stock, prms) {
|
|
29
|
+
const ins = stock.sumIns - stock.sumOuts;
|
|
30
|
+
return ins <= 0 ? 0 : ins;
|
|
31
|
+
}
|
|
32
|
+
getStockSalable(product) {
|
|
33
|
+
const stockAllSalable = this.qtityInAllDepots(product.stock);
|
|
34
|
+
const stockProduct = Math.trunc(stockAllSalable / product.qtityUnit);
|
|
35
|
+
/* let stockSalable: number = 0;
|
|
36
|
+
|
|
37
|
+
if (stockAllSalable <= stockStore) {
|
|
38
|
+
stockSalable = stockAllSalable;
|
|
39
|
+
}
|
|
40
|
+
if (stockAllSalable > stockStore) {
|
|
41
|
+
stockSalable = stockStore;
|
|
42
|
+
} */
|
|
43
|
+
// return stockSalable || 0;
|
|
44
|
+
return stockProduct || 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export default new HlpProduct();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Market from "../../models/Market";
|
|
2
|
+
import Shop from "../../shops/models/Shop";
|
|
3
|
+
import ProductCat from "./ProductCat";
|
|
4
|
+
import ProductImage from "./ProductImage";
|
|
5
|
+
import ProductIn from "./ProductIn";
|
|
6
|
+
interface Stock {
|
|
7
|
+
sumIns: number;
|
|
8
|
+
sumOuts: number;
|
|
9
|
+
qtityPerPackaging: number;
|
|
10
|
+
}
|
|
11
|
+
export default interface Product {
|
|
12
|
+
capacity: string;
|
|
13
|
+
cat: ProductCat;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
description: string;
|
|
16
|
+
designation: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
iconName: string;
|
|
19
|
+
iconPack: string;
|
|
20
|
+
id: number;
|
|
21
|
+
images: ProductImage[];
|
|
22
|
+
ins: ProductIn[];
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
isAvailable?: boolean;
|
|
25
|
+
isBulk: boolean;
|
|
26
|
+
market: Market;
|
|
27
|
+
price: number;
|
|
28
|
+
publicPrice: number;
|
|
29
|
+
qtityLimit: number;
|
|
30
|
+
qtityUnit: number;
|
|
31
|
+
stock: Stock;
|
|
32
|
+
qtityPerBox: number;
|
|
33
|
+
qtityPerPackaging: number;
|
|
34
|
+
ref: string;
|
|
35
|
+
salePrice: number;
|
|
36
|
+
shop: Shop;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import EInOutMotive from "../../../shared/models/EInOutMotive";
|
|
2
|
+
import Product from "./Product";
|
|
3
|
+
import ProductDepot from "./ProductDepot";
|
|
4
|
+
export default interface ProductIn {
|
|
5
|
+
id: number;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
lot: string;
|
|
8
|
+
qtity: number;
|
|
9
|
+
comment: string;
|
|
10
|
+
isEdit: boolean;
|
|
11
|
+
motive: EInOutMotive;
|
|
12
|
+
authorId: number;
|
|
13
|
+
qtityPerPackaging: number;
|
|
14
|
+
/**
|
|
15
|
+
* remaining qtity
|
|
16
|
+
*/
|
|
17
|
+
qtityIn: number;
|
|
18
|
+
isOutDate: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* expired
|
|
21
|
+
*/
|
|
22
|
+
isOut: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* if true the productIn is created from transfering qtity from another productin
|
|
25
|
+
*/
|
|
26
|
+
fromTransfert: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* indique the qtity waiting to transfert after transfert validation
|
|
29
|
+
*/
|
|
30
|
+
qtityInTransfert: number;
|
|
31
|
+
/**
|
|
32
|
+
* is true if the transfert not validate
|
|
33
|
+
*/
|
|
34
|
+
inTransfert: boolean;
|
|
35
|
+
depotId: number;
|
|
36
|
+
productId: number;
|
|
37
|
+
designation: string;
|
|
38
|
+
salePrice: number;
|
|
39
|
+
publicPrice: number;
|
|
40
|
+
product: Product;
|
|
41
|
+
depot: ProductDepot;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|