@managesome/eposmatic-toolkit 0.2.597 → 0.2.601
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/helpers/order/generate-warehouse-internal-movement.d.ts +2 -1
- package/lib/helpers/order/generate-warehouse-internal-movement.js +50 -0
- package/lib/helpers/store/common-warehouse-internal-movement-actions.d.ts +6 -2
- package/lib/helpers/store/common-warehouse-internal-movement-actions.js +14 -0
- package/lib/helpers/utils/expense.d.ts +0 -1
- package/lib/helpers/utils/expense.js +0 -22
- package/lib/schemas/models/expense_details.d.ts +0 -183
- package/lib/schemas/models/expense_details.js +0 -5
- package/lib/schemas/models/orders.d.ts +228 -228
- package/lib/schemas/models/tenant_purchase_orders.d.ts +228 -228
- package/lib/schemas/models/warehouse_internal_movements.d.ts +1272 -12
- package/lib/schemas/models/warehouse_internal_movements.js +78 -1
- package/lib/schemas/models/warehouse_purchase_orders.d.ts +228 -228
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +3 -3
- package/lib/schemas/types/expense_details.d.ts +0 -2
- package/lib/schemas/types/warehouse_internal_movements.d.ts +17 -13
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WarehouseInternalMovementsSchema = exports.WAREHOUSE_INTERNAL_MOVEMENTS_COLLECTION_NAME = void 0;
|
|
3
|
+
exports.WarehouseInternalMovementsSchema = exports.WarehouseInternalMovementIterationSchema = exports.WAREHOUSE_INTERNAL_MOVEMENTS_COLLECTION_NAME = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
const common_models_1 = require("./common-models");
|
|
@@ -69,6 +69,79 @@ const WarehouseInternalMovementItemSchema = new mongoose_1.Schema({
|
|
|
69
69
|
_id: false,
|
|
70
70
|
minimize: false,
|
|
71
71
|
});
|
|
72
|
+
exports.WarehouseInternalMovementIterationSchema = new mongoose_1.Schema({
|
|
73
|
+
items: {
|
|
74
|
+
type: [WarehouseInternalMovementItemSchema],
|
|
75
|
+
required: true,
|
|
76
|
+
default: [],
|
|
77
|
+
},
|
|
78
|
+
total_items: {
|
|
79
|
+
type: Number,
|
|
80
|
+
min: 0,
|
|
81
|
+
required: true,
|
|
82
|
+
default: 0,
|
|
83
|
+
},
|
|
84
|
+
total_quantity: {
|
|
85
|
+
type: Number,
|
|
86
|
+
min: 0,
|
|
87
|
+
required: true,
|
|
88
|
+
default: 0,
|
|
89
|
+
},
|
|
90
|
+
grand_total: {
|
|
91
|
+
type: Number,
|
|
92
|
+
min: 0,
|
|
93
|
+
required: true,
|
|
94
|
+
default: 0,
|
|
95
|
+
},
|
|
96
|
+
payments: {
|
|
97
|
+
type: [common_models_1.PaymentsSchema],
|
|
98
|
+
required: true,
|
|
99
|
+
default: [],
|
|
100
|
+
},
|
|
101
|
+
amount_collected: {
|
|
102
|
+
type: Number,
|
|
103
|
+
min: 0,
|
|
104
|
+
required: true,
|
|
105
|
+
default: 0,
|
|
106
|
+
},
|
|
107
|
+
amount_earned: {
|
|
108
|
+
type: Number,
|
|
109
|
+
min: 0,
|
|
110
|
+
required: true,
|
|
111
|
+
default: 0,
|
|
112
|
+
},
|
|
113
|
+
is_gst_inclusive: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
required: false,
|
|
116
|
+
},
|
|
117
|
+
gst: {
|
|
118
|
+
type: Number,
|
|
119
|
+
min: 0,
|
|
120
|
+
required: false,
|
|
121
|
+
},
|
|
122
|
+
gst_amount: {
|
|
123
|
+
type: Number,
|
|
124
|
+
min: 0,
|
|
125
|
+
required: false,
|
|
126
|
+
},
|
|
127
|
+
notes: {
|
|
128
|
+
type: String,
|
|
129
|
+
required: false,
|
|
130
|
+
},
|
|
131
|
+
status: {
|
|
132
|
+
type: String,
|
|
133
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_STATUS_NAMES,
|
|
134
|
+
required: true,
|
|
135
|
+
},
|
|
136
|
+
updatedAt: {
|
|
137
|
+
type: mongoose_1.Schema.Types.Date,
|
|
138
|
+
required: true,
|
|
139
|
+
},
|
|
140
|
+
}, {
|
|
141
|
+
_id: false,
|
|
142
|
+
timestamps: false,
|
|
143
|
+
versionKey: false,
|
|
144
|
+
});
|
|
72
145
|
exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
73
146
|
_id: {
|
|
74
147
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -136,6 +209,10 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
136
209
|
required: true,
|
|
137
210
|
default: [],
|
|
138
211
|
},
|
|
212
|
+
iterations: {
|
|
213
|
+
type: [exports.WarehouseInternalMovementIterationSchema],
|
|
214
|
+
default: [],
|
|
215
|
+
},
|
|
139
216
|
total_items: {
|
|
140
217
|
type: Number,
|
|
141
218
|
min: 0,
|