@managesome/eposmatic-toolkit 0.2.454 → 0.2.457
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/constants/WORKER_ENDPOINTS.d.ts +2 -0
- package/lib/constants/WORKER_ENDPOINTS.js +3 -0
- package/lib/helpers/store/common-warehouse-internal-movement-actions.d.ts +12 -0
- package/lib/helpers/store/common-warehouse-internal-movement-actions.js +33 -0
- package/lib/helpers/store/common-warehouse-purchase-order-receipt-actions.d.ts +12 -0
- package/lib/helpers/store/common-warehouse-purchase-order-receipt-actions.js +37 -0
- package/lib/helpers/store/index.d.ts +2 -0
- package/lib/helpers/store/index.js +2 -0
- package/lib/helpers/types/workers.d.ts +16 -1
- package/lib/schemas/models/index.d.ts +1 -0
- package/lib/schemas/models/index.js +1 -0
- package/lib/schemas/models/warehouse_internal_movements.d.ts +3 -3
- package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.d.ts +3 -3
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +3 -3
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +3 -3
- package/lib/schemas/types/index.d.ts +2 -0
- package/lib/schemas/types/index.js +2 -0
- package/package.json +1 -1
- package/lib/constants/PURCHASE_ORDER.d.ts +0 -16
- package/lib/constants/PURCHASE_ORDER.js +0 -100
- package/lib/constants/RFQ.d.ts +0 -0
- package/lib/constants/RFQ.js +0 -1
- package/lib/helpers/order/generate-purchase-order-rfq.d.ts +0 -3
- package/lib/helpers/order/generate-purchase-order-rfq.js +0 -64
- package/lib/helpers/order/generate-purchase-order.d.ts +0 -11
- package/lib/helpers/order/generate-purchase-order.js +0 -196
- package/lib/helpers/store/all-purchase-orders-actions.d.ts +0 -13
- package/lib/helpers/store/all-purchase-orders-actions.js +0 -56
- package/lib/helpers/store/all-sale-orders-actions.d.ts +0 -2
- package/lib/helpers/store/all-sale-orders-actions.js +0 -8
- package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +0 -2
- package/lib/helpers/store/all-warehouse-sale-orders-actions.js +0 -8
- package/lib/helpers/store/common-purchase-order-actions.d.ts +0 -31
- package/lib/helpers/store/common-purchase-order-actions.js +0 -543
- package/lib/helpers/store/common-sale-order-actions.d.ts +0 -5
- package/lib/helpers/store/common-sale-order-actions.js +0 -65
- package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +0 -19
- package/lib/helpers/store/purchase-order-rfq-cart-actions.js +0 -373
- package/lib/helpers/store/purchase-orders-cart-actions.d.ts +0 -57
- package/lib/helpers/store/purchase-orders-cart-actions.js +0 -486
- package/lib/helpers/types/purchase-order-cart-actions.d.ts +0 -26
- package/lib/helpers/types/purchase-order-cart-actions.js +0 -2
- package/lib/helpers/utils/invoice-x-report-helpers.d.ts +0 -58
- package/lib/helpers/utils/invoice-x-report-helpers.js +0 -1432
- package/lib/helpers/utils/purchase-order-engine.d.ts +0 -9
- package/lib/helpers/utils/purchase-order-engine.js +0 -34
- package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +0 -149
- package/lib/helpers/utils/purchase-order-receipt-engine.js +0 -214
- package/lib/helpers/utils/purchase-order-x-report-helpers.d.ts +0 -58
- package/lib/helpers/utils/purchase-order-x-report-helpers.js +0 -1440
- package/lib/helpers/utils/sale-order-x-report-helpers.d.ts +0 -44
- package/lib/helpers/utils/sale-order-x-report-helpers.js +0 -22
- package/lib/helpers/utils/sale-x-report-helpers.d.ts +0 -58
- package/lib/helpers/utils/sale-x-report-helpers.js +0 -1456
- package/lib/helpers/utils/terminal-devices-helpers.d.ts +0 -2
- package/lib/helpers/utils/terminal-devices-helpers.js +0 -13
- package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +0 -3
- package/lib/helpers/utils/void-purchase-order-items-helpers.js +0 -38
- package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +0 -13
- package/lib/helpers/utils/void-purchase-order-items-report-helpers.js +0 -22
- package/lib/schemas/models/applied-order-discounts.d.ts +0 -80
- package/lib/schemas/models/applied-order-discounts.js +0 -106
- package/lib/schemas/models/brand.d.ts +0 -45
- package/lib/schemas/models/brand.js +0 -45
- package/lib/schemas/models/category.d.ts +0 -60
- package/lib/schemas/models/category.js +0 -67
- package/lib/schemas/models/dinein_table_fingerprints.d.ts +0 -65
- package/lib/schemas/models/dinein_table_fingerprints.js +0 -85
- package/lib/schemas/models/expense_category.d.ts +0 -83
- package/lib/schemas/models/expense_category.js +0 -64
- package/lib/schemas/models/internal_movements.d.ts +0 -357
- package/lib/schemas/models/internal_movements.js +0 -323
- package/lib/schemas/models/inventory.d.ts +0 -99
- package/lib/schemas/models/inventory.js +0 -87
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +0 -154
- package/lib/schemas/models/inventory_lot_serial_numbers.js +0 -193
- package/lib/schemas/models/item.d.ts +0 -11269
- package/lib/schemas/models/item.js +0 -333
- package/lib/schemas/models/menu.d.ts +0 -941
- package/lib/schemas/models/menu.js +0 -69
- package/lib/schemas/models/order.d.ts +0 -15437
- package/lib/schemas/models/order.js +0 -891
- package/lib/schemas/models/purchase_order_receipts.d.ts +0 -165
- package/lib/schemas/models/purchase_order_receipts.js +0 -151
- package/lib/schemas/models/purchase_order_rfq.d.ts +0 -1959
- package/lib/schemas/models/purchase_order_rfq.js +0 -328
- package/lib/schemas/models/purchase_order_rfqs.d.ts +0 -1959
- package/lib/schemas/models/purchase_order_rfqs.js +0 -328
- package/lib/schemas/models/purchase_order_vendor_returns.d.ts +0 -234
- package/lib/schemas/models/purchase_order_vendor_returns.js +0 -188
- package/lib/schemas/models/purchase_orders.d.ts +0 -2678
- package/lib/schemas/models/purchase_orders.js +0 -336
- package/lib/schemas/models/rider.d.ts +0 -65
- package/lib/schemas/models/rider.js +0 -74
- package/lib/schemas/models/sale_order_deliveries.d.ts +0 -167
- package/lib/schemas/models/sale_order_deliveries.js +0 -155
- package/lib/schemas/models/sale_order_invoices.d.ts +0 -227
- package/lib/schemas/models/sale_order_invoices.js +0 -206
- package/lib/schemas/models/sale_order_rfq.d.ts +0 -1938
- package/lib/schemas/models/sale_order_rfq.js +0 -309
- package/lib/schemas/models/sale_orders.d.ts +0 -1943
- package/lib/schemas/models/sale_orders.js +0 -324
- package/lib/schemas/models/tenant.d.ts +0 -528
- package/lib/schemas/models/tenant.js +0 -755
- package/lib/schemas/models/tenant_staff.d.ts +0 -932
- package/lib/schemas/models/tenant_staff.js +0 -96
- package/lib/schemas/models/track_order_number.d.ts +0 -413
- package/lib/schemas/models/track_order_number.js +0 -45
- package/lib/schemas/models/void_purchase_order_items.d.ts +0 -176
- package/lib/schemas/models/void_purchase_order_items.js +0 -177
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +0 -176
- package/lib/schemas/models/void_warehouse_invoice_items.js +0 -176
- package/lib/schemas/models/wallet.d.ts +0 -38
- package/lib/schemas/models/wallet.js +0 -37
- package/lib/schemas/models/warehouse-communications.d.ts +0 -228
- package/lib/schemas/models/warehouse-communications.js +0 -216
- package/lib/schemas/models/warehouse.d.ts +0 -162
- package/lib/schemas/models/warehouse.js +0 -222
- package/lib/schemas/models/warehouse_staff.d.ts +0 -65
- package/lib/schemas/models/warehouse_staff.js +0 -78
- package/lib/schemas/models/warehouse_track_order_number.d.ts +0 -50
- package/lib/schemas/models/warehouse_track_order_number.js +0 -52
- package/lib/schemas/types/applied-order-discounts.d.ts +0 -22
- package/lib/schemas/types/applied-order-discounts.js +0 -2
- package/lib/schemas/types/brand.d.ts +0 -32
- package/lib/schemas/types/brand.js +0 -2
- package/lib/schemas/types/category.d.ts +0 -15
- package/lib/schemas/types/category.js +0 -2
- package/lib/schemas/types/expense_category.d.ts +0 -20
- package/lib/schemas/types/expense_category.js +0 -2
- package/lib/schemas/types/internal_movements.d.ts +0 -73
- package/lib/schemas/types/internal_movements.js +0 -2
- package/lib/schemas/types/inventory.d.ts +0 -48
- package/lib/schemas/types/inventory.js +0 -2
- package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +0 -85
- package/lib/schemas/types/inventory_lot_serial_numbers.js +0 -4
- package/lib/schemas/types/item.d.ts +0 -89
- package/lib/schemas/types/item.js +0 -2
- package/lib/schemas/types/menu.d.ts +0 -17
- package/lib/schemas/types/menu.js +0 -2
- package/lib/schemas/types/order.d.ts +0 -242
- package/lib/schemas/types/order.js +0 -2
- package/lib/schemas/types/purchase_order_common.d.ts +0 -39
- package/lib/schemas/types/purchase_order_common.js +0 -2
- package/lib/schemas/types/purchase_order_receipts.d.ts +0 -39
- package/lib/schemas/types/purchase_order_receipts.js +0 -21
- package/lib/schemas/types/purchase_order_rfq.d.ts +0 -33
- package/lib/schemas/types/purchase_order_rfq.js +0 -2
- package/lib/schemas/types/purchase_order_rfqs.d.ts +0 -33
- package/lib/schemas/types/purchase_order_rfqs.js +0 -2
- package/lib/schemas/types/purchase_order_vendor_returns.d.ts +0 -49
- package/lib/schemas/types/purchase_order_vendor_returns.js +0 -42
- package/lib/schemas/types/purchase_orders.d.ts +0 -33
- package/lib/schemas/types/purchase_orders.js +0 -2
- package/lib/schemas/types/rider.d.ts +0 -16
- package/lib/schemas/types/rider.js +0 -2
- package/lib/schemas/types/sale_order_common.d.ts +0 -39
- package/lib/schemas/types/sale_order_common.js +0 -2
- package/lib/schemas/types/sale_order_deliveries.d.ts +0 -67
- package/lib/schemas/types/sale_order_deliveries.js +0 -2
- package/lib/schemas/types/sale_order_invoices.d.ts +0 -49
- package/lib/schemas/types/sale_order_invoices.js +0 -2
- package/lib/schemas/types/sale_order_rfq.d.ts +0 -25
- package/lib/schemas/types/sale_order_rfq.js +0 -2
- package/lib/schemas/types/sale_orders.d.ts +0 -30
- package/lib/schemas/types/sale_orders.js +0 -2
- package/lib/schemas/types/tenant.d.ts +0 -205
- package/lib/schemas/types/tenant.js +0 -2
- package/lib/schemas/types/tenant_staff.d.ts +0 -22
- package/lib/schemas/types/tenant_staff.js +0 -2
- package/lib/schemas/types/track_order_number.d.ts +0 -10
- package/lib/schemas/types/track_order_number.js +0 -2
- package/lib/schemas/types/void_purchase_order_items.d.ts +0 -37
- package/lib/schemas/types/void_purchase_order_items.js +0 -2
- package/lib/schemas/types/void_warehouse_invoice_items.d.ts +0 -37
- package/lib/schemas/types/void_warehouse_invoice_items.js +0 -2
- package/lib/schemas/types/wallet.d.ts +0 -7
- package/lib/schemas/types/wallet.js +0 -2
- package/lib/schemas/types/warehouse-communications.d.ts +0 -54
- package/lib/schemas/types/warehouse-communications.js +0 -2
- package/lib/schemas/types/warehouse.d.ts +0 -49
- package/lib/schemas/types/warehouse.js +0 -2
- package/lib/schemas/types/warehouse_purchase_order_common.d.ts +0 -39
- package/lib/schemas/types/warehouse_purchase_order_common.js +0 -2
- package/lib/schemas/types/warehouse_sale_order_common.d.ts +0 -39
- package/lib/schemas/types/warehouse_sale_order_common.js +0 -2
- package/lib/schemas/types/warehouse_staff.d.ts +0 -17
- package/lib/schemas/types/warehouse_staff.js +0 -2
- package/lib/schemas/types/warehouse_track_order_number.d.ts +0 -11
- package/lib/schemas/types/warehouse_track_order_number.js +0 -2
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SALE_ORDER_COLLECTION_NAME = exports.SaleOrdersSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
const sale_order_rfq_1 = require("./sale_order_rfq");
|
|
7
|
-
const warehouse_1 = require("./warehouse");
|
|
8
|
-
const warehouse_categories_1 = require("./warehouse_categories");
|
|
9
|
-
const warehouse_clients_1 = require("./warehouse_clients");
|
|
10
|
-
const warehouse_items_1 = require("./warehouse_items");
|
|
11
|
-
const StaffDetailsSchema = new mongoose_1.Schema({
|
|
12
|
-
staff_id: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
staff_name: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: '',
|
|
19
|
-
},
|
|
20
|
-
staff_mobile: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: null,
|
|
23
|
-
},
|
|
24
|
-
staff_email: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: null,
|
|
27
|
-
},
|
|
28
|
-
}, { _id: false, minimize: false });
|
|
29
|
-
const SaleOrderItemsSchema = new mongoose_1.Schema({
|
|
30
|
-
_id: {
|
|
31
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
32
|
-
required: true,
|
|
33
|
-
immutable: true,
|
|
34
|
-
},
|
|
35
|
-
item_id: {
|
|
36
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
37
|
-
required: true,
|
|
38
|
-
immutable: true,
|
|
39
|
-
ref: warehouse_items_1.WAREHOUSE_ITEMS_COLLECTION_NAME,
|
|
40
|
-
},
|
|
41
|
-
is_ready: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
required: false,
|
|
44
|
-
},
|
|
45
|
-
void_reason: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: false,
|
|
48
|
-
},
|
|
49
|
-
name: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: true,
|
|
52
|
-
},
|
|
53
|
-
quantity: {
|
|
54
|
-
type: Number,
|
|
55
|
-
min: 0,
|
|
56
|
-
required: true,
|
|
57
|
-
},
|
|
58
|
-
price: {
|
|
59
|
-
type: Number,
|
|
60
|
-
min: 0,
|
|
61
|
-
required: true,
|
|
62
|
-
},
|
|
63
|
-
subtotal: {
|
|
64
|
-
type: Number,
|
|
65
|
-
min: 0,
|
|
66
|
-
required: true,
|
|
67
|
-
},
|
|
68
|
-
_net_amount: {
|
|
69
|
-
type: Number,
|
|
70
|
-
min: 0,
|
|
71
|
-
required: true,
|
|
72
|
-
},
|
|
73
|
-
_gross_amount: {
|
|
74
|
-
type: Number,
|
|
75
|
-
min: 0,
|
|
76
|
-
required: true,
|
|
77
|
-
},
|
|
78
|
-
_gst_amount: {
|
|
79
|
-
type: Number,
|
|
80
|
-
min: 0,
|
|
81
|
-
required: true,
|
|
82
|
-
},
|
|
83
|
-
_discount_amount: {
|
|
84
|
-
type: Number,
|
|
85
|
-
min: 0,
|
|
86
|
-
required: true,
|
|
87
|
-
},
|
|
88
|
-
special_instructions: {
|
|
89
|
-
type: String,
|
|
90
|
-
default: '',
|
|
91
|
-
},
|
|
92
|
-
}, {
|
|
93
|
-
_id: false,
|
|
94
|
-
minimize: false,
|
|
95
|
-
});
|
|
96
|
-
const SaleOrderCategoriesSchema = new mongoose_1.Schema({
|
|
97
|
-
category_id: {
|
|
98
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
99
|
-
required: true,
|
|
100
|
-
immutable: true,
|
|
101
|
-
ref: warehouse_categories_1.WAREHOUSE_CATEGORY_COLLECTION_NAME,
|
|
102
|
-
},
|
|
103
|
-
name: {
|
|
104
|
-
type: String,
|
|
105
|
-
required: true,
|
|
106
|
-
},
|
|
107
|
-
items: {
|
|
108
|
-
type: [SaleOrderItemsSchema],
|
|
109
|
-
default: [],
|
|
110
|
-
},
|
|
111
|
-
}, {
|
|
112
|
-
_id: false,
|
|
113
|
-
minimize: false,
|
|
114
|
-
});
|
|
115
|
-
const SaleOrderIterationSchema = new mongoose_1.Schema({
|
|
116
|
-
categories: {
|
|
117
|
-
type: [SaleOrderCategoriesSchema],
|
|
118
|
-
required: true,
|
|
119
|
-
},
|
|
120
|
-
special_instructions: {
|
|
121
|
-
type: String,
|
|
122
|
-
default: '',
|
|
123
|
-
},
|
|
124
|
-
order_status: {
|
|
125
|
-
type: String,
|
|
126
|
-
enum: constants_1.ALL_SALES_ORDER_STATUS_NAMES,
|
|
127
|
-
required: true,
|
|
128
|
-
},
|
|
129
|
-
price: {
|
|
130
|
-
type: Number,
|
|
131
|
-
min: 0,
|
|
132
|
-
required: true,
|
|
133
|
-
},
|
|
134
|
-
amount_earned: {
|
|
135
|
-
type: Number,
|
|
136
|
-
min: 0,
|
|
137
|
-
required: true,
|
|
138
|
-
},
|
|
139
|
-
grand_total: {
|
|
140
|
-
type: Number,
|
|
141
|
-
min: 0,
|
|
142
|
-
required: true,
|
|
143
|
-
},
|
|
144
|
-
staff_details: {
|
|
145
|
-
type: StaffDetailsSchema,
|
|
146
|
-
required: false,
|
|
147
|
-
},
|
|
148
|
-
gst: {
|
|
149
|
-
type: Number,
|
|
150
|
-
min: 0,
|
|
151
|
-
required: false,
|
|
152
|
-
},
|
|
153
|
-
gst_amount: {
|
|
154
|
-
type: Number,
|
|
155
|
-
min: 0,
|
|
156
|
-
required: false,
|
|
157
|
-
},
|
|
158
|
-
is_gst_inclusive: {
|
|
159
|
-
type: Boolean,
|
|
160
|
-
required: false,
|
|
161
|
-
},
|
|
162
|
-
tax_number: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: '',
|
|
165
|
-
},
|
|
166
|
-
updatedAt: {
|
|
167
|
-
type: mongoose_1.Schema.Types.Date,
|
|
168
|
-
required: true,
|
|
169
|
-
},
|
|
170
|
-
}, {
|
|
171
|
-
_id: false,
|
|
172
|
-
timestamps: false,
|
|
173
|
-
versionKey: false,
|
|
174
|
-
});
|
|
175
|
-
exports.SaleOrdersSchema = new mongoose_1.Schema({
|
|
176
|
-
_id: {
|
|
177
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
178
|
-
required: true,
|
|
179
|
-
immutable: true,
|
|
180
|
-
},
|
|
181
|
-
warehouse_id: {
|
|
182
|
-
type: String,
|
|
183
|
-
required: true,
|
|
184
|
-
ref: warehouse_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
|
|
185
|
-
},
|
|
186
|
-
client_id: {
|
|
187
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
188
|
-
required: true,
|
|
189
|
-
ref: warehouse_clients_1.WAREHOUSE_CLIENTS_COLLECTION_NAME,
|
|
190
|
-
},
|
|
191
|
-
client_name: {
|
|
192
|
-
type: String,
|
|
193
|
-
default: '',
|
|
194
|
-
},
|
|
195
|
-
rfq_id: {
|
|
196
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
197
|
-
required: false,
|
|
198
|
-
ref: sale_order_rfq_1.SALE_ORDER_RFQ_COLLECTION_NAME,
|
|
199
|
-
},
|
|
200
|
-
categories: {
|
|
201
|
-
type: [SaleOrderCategoriesSchema],
|
|
202
|
-
default: [],
|
|
203
|
-
},
|
|
204
|
-
iterations: {
|
|
205
|
-
type: [SaleOrderIterationSchema],
|
|
206
|
-
default: [],
|
|
207
|
-
},
|
|
208
|
-
special_instructions: {
|
|
209
|
-
type: String,
|
|
210
|
-
default: '',
|
|
211
|
-
},
|
|
212
|
-
order_status: {
|
|
213
|
-
type: String,
|
|
214
|
-
enum: constants_1.ALL_SALES_ORDER_STATUS_NAMES,
|
|
215
|
-
required: true,
|
|
216
|
-
},
|
|
217
|
-
tax_number: {
|
|
218
|
-
type: String,
|
|
219
|
-
default: '',
|
|
220
|
-
},
|
|
221
|
-
gst: {
|
|
222
|
-
type: Number,
|
|
223
|
-
min: 0,
|
|
224
|
-
required: false,
|
|
225
|
-
},
|
|
226
|
-
gst_amount: {
|
|
227
|
-
type: Number,
|
|
228
|
-
min: 0,
|
|
229
|
-
required: false,
|
|
230
|
-
},
|
|
231
|
-
is_gst_inclusive: {
|
|
232
|
-
type: Boolean,
|
|
233
|
-
required: false,
|
|
234
|
-
},
|
|
235
|
-
price: {
|
|
236
|
-
type: Number,
|
|
237
|
-
min: 0,
|
|
238
|
-
required: true,
|
|
239
|
-
},
|
|
240
|
-
amount_earned: {
|
|
241
|
-
type: Number,
|
|
242
|
-
min: 0,
|
|
243
|
-
required: true,
|
|
244
|
-
},
|
|
245
|
-
amount_collected: {
|
|
246
|
-
type: Number,
|
|
247
|
-
min: 0,
|
|
248
|
-
required: true,
|
|
249
|
-
default: 0,
|
|
250
|
-
},
|
|
251
|
-
grand_total: {
|
|
252
|
-
type: Number,
|
|
253
|
-
min: 0,
|
|
254
|
-
required: true,
|
|
255
|
-
},
|
|
256
|
-
order_number: {
|
|
257
|
-
type: Number,
|
|
258
|
-
min: 0,
|
|
259
|
-
default: null,
|
|
260
|
-
},
|
|
261
|
-
delete_reason: {
|
|
262
|
-
type: String,
|
|
263
|
-
required: false,
|
|
264
|
-
},
|
|
265
|
-
cancel_reason: {
|
|
266
|
-
type: String,
|
|
267
|
-
required: false,
|
|
268
|
-
},
|
|
269
|
-
staff_details: {
|
|
270
|
-
type: StaffDetailsSchema,
|
|
271
|
-
required: true,
|
|
272
|
-
},
|
|
273
|
-
is_deleted: {
|
|
274
|
-
type: Boolean,
|
|
275
|
-
default: false,
|
|
276
|
-
},
|
|
277
|
-
order_status_updated_at: {
|
|
278
|
-
type: mongoose_1.Schema.Types.Date,
|
|
279
|
-
required: true,
|
|
280
|
-
default: () => new Date(),
|
|
281
|
-
},
|
|
282
|
-
is_reopened: {
|
|
283
|
-
type: Boolean,
|
|
284
|
-
required: false,
|
|
285
|
-
},
|
|
286
|
-
order_settled_at: {
|
|
287
|
-
type: mongoose_1.Schema.Types.Date,
|
|
288
|
-
required: true,
|
|
289
|
-
default: () => new Date(),
|
|
290
|
-
},
|
|
291
|
-
order_settled_at_mins: {
|
|
292
|
-
type: Number,
|
|
293
|
-
required: true,
|
|
294
|
-
default: () => {
|
|
295
|
-
const date = new Date();
|
|
296
|
-
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
createdAt_mins: {
|
|
300
|
-
type: Number,
|
|
301
|
-
required: true,
|
|
302
|
-
immutable: true,
|
|
303
|
-
default: () => {
|
|
304
|
-
const date = new Date();
|
|
305
|
-
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
createdAt: {
|
|
309
|
-
type: mongoose_1.Schema.Types.Date,
|
|
310
|
-
required: true,
|
|
311
|
-
default: () => new Date(),
|
|
312
|
-
immutable: true,
|
|
313
|
-
},
|
|
314
|
-
updatedAt: {
|
|
315
|
-
type: mongoose_1.Schema.Types.Date,
|
|
316
|
-
required: true,
|
|
317
|
-
default: () => new Date(),
|
|
318
|
-
},
|
|
319
|
-
}, {
|
|
320
|
-
timestamps: true,
|
|
321
|
-
versionKey: false,
|
|
322
|
-
minimize: false,
|
|
323
|
-
});
|
|
324
|
-
exports.SALE_ORDER_COLLECTION_NAME = 'warehouse_sale_orders';
|