@managesome/eposmatic-toolkit 0.2.427 → 0.2.429
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/schemas/models/applied_order_discounts.d.ts +80 -0
- package/lib/schemas/models/applied_order_discounts.js +106 -0
- package/lib/schemas/models/brands.d.ts +45 -0
- package/lib/schemas/models/brands.js +45 -0
- package/lib/schemas/models/categories.d.ts +60 -0
- package/lib/schemas/models/categories.js +67 -0
- package/lib/schemas/models/close_dates.js +2 -2
- package/lib/schemas/models/dinein_tables.d.ts +6 -6
- package/lib/schemas/models/dinein_tables_fingerprints.d.ts +65 -0
- package/lib/schemas/models/dinein_tables_fingerprints.js +85 -0
- package/lib/schemas/models/discounts.js +3 -3
- package/lib/schemas/models/expense_categories.d.ts +83 -0
- package/lib/schemas/models/expense_categories.js +64 -0
- package/lib/schemas/models/halfhalf_setup.js +3 -3
- package/lib/schemas/models/index.d.ts +23 -23
- package/lib/schemas/models/index.js +23 -23
- package/lib/schemas/models/inventories.d.ts +99 -0
- package/lib/schemas/models/inventories.js +87 -0
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +15 -15
- package/lib/schemas/models/items.d.ts +11269 -0
- package/lib/schemas/models/items.js +333 -0
- package/lib/schemas/models/menus.d.ts +941 -0
- package/lib/schemas/models/menus.js +69 -0
- package/lib/schemas/models/offers.js +3 -3
- package/lib/schemas/models/orders.d.ts +15437 -0
- package/lib/schemas/models/orders.js +891 -0
- package/lib/schemas/models/public_holidays.js +2 -2
- package/lib/schemas/models/purchase_order_receipts.d.ts +3 -3
- package/lib/schemas/models/purchase_order_receipts.js +2 -2
- package/lib/schemas/models/purchase_order_rfqs.d.ts +1959 -0
- package/lib/schemas/models/purchase_order_rfqs.js +328 -0
- package/lib/schemas/models/purchase_order_vendor_returns.d.ts +15 -15
- package/lib/schemas/models/purchase_order_vendor_returns.js +2 -2
- package/lib/schemas/models/purchase_orders.js +4 -4
- package/lib/schemas/models/riders.d.ts +65 -0
- package/lib/schemas/models/riders.js +74 -0
- package/lib/schemas/models/specials.js +3 -3
- package/lib/schemas/models/tenant_staffs.d.ts +932 -0
- package/lib/schemas/models/tenant_staffs.js +96 -0
- package/lib/schemas/models/tenants.d.ts +528 -0
- package/lib/schemas/models/tenants.js +755 -0
- package/lib/schemas/models/track_order_numbers.d.ts +413 -0
- package/lib/schemas/models/track_order_numbers.js +45 -0
- package/lib/schemas/models/void_purchase_order_items.js +2 -2
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +6 -6
- package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
- package/lib/schemas/models/wallets.d.ts +38 -0
- package/lib/schemas/models/wallets.js +37 -0
- package/lib/schemas/models/warehouse-activity-logs.js +2 -2
- package/lib/schemas/models/warehouse_communications.d.ts +228 -0
- package/lib/schemas/models/warehouse_communications.js +216 -0
- package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -34
- package/lib/schemas/models/warehouse_internal_movements.js +2 -34
- package/lib/schemas/models/warehouse_invoices.js +2 -2
- package/lib/schemas/models/warehouse_items.js +2 -2
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +167 -0
- package/lib/schemas/models/warehouse_sale_deliveries.js +155 -0
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +227 -0
- package/lib/schemas/models/warehouse_sale_invoices.js +206 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +1938 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.js +309 -0
- package/lib/schemas/models/warehouse_sale_orders.d.ts +1943 -0
- package/lib/schemas/models/warehouse_sale_orders.js +324 -0
- package/lib/schemas/models/warehouse_staffs.d.ts +65 -0
- package/lib/schemas/models/warehouse_staffs.js +78 -0
- package/lib/schemas/models/warehouse_track_order_numbers.d.ts +50 -0
- package/lib/schemas/models/warehouse_track_order_numbers.js +52 -0
- package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
- package/lib/schemas/models/warehouses.d.ts +162 -0
- package/lib/schemas/models/warehouses.js +222 -0
- package/lib/schemas/types/applied_order_discounts.d.ts +22 -0
- package/lib/schemas/types/applied_order_discounts.js +2 -0
- package/lib/schemas/types/brands.d.ts +32 -0
- package/lib/schemas/types/brands.js +2 -0
- package/lib/schemas/types/categories.d.ts +15 -0
- package/lib/schemas/types/categories.js +2 -0
- package/lib/schemas/types/deliveries.d.ts +1 -1
- package/lib/schemas/types/expense_categories.d.ts +20 -0
- package/lib/schemas/types/expense_categories.js +2 -0
- package/lib/schemas/types/expense_details.d.ts +1 -1
- package/lib/schemas/types/index.d.ts +22 -22
- package/lib/schemas/types/index.js +22 -22
- package/lib/schemas/types/inventories.d.ts +48 -0
- package/lib/schemas/types/inventories.js +2 -0
- package/lib/schemas/types/items.d.ts +89 -0
- package/lib/schemas/types/items.js +2 -0
- package/lib/schemas/types/menus.d.ts +17 -0
- package/lib/schemas/types/menus.js +2 -0
- package/lib/schemas/types/multi_tenants.d.ts +2 -2
- package/lib/schemas/types/orders.d.ts +242 -0
- package/lib/schemas/types/orders.js +2 -0
- package/lib/schemas/types/purchase_order_common.d.ts +1 -1
- package/lib/schemas/types/purchase_order_rfqs.d.ts +33 -0
- package/lib/schemas/types/purchase_order_rfqs.js +2 -0
- package/lib/schemas/types/purchase_orders.d.ts +1 -1
- package/lib/schemas/types/reservations.d.ts +1 -1
- package/lib/schemas/types/riders.d.ts +16 -0
- package/lib/schemas/types/riders.js +2 -0
- package/lib/schemas/types/sale_order_common.d.ts +1 -1
- package/lib/schemas/types/specials.d.ts +1 -1
- package/lib/schemas/types/tenant_staffs.d.ts +22 -0
- package/lib/schemas/types/tenant_staffs.js +2 -0
- package/lib/schemas/types/tenants.d.ts +205 -0
- package/lib/schemas/types/tenants.js +2 -0
- package/lib/schemas/types/track_order_numbers.d.ts +10 -0
- package/lib/schemas/types/track_order_numbers.js +2 -0
- package/lib/schemas/types/wallets.d.ts +7 -0
- package/lib/schemas/types/wallets.js +2 -0
- package/lib/schemas/types/warehouse_communications.d.ts +54 -0
- package/lib/schemas/types/warehouse_communications.js +2 -0
- package/lib/schemas/types/warehouse_internal_movements.d.ts +2 -2
- package/lib/schemas/types/warehouse_invoices.d.ts +1 -1
- package/lib/schemas/types/warehouse_sale_deliveries.d.ts +67 -0
- package/lib/schemas/types/warehouse_sale_deliveries.js +2 -0
- package/lib/schemas/types/warehouse_sale_invoices.d.ts +49 -0
- package/lib/schemas/types/warehouse_sale_invoices.js +2 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +25 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.js +2 -0
- package/lib/schemas/types/warehouse_sale_orders.d.ts +30 -0
- package/lib/schemas/types/warehouse_sale_orders.js +2 -0
- package/lib/schemas/types/warehouse_staffs.d.ts +17 -0
- package/lib/schemas/types/warehouse_staffs.js +2 -0
- package/lib/schemas/types/warehouse_track_order_numbers.d.ts +11 -0
- package/lib/schemas/types/warehouse_track_order_numbers.js +2 -0
- package/lib/schemas/types/warehouses.d.ts +49 -0
- package/lib/schemas/types/warehouses.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { COMMUNICATION_CHANNEL_ENUM } from '../../constants';
|
|
3
|
+
export declare const WarehouseCommunicationsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
versionKey: false;
|
|
6
|
+
minimize: false;
|
|
7
|
+
}, {
|
|
8
|
+
createdAt: NativeDate;
|
|
9
|
+
updatedAt: NativeDate;
|
|
10
|
+
} & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
createdAt: NativeDate;
|
|
13
|
+
updatedAt: NativeDate;
|
|
14
|
+
description: string;
|
|
15
|
+
warehouse_id: string;
|
|
16
|
+
document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
|
|
17
|
+
document_id: string;
|
|
18
|
+
communication_channel: COMMUNICATION_CHANNEL_ENUM;
|
|
19
|
+
to: string;
|
|
20
|
+
subject: string;
|
|
21
|
+
metadata: {
|
|
22
|
+
grand_total: number;
|
|
23
|
+
subtotal: number;
|
|
24
|
+
support_email: string;
|
|
25
|
+
currency_symbol: string;
|
|
26
|
+
warehouse_name: string;
|
|
27
|
+
warehouse_logo_url: string;
|
|
28
|
+
counterparty_name: string;
|
|
29
|
+
counterparty_email: string;
|
|
30
|
+
issued_date: string;
|
|
31
|
+
line_items: import("mongoose").Types.DocumentArray<{
|
|
32
|
+
name: string;
|
|
33
|
+
price: number;
|
|
34
|
+
quantity: number;
|
|
35
|
+
subtotal: number;
|
|
36
|
+
currency_symbol?: string | null | undefined;
|
|
37
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
38
|
+
name: string;
|
|
39
|
+
price: number;
|
|
40
|
+
quantity: number;
|
|
41
|
+
subtotal: number;
|
|
42
|
+
currency_symbol?: string | null | undefined;
|
|
43
|
+
}> & {
|
|
44
|
+
name: string;
|
|
45
|
+
price: number;
|
|
46
|
+
quantity: number;
|
|
47
|
+
subtotal: number;
|
|
48
|
+
currency_symbol?: string | null | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
action_buttons: import("mongoose").Types.DocumentArray<{
|
|
51
|
+
title: string;
|
|
52
|
+
url: string;
|
|
53
|
+
button_color: string;
|
|
54
|
+
button_text_color: string;
|
|
55
|
+
icon?: string | null | undefined;
|
|
56
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
57
|
+
title: string;
|
|
58
|
+
url: string;
|
|
59
|
+
button_color: string;
|
|
60
|
+
button_text_color: string;
|
|
61
|
+
icon?: string | null | undefined;
|
|
62
|
+
}> & {
|
|
63
|
+
title: string;
|
|
64
|
+
url: string;
|
|
65
|
+
button_color: string;
|
|
66
|
+
button_text_color: string;
|
|
67
|
+
icon?: string | null | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
reference_number?: string | null | undefined;
|
|
70
|
+
order_number?: number | null | undefined;
|
|
71
|
+
notes?: string | null | undefined;
|
|
72
|
+
gst?: number | null | undefined;
|
|
73
|
+
gst_amount?: number | null | undefined;
|
|
74
|
+
is_gst_inclusive?: boolean | null | undefined;
|
|
75
|
+
expected_deadline?: string | null | undefined;
|
|
76
|
+
payment_terms_days?: number | null | undefined;
|
|
77
|
+
};
|
|
78
|
+
sent_at?: NativeDate | null | undefined;
|
|
79
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
80
|
+
createdAt: NativeDate;
|
|
81
|
+
updatedAt: NativeDate;
|
|
82
|
+
} & {
|
|
83
|
+
_id: import("mongoose").Types.ObjectId;
|
|
84
|
+
createdAt: NativeDate;
|
|
85
|
+
updatedAt: NativeDate;
|
|
86
|
+
description: string;
|
|
87
|
+
warehouse_id: string;
|
|
88
|
+
document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
|
|
89
|
+
document_id: string;
|
|
90
|
+
communication_channel: COMMUNICATION_CHANNEL_ENUM;
|
|
91
|
+
to: string;
|
|
92
|
+
subject: string;
|
|
93
|
+
metadata: {
|
|
94
|
+
grand_total: number;
|
|
95
|
+
subtotal: number;
|
|
96
|
+
support_email: string;
|
|
97
|
+
currency_symbol: string;
|
|
98
|
+
warehouse_name: string;
|
|
99
|
+
warehouse_logo_url: string;
|
|
100
|
+
counterparty_name: string;
|
|
101
|
+
counterparty_email: string;
|
|
102
|
+
issued_date: string;
|
|
103
|
+
line_items: import("mongoose").Types.DocumentArray<{
|
|
104
|
+
name: string;
|
|
105
|
+
price: number;
|
|
106
|
+
quantity: number;
|
|
107
|
+
subtotal: number;
|
|
108
|
+
currency_symbol?: string | null | undefined;
|
|
109
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
110
|
+
name: string;
|
|
111
|
+
price: number;
|
|
112
|
+
quantity: number;
|
|
113
|
+
subtotal: number;
|
|
114
|
+
currency_symbol?: string | null | undefined;
|
|
115
|
+
}> & {
|
|
116
|
+
name: string;
|
|
117
|
+
price: number;
|
|
118
|
+
quantity: number;
|
|
119
|
+
subtotal: number;
|
|
120
|
+
currency_symbol?: string | null | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
action_buttons: import("mongoose").Types.DocumentArray<{
|
|
123
|
+
title: string;
|
|
124
|
+
url: string;
|
|
125
|
+
button_color: string;
|
|
126
|
+
button_text_color: string;
|
|
127
|
+
icon?: string | null | undefined;
|
|
128
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
129
|
+
title: string;
|
|
130
|
+
url: string;
|
|
131
|
+
button_color: string;
|
|
132
|
+
button_text_color: string;
|
|
133
|
+
icon?: string | null | undefined;
|
|
134
|
+
}> & {
|
|
135
|
+
title: string;
|
|
136
|
+
url: string;
|
|
137
|
+
button_color: string;
|
|
138
|
+
button_text_color: string;
|
|
139
|
+
icon?: string | null | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
reference_number?: string | null | undefined;
|
|
142
|
+
order_number?: number | null | undefined;
|
|
143
|
+
notes?: string | null | undefined;
|
|
144
|
+
gst?: number | null | undefined;
|
|
145
|
+
gst_amount?: number | null | undefined;
|
|
146
|
+
is_gst_inclusive?: boolean | null | undefined;
|
|
147
|
+
expected_deadline?: string | null | undefined;
|
|
148
|
+
payment_terms_days?: number | null | undefined;
|
|
149
|
+
};
|
|
150
|
+
sent_at?: NativeDate | null | undefined;
|
|
151
|
+
}>> & import("mongoose").FlatRecord<{
|
|
152
|
+
createdAt: NativeDate;
|
|
153
|
+
updatedAt: NativeDate;
|
|
154
|
+
} & {
|
|
155
|
+
_id: import("mongoose").Types.ObjectId;
|
|
156
|
+
createdAt: NativeDate;
|
|
157
|
+
updatedAt: NativeDate;
|
|
158
|
+
description: string;
|
|
159
|
+
warehouse_id: string;
|
|
160
|
+
document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
|
|
161
|
+
document_id: string;
|
|
162
|
+
communication_channel: COMMUNICATION_CHANNEL_ENUM;
|
|
163
|
+
to: string;
|
|
164
|
+
subject: string;
|
|
165
|
+
metadata: {
|
|
166
|
+
grand_total: number;
|
|
167
|
+
subtotal: number;
|
|
168
|
+
support_email: string;
|
|
169
|
+
currency_symbol: string;
|
|
170
|
+
warehouse_name: string;
|
|
171
|
+
warehouse_logo_url: string;
|
|
172
|
+
counterparty_name: string;
|
|
173
|
+
counterparty_email: string;
|
|
174
|
+
issued_date: string;
|
|
175
|
+
line_items: import("mongoose").Types.DocumentArray<{
|
|
176
|
+
name: string;
|
|
177
|
+
price: number;
|
|
178
|
+
quantity: number;
|
|
179
|
+
subtotal: number;
|
|
180
|
+
currency_symbol?: string | null | undefined;
|
|
181
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
182
|
+
name: string;
|
|
183
|
+
price: number;
|
|
184
|
+
quantity: number;
|
|
185
|
+
subtotal: number;
|
|
186
|
+
currency_symbol?: string | null | undefined;
|
|
187
|
+
}> & {
|
|
188
|
+
name: string;
|
|
189
|
+
price: number;
|
|
190
|
+
quantity: number;
|
|
191
|
+
subtotal: number;
|
|
192
|
+
currency_symbol?: string | null | undefined;
|
|
193
|
+
}>;
|
|
194
|
+
action_buttons: import("mongoose").Types.DocumentArray<{
|
|
195
|
+
title: string;
|
|
196
|
+
url: string;
|
|
197
|
+
button_color: string;
|
|
198
|
+
button_text_color: string;
|
|
199
|
+
icon?: string | null | undefined;
|
|
200
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
201
|
+
title: string;
|
|
202
|
+
url: string;
|
|
203
|
+
button_color: string;
|
|
204
|
+
button_text_color: string;
|
|
205
|
+
icon?: string | null | undefined;
|
|
206
|
+
}> & {
|
|
207
|
+
title: string;
|
|
208
|
+
url: string;
|
|
209
|
+
button_color: string;
|
|
210
|
+
button_text_color: string;
|
|
211
|
+
icon?: string | null | undefined;
|
|
212
|
+
}>;
|
|
213
|
+
reference_number?: string | null | undefined;
|
|
214
|
+
order_number?: number | null | undefined;
|
|
215
|
+
notes?: string | null | undefined;
|
|
216
|
+
gst?: number | null | undefined;
|
|
217
|
+
gst_amount?: number | null | undefined;
|
|
218
|
+
is_gst_inclusive?: boolean | null | undefined;
|
|
219
|
+
expected_deadline?: string | null | undefined;
|
|
220
|
+
payment_terms_days?: number | null | undefined;
|
|
221
|
+
};
|
|
222
|
+
sent_at?: NativeDate | null | undefined;
|
|
223
|
+
}> & Required<{
|
|
224
|
+
_id: import("mongoose").Types.ObjectId;
|
|
225
|
+
}> & {
|
|
226
|
+
__v: number;
|
|
227
|
+
}>;
|
|
228
|
+
export declare const WAREHOUSE_COMMUNICATIONS_COLLECTION_NAME = "warehouse_communications";
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WAREHOUSE_COMMUNICATIONS_COLLECTION_NAME = exports.WarehouseCommunicationsSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const warehouses_1 = require("./warehouses");
|
|
7
|
+
const WarehouseCommunicationActionButtonSchema = new mongoose_1.Schema({
|
|
8
|
+
title: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
url: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
button_color: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
button_text_color: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
icon: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
28
|
+
}, {
|
|
29
|
+
_id: false,
|
|
30
|
+
minimize: false,
|
|
31
|
+
});
|
|
32
|
+
const WarehouseCommunicationLineItemSchema = new mongoose_1.Schema({
|
|
33
|
+
name: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
quantity: {
|
|
38
|
+
type: Number,
|
|
39
|
+
min: 0,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
price: {
|
|
43
|
+
type: Number,
|
|
44
|
+
min: 0,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
subtotal: {
|
|
48
|
+
type: Number,
|
|
49
|
+
min: 0,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
currency_symbol: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: false,
|
|
55
|
+
},
|
|
56
|
+
}, {
|
|
57
|
+
_id: false,
|
|
58
|
+
minimize: false,
|
|
59
|
+
});
|
|
60
|
+
const WarehouseCommunicationMetadataSchema = new mongoose_1.Schema({
|
|
61
|
+
warehouse_name: {
|
|
62
|
+
type: String,
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
warehouse_logo_url: {
|
|
66
|
+
type: String,
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
support_email: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
73
|
+
counterparty_name: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: true,
|
|
76
|
+
},
|
|
77
|
+
counterparty_email: {
|
|
78
|
+
type: String,
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
reference_number: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: false,
|
|
84
|
+
default: null,
|
|
85
|
+
},
|
|
86
|
+
order_number: {
|
|
87
|
+
type: Number,
|
|
88
|
+
required: false,
|
|
89
|
+
default: null,
|
|
90
|
+
},
|
|
91
|
+
issued_date: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
expected_deadline: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: false,
|
|
98
|
+
default: null,
|
|
99
|
+
},
|
|
100
|
+
payment_terms_days: {
|
|
101
|
+
type: Number,
|
|
102
|
+
required: false,
|
|
103
|
+
default: null,
|
|
104
|
+
},
|
|
105
|
+
currency_symbol: {
|
|
106
|
+
type: String,
|
|
107
|
+
required: true,
|
|
108
|
+
},
|
|
109
|
+
subtotal: {
|
|
110
|
+
type: Number,
|
|
111
|
+
min: 0,
|
|
112
|
+
required: true,
|
|
113
|
+
},
|
|
114
|
+
gst: {
|
|
115
|
+
type: Number,
|
|
116
|
+
min: 0,
|
|
117
|
+
required: false,
|
|
118
|
+
default: null,
|
|
119
|
+
},
|
|
120
|
+
gst_amount: {
|
|
121
|
+
type: Number,
|
|
122
|
+
min: 0,
|
|
123
|
+
required: false,
|
|
124
|
+
default: null,
|
|
125
|
+
},
|
|
126
|
+
is_gst_inclusive: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
required: false,
|
|
129
|
+
default: null,
|
|
130
|
+
},
|
|
131
|
+
grand_total: {
|
|
132
|
+
type: Number,
|
|
133
|
+
min: 0,
|
|
134
|
+
required: true,
|
|
135
|
+
},
|
|
136
|
+
line_items: {
|
|
137
|
+
type: [WarehouseCommunicationLineItemSchema],
|
|
138
|
+
default: [],
|
|
139
|
+
},
|
|
140
|
+
notes: {
|
|
141
|
+
type: String,
|
|
142
|
+
required: false,
|
|
143
|
+
default: null,
|
|
144
|
+
},
|
|
145
|
+
action_buttons: {
|
|
146
|
+
type: [WarehouseCommunicationActionButtonSchema],
|
|
147
|
+
default: [],
|
|
148
|
+
},
|
|
149
|
+
}, {
|
|
150
|
+
_id: false,
|
|
151
|
+
minimize: false,
|
|
152
|
+
});
|
|
153
|
+
exports.WarehouseCommunicationsSchema = new mongoose_1.Schema({
|
|
154
|
+
_id: {
|
|
155
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
156
|
+
required: true,
|
|
157
|
+
immutable: true,
|
|
158
|
+
},
|
|
159
|
+
warehouse_id: {
|
|
160
|
+
type: String,
|
|
161
|
+
required: true,
|
|
162
|
+
ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
|
|
163
|
+
},
|
|
164
|
+
document_kind: {
|
|
165
|
+
type: String,
|
|
166
|
+
enum: constants_1.ALL_EMAIL_DOCUMENT_KINDS,
|
|
167
|
+
required: true,
|
|
168
|
+
},
|
|
169
|
+
document_id: {
|
|
170
|
+
type: String,
|
|
171
|
+
required: true,
|
|
172
|
+
},
|
|
173
|
+
communication_channel: {
|
|
174
|
+
type: String,
|
|
175
|
+
enum: constants_1.ALL_COMMUNICATION_CHANNELS,
|
|
176
|
+
required: true,
|
|
177
|
+
default: constants_1.COMMUNICATION_CHANNEL_ENUM.EMAIL,
|
|
178
|
+
},
|
|
179
|
+
to: {
|
|
180
|
+
type: String,
|
|
181
|
+
required: true,
|
|
182
|
+
},
|
|
183
|
+
subject: {
|
|
184
|
+
type: String,
|
|
185
|
+
required: true,
|
|
186
|
+
},
|
|
187
|
+
description: {
|
|
188
|
+
type: String,
|
|
189
|
+
default: '',
|
|
190
|
+
},
|
|
191
|
+
metadata: {
|
|
192
|
+
type: WarehouseCommunicationMetadataSchema,
|
|
193
|
+
required: true,
|
|
194
|
+
},
|
|
195
|
+
sent_at: {
|
|
196
|
+
type: mongoose_1.Schema.Types.Date,
|
|
197
|
+
required: false,
|
|
198
|
+
default: null,
|
|
199
|
+
},
|
|
200
|
+
createdAt: {
|
|
201
|
+
type: mongoose_1.Schema.Types.Date,
|
|
202
|
+
required: true,
|
|
203
|
+
default: () => new Date(),
|
|
204
|
+
immutable: true,
|
|
205
|
+
},
|
|
206
|
+
updatedAt: {
|
|
207
|
+
type: mongoose_1.Schema.Types.Date,
|
|
208
|
+
required: true,
|
|
209
|
+
default: () => new Date(),
|
|
210
|
+
},
|
|
211
|
+
}, {
|
|
212
|
+
timestamps: true,
|
|
213
|
+
versionKey: false,
|
|
214
|
+
minimize: false,
|
|
215
|
+
});
|
|
216
|
+
exports.WAREHOUSE_COMMUNICATIONS_COLLECTION_NAME = 'warehouse_communications';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
|
-
import { INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM } from '../../constants';
|
|
3
2
|
export declare const WAREHOUSE_INTERNAL_MOVEMENTS_COLLECTION_NAME = "warehouse_internal_movements";
|
|
4
3
|
export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
5
4
|
timestamps: true;
|
|
@@ -56,8 +55,6 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
56
55
|
name: string;
|
|
57
56
|
uid: string;
|
|
58
57
|
};
|
|
59
|
-
edit_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
60
|
-
cancel_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
61
58
|
parent_movement_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
62
59
|
notes?: string | null | undefined;
|
|
63
60
|
updated_by?: {
|
|
@@ -65,12 +62,16 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
65
62
|
uid: string;
|
|
66
63
|
} | null | undefined;
|
|
67
64
|
cancelled_reason?: string | null | undefined;
|
|
65
|
+
requested_at?: NativeDate | null | undefined;
|
|
66
|
+
approved_at?: NativeDate | null | undefined;
|
|
67
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
68
|
+
delivered_at?: NativeDate | null | undefined;
|
|
68
69
|
received_at?: NativeDate | null | undefined;
|
|
69
|
-
|
|
70
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
71
|
+
requested_by?: {
|
|
70
72
|
name: string;
|
|
71
73
|
uid: string;
|
|
72
74
|
} | null | undefined;
|
|
73
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
74
75
|
approved_by?: {
|
|
75
76
|
name: string;
|
|
76
77
|
uid: string;
|
|
@@ -79,22 +80,19 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
79
80
|
name: string;
|
|
80
81
|
uid: string;
|
|
81
82
|
} | null | undefined;
|
|
82
|
-
|
|
83
|
+
delivered_by?: {
|
|
83
84
|
name: string;
|
|
84
85
|
uid: string;
|
|
85
86
|
} | null | undefined;
|
|
86
|
-
|
|
87
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
88
|
-
delivered_by?: {
|
|
87
|
+
received_by?: {
|
|
89
88
|
name: string;
|
|
90
89
|
uid: string;
|
|
91
90
|
} | null | undefined;
|
|
92
|
-
|
|
93
|
-
requested_at?: NativeDate | null | undefined;
|
|
94
|
-
requested_by?: {
|
|
91
|
+
cancelled_by?: {
|
|
95
92
|
name: string;
|
|
96
93
|
uid: string;
|
|
97
94
|
} | null | undefined;
|
|
95
|
+
edit_request_status?: import("../../constants").INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
98
96
|
edit_requested_at?: NativeDate | null | undefined;
|
|
99
97
|
edit_requested_by?: {
|
|
100
98
|
name: string;
|
|
@@ -108,6 +106,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
108
106
|
} | null | undefined;
|
|
109
107
|
edit_request_decision_note?: string | null | undefined;
|
|
110
108
|
edit_approved_for_context_id?: string | null | undefined;
|
|
109
|
+
cancel_request_status?: import("../../constants").INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
111
110
|
cancel_requested_at?: NativeDate | null | undefined;
|
|
112
111
|
cancel_requested_by?: {
|
|
113
112
|
name: string;
|
|
@@ -171,8 +170,6 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
171
170
|
name: string;
|
|
172
171
|
uid: string;
|
|
173
172
|
};
|
|
174
|
-
edit_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
175
|
-
cancel_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
176
173
|
parent_movement_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
177
174
|
notes?: string | null | undefined;
|
|
178
175
|
updated_by?: {
|
|
@@ -180,12 +177,16 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
180
177
|
uid: string;
|
|
181
178
|
} | null | undefined;
|
|
182
179
|
cancelled_reason?: string | null | undefined;
|
|
180
|
+
requested_at?: NativeDate | null | undefined;
|
|
181
|
+
approved_at?: NativeDate | null | undefined;
|
|
182
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
183
|
+
delivered_at?: NativeDate | null | undefined;
|
|
183
184
|
received_at?: NativeDate | null | undefined;
|
|
184
|
-
|
|
185
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
186
|
+
requested_by?: {
|
|
185
187
|
name: string;
|
|
186
188
|
uid: string;
|
|
187
189
|
} | null | undefined;
|
|
188
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
189
190
|
approved_by?: {
|
|
190
191
|
name: string;
|
|
191
192
|
uid: string;
|
|
@@ -194,22 +195,19 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
194
195
|
name: string;
|
|
195
196
|
uid: string;
|
|
196
197
|
} | null | undefined;
|
|
197
|
-
|
|
198
|
+
delivered_by?: {
|
|
198
199
|
name: string;
|
|
199
200
|
uid: string;
|
|
200
201
|
} | null | undefined;
|
|
201
|
-
|
|
202
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
203
|
-
delivered_by?: {
|
|
202
|
+
received_by?: {
|
|
204
203
|
name: string;
|
|
205
204
|
uid: string;
|
|
206
205
|
} | null | undefined;
|
|
207
|
-
|
|
208
|
-
requested_at?: NativeDate | null | undefined;
|
|
209
|
-
requested_by?: {
|
|
206
|
+
cancelled_by?: {
|
|
210
207
|
name: string;
|
|
211
208
|
uid: string;
|
|
212
209
|
} | null | undefined;
|
|
210
|
+
edit_request_status?: import("../../constants").INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
213
211
|
edit_requested_at?: NativeDate | null | undefined;
|
|
214
212
|
edit_requested_by?: {
|
|
215
213
|
name: string;
|
|
@@ -223,6 +221,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
223
221
|
} | null | undefined;
|
|
224
222
|
edit_request_decision_note?: string | null | undefined;
|
|
225
223
|
edit_approved_for_context_id?: string | null | undefined;
|
|
224
|
+
cancel_request_status?: import("../../constants").INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
226
225
|
cancel_requested_at?: NativeDate | null | undefined;
|
|
227
226
|
cancel_requested_by?: {
|
|
228
227
|
name: string;
|
|
@@ -286,8 +285,6 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
286
285
|
name: string;
|
|
287
286
|
uid: string;
|
|
288
287
|
};
|
|
289
|
-
edit_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
290
|
-
cancel_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
291
288
|
parent_movement_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
292
289
|
notes?: string | null | undefined;
|
|
293
290
|
updated_by?: {
|
|
@@ -295,12 +292,16 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
295
292
|
uid: string;
|
|
296
293
|
} | null | undefined;
|
|
297
294
|
cancelled_reason?: string | null | undefined;
|
|
295
|
+
requested_at?: NativeDate | null | undefined;
|
|
296
|
+
approved_at?: NativeDate | null | undefined;
|
|
297
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
298
|
+
delivered_at?: NativeDate | null | undefined;
|
|
298
299
|
received_at?: NativeDate | null | undefined;
|
|
299
|
-
|
|
300
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
301
|
+
requested_by?: {
|
|
300
302
|
name: string;
|
|
301
303
|
uid: string;
|
|
302
304
|
} | null | undefined;
|
|
303
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
304
305
|
approved_by?: {
|
|
305
306
|
name: string;
|
|
306
307
|
uid: string;
|
|
@@ -309,22 +310,19 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
309
310
|
name: string;
|
|
310
311
|
uid: string;
|
|
311
312
|
} | null | undefined;
|
|
312
|
-
|
|
313
|
+
delivered_by?: {
|
|
313
314
|
name: string;
|
|
314
315
|
uid: string;
|
|
315
316
|
} | null | undefined;
|
|
316
|
-
|
|
317
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
318
|
-
delivered_by?: {
|
|
317
|
+
received_by?: {
|
|
319
318
|
name: string;
|
|
320
319
|
uid: string;
|
|
321
320
|
} | null | undefined;
|
|
322
|
-
|
|
323
|
-
requested_at?: NativeDate | null | undefined;
|
|
324
|
-
requested_by?: {
|
|
321
|
+
cancelled_by?: {
|
|
325
322
|
name: string;
|
|
326
323
|
uid: string;
|
|
327
324
|
} | null | undefined;
|
|
325
|
+
edit_request_status?: import("../../constants").INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
328
326
|
edit_requested_at?: NativeDate | null | undefined;
|
|
329
327
|
edit_requested_by?: {
|
|
330
328
|
name: string;
|
|
@@ -338,6 +336,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
338
336
|
} | null | undefined;
|
|
339
337
|
edit_request_decision_note?: string | null | undefined;
|
|
340
338
|
edit_approved_for_context_id?: string | null | undefined;
|
|
339
|
+
cancel_request_status?: import("../../constants").INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
341
340
|
cancel_requested_at?: NativeDate | null | undefined;
|
|
342
341
|
cancel_requested_by?: {
|
|
343
342
|
name: string;
|