proflores-db-model 0.2.20 → 0.2.21
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/.yarn/install-state.gz +0 -0
- package/.yarnrc.yml +1 -0
- package/dist/entities/ExpenseDetail.d.ts +3 -1
- package/dist/entities/ExpenseDetail.js +7 -1
- package/dist/models/technical-sheet/catalogs/payment-method.d.ts +8 -0
- package/dist/models/technical-sheet/catalogs/payment-method.js +12 -0
- package/package.json +3 -2
- package/src/entities/ExpenseDetail.ts +8 -3
- package/src/models/technical-sheet/catalogs/payment-method.ts +12 -0
|
Binary file
|
package/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ObjectLiteral } from "typeorm";
|
|
2
2
|
import { ExpenseTransaction } from "./ExpenseTransaction";
|
|
3
|
+
import { InventoryItem } from "./InventoryItem";
|
|
3
4
|
export declare class ExpenseDetail implements ObjectLiteral {
|
|
4
5
|
expenseDetailId: number;
|
|
5
6
|
expenseTransaction: ExpenseTransaction;
|
|
6
|
-
|
|
7
|
+
inventoryItem?: InventoryItem;
|
|
8
|
+
concept?: string;
|
|
7
9
|
quantity: number;
|
|
8
10
|
unitPrice: number;
|
|
9
11
|
purchaseDate: Date;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ExpenseDetail = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const ExpenseTransaction_1 = require("./ExpenseTransaction");
|
|
15
|
+
const InventoryItem_1 = require("./InventoryItem");
|
|
15
16
|
let ExpenseDetail = class ExpenseDetail {
|
|
16
17
|
};
|
|
17
18
|
exports.ExpenseDetail = ExpenseDetail;
|
|
@@ -25,7 +26,12 @@ __decorate([
|
|
|
25
26
|
__metadata("design:type", ExpenseTransaction_1.ExpenseTransaction)
|
|
26
27
|
], ExpenseDetail.prototype, "expenseTransaction", void 0);
|
|
27
28
|
__decorate([
|
|
28
|
-
(0, typeorm_1.
|
|
29
|
+
(0, typeorm_1.ManyToOne)(() => InventoryItem_1.InventoryItem, { nullable: false }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "inventoryItemId" }),
|
|
31
|
+
__metadata("design:type", InventoryItem_1.InventoryItem)
|
|
32
|
+
], ExpenseDetail.prototype, "inventoryItem", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)("varchar", { nullable: true }),
|
|
29
35
|
__metadata("design:type", String)
|
|
30
36
|
], ExpenseDetail.prototype, "concept", void 0);
|
|
31
37
|
__decorate([
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAYMENT_METHOD = void 0;
|
|
4
|
+
// src/models/expense/catalogs/payment-method.ts
|
|
5
|
+
const makeCatalog_1 = require("../utils/makeCatalog");
|
|
6
|
+
exports.PAYMENT_METHOD = (0, makeCatalog_1.makeCatalog)({
|
|
7
|
+
EFECTIVO: "Efectivo",
|
|
8
|
+
TRANSFERENCIA: "Transferencia",
|
|
9
|
+
TARJETA: "Tarjeta",
|
|
10
|
+
CHEQUE: "Cheque",
|
|
11
|
+
OTRO: "Otro",
|
|
12
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proflores-db-model",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"description": "Data model for managing expenses and transactions for Proflores nursery business",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,5 +18,6 @@
|
|
|
18
18
|
"@types/node": "^22.15.3",
|
|
19
19
|
"ts-node": "^10.0.0",
|
|
20
20
|
"typescript": "^5.8.3"
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
|
+
"packageManager": "yarn@4.9.2+sha512.1fc009bc09d13cfd0e19efa44cbfc2b9cf6ca61482725eb35bbc5e257e093ebf4130db6dfe15d604ff4b79efd8e1e8e99b25fa7d0a6197c9f9826358d4d65c3c"
|
|
22
23
|
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ObjectLiteral,
|
|
8
8
|
} from "typeorm";
|
|
9
9
|
import { ExpenseTransaction } from "./ExpenseTransaction";
|
|
10
|
+
import { InventoryItem } from "./InventoryItem";
|
|
10
11
|
|
|
11
12
|
@Entity()
|
|
12
13
|
export class ExpenseDetail implements ObjectLiteral {
|
|
@@ -20,8 +21,12 @@ export class ExpenseDetail implements ObjectLiteral {
|
|
|
20
21
|
@JoinColumn({ name: "expenseTransactionId" })
|
|
21
22
|
expenseTransaction!: ExpenseTransaction;
|
|
22
23
|
|
|
23
|
-
@
|
|
24
|
-
|
|
24
|
+
@ManyToOne(() => InventoryItem, { nullable: false })
|
|
25
|
+
@JoinColumn({ name: "inventoryItemId" })
|
|
26
|
+
inventoryItem?: InventoryItem;
|
|
27
|
+
|
|
28
|
+
@Column("varchar", { nullable: true })
|
|
29
|
+
concept?: string;
|
|
25
30
|
|
|
26
31
|
@Column("decimal", { nullable: false })
|
|
27
32
|
quantity!: number;
|
|
@@ -31,7 +36,7 @@ export class ExpenseDetail implements ObjectLiteral {
|
|
|
31
36
|
|
|
32
37
|
@Column("date", { nullable: false })
|
|
33
38
|
purchaseDate!: Date;
|
|
34
|
-
|
|
39
|
+
|
|
35
40
|
@Column("boolean", { default: true })
|
|
36
41
|
isActive!: boolean;
|
|
37
42
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/models/expense/catalogs/payment-method.ts
|
|
2
|
+
import { makeCatalog } from "../utils/makeCatalog";
|
|
3
|
+
|
|
4
|
+
export const PAYMENT_METHOD = makeCatalog({
|
|
5
|
+
EFECTIVO: "Efectivo",
|
|
6
|
+
TRANSFERENCIA: "Transferencia",
|
|
7
|
+
TARJETA: "Tarjeta",
|
|
8
|
+
CHEQUE: "Cheque",
|
|
9
|
+
OTRO: "Otro",
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type PaymentMethod = keyof typeof PAYMENT_METHOD;
|