asv-hlps-market 1.0.3 → 1.0.5
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/buys/index.d.ts +1 -0
- package/lib/cjs/buys/index.js +17 -0
- package/lib/cjs/buys/models/Buy.d.ts +31 -0
- package/lib/cjs/buys/models/Buy.js +2 -0
- package/lib/cjs/buys/models/BuyProduct.d.ts +23 -0
- package/lib/cjs/buys/models/BuyProduct.js +2 -0
- package/lib/cjs/buys/models/index.d.ts +2 -0
- package/lib/cjs/buys/models/index.js +18 -0
- package/lib/cjs/pos/CartProduct.d.ts +1 -1
- package/lib/cjs/pos/hlpShop.js +0 -1
- package/lib/cjs/sales/models/SaleItems.d.ts +10 -0
- package/lib/cjs/sales/models/SaleItems.js +2 -0
- package/lib/cjs/sales/models/SalePayment.d.ts +1 -1
- package/lib/cjs/sales/models/SaleProduct.d.ts +1 -1
- package/lib/esm/buys/index.d.ts +1 -0
- package/lib/esm/buys/index.js +1 -0
- package/lib/esm/buys/models/Buy.d.ts +31 -0
- package/lib/esm/buys/models/Buy.js +1 -0
- package/lib/esm/buys/models/BuyProduct.d.ts +23 -0
- package/lib/esm/buys/models/BuyProduct.js +1 -0
- package/lib/esm/buys/models/index.d.ts +2 -0
- package/lib/esm/buys/models/index.js +2 -0
- package/lib/esm/pos/CartProduct.d.ts +1 -1
- package/lib/esm/pos/hlpShop.js +0 -1
- package/lib/esm/sales/models/SaleItems.d.ts +10 -0
- package/lib/esm/sales/models/SaleItems.js +1 -0
- package/lib/esm/sales/models/SalePayment.d.ts +1 -1
- package/lib/esm/sales/models/SaleProduct.d.ts +1 -1
- package/package.json +1 -1
@@ -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,31 @@
|
|
1
|
+
import Ste from "asv-hlps/lib/cjs/users/models/Ste";
|
2
|
+
import User from "asv-hlps/lib/cjs/users/models/User";
|
3
|
+
import ProductIn from "asv-hlps/lib/cjs/products/models/ProductIn";
|
4
|
+
import { BuyProduct } from "./BuyProduct";
|
5
|
+
export interface Buy {
|
6
|
+
author: User;
|
7
|
+
buyProducts: BuyProduct[];
|
8
|
+
createdAt: Date;
|
9
|
+
buyDate: Date | string;
|
10
|
+
id: number;
|
11
|
+
ins: ProductIn[];
|
12
|
+
isReceived: boolean;
|
13
|
+
isSaved: boolean;
|
14
|
+
isClosed: boolean;
|
15
|
+
fromInventory: boolean;
|
16
|
+
isArchived: boolean;
|
17
|
+
isSended: boolean;
|
18
|
+
isStandby: boolean;
|
19
|
+
isValided: boolean;
|
20
|
+
nbProducts: number;
|
21
|
+
pvd: Ste;
|
22
|
+
receivedDate: Date;
|
23
|
+
ref: string;
|
24
|
+
sendDate: Date | string;
|
25
|
+
otherCosts: number;
|
26
|
+
shippingCosts: number;
|
27
|
+
totalAmount: number;
|
28
|
+
totalQtity: number;
|
29
|
+
updatedAt: Date;
|
30
|
+
directReceived: boolean;
|
31
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import Product from "../../products/models/Product";
|
2
|
+
import { Buy } from "./Buy";
|
3
|
+
export interface BuyProduct {
|
4
|
+
buy?: Buy;
|
5
|
+
createdAt?: Date;
|
6
|
+
id?: number;
|
7
|
+
lot?: number;
|
8
|
+
product?: Product;
|
9
|
+
qtityDlvr: number;
|
10
|
+
qtityMiss?: number;
|
11
|
+
qtityOdr: number;
|
12
|
+
qtityFree?: number;
|
13
|
+
qtityPackOdr?: number;
|
14
|
+
qtityPackDlvr?: number;
|
15
|
+
qtityUnitOdr?: number;
|
16
|
+
qtityUnitDlvr?: number;
|
17
|
+
updatedAt?: Date;
|
18
|
+
qrCode?: string;
|
19
|
+
expirationDate: Date | string;
|
20
|
+
buyPrice: number;
|
21
|
+
amountBuyPrice: number;
|
22
|
+
publicPrice: number;
|
23
|
+
}
|
@@ -0,0 +1,18 @@
|
|
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("./Buy"), exports);
|
18
|
+
__exportStar(require("./BuyProduct"), exports);
|
package/lib/cjs/pos/hlpShop.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Bank, BankAccount, PaymentMode } from "asv-hlps/lib/cjs/cashs";
|
2
2
|
import User from "../../users/models/User";
|
3
3
|
import Sale from "./Sale";
|
4
|
-
export interface SalePayment {
|
4
|
+
export default interface SalePayment {
|
5
5
|
id: number;
|
6
6
|
ref: string;
|
7
7
|
createdAt: Date;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./models";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./models";
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import Ste from "asv-hlps/lib/cjs/users/models/Ste";
|
2
|
+
import User from "asv-hlps/lib/cjs/users/models/User";
|
3
|
+
import ProductIn from "asv-hlps/lib/cjs/products/models/ProductIn";
|
4
|
+
import { BuyProduct } from "./BuyProduct";
|
5
|
+
export interface Buy {
|
6
|
+
author: User;
|
7
|
+
buyProducts: BuyProduct[];
|
8
|
+
createdAt: Date;
|
9
|
+
buyDate: Date | string;
|
10
|
+
id: number;
|
11
|
+
ins: ProductIn[];
|
12
|
+
isReceived: boolean;
|
13
|
+
isSaved: boolean;
|
14
|
+
isClosed: boolean;
|
15
|
+
fromInventory: boolean;
|
16
|
+
isArchived: boolean;
|
17
|
+
isSended: boolean;
|
18
|
+
isStandby: boolean;
|
19
|
+
isValided: boolean;
|
20
|
+
nbProducts: number;
|
21
|
+
pvd: Ste;
|
22
|
+
receivedDate: Date;
|
23
|
+
ref: string;
|
24
|
+
sendDate: Date | string;
|
25
|
+
otherCosts: number;
|
26
|
+
shippingCosts: number;
|
27
|
+
totalAmount: number;
|
28
|
+
totalQtity: number;
|
29
|
+
updatedAt: Date;
|
30
|
+
directReceived: boolean;
|
31
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import Product from "../../products/models/Product";
|
2
|
+
import { Buy } from "./Buy";
|
3
|
+
export interface BuyProduct {
|
4
|
+
buy?: Buy;
|
5
|
+
createdAt?: Date;
|
6
|
+
id?: number;
|
7
|
+
lot?: number;
|
8
|
+
product?: Product;
|
9
|
+
qtityDlvr: number;
|
10
|
+
qtityMiss?: number;
|
11
|
+
qtityOdr: number;
|
12
|
+
qtityFree?: number;
|
13
|
+
qtityPackOdr?: number;
|
14
|
+
qtityPackDlvr?: number;
|
15
|
+
qtityUnitOdr?: number;
|
16
|
+
qtityUnitDlvr?: number;
|
17
|
+
updatedAt?: Date;
|
18
|
+
qrCode?: string;
|
19
|
+
expirationDate: Date | string;
|
20
|
+
buyPrice: number;
|
21
|
+
amountBuyPrice: number;
|
22
|
+
publicPrice: number;
|
23
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/lib/esm/pos/hlpShop.js
CHANGED
@@ -17,7 +17,6 @@ export default class HlpShop {
|
|
17
17
|
this.createCart(product.shop.id);
|
18
18
|
const nItem = cartProducts.find((item) => this.isProductInCart(item, product));
|
19
19
|
if (!nItem) {
|
20
|
-
//@ts-ignore
|
21
20
|
nCartProducts = [...cartProducts, { product, qtityOdr: 1 }];
|
22
21
|
}
|
23
22
|
else {
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Bank, BankAccount, PaymentMode } from "asv-hlps/lib/cjs/cashs";
|
2
2
|
import User from "../../users/models/User";
|
3
3
|
import Sale from "./Sale";
|
4
|
-
export interface SalePayment {
|
4
|
+
export default interface SalePayment {
|
5
5
|
id: number;
|
6
6
|
ref: string;
|
7
7
|
createdAt: Date;
|