@managesome/eposmatic-toolkit 0.2.455 → 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/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/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,188 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PURCHASE_ORDER_VENDOR_RETURNS_COLLECTION_NAME = exports.PurchaseOrderVendorReturnsSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
const purchase_orders_1 = require("./purchase_orders");
|
|
7
|
-
const warehouse_items_1 = require("./warehouse_items");
|
|
8
|
-
const warehouse_vendors_1 = require("./warehouse_vendors");
|
|
9
|
-
const warehouses_1 = require("./warehouses");
|
|
10
|
-
const PurchaseOrderVendorReturnActorSchema = new mongoose_1.Schema({
|
|
11
|
-
_id: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
name: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true,
|
|
18
|
-
default: '',
|
|
19
|
-
},
|
|
20
|
-
}, { _id: false, minimize: false });
|
|
21
|
-
const PurchaseOrderVendorReturnItemsSchema = new mongoose_1.Schema({
|
|
22
|
-
_id: {
|
|
23
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
24
|
-
required: true,
|
|
25
|
-
immutable: true,
|
|
26
|
-
},
|
|
27
|
-
item_id: {
|
|
28
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
29
|
-
required: true,
|
|
30
|
-
immutable: true,
|
|
31
|
-
ref: warehouse_items_1.WAREHOUSE_ITEMS_COLLECTION_NAME,
|
|
32
|
-
},
|
|
33
|
-
name: {
|
|
34
|
-
type: String,
|
|
35
|
-
required: true,
|
|
36
|
-
},
|
|
37
|
-
ordered_quantity: {
|
|
38
|
-
type: Number,
|
|
39
|
-
min: 0,
|
|
40
|
-
required: true,
|
|
41
|
-
},
|
|
42
|
-
return_quantity: {
|
|
43
|
-
type: Number,
|
|
44
|
-
min: 0,
|
|
45
|
-
required: true,
|
|
46
|
-
},
|
|
47
|
-
price: {
|
|
48
|
-
type: Number,
|
|
49
|
-
min: 0,
|
|
50
|
-
required: true,
|
|
51
|
-
},
|
|
52
|
-
subtotal: {
|
|
53
|
-
type: Number,
|
|
54
|
-
min: 0,
|
|
55
|
-
required: true,
|
|
56
|
-
},
|
|
57
|
-
reason: {
|
|
58
|
-
type: String,
|
|
59
|
-
required: false,
|
|
60
|
-
},
|
|
61
|
-
}, {
|
|
62
|
-
_id: false,
|
|
63
|
-
minimize: false,
|
|
64
|
-
});
|
|
65
|
-
exports.PurchaseOrderVendorReturnsSchema = new mongoose_1.Schema({
|
|
66
|
-
_id: {
|
|
67
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
68
|
-
required: true,
|
|
69
|
-
immutable: true,
|
|
70
|
-
},
|
|
71
|
-
warehouse_id: {
|
|
72
|
-
type: String,
|
|
73
|
-
required: true,
|
|
74
|
-
ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
|
|
75
|
-
},
|
|
76
|
-
purchase_order_id: {
|
|
77
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
78
|
-
required: true,
|
|
79
|
-
ref: purchase_orders_1.PURCHASE_ORDER_COLLECTION_NAME,
|
|
80
|
-
},
|
|
81
|
-
vendor_id: {
|
|
82
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
83
|
-
required: true,
|
|
84
|
-
ref: warehouse_vendors_1.WAREHOUSE_VENDORS_COLLECTION_NAME,
|
|
85
|
-
},
|
|
86
|
-
vendor_name: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: '',
|
|
89
|
-
},
|
|
90
|
-
return_status: {
|
|
91
|
-
type: String,
|
|
92
|
-
enum: constants_1.ALL_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES,
|
|
93
|
-
required: true,
|
|
94
|
-
default: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CREATED,
|
|
95
|
-
},
|
|
96
|
-
inventory_consumed: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
required: true,
|
|
99
|
-
default: false,
|
|
100
|
-
},
|
|
101
|
-
items: {
|
|
102
|
-
type: [PurchaseOrderVendorReturnItemsSchema],
|
|
103
|
-
required: true,
|
|
104
|
-
default: [],
|
|
105
|
-
},
|
|
106
|
-
total_return_amount: {
|
|
107
|
-
type: Number,
|
|
108
|
-
min: 0,
|
|
109
|
-
required: true,
|
|
110
|
-
},
|
|
111
|
-
notes: {
|
|
112
|
-
type: String,
|
|
113
|
-
required: false,
|
|
114
|
-
},
|
|
115
|
-
created_by: {
|
|
116
|
-
type: PurchaseOrderVendorReturnActorSchema,
|
|
117
|
-
required: false,
|
|
118
|
-
},
|
|
119
|
-
approved_by: {
|
|
120
|
-
type: PurchaseOrderVendorReturnActorSchema,
|
|
121
|
-
required: false,
|
|
122
|
-
},
|
|
123
|
-
dispatched_by: {
|
|
124
|
-
type: PurchaseOrderVendorReturnActorSchema,
|
|
125
|
-
required: false,
|
|
126
|
-
},
|
|
127
|
-
vendor_confirmed_by: {
|
|
128
|
-
type: PurchaseOrderVendorReturnActorSchema,
|
|
129
|
-
required: false,
|
|
130
|
-
},
|
|
131
|
-
completed_by: {
|
|
132
|
-
type: PurchaseOrderVendorReturnActorSchema,
|
|
133
|
-
required: false,
|
|
134
|
-
},
|
|
135
|
-
cancelled_by: {
|
|
136
|
-
type: PurchaseOrderVendorReturnActorSchema,
|
|
137
|
-
required: false,
|
|
138
|
-
},
|
|
139
|
-
approved_at: {
|
|
140
|
-
type: mongoose_1.Schema.Types.Date,
|
|
141
|
-
required: false,
|
|
142
|
-
},
|
|
143
|
-
dispatched_at: {
|
|
144
|
-
type: mongoose_1.Schema.Types.Date,
|
|
145
|
-
required: false,
|
|
146
|
-
},
|
|
147
|
-
vendor_confirmed_at: {
|
|
148
|
-
type: mongoose_1.Schema.Types.Date,
|
|
149
|
-
required: false,
|
|
150
|
-
},
|
|
151
|
-
completed_at: {
|
|
152
|
-
type: mongoose_1.Schema.Types.Date,
|
|
153
|
-
required: false,
|
|
154
|
-
},
|
|
155
|
-
cancelled_at: {
|
|
156
|
-
type: mongoose_1.Schema.Types.Date,
|
|
157
|
-
required: false,
|
|
158
|
-
},
|
|
159
|
-
cancel_reason: {
|
|
160
|
-
type: String,
|
|
161
|
-
required: false,
|
|
162
|
-
},
|
|
163
|
-
createdAt_mins: {
|
|
164
|
-
type: Number,
|
|
165
|
-
required: true,
|
|
166
|
-
immutable: true,
|
|
167
|
-
default: () => {
|
|
168
|
-
const date = new Date();
|
|
169
|
-
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
createdAt: {
|
|
173
|
-
type: mongoose_1.Schema.Types.Date,
|
|
174
|
-
required: true,
|
|
175
|
-
default: () => new Date(),
|
|
176
|
-
immutable: true,
|
|
177
|
-
},
|
|
178
|
-
updatedAt: {
|
|
179
|
-
type: mongoose_1.Schema.Types.Date,
|
|
180
|
-
required: true,
|
|
181
|
-
default: () => new Date(),
|
|
182
|
-
},
|
|
183
|
-
}, {
|
|
184
|
-
timestamps: true,
|
|
185
|
-
versionKey: false,
|
|
186
|
-
minimize: false,
|
|
187
|
-
});
|
|
188
|
-
exports.PURCHASE_ORDER_VENDOR_RETURNS_COLLECTION_NAME = 'purchase_order_vendor_returns';
|