asv-hlps 1.4.70 → 1.4.71
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Product from "../../products/models/Product";
|
|
2
2
|
declare class StockPipe {
|
|
3
|
-
transform(tob: Product, param: "valueInDepots" | "store" | "salable" | "reserve" | "all"): number;
|
|
3
|
+
transform(tob: Product, param: "valueInDepots" | "store" | "salable" | "reserve" | "all", stores?: string[]): number;
|
|
4
4
|
}
|
|
5
5
|
declare const _default: StockPipe;
|
|
6
6
|
export default _default;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const hlpProduct_1 = __importDefault(require("../../products/hlpProduct"));
|
|
7
7
|
class StockPipe {
|
|
8
|
-
transform(tob, param) {
|
|
8
|
+
transform(tob, param, stores = ["cpaa"]) {
|
|
9
9
|
// const storeName = (environment.host === 'cpa') ? 'eqeer' : 'cpa'
|
|
10
10
|
switch (param) {
|
|
11
11
|
case "valueInDepots":
|
|
@@ -15,7 +15,7 @@ class StockPipe {
|
|
|
15
15
|
case "salable":
|
|
16
16
|
return hlpProduct_1.default.getStockSalable(tob);
|
|
17
17
|
case "reserve":
|
|
18
|
-
return hlpProduct_1.default.qtityInAllDepotsExeptStore(tob === null || tob === void 0 ? void 0 : tob.ins,
|
|
18
|
+
return hlpProduct_1.default.qtityInAllDepotsExeptStore(tob === null || tob === void 0 ? void 0 : tob.ins, stores) || 0;
|
|
19
19
|
case "all":
|
|
20
20
|
return hlpProduct_1.default.qtityInAllDepots(tob === null || tob === void 0 ? void 0 : tob.ins) || 0;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Product from "../../products/models/Product";
|
|
2
2
|
declare class StockPipe {
|
|
3
|
-
transform(tob: Product, param: "valueInDepots" | "store" | "salable" | "reserve" | "all"): number;
|
|
3
|
+
transform(tob: Product, param: "valueInDepots" | "store" | "salable" | "reserve" | "all", stores?: string[]): number;
|
|
4
4
|
}
|
|
5
5
|
declare const _default: StockPipe;
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import HlpProduct from "../../products/hlpProduct";
|
|
2
2
|
class StockPipe {
|
|
3
|
-
transform(tob, param) {
|
|
3
|
+
transform(tob, param, stores = ["cpaa"]) {
|
|
4
4
|
// const storeName = (environment.host === 'cpa') ? 'eqeer' : 'cpa'
|
|
5
5
|
switch (param) {
|
|
6
6
|
case "valueInDepots":
|
|
@@ -10,7 +10,7 @@ class StockPipe {
|
|
|
10
10
|
case "salable":
|
|
11
11
|
return HlpProduct.getStockSalable(tob);
|
|
12
12
|
case "reserve":
|
|
13
|
-
return HlpProduct.qtityInAllDepotsExeptStore(tob === null || tob === void 0 ? void 0 : tob.ins,
|
|
13
|
+
return HlpProduct.qtityInAllDepotsExeptStore(tob === null || tob === void 0 ? void 0 : tob.ins, stores) || 0;
|
|
14
14
|
case "all":
|
|
15
15
|
return HlpProduct.qtityInAllDepots(tob === null || tob === void 0 ? void 0 : tob.ins) || 0;
|
|
16
16
|
}
|