asv-hlps 1.4.8 → 1.4.10
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/auth.d.ts +1 -1
- package/lib/cjs/auth/auth.js +12 -18
- package/lib/cjs/auth/authService.js +0 -13
- package/lib/cjs/auth/models/AuthTag.d.ts +0 -2
- package/lib/cjs/auth/models/index.d.ts +0 -1
- package/lib/cjs/users/models/User.d.ts +1 -1
- package/lib/cjs/users/models/UserAbs.d.ts +1 -1
- package/lib/cjs/users/models/UserBase.d.ts +14 -14
- package/lib/cjs/utils.d.ts +0 -1
- package/lib/cjs/utils.js +0 -5
- package/lib/esm/auth/auth.d.ts +1 -1
- package/lib/esm/auth/auth.js +12 -18
- package/lib/esm/auth/authService.js +0 -13
- package/lib/esm/auth/models/AuthTag.d.ts +0 -2
- package/lib/esm/auth/models/index.d.ts +0 -1
- package/lib/esm/users/models/User.d.ts +1 -1
- package/lib/esm/users/models/UserAbs.d.ts +1 -1
- package/lib/esm/users/models/UserBase.d.ts +14 -14
- package/lib/esm/utils.d.ts +0 -1
- package/lib/esm/utils.js +0 -4
- package/package.json +4 -3
- package/lib/cjs/auth/models/AuthTagGrp.d.ts +0 -3
- package/lib/cjs/auth/models/AuthTagGrp.js +0 -2
- package/lib/cjs/auth/models/AuthTagSub.d.ts +0 -3
- package/lib/cjs/auth/models/AuthTagSub.js +0 -2
- package/lib/cjs/bootstrap.d.ts +0 -1
- package/lib/cjs/bootstrap.js +0 -2
- package/lib/cjs/cashs/models/PaymentMode.d.ts +0 -5
- package/lib/cjs/cashs/models/PaymentMode.js +0 -2
- package/lib/cjs/markets/index.d.ts +0 -2
- package/lib/cjs/markets/index.js +0 -18
- package/lib/cjs/markets/models/Market.d.ts +0 -8
- package/lib/cjs/markets/models/Market.js +0 -2
- package/lib/cjs/markets/models/UMarket.d.ts +0 -11
- package/lib/cjs/markets/models/UMarket.js +0 -2
- package/lib/cjs/markets/models/index.d.ts +0 -2
- package/lib/cjs/markets/models/index.js +0 -18
- package/lib/cjs/markets/products/hlpProduct.d.ts +0 -13
- package/lib/cjs/markets/products/hlpProduct.js +0 -49
- package/lib/cjs/markets/products/index.d.ts +0 -2
- package/lib/cjs/markets/products/index.js +0 -23
- package/lib/cjs/markets/products/models/Product.d.ts +0 -39
- package/lib/cjs/markets/products/models/Product.js +0 -2
- package/lib/cjs/markets/products/models/ProductAsset.d.ts +0 -8
- package/lib/cjs/markets/products/models/ProductAsset.js +0 -2
- package/lib/cjs/markets/products/models/ProductCat.d.ts +0 -3
- package/lib/cjs/markets/products/models/ProductCat.js +0 -2
- package/lib/cjs/markets/products/models/ProductCollection.d.ts +0 -3
- package/lib/cjs/markets/products/models/ProductCollection.js +0 -2
- package/lib/cjs/markets/products/models/ProductDepot.d.ts +0 -11
- package/lib/cjs/markets/products/models/ProductDepot.js +0 -2
- package/lib/cjs/markets/products/models/ProductElt.d.ts +0 -3
- package/lib/cjs/markets/products/models/ProductElt.js +0 -2
- package/lib/cjs/markets/products/models/ProductGrp.d.ts +0 -3
- package/lib/cjs/markets/products/models/ProductGrp.js +0 -2
- package/lib/cjs/markets/products/models/ProductImage.d.ts +0 -5
- package/lib/cjs/markets/products/models/ProductImage.js +0 -2
- package/lib/cjs/markets/products/models/ProductIn.d.ts +0 -42
- package/lib/cjs/markets/products/models/ProductIn.js +0 -2
- package/lib/cjs/markets/products/models/ProductState.d.ts +0 -3
- package/lib/cjs/markets/products/models/ProductState.js +0 -2
- package/lib/cjs/markets/products/models/ProductStock.d.ts +0 -6
- package/lib/cjs/markets/products/models/ProductStock.js +0 -2
- package/lib/cjs/markets/products/models/ProductTag.d.ts +0 -3
- package/lib/cjs/markets/products/models/ProductTag.js +0 -2
- package/lib/cjs/markets/products/models/ProductVariant.d.ts +0 -6
- package/lib/cjs/markets/products/models/ProductVariant.js +0 -2
- package/lib/cjs/markets/products/models/index.d.ts +0 -13
- package/lib/cjs/markets/products/models/index.js +0 -29
- package/lib/cjs/markets/sales/index.d.ts +0 -1
- package/lib/cjs/markets/sales/index.js +0 -17
- package/lib/cjs/markets/sales/models/Sale.d.ts +0 -8
- package/lib/cjs/markets/sales/models/Sale.js +0 -2
- package/lib/cjs/markets/sales/models/SalePayment.d.ts +0 -23
- package/lib/cjs/markets/sales/models/SalePayment.js +0 -2
- package/lib/cjs/markets/sales/models/SaleProduct.d.ts +0 -8
- package/lib/cjs/markets/sales/models/SaleProduct.js +0 -2
- package/lib/cjs/markets/sales/models/index.d.ts +0 -3
- package/lib/cjs/markets/sales/models/index.js +0 -19
- package/lib/cjs/markets/shops/index.d.ts +0 -1
- package/lib/cjs/markets/shops/index.js +0 -17
- package/lib/cjs/markets/shops/models/Shop.d.ts +0 -13
- package/lib/cjs/markets/shops/models/Shop.js +0 -2
- package/lib/cjs/markets/users/models/User.d.ts +0 -7
- package/lib/cjs/markets/users/models/User.js +0 -2
- package/lib/cjs/shared/models/IIcon.d.ts +0 -4
- package/lib/cjs/shared/models/IIcon.js +0 -6
- package/lib/cjs/shared/models/NaAcIc.d.ts +0 -7
- package/lib/cjs/shared/models/NaAcIc.js +0 -7
- package/lib/cjs/shared/models/NaCoAcIc.d.ts +0 -4
- package/lib/cjs/shared/models/NaCoAcIc.js +0 -7
- package/lib/cjs/users/models/EUserTag.d.ts +0 -14
- package/lib/cjs/users/models/EUserTag.js +0 -2
- package/lib/esm/auth/models/AuthTagGrp.d.ts +0 -3
- package/lib/esm/auth/models/AuthTagGrp.js +0 -1
- package/lib/esm/auth/models/AuthTagSub.d.ts +0 -3
- package/lib/esm/auth/models/AuthTagSub.js +0 -1
- package/lib/esm/bootstrap.d.ts +0 -1
- package/lib/esm/bootstrap.js +0 -1
- package/lib/esm/cashs/models/PaymentMode.d.ts +0 -5
- package/lib/esm/cashs/models/PaymentMode.js +0 -1
- package/lib/esm/markets/index.d.ts +0 -2
- package/lib/esm/markets/index.js +0 -2
- package/lib/esm/markets/models/Market.d.ts +0 -8
- package/lib/esm/markets/models/Market.js +0 -1
- package/lib/esm/markets/models/UMarket.d.ts +0 -11
- package/lib/esm/markets/models/UMarket.js +0 -1
- package/lib/esm/markets/models/index.d.ts +0 -2
- package/lib/esm/markets/models/index.js +0 -2
- package/lib/esm/markets/products/hlpProduct.d.ts +0 -13
- package/lib/esm/markets/products/hlpProduct.js +0 -47
- package/lib/esm/markets/products/index.d.ts +0 -2
- package/lib/esm/markets/products/index.js +0 -2
- package/lib/esm/markets/products/models/Product.d.ts +0 -39
- package/lib/esm/markets/products/models/Product.js +0 -1
- package/lib/esm/markets/products/models/ProductAsset.d.ts +0 -8
- package/lib/esm/markets/products/models/ProductAsset.js +0 -1
- package/lib/esm/markets/products/models/ProductCat.d.ts +0 -3
- package/lib/esm/markets/products/models/ProductCat.js +0 -1
- package/lib/esm/markets/products/models/ProductCollection.d.ts +0 -3
- package/lib/esm/markets/products/models/ProductCollection.js +0 -1
- package/lib/esm/markets/products/models/ProductDepot.d.ts +0 -11
- package/lib/esm/markets/products/models/ProductDepot.js +0 -1
- package/lib/esm/markets/products/models/ProductElt.d.ts +0 -3
- package/lib/esm/markets/products/models/ProductElt.js +0 -1
- package/lib/esm/markets/products/models/ProductGrp.d.ts +0 -3
- package/lib/esm/markets/products/models/ProductGrp.js +0 -1
- package/lib/esm/markets/products/models/ProductImage.d.ts +0 -5
- package/lib/esm/markets/products/models/ProductImage.js +0 -1
- package/lib/esm/markets/products/models/ProductIn.d.ts +0 -42
- package/lib/esm/markets/products/models/ProductIn.js +0 -1
- package/lib/esm/markets/products/models/ProductState.d.ts +0 -3
- package/lib/esm/markets/products/models/ProductState.js +0 -1
- package/lib/esm/markets/products/models/ProductStock.d.ts +0 -6
- package/lib/esm/markets/products/models/ProductStock.js +0 -1
- package/lib/esm/markets/products/models/ProductTag.d.ts +0 -3
- package/lib/esm/markets/products/models/ProductTag.js +0 -1
- package/lib/esm/markets/products/models/ProductVariant.d.ts +0 -6
- package/lib/esm/markets/products/models/ProductVariant.js +0 -1
- package/lib/esm/markets/products/models/index.d.ts +0 -13
- package/lib/esm/markets/products/models/index.js +0 -13
- package/lib/esm/markets/sales/index.d.ts +0 -1
- package/lib/esm/markets/sales/index.js +0 -1
- package/lib/esm/markets/sales/models/Sale.d.ts +0 -8
- package/lib/esm/markets/sales/models/Sale.js +0 -1
- package/lib/esm/markets/sales/models/SalePayment.d.ts +0 -23
- package/lib/esm/markets/sales/models/SalePayment.js +0 -1
- package/lib/esm/markets/sales/models/SaleProduct.d.ts +0 -8
- package/lib/esm/markets/sales/models/SaleProduct.js +0 -1
- package/lib/esm/markets/sales/models/index.d.ts +0 -3
- package/lib/esm/markets/sales/models/index.js +0 -3
- package/lib/esm/markets/shops/index.d.ts +0 -1
- package/lib/esm/markets/shops/index.js +0 -1
- package/lib/esm/markets/shops/models/Shop.d.ts +0 -13
- package/lib/esm/markets/shops/models/Shop.js +0 -1
- package/lib/esm/markets/users/models/User.d.ts +0 -7
- package/lib/esm/markets/users/models/User.js +0 -1
- package/lib/esm/shared/models/IIcon.d.ts +0 -4
- package/lib/esm/shared/models/IIcon.js +0 -2
- package/lib/esm/shared/models/NaAcIc.d.ts +0 -7
- package/lib/esm/shared/models/NaAcIc.js +0 -3
- package/lib/esm/shared/models/NaCoAcIc.d.ts +0 -4
- package/lib/esm/shared/models/NaCoAcIc.js +0 -3
- package/lib/esm/users/models/EUserTag.d.ts +0 -14
- package/lib/esm/users/models/EUserTag.js +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
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();
|
|
@@ -1,39 +0,0 @@
|
|
|
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 {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from "./Product";
|
|
2
|
-
export * from "./ProductAsset";
|
|
3
|
-
export * from "./ProductCat";
|
|
4
|
-
export * from "./ProductCollection";
|
|
5
|
-
export * from "./ProductDepot";
|
|
6
|
-
export * from "./ProductElt";
|
|
7
|
-
export * from "./ProductGrp";
|
|
8
|
-
export * from "./ProductImage";
|
|
9
|
-
export * from "./ProductIn";
|
|
10
|
-
export * from "./ProductState";
|
|
11
|
-
export * from "./ProductStock";
|
|
12
|
-
export * from "./ProductTag";
|
|
13
|
-
export * from "./ProductVariant";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from "./Product";
|
|
2
|
-
export * from "./ProductAsset";
|
|
3
|
-
export * from "./ProductCat";
|
|
4
|
-
export * from "./ProductCollection";
|
|
5
|
-
export * from "./ProductDepot";
|
|
6
|
-
export * from "./ProductElt";
|
|
7
|
-
export * from "./ProductGrp";
|
|
8
|
-
export * from "./ProductImage";
|
|
9
|
-
export * from "./ProductIn";
|
|
10
|
-
export * from "./ProductState";
|
|
11
|
-
export * from "./ProductStock";
|
|
12
|
-
export * from "./ProductTag";
|
|
13
|
-
export * from "./ProductVariant";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./models";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./models";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Bank from "../../../cashs/models/Bank";
|
|
2
|
-
import BankAccount from "../../../cashs/models/BankAccount";
|
|
3
|
-
import PaymentMode from "../../../cashs/models/PaymentMode";
|
|
4
|
-
import User from "../../users/models/User";
|
|
5
|
-
import Sale from "./Sale";
|
|
6
|
-
export interface SalePayment {
|
|
7
|
-
id: number;
|
|
8
|
-
ref: string;
|
|
9
|
-
createdAt: Date;
|
|
10
|
-
paymentDate: Date;
|
|
11
|
-
prevAmount: number;
|
|
12
|
-
paidAmount: number;
|
|
13
|
-
cashReceived: number;
|
|
14
|
-
cashReturned: number;
|
|
15
|
-
restAmount: number;
|
|
16
|
-
checkNumber: string;
|
|
17
|
-
checkDate: string;
|
|
18
|
-
sale: Sale;
|
|
19
|
-
encoder: User;
|
|
20
|
-
account: BankAccount;
|
|
21
|
-
bank: Bank;
|
|
22
|
-
mode: PaymentMode;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./models/Shop";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./models/Shop";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import UMarket from "../../models/UMarket";
|
|
2
|
-
import Product from "../../products/models/Product";
|
|
3
|
-
export 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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const enum UserTags {
|
|
2
|
-
MEMO = "users_memos",
|
|
3
|
-
TOOLS = "users_tools",
|
|
4
|
-
GRP_CL = "users_grps_cl",
|
|
5
|
-
BAZARS = "users_bazars",
|
|
6
|
-
GRP_PH = "users_grps_ph",
|
|
7
|
-
GRP_AG = "users_grps_ag",
|
|
8
|
-
GRP_LA = "users_grps_la",
|
|
9
|
-
GRP_FR = "users_grps_fr",
|
|
10
|
-
GRP_SF = "users_grps_sf",
|
|
11
|
-
GRP_PA = "users_grps_pa",
|
|
12
|
-
GRP_ST = "users_grps_st"
|
|
13
|
-
}
|
|
14
|
-
export default UserTags;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|