asv-hlps-market 1.0.6 → 1.0.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.
- package/lib/cjs/bills/bill.d.ts +19 -0
- package/lib/cjs/bills/bill.js +79 -0
- package/lib/cjs/bills/models/Bill.d.ts +21 -0
- package/lib/cjs/buys/models/Buy.d.ts +3 -2
- package/lib/cjs/buys/models/BuyProduct.d.ts +3 -0
- package/lib/cjs/index.d.ts +12 -2
- package/lib/cjs/index.js +14 -2
- package/lib/cjs/markets/index.d.ts +1 -0
- package/lib/cjs/{shops → markets}/index.js +1 -1
- package/lib/cjs/{models → markets/models}/Market.d.ts +2 -1
- package/lib/{esm → cjs/markets}/models/UMarket.d.ts +2 -2
- package/lib/cjs/models/Gender.d.ts +6 -0
- package/lib/cjs/models/Gender.js +2 -0
- package/lib/cjs/models/Sale.d.ts +34 -0
- package/lib/cjs/models/Sale.js +2 -0
- package/lib/cjs/models/SaleProduct.d.ts +18 -0
- package/lib/cjs/models/SaleProduct.js +6 -0
- package/lib/cjs/models/Ste.d.ts +8 -0
- package/lib/cjs/models/Ste.js +2 -0
- package/lib/cjs/models/SteGrp.d.ts +7 -0
- package/lib/cjs/models/SteGrp.js +2 -0
- package/lib/cjs/models/Titr.d.ts +5 -0
- package/lib/cjs/models/Titr.js +2 -0
- package/lib/cjs/models/User.d.ts +38 -0
- package/lib/cjs/models/User.js +2 -0
- package/lib/cjs/models/UserGrp.d.ts +4 -0
- package/lib/cjs/models/UserGrp.js +2 -0
- package/lib/cjs/models/UserRole.d.ts +5 -0
- package/lib/cjs/models/UserRole.js +2 -0
- package/lib/cjs/models/shared/NaAc.d.ts +6 -0
- package/lib/cjs/models/shared/NaAc.js +2 -0
- package/lib/cjs/models/shared/NaCoAc.d.ts +4 -0
- package/lib/cjs/models/shared/NaCoAc.js +2 -0
- package/lib/cjs/models/shared/NaCoShortAc.d.ts +4 -0
- package/lib/cjs/models/shared/NaCoShortAc.js +2 -0
- package/lib/cjs/pdfs/invoices/amountInvoice.d.ts +66 -0
- package/lib/cjs/pdfs/invoices/amountInvoice.js +144 -0
- package/lib/cjs/pdfs/invoices/infoInvoice.d.ts +32 -0
- package/lib/cjs/pdfs/invoices/infoInvoice.js +80 -0
- package/lib/cjs/pdfs/tools/tools.d.ts +34 -0
- package/lib/cjs/pdfs/tools/tools.js +53 -0
- package/lib/cjs/products/hlpProduct.d.ts +1 -2
- package/lib/cjs/products/hlpProduct.js +7 -16
- package/lib/cjs/products/interfaces/Product.d.ts +53 -0
- package/lib/cjs/products/interfaces/Product.js +2 -0
- package/lib/cjs/products/interfaces/ProductCat.d.ts +6 -0
- package/lib/cjs/products/interfaces/ProductCat.js +2 -0
- package/lib/cjs/products/interfaces/ProductStore.d.ts +24 -0
- package/lib/cjs/products/interfaces/ProductStore.js +2 -0
- package/lib/cjs/products/models/Product.d.ts +5 -5
- package/lib/cjs/products/product.d.ts +3 -0
- package/lib/cjs/products/product.js +22 -0
- package/lib/cjs/sales/models/SaleItems.d.ts +2 -2
- package/lib/cjs/sales/models/SalePayment.d.ts +2 -1
- package/lib/cjs/sales/sale.d.ts +18 -0
- package/lib/cjs/sales/sale.js +129 -0
- package/lib/cjs/shared/CartItem.js +0 -1
- package/lib/cjs/shopping/models/CartItem.d.ts +6 -0
- package/lib/cjs/shopping/models/CartItem.js +2 -0
- package/lib/cjs/shopping/models/index.d.ts +1 -0
- package/lib/cjs/shopping/models/index.js +17 -0
- package/lib/cjs/shops/models/CartItem.d.ts +6 -0
- package/lib/cjs/shops/models/CartItem.js +2 -0
- package/lib/cjs/shops/models/Shop.d.ts +1 -1
- package/lib/cjs/shops/models/index.d.ts +1 -0
- package/lib/cjs/shops/models/index.js +17 -0
- package/lib/cjs/users/index.d.ts +1 -0
- package/lib/cjs/users/index.js +17 -0
- package/lib/cjs/users/models/User.d.ts +1 -1
- package/lib/cjs/users/models/index.d.ts +1 -0
- package/lib/cjs/users/models/index.js +17 -0
- package/lib/esm/bills/bill.d.ts +19 -0
- package/lib/esm/bills/bill.js +58 -0
- package/lib/esm/bills/models/Bill.d.ts +21 -0
- package/lib/esm/buys/models/Buy.d.ts +3 -2
- package/lib/esm/buys/models/BuyProduct.d.ts +3 -0
- package/lib/esm/index.d.ts +12 -2
- package/lib/esm/index.js +14 -2
- package/lib/esm/markets/index.d.ts +1 -0
- package/lib/esm/markets/index.js +1 -0
- package/lib/esm/{models → markets/models}/Market.d.ts +2 -1
- package/lib/{cjs → esm/markets}/models/UMarket.d.ts +2 -2
- package/lib/esm/models/Gender.d.ts +6 -0
- package/lib/esm/models/Gender.js +1 -0
- package/lib/esm/models/Sale.d.ts +34 -0
- package/lib/esm/models/Sale.js +1 -0
- package/lib/esm/models/SaleProduct.d.ts +18 -0
- package/lib/esm/models/SaleProduct.js +2 -0
- package/lib/esm/models/Ste.d.ts +8 -0
- package/lib/esm/models/Ste.js +1 -0
- package/lib/esm/models/SteGrp.d.ts +7 -0
- package/lib/esm/models/SteGrp.js +1 -0
- package/lib/esm/models/Titr.d.ts +5 -0
- package/lib/esm/models/Titr.js +1 -0
- package/lib/esm/models/User.d.ts +38 -0
- package/lib/esm/models/User.js +1 -0
- package/lib/esm/models/UserGrp.d.ts +4 -0
- package/lib/esm/models/UserGrp.js +1 -0
- package/lib/esm/models/UserRole.d.ts +5 -0
- package/lib/esm/models/UserRole.js +1 -0
- package/lib/esm/models/shared/NaAc.d.ts +6 -0
- package/lib/esm/models/shared/NaAc.js +1 -0
- package/lib/esm/models/shared/NaCoAc.d.ts +4 -0
- package/lib/esm/models/shared/NaCoAc.js +1 -0
- package/lib/esm/models/shared/NaCoShortAc.d.ts +4 -0
- package/lib/esm/models/shared/NaCoShortAc.js +1 -0
- package/lib/esm/pdfs/invoices/amountInvoice.d.ts +66 -0
- package/lib/esm/pdfs/invoices/amountInvoice.js +137 -0
- package/lib/esm/pdfs/invoices/infoInvoice.d.ts +26 -0
- package/lib/esm/pdfs/invoices/infoInvoice.js +75 -0
- package/lib/esm/pdfs/tools/tools.d.ts +34 -0
- package/lib/esm/pdfs/tools/tools.js +47 -0
- package/lib/esm/products/hlpProduct.d.ts +1 -2
- package/lib/esm/products/hlpProduct.js +7 -16
- package/lib/esm/products/interfaces/Product.d.ts +53 -0
- package/lib/esm/products/interfaces/Product.js +1 -0
- package/lib/esm/products/interfaces/ProductCat.d.ts +6 -0
- package/lib/esm/products/interfaces/ProductCat.js +1 -0
- package/lib/esm/products/interfaces/ProductStore.d.ts +24 -0
- package/lib/esm/products/interfaces/ProductStore.js +1 -0
- package/lib/esm/products/models/Product.d.ts +5 -5
- package/lib/esm/products/product.d.ts +3 -0
- package/lib/esm/products/product.js +17 -0
- package/lib/esm/sales/models/SaleItems.d.ts +2 -2
- package/lib/esm/sales/models/SalePayment.d.ts +2 -1
- package/lib/esm/sales/sale.d.ts +18 -0
- package/lib/esm/sales/sale.js +109 -0
- package/lib/esm/shared/CartItem.js +0 -1
- package/lib/esm/shopping/models/CartItem.d.ts +6 -0
- package/lib/esm/shopping/models/CartItem.js +1 -0
- package/lib/esm/shopping/models/index.d.ts +1 -0
- package/lib/esm/shopping/models/index.js +1 -0
- package/lib/esm/shops/models/CartItem.d.ts +6 -0
- package/lib/esm/shops/models/CartItem.js +1 -0
- package/lib/esm/shops/models/Shop.d.ts +1 -1
- package/lib/esm/shops/models/index.d.ts +1 -0
- package/lib/esm/shops/models/index.js +1 -0
- package/lib/esm/users/index.d.ts +1 -0
- package/lib/esm/users/index.js +1 -0
- package/lib/esm/users/models/User.d.ts +1 -1
- package/lib/esm/users/models/index.d.ts +1 -0
- package/lib/esm/users/models/index.js +1 -0
- package/package.json +4 -4
- package/lib/cjs/pos/CartProduct.d.ts +0 -6
- package/lib/cjs/pos/hlpShop.d.ts +0 -37
- package/lib/cjs/pos/hlpShop.js +0 -216
- package/lib/cjs/pos/index.d.ts +0 -1
- package/lib/cjs/pos/index.js +0 -8
- package/lib/cjs/shops/index.d.ts +0 -1
- package/lib/esm/pos/CartProduct.d.ts +0 -6
- package/lib/esm/pos/hlpShop.d.ts +0 -37
- package/lib/esm/pos/hlpShop.js +0 -210
- package/lib/esm/pos/index.d.ts +0 -1
- package/lib/esm/pos/index.js +0 -1
- package/lib/esm/shops/index.d.ts +0 -1
- package/lib/esm/shops/index.js +0 -1
- /package/lib/cjs/{models/Market.js → bills/models/Bill.js} +0 -0
- /package/lib/cjs/{models/UMarket.js → markets/models/Market.js} +0 -0
- /package/lib/cjs/{pos/CartProduct.js → markets/models/UMarket.js} +0 -0
- /package/lib/cjs/{models → markets/models}/index.d.ts +0 -0
- /package/lib/cjs/{models → markets/models}/index.js +0 -0
- /package/lib/esm/{models/Market.js → bills/models/Bill.js} +0 -0
- /package/lib/esm/{models/UMarket.js → markets/models/Market.js} +0 -0
- /package/lib/esm/{pos/CartProduct.js → markets/models/UMarket.js} +0 -0
- /package/lib/esm/{models → markets/models}/index.d.ts +0 -0
- /package/lib/esm/{models → markets/models}/index.js +0 -0
@@ -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("./Shop"), 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 @@
|
|
1
|
+
export * from "./User";
|
@@ -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("./User"), exports);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Bill, Sale } from "asv-hlps-models";
|
2
|
+
export declare const getNbProductsOnBill: (sales: Sale[]) => number;
|
3
|
+
export declare const getNbPackagesOnBill: (sales: Sale[]) => number;
|
4
|
+
export declare const getNbFreezeOnBill: (sales: Sale[]) => number;
|
5
|
+
export declare const getTotalTvaOnBill: (sales: Sale[]) => number;
|
6
|
+
export declare const getTotalAmountOnBill: (sales: Sale[]) => number;
|
7
|
+
export declare const getTotalAmountBackOnBill: (sales: Sale[]) => number;
|
8
|
+
export declare const getTotalTvaBackOnBill: (sales: Sale[]) => number;
|
9
|
+
export declare const getTotalQtityOnBill: (sales: Sale[]) => number;
|
10
|
+
export declare const getTotalQtityFreeOnBill: (sales: Sale[]) => number;
|
11
|
+
export declare const getTotalAmountWithoutTvaOnBill: (sales: Sale[]) => number;
|
12
|
+
export declare const getTotalAmountWithoutTvaBackOnBill: (sales: Sale[]) => number;
|
13
|
+
export declare const getTotalAmountAllIncludedOnBill: (sales: Sale[]) => number;
|
14
|
+
export declare const getTotalAmountTvaOnBill: (sales: Sale[]) => number;
|
15
|
+
export declare const getTotalAmountTvaBackOnBill: (sales: Sale[]) => number;
|
16
|
+
export declare const getTotalAmountOnListBill: (bills: Bill[]) => number;
|
17
|
+
export declare const getTotalAmountTvaOnListBill: (bills: Bill[]) => number;
|
18
|
+
export declare const getTotalAmountWithoutTvaOnListBill: (bills: Bill[]) => number;
|
19
|
+
export declare const getTotalDueAmountOnListBill: (bills: Bill[]) => number;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { getNbProductsOnSale, getTotalAmountAllIncludedOnSale, getTotalAmountBackOnSale, getTotalAmountOnSale, getTotalAmountWithoutTvaBackOnSale, getTotalAmountWithoutTvaOnSale, getTotalQtityFreeOnSale, getTotalQtityOnSale, getTotalTvaBackOnSale, getTotalTvaOnSale } from "../sales/sale";
|
2
|
+
export const getNbProductsOnBill = (sales) => {
|
3
|
+
return sales.reduce((prev, sale) => prev + (+getNbProductsOnSale(sale)), 0);
|
4
|
+
};
|
5
|
+
export const getNbPackagesOnBill = (sales) => {
|
6
|
+
return sales.reduce((prev, sale) => prev + (+sale.nbPackages), 0);
|
7
|
+
};
|
8
|
+
export const getNbFreezeOnBill = (sales) => {
|
9
|
+
return sales.reduce((prev, sale) => prev + (+sale.nbFreeze), 0);
|
10
|
+
};
|
11
|
+
export const getTotalTvaOnBill = (sales) => {
|
12
|
+
if (!sales.length) {
|
13
|
+
return 0;
|
14
|
+
}
|
15
|
+
return sales.reduce((prev, sale) => prev + (getTotalTvaOnSale(sale, true)), 0);
|
16
|
+
};
|
17
|
+
export const getTotalAmountOnBill = (sales) => {
|
18
|
+
return sales.reduce((prev, sale) => prev + (getTotalAmountOnSale(sale, true)), 0);
|
19
|
+
};
|
20
|
+
export const getTotalAmountBackOnBill = (sales) => {
|
21
|
+
return sales.reduce((prev, sale) => prev + (getTotalAmountBackOnSale(sale)), 0);
|
22
|
+
};
|
23
|
+
export const getTotalTvaBackOnBill = (sales) => {
|
24
|
+
return sales.reduce((prev, sale) => prev + (getTotalTvaBackOnSale(sale)), 0);
|
25
|
+
};
|
26
|
+
export const getTotalQtityOnBill = (sales) => {
|
27
|
+
return sales.reduce((prev, sale) => prev + (getTotalQtityOnSale(sale, true)), 0);
|
28
|
+
};
|
29
|
+
export const getTotalQtityFreeOnBill = (sales) => {
|
30
|
+
return sales.reduce((prev, sale) => prev + (getTotalQtityFreeOnSale(sale)), 0);
|
31
|
+
};
|
32
|
+
export const getTotalAmountWithoutTvaOnBill = (sales) => {
|
33
|
+
return sales.reduce((prev, sale) => prev + (+getTotalAmountWithoutTvaOnSale(sale, true)), 0);
|
34
|
+
};
|
35
|
+
export const getTotalAmountWithoutTvaBackOnBill = (sales) => {
|
36
|
+
return sales.reduce((prev, sale) => prev + (+getTotalAmountWithoutTvaBackOnSale(sale)), 0);
|
37
|
+
};
|
38
|
+
export const getTotalAmountAllIncludedOnBill = (sales) => {
|
39
|
+
return sales.reduce((prev, sale) => prev + (+getTotalAmountAllIncludedOnSale(sale, true)), 0);
|
40
|
+
};
|
41
|
+
export const getTotalAmountTvaOnBill = (sales) => {
|
42
|
+
return sales.reduce((prev, sale) => prev + (+getTotalTvaOnSale(sale, true)), 0);
|
43
|
+
};
|
44
|
+
export const getTotalAmountTvaBackOnBill = (sales) => {
|
45
|
+
return sales.reduce((prev, sale) => prev + (+getTotalTvaBackOnSale(sale)), 0);
|
46
|
+
};
|
47
|
+
export const getTotalAmountOnListBill = (bills) => {
|
48
|
+
return bills.reduce((prev, curr) => prev + (+curr.totalAmount), 0);
|
49
|
+
};
|
50
|
+
export const getTotalAmountTvaOnListBill = (bills) => {
|
51
|
+
return bills.reduce((prev, curr) => prev + (+getTotalAmountTvaOnBill(curr.sales)), 0);
|
52
|
+
};
|
53
|
+
export const getTotalAmountWithoutTvaOnListBill = (bills) => {
|
54
|
+
return bills.reduce((prev, curr) => prev + (+getTotalAmountWithoutTvaOnBill(curr.sales)), 0);
|
55
|
+
};
|
56
|
+
export const getTotalDueAmountOnListBill = (bills) => {
|
57
|
+
return bills.reduce((prev, curr) => prev + (+curr.dueAmount), 0);
|
58
|
+
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Sale } from "../../models/Sale";
|
2
|
+
export interface Bill {
|
3
|
+
id?: number;
|
4
|
+
createdAt?: Date;
|
5
|
+
ref?: string;
|
6
|
+
totalAmount?: number;
|
7
|
+
isPaid?: boolean;
|
8
|
+
isPartialPaid?: boolean;
|
9
|
+
paidDate?: Date;
|
10
|
+
dueAmount?: number;
|
11
|
+
escompteAmount?: number;
|
12
|
+
totalAmountAllIncluded?: number;
|
13
|
+
hasTva?: boolean;
|
14
|
+
isBack?: boolean;
|
15
|
+
fromCron?: boolean;
|
16
|
+
nbPrint?: number;
|
17
|
+
type?: 'sale' | 'avoir';
|
18
|
+
store?: string;
|
19
|
+
sales?: Sale[];
|
20
|
+
nbrePayment?: number;
|
21
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import Ste from "asv-hlps/lib/cjs/users/models/Ste";
|
2
|
-
import
|
3
|
-
import
|
2
|
+
import ProductIn from "../../products/models/ProductIn";
|
3
|
+
import User from "../../users/models/User";
|
4
4
|
import { BuyProduct } from "./BuyProduct";
|
5
5
|
export interface Buy {
|
6
6
|
author: User;
|
@@ -29,3 +29,4 @@ export interface Buy {
|
|
29
29
|
updatedAt: Date;
|
30
30
|
directReceived: boolean;
|
31
31
|
}
|
32
|
+
export default Buy;
|
package/lib/esm/index.d.ts
CHANGED
@@ -1,2 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import './bills/bill';
|
2
|
+
import './pdfs/invoices/amountInvoice';
|
3
|
+
import './pdfs/invoices/infoInvoice';
|
4
|
+
import './pdfs/tools/tools';
|
5
|
+
import './products/product';
|
6
|
+
import './sales/sale';
|
7
|
+
export * from './bills/bill';
|
8
|
+
export * from './pdfs/invoices/amountInvoice';
|
9
|
+
export * from './pdfs/invoices/infoInvoice';
|
10
|
+
export * from './pdfs/tools/tools';
|
11
|
+
export * from './products/product';
|
12
|
+
export * from './sales/sale';
|
package/lib/esm/index.js
CHANGED
@@ -1,2 +1,14 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
// import 'asv-hlps';
|
2
|
+
import './bills/bill';
|
3
|
+
import './pdfs/invoices/amountInvoice';
|
4
|
+
import './pdfs/invoices/infoInvoice';
|
5
|
+
import './pdfs/tools/tools';
|
6
|
+
import './products/product';
|
7
|
+
import './sales/sale';
|
8
|
+
// export * from 'asv-hlps/lib/cjs';
|
9
|
+
export * from './bills/bill';
|
10
|
+
export * from './pdfs/invoices/amountInvoice';
|
11
|
+
export * from './pdfs/invoices/infoInvoice';
|
12
|
+
export * from './pdfs/tools/tools';
|
13
|
+
export * from './products/product';
|
14
|
+
export * from './sales/sale';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./models";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./models";
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { SaleProduct } from "./SaleProduct";
|
2
|
+
import { User } from "./User";
|
3
|
+
export interface Sale {
|
4
|
+
id: number;
|
5
|
+
ref?: string;
|
6
|
+
createdAt?: any;
|
7
|
+
saleDate?: any;
|
8
|
+
deliveryDate?: Date;
|
9
|
+
shippingDate?: Date;
|
10
|
+
shippingFee?: number;
|
11
|
+
otherFee?: number;
|
12
|
+
nbPrint?: number;
|
13
|
+
discountRate?: number;
|
14
|
+
status?: number;
|
15
|
+
isValided?: boolean;
|
16
|
+
isProforma?: boolean;
|
17
|
+
proformaToSale?: boolean;
|
18
|
+
hasBack?: boolean;
|
19
|
+
isBack?: boolean;
|
20
|
+
isWaiting?: boolean;
|
21
|
+
waitingToSale?: boolean;
|
22
|
+
backChoice?: string;
|
23
|
+
nbPackages?: number;
|
24
|
+
nbFreeze?: number;
|
25
|
+
isProcessing?: boolean;
|
26
|
+
isProcessed?: boolean;
|
27
|
+
isOnProcessed?: boolean;
|
28
|
+
isDelivering?: boolean;
|
29
|
+
isPicking?: boolean;
|
30
|
+
isDelivered?: boolean;
|
31
|
+
rejectedReason?: string;
|
32
|
+
saleProducts?: SaleProduct[];
|
33
|
+
client?: User;
|
34
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Product } from '../products/interfaces/Product';
|
2
|
+
export declare class SaleProduct {
|
3
|
+
id: number;
|
4
|
+
qtityFund?: number;
|
5
|
+
qtityOdr?: number;
|
6
|
+
qtityDlvr?: number;
|
7
|
+
qtityFree?: number;
|
8
|
+
qtityBack?: number;
|
9
|
+
publicPrice?: number;
|
10
|
+
unitPrice?: number;
|
11
|
+
speUnitPrice?: number;
|
12
|
+
pghtPrice?: number;
|
13
|
+
promo?: number;
|
14
|
+
tva?: number;
|
15
|
+
isBack?: boolean;
|
16
|
+
hasBack?: boolean;
|
17
|
+
product?: Product;
|
18
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { Gender } from "./Gender";
|
2
|
+
import { Ste } from "./Ste";
|
3
|
+
import { Titr } from "./Titr";
|
4
|
+
import { UserGrp } from "./UserGrp";
|
5
|
+
import { UserRole } from "./UserRole";
|
6
|
+
export interface User {
|
7
|
+
id: number;
|
8
|
+
codeCompta?: string | number;
|
9
|
+
firstname?: string;
|
10
|
+
lastname?: string;
|
11
|
+
username?: string;
|
12
|
+
birthday?: Date | string;
|
13
|
+
password?: string;
|
14
|
+
approval?: string;
|
15
|
+
approvalExpDate?: Date;
|
16
|
+
ip?: string;
|
17
|
+
isActive?: boolean;
|
18
|
+
isSpecial?: boolean;
|
19
|
+
hasBillCredit?: boolean;
|
20
|
+
isValided?: boolean;
|
21
|
+
disabled?: boolean;
|
22
|
+
isBadPayer?: boolean;
|
23
|
+
isEqeerUser?: boolean;
|
24
|
+
ifDarkMode?: boolean;
|
25
|
+
foto?: string;
|
26
|
+
clp?: string;
|
27
|
+
periodBill?: string;
|
28
|
+
limitAmountSaleByMonth?: number;
|
29
|
+
hasLimitSaleSafe?: boolean;
|
30
|
+
hasBillSafe?: boolean;
|
31
|
+
gender?: Gender;
|
32
|
+
titr?: Titr;
|
33
|
+
clientId?: number;
|
34
|
+
grp?: UserGrp;
|
35
|
+
role?: UserRole;
|
36
|
+
ste?: Ste;
|
37
|
+
fullname: string;
|
38
|
+
}
|
@@ -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,66 @@
|
|
1
|
+
import { Bill } from "asv-hlps-models";
|
2
|
+
import { Sale } from "asv-hlps-models";
|
3
|
+
export declare const infoAmountOnBl: (tob: Sale) => {
|
4
|
+
width: string;
|
5
|
+
table: {
|
6
|
+
headerRows: number;
|
7
|
+
widths: string[];
|
8
|
+
heights: number[];
|
9
|
+
body: ({
|
10
|
+
text: string;
|
11
|
+
style: string;
|
12
|
+
}[] | {
|
13
|
+
text: string | number;
|
14
|
+
style: string;
|
15
|
+
alignment: string;
|
16
|
+
}[])[];
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export declare const infoAmountOnProforma: (tob: Sale) => {
|
20
|
+
width: string;
|
21
|
+
table: {
|
22
|
+
headerRows: number;
|
23
|
+
widths: string[];
|
24
|
+
heights: number[];
|
25
|
+
body: ({
|
26
|
+
text: string;
|
27
|
+
style: string;
|
28
|
+
}[] | {
|
29
|
+
text: string | number;
|
30
|
+
style: string;
|
31
|
+
alignment: string;
|
32
|
+
}[])[];
|
33
|
+
};
|
34
|
+
};
|
35
|
+
export declare const infoAmounOntSale: (tob: Sale) => {
|
36
|
+
width: string;
|
37
|
+
table: {
|
38
|
+
headerRows: number;
|
39
|
+
widths: string[];
|
40
|
+
heights: number[];
|
41
|
+
body: ({
|
42
|
+
text: string;
|
43
|
+
style: string;
|
44
|
+
}[] | {
|
45
|
+
text: string | number;
|
46
|
+
style: string;
|
47
|
+
alignment: string;
|
48
|
+
}[])[];
|
49
|
+
};
|
50
|
+
};
|
51
|
+
export declare const infoAmountOnBill: (tob: Bill) => {
|
52
|
+
width: string;
|
53
|
+
table: {
|
54
|
+
headerRows: number;
|
55
|
+
widths: string[];
|
56
|
+
heights: number[];
|
57
|
+
body: ({
|
58
|
+
text: string;
|
59
|
+
style: string;
|
60
|
+
}[] | {
|
61
|
+
text: string;
|
62
|
+
style: string;
|
63
|
+
alignment: string;
|
64
|
+
}[])[];
|
65
|
+
};
|
66
|
+
};
|