@managesome/eposmatic-toolkit 0.2.442 → 0.2.444
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/RFQ_GO.d.ts +37 -0
- package/lib/constants/RFQ_GO.js +87 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +1 -0
- package/lib/helpers/store/all-warehouse-purchase-order-vendor-return-actions.d.ts +13 -0
- package/lib/helpers/store/all-warehouse-purchase-order-vendor-return-actions.js +57 -0
- package/lib/helpers/store/common-warehouse-purchase-order-vendor-return-actions.d.ts +3 -0
- package/lib/helpers/store/common-warehouse-purchase-order-vendor-return-actions.js +29 -0
- package/lib/helpers/store/index.d.ts +2 -0
- package/lib/helpers/store/index.js +2 -0
- package/lib/schemas/models/tenant_purchase_order_vendor_returns.d.ts +18 -18
- package/lib/schemas/models/warehouse_internal_movements.d.ts +63 -63
- package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.d.ts +3 -3
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.d.ts +21 -21
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +15 -15
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare enum RFQ_PUBLIC_RESPOND_ACTION_ENUM {
|
|
2
|
+
CONFIRM = "confirm",
|
|
3
|
+
CANCEL = "cancel"
|
|
4
|
+
}
|
|
5
|
+
export declare const ALL_RFQ_PUBLIC_RESPOND_ACTIONS: RFQ_PUBLIC_RESPOND_ACTION_ENUM[];
|
|
6
|
+
export declare enum RFQ_PUBLIC_RESPOND_CODE_ENUM {
|
|
7
|
+
PROCESSED = "PROCESSED",
|
|
8
|
+
ALREADY_PROCESSED = "ALREADY_PROCESSED",
|
|
9
|
+
EXPIRED = "EXPIRED",
|
|
10
|
+
NOT_FOUND = "NOT_FOUND",
|
|
11
|
+
INVALID_TRANSITION = "INVALID_TRANSITION",
|
|
12
|
+
/** Used by routes when the request body is missing required fields. */
|
|
13
|
+
INVALID_REQUEST = "INVALID_REQUEST"
|
|
14
|
+
}
|
|
15
|
+
export declare const ALL_RFQ_PUBLIC_RESPOND_CODES: RFQ_PUBLIC_RESPOND_CODE_ENUM[];
|
|
16
|
+
export type RfqType = 'purchase' | 'sale';
|
|
17
|
+
export type ActionStatus = 'PENDING' | 'COMPLETED' | 'EXPIRED' | 'INVALID';
|
|
18
|
+
export interface IRfqRespondPageResult {
|
|
19
|
+
status: ActionStatus;
|
|
20
|
+
title: string;
|
|
21
|
+
message: string;
|
|
22
|
+
completedAt?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function getRfqRespondPageResult(code: RFQ_PUBLIC_RESPOND_CODE_ENUM, action: RFQ_PUBLIC_RESPOND_ACTION_ENUM, rfqType: RfqType): IRfqRespondPageResult;
|
|
25
|
+
export interface IPublicRfqRespondRequest {
|
|
26
|
+
rfq_id: string;
|
|
27
|
+
vendor_id: string;
|
|
28
|
+
action: RFQ_PUBLIC_RESPOND_ACTION_ENUM;
|
|
29
|
+
}
|
|
30
|
+
export interface IPublicRfqRespondResponse {
|
|
31
|
+
success: boolean;
|
|
32
|
+
code: RFQ_PUBLIC_RESPOND_CODE_ENUM;
|
|
33
|
+
message: string;
|
|
34
|
+
order_status?: string;
|
|
35
|
+
rfq_id?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function getRfqPublicRespondMessage(code: RFQ_PUBLIC_RESPOND_CODE_ENUM, action: RFQ_PUBLIC_RESPOND_ACTION_ENUM): string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// TODO: Check this file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ALL_RFQ_PUBLIC_RESPOND_CODES = exports.RFQ_PUBLIC_RESPOND_CODE_ENUM = exports.ALL_RFQ_PUBLIC_RESPOND_ACTIONS = exports.RFQ_PUBLIC_RESPOND_ACTION_ENUM = void 0;
|
|
5
|
+
exports.getRfqRespondPageResult = getRfqRespondPageResult;
|
|
6
|
+
exports.getRfqPublicRespondMessage = getRfqPublicRespondMessage;
|
|
7
|
+
var RFQ_PUBLIC_RESPOND_ACTION_ENUM;
|
|
8
|
+
(function (RFQ_PUBLIC_RESPOND_ACTION_ENUM) {
|
|
9
|
+
RFQ_PUBLIC_RESPOND_ACTION_ENUM["CONFIRM"] = "confirm";
|
|
10
|
+
RFQ_PUBLIC_RESPOND_ACTION_ENUM["CANCEL"] = "cancel";
|
|
11
|
+
})(RFQ_PUBLIC_RESPOND_ACTION_ENUM || (exports.RFQ_PUBLIC_RESPOND_ACTION_ENUM = RFQ_PUBLIC_RESPOND_ACTION_ENUM = {}));
|
|
12
|
+
exports.ALL_RFQ_PUBLIC_RESPOND_ACTIONS = Object.values(RFQ_PUBLIC_RESPOND_ACTION_ENUM);
|
|
13
|
+
var RFQ_PUBLIC_RESPOND_CODE_ENUM;
|
|
14
|
+
(function (RFQ_PUBLIC_RESPOND_CODE_ENUM) {
|
|
15
|
+
RFQ_PUBLIC_RESPOND_CODE_ENUM["PROCESSED"] = "PROCESSED";
|
|
16
|
+
RFQ_PUBLIC_RESPOND_CODE_ENUM["ALREADY_PROCESSED"] = "ALREADY_PROCESSED";
|
|
17
|
+
RFQ_PUBLIC_RESPOND_CODE_ENUM["EXPIRED"] = "EXPIRED";
|
|
18
|
+
RFQ_PUBLIC_RESPOND_CODE_ENUM["NOT_FOUND"] = "NOT_FOUND";
|
|
19
|
+
RFQ_PUBLIC_RESPOND_CODE_ENUM["INVALID_TRANSITION"] = "INVALID_TRANSITION";
|
|
20
|
+
/** Used by routes when the request body is missing required fields. */
|
|
21
|
+
RFQ_PUBLIC_RESPOND_CODE_ENUM["INVALID_REQUEST"] = "INVALID_REQUEST";
|
|
22
|
+
})(RFQ_PUBLIC_RESPOND_CODE_ENUM || (exports.RFQ_PUBLIC_RESPOND_CODE_ENUM = RFQ_PUBLIC_RESPOND_CODE_ENUM = {}));
|
|
23
|
+
exports.ALL_RFQ_PUBLIC_RESPOND_CODES = Object.values(RFQ_PUBLIC_RESPOND_CODE_ENUM);
|
|
24
|
+
function getRfqRespondPageResult(code, action, rfqType) {
|
|
25
|
+
const label = rfqType === 'sale' ? 'Quotation' : 'RFQ';
|
|
26
|
+
switch (code) {
|
|
27
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.PROCESSED:
|
|
28
|
+
return {
|
|
29
|
+
status: 'PENDING',
|
|
30
|
+
title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? `${label} Accepted` : `${label} Declined`,
|
|
31
|
+
message: getRfqPublicRespondMessage(code, action),
|
|
32
|
+
};
|
|
33
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.ALREADY_PROCESSED:
|
|
34
|
+
return {
|
|
35
|
+
status: 'COMPLETED',
|
|
36
|
+
title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? 'Already Accepted' : 'Already Declined',
|
|
37
|
+
message: getRfqPublicRespondMessage(code, action),
|
|
38
|
+
};
|
|
39
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.EXPIRED:
|
|
40
|
+
return {
|
|
41
|
+
status: 'EXPIRED',
|
|
42
|
+
title: `${label} Expired`,
|
|
43
|
+
message: getRfqPublicRespondMessage(code, action),
|
|
44
|
+
};
|
|
45
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.NOT_FOUND:
|
|
46
|
+
return {
|
|
47
|
+
status: 'INVALID',
|
|
48
|
+
title: `${label} Not Found`,
|
|
49
|
+
message: getRfqPublicRespondMessage(code, action),
|
|
50
|
+
};
|
|
51
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.INVALID_TRANSITION:
|
|
52
|
+
return {
|
|
53
|
+
status: 'INVALID',
|
|
54
|
+
title: 'Action Not Allowed',
|
|
55
|
+
message: getRfqPublicRespondMessage(code, action),
|
|
56
|
+
};
|
|
57
|
+
default:
|
|
58
|
+
return {
|
|
59
|
+
status: 'INVALID',
|
|
60
|
+
title: 'Unexpected Error',
|
|
61
|
+
message: 'An unexpected response was received. Please try again or contact support.',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ─── Message helpers ───────────────────────────────────────────────
|
|
66
|
+
function getRfqPublicRespondMessage(code, action) {
|
|
67
|
+
switch (code) {
|
|
68
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.PROCESSED:
|
|
69
|
+
return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
|
|
70
|
+
? 'You have accepted this RFQ. The buyer will review your response.'
|
|
71
|
+
: 'You have declined this RFQ.';
|
|
72
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.ALREADY_PROCESSED:
|
|
73
|
+
return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
|
|
74
|
+
? 'You have already accepted this RFQ.'
|
|
75
|
+
: 'You have already declined this RFQ.';
|
|
76
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.EXPIRED:
|
|
77
|
+
return 'This RFQ has expired and can no longer be responded to.';
|
|
78
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.NOT_FOUND:
|
|
79
|
+
return 'This RFQ could not be found. It may have been deleted or the link is invalid.';
|
|
80
|
+
case RFQ_PUBLIC_RESPOND_CODE_ENUM.INVALID_TRANSITION:
|
|
81
|
+
return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
|
|
82
|
+
? 'This RFQ has already been declined and cannot be accepted.'
|
|
83
|
+
: 'This RFQ has already been accepted and cannot be declined via this link.';
|
|
84
|
+
default:
|
|
85
|
+
return 'An unknown error occurred.';
|
|
86
|
+
}
|
|
87
|
+
}
|
package/lib/constants/index.d.ts
CHANGED
package/lib/constants/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./NOTIFICATIONS"), exports);
|
|
|
24
24
|
__exportStar(require("./ORDER"), exports);
|
|
25
25
|
__exportStar(require("./PRA_ENUMS"), exports);
|
|
26
26
|
__exportStar(require("./REPORT_WEBVIEW"), exports);
|
|
27
|
+
__exportStar(require("./RFQ_GO"), exports);
|
|
27
28
|
__exportStar(require("./SMARTPAY_ENUMS"), exports);
|
|
28
29
|
__exportStar(require("./SOCKET"), exports);
|
|
29
30
|
__exportStar(require("./SRB_ENUMS"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehousePurchaseOrderVendorReturn, IWarehousePurchaseOrderVendorReturnStatus } from '../../schemas';
|
|
3
|
+
export declare function getWarehousePurchaseOrderVendorReturnsFetchedData(data: IWarehousePurchaseOrderVendorReturn[]): IWarehousePurchaseOrderVendorReturn[];
|
|
4
|
+
export declare function getWarehousePurchaseOrderVendorReturnsPostedData(data: IWarehousePurchaseOrderVendorReturn[], order: IWarehousePurchaseOrderVendorReturn): IWarehousePurchaseOrderVendorReturn[];
|
|
5
|
+
export declare function getWarehousePurchaseOrderVendorReturnsUpdatedData(data: IWarehousePurchaseOrderVendorReturn[], order: Partial<IWarehousePurchaseOrderVendorReturn>): IWarehousePurchaseOrderVendorReturn[];
|
|
6
|
+
export declare function getWarehousePurchaseOrderVendorReturnsDeletedData(data: IWarehousePurchaseOrderVendorReturn[], orderId: string): IWarehousePurchaseOrderVendorReturn[];
|
|
7
|
+
interface IWarehouseGetVendorReturnStatusInfoReturn {
|
|
8
|
+
currentOrderStatus: IWarehousePurchaseOrderVendorReturnStatus | null;
|
|
9
|
+
nextOrderStatus: IWarehousePurchaseOrderVendorReturnStatus | null;
|
|
10
|
+
orderProgress: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function getWarehousePurchaseOrderVendorReturnStatusInfo(currentStatus: WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM): IWarehouseGetVendorReturnStatusInfoReturn;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWarehousePurchaseOrderVendorReturnsFetchedData = getWarehousePurchaseOrderVendorReturnsFetchedData;
|
|
4
|
+
exports.getWarehousePurchaseOrderVendorReturnsPostedData = getWarehousePurchaseOrderVendorReturnsPostedData;
|
|
5
|
+
exports.getWarehousePurchaseOrderVendorReturnsUpdatedData = getWarehousePurchaseOrderVendorReturnsUpdatedData;
|
|
6
|
+
exports.getWarehousePurchaseOrderVendorReturnsDeletedData = getWarehousePurchaseOrderVendorReturnsDeletedData;
|
|
7
|
+
exports.getWarehousePurchaseOrderVendorReturnStatusInfo = getWarehousePurchaseOrderVendorReturnStatusInfo;
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
const common_order_actions_1 = require("./common-order-actions");
|
|
10
|
+
const common_warehouse_purchase_order_vendor_return_actions_1 = require("./common-warehouse-purchase-order-vendor-return-actions");
|
|
11
|
+
function getWarehousePurchaseOrderVendorReturnsFetchedData(data) {
|
|
12
|
+
return data.map((order) => (0, common_warehouse_purchase_order_vendor_return_actions_1.getWarehousePurchaseOrderVendorReturnWithPrice)(order, false)).sort(common_order_actions_1.sortByCreatedAt);
|
|
13
|
+
}
|
|
14
|
+
function getWarehousePurchaseOrderVendorReturnsPostedData(data, order) {
|
|
15
|
+
const newOrders = data
|
|
16
|
+
.filter((item) => item._id !== order._id)
|
|
17
|
+
.concat((0, common_warehouse_purchase_order_vendor_return_actions_1.getWarehousePurchaseOrderVendorReturnWithPrice)(order));
|
|
18
|
+
return newOrders.sort(common_order_actions_1.sortByCreatedAt);
|
|
19
|
+
}
|
|
20
|
+
function getWarehousePurchaseOrderVendorReturnsUpdatedData(data, order) {
|
|
21
|
+
const updatedOrder = (0, common_warehouse_purchase_order_vendor_return_actions_1.getWarehousePurchaseOrderVendorReturnWithPrice)(order);
|
|
22
|
+
const newOrders = data.map((item) => item._id === updatedOrder._id ? { ...item, ...updatedOrder } : item);
|
|
23
|
+
return newOrders;
|
|
24
|
+
}
|
|
25
|
+
function getWarehousePurchaseOrderVendorReturnsDeletedData(data, orderId) {
|
|
26
|
+
return data.filter((item) => item._id !== orderId);
|
|
27
|
+
}
|
|
28
|
+
function getWarehousePurchaseOrderVendorReturnStatusInfo(currentStatus) {
|
|
29
|
+
const info = {
|
|
30
|
+
orderProgress: 0,
|
|
31
|
+
nextOrderStatus: null,
|
|
32
|
+
currentOrderStatus: null,
|
|
33
|
+
};
|
|
34
|
+
let currentStatusIndex;
|
|
35
|
+
for (let i = 0; i < constants_1.DEFAULT_WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUSES.length; i++) {
|
|
36
|
+
const obj = constants_1.DEFAULT_WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUSES[i];
|
|
37
|
+
if (obj.status === currentStatus) {
|
|
38
|
+
info.currentOrderStatus = obj;
|
|
39
|
+
currentStatusIndex = i;
|
|
40
|
+
if (info.currentOrderStatus.status !== constants_1.WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CANCELLED) {
|
|
41
|
+
// Total is -2 because we don't want to count the first and cancelled
|
|
42
|
+
const total = constants_1.DEFAULT_WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUSES.length - 2;
|
|
43
|
+
info.orderProgress = Math.round((obj.priority / total) * 100);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (currentStatusIndex == null) {
|
|
49
|
+
return info;
|
|
50
|
+
}
|
|
51
|
+
const nextObj = constants_1.DEFAULT_WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUSES[currentStatusIndex + 1];
|
|
52
|
+
if (!nextObj || nextObj.status === constants_1.WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CANCELLED) {
|
|
53
|
+
return info;
|
|
54
|
+
}
|
|
55
|
+
info.nextOrderStatus = nextObj;
|
|
56
|
+
return info;
|
|
57
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IWarehousePurchaseOrderVendorReturn, IWarehousePurchaseOrderVendorReturnItem } from '../../schemas';
|
|
2
|
+
export declare function getWarehousePurchaseOrderVendorReturnItemsWithPrice(items: IWarehousePurchaseOrderVendorReturnItem[] | undefined, convertToPrice: (price: number) => number): IWarehousePurchaseOrderVendorReturnItem[];
|
|
3
|
+
export declare function getWarehousePurchaseOrderVendorReturnWithPrice<T extends Partial<IWarehousePurchaseOrderVendorReturn> | IWarehousePurchaseOrderVendorReturn>(order: T, writeable?: boolean): T;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWarehousePurchaseOrderVendorReturnItemsWithPrice = getWarehousePurchaseOrderVendorReturnItemsWithPrice;
|
|
4
|
+
exports.getWarehousePurchaseOrderVendorReturnWithPrice = getWarehousePurchaseOrderVendorReturnWithPrice;
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function getWarehousePurchaseOrderVendorReturnItemsWithPrice(items, convertToPrice) {
|
|
7
|
+
if (!items)
|
|
8
|
+
return [];
|
|
9
|
+
return items.map((item) => ({
|
|
10
|
+
...item,
|
|
11
|
+
ordered_quantity: (0, utils_1.parseNum)(item.ordered_quantity || 1, true),
|
|
12
|
+
return_quantity: (0, utils_1.parseNum)(item.return_quantity, true),
|
|
13
|
+
price: convertToPrice(item.price ?? 0),
|
|
14
|
+
subtotal: convertToPrice(item.subtotal ?? 0),
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
function getWarehousePurchaseOrderVendorReturnWithPrice(order, writeable) {
|
|
18
|
+
const convertToPrice = writeable ? utils_1.convertDecimalToInt : utils_1.convertIntToDecimal;
|
|
19
|
+
const payload = {
|
|
20
|
+
...order,
|
|
21
|
+
...(order.items != null
|
|
22
|
+
? {
|
|
23
|
+
items: getWarehousePurchaseOrderVendorReturnItemsWithPrice(order.items, convertToPrice),
|
|
24
|
+
}
|
|
25
|
+
: {}),
|
|
26
|
+
...(order.total_return_amount != null ? { total_return_amount: convertToPrice(order.total_return_amount) } : {}),
|
|
27
|
+
};
|
|
28
|
+
return payload;
|
|
29
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './all-orders-actions';
|
|
2
2
|
export * from './all-warehouse-invoice-actions';
|
|
3
3
|
export * from './all-warehouse-purchase-order-rfqs-actions';
|
|
4
|
+
export * from './all-warehouse-purchase-order-vendor-return-actions';
|
|
4
5
|
export * from './all-warehouse-purchase-orders-actions';
|
|
5
6
|
export * from './all-warehouse-sale-order-rfqs-actions';
|
|
6
7
|
export * from './all-warehouse-sale-orders-actions';
|
|
@@ -10,6 +11,7 @@ export * from './common-order-actions';
|
|
|
10
11
|
export * from './common-warehouse-invoice-actions';
|
|
11
12
|
export * from './common-warehouse-purchase-order-actions';
|
|
12
13
|
export * from './common-warehouse-purchase-order-rfq-actions';
|
|
14
|
+
export * from './common-warehouse-purchase-order-vendor-return-actions';
|
|
13
15
|
export * from './common-warehouse-sale-order-actions';
|
|
14
16
|
export * from './common-warehouse-sale-order-rfq-actions';
|
|
15
17
|
export * from './offline-ordering';
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./all-orders-actions"), exports);
|
|
18
18
|
__exportStar(require("./all-warehouse-invoice-actions"), exports);
|
|
19
19
|
__exportStar(require("./all-warehouse-purchase-order-rfqs-actions"), exports);
|
|
20
|
+
__exportStar(require("./all-warehouse-purchase-order-vendor-return-actions"), exports);
|
|
20
21
|
__exportStar(require("./all-warehouse-purchase-orders-actions"), exports);
|
|
21
22
|
__exportStar(require("./all-warehouse-sale-order-rfqs-actions"), exports);
|
|
22
23
|
__exportStar(require("./all-warehouse-sale-orders-actions"), exports);
|
|
@@ -26,6 +27,7 @@ __exportStar(require("./common-order-actions"), exports);
|
|
|
26
27
|
__exportStar(require("./common-warehouse-invoice-actions"), exports);
|
|
27
28
|
__exportStar(require("./common-warehouse-purchase-order-actions"), exports);
|
|
28
29
|
__exportStar(require("./common-warehouse-purchase-order-rfq-actions"), exports);
|
|
30
|
+
__exportStar(require("./common-warehouse-purchase-order-vendor-return-actions"), exports);
|
|
29
31
|
__exportStar(require("./common-warehouse-sale-order-actions"), exports);
|
|
30
32
|
__exportStar(require("./common-warehouse-sale-order-rfq-actions"), exports);
|
|
31
33
|
__exportStar(require("./offline-ordering"), exports);
|
|
@@ -43,19 +43,16 @@ export declare const TenantPurchaseOrderVendorReturnsSchema: Schema<any, import(
|
|
|
43
43
|
}>;
|
|
44
44
|
vendor_name: string;
|
|
45
45
|
vendor_id: import("mongoose").Types.ObjectId;
|
|
46
|
-
tenant_purchase_order_id: import("mongoose").Types.ObjectId;
|
|
47
46
|
return_status: TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
48
47
|
inventory_consumed: boolean;
|
|
49
48
|
total_return_amount: number;
|
|
49
|
+
tenant_purchase_order_id: import("mongoose").Types.ObjectId;
|
|
50
50
|
cancel_reason?: string | null | undefined;
|
|
51
51
|
notes?: string | null | undefined;
|
|
52
52
|
created_by?: {
|
|
53
53
|
_id: string;
|
|
54
54
|
name: string;
|
|
55
55
|
} | null | undefined;
|
|
56
|
-
approved_at?: NativeDate | null | undefined;
|
|
57
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
58
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
59
56
|
approved_by?: {
|
|
60
57
|
_id: string;
|
|
61
58
|
name: string;
|
|
@@ -64,15 +61,18 @@ export declare const TenantPurchaseOrderVendorReturnsSchema: Schema<any, import(
|
|
|
64
61
|
_id: string;
|
|
65
62
|
name: string;
|
|
66
63
|
} | null | undefined;
|
|
67
|
-
|
|
64
|
+
completed_by?: {
|
|
68
65
|
_id: string;
|
|
69
66
|
name: string;
|
|
70
67
|
} | null | undefined;
|
|
71
|
-
|
|
68
|
+
cancelled_by?: {
|
|
72
69
|
_id: string;
|
|
73
70
|
name: string;
|
|
74
71
|
} | null | undefined;
|
|
72
|
+
approved_at?: NativeDate | null | undefined;
|
|
73
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
75
74
|
completed_at?: NativeDate | null | undefined;
|
|
75
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
76
76
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
77
77
|
createdAt: NativeDate;
|
|
78
78
|
updatedAt: NativeDate;
|
|
@@ -112,19 +112,16 @@ export declare const TenantPurchaseOrderVendorReturnsSchema: Schema<any, import(
|
|
|
112
112
|
}>;
|
|
113
113
|
vendor_name: string;
|
|
114
114
|
vendor_id: import("mongoose").Types.ObjectId;
|
|
115
|
-
tenant_purchase_order_id: import("mongoose").Types.ObjectId;
|
|
116
115
|
return_status: TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
117
116
|
inventory_consumed: boolean;
|
|
118
117
|
total_return_amount: number;
|
|
118
|
+
tenant_purchase_order_id: import("mongoose").Types.ObjectId;
|
|
119
119
|
cancel_reason?: string | null | undefined;
|
|
120
120
|
notes?: string | null | undefined;
|
|
121
121
|
created_by?: {
|
|
122
122
|
_id: string;
|
|
123
123
|
name: string;
|
|
124
124
|
} | null | undefined;
|
|
125
|
-
approved_at?: NativeDate | null | undefined;
|
|
126
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
127
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
128
125
|
approved_by?: {
|
|
129
126
|
_id: string;
|
|
130
127
|
name: string;
|
|
@@ -133,15 +130,18 @@ export declare const TenantPurchaseOrderVendorReturnsSchema: Schema<any, import(
|
|
|
133
130
|
_id: string;
|
|
134
131
|
name: string;
|
|
135
132
|
} | null | undefined;
|
|
136
|
-
|
|
133
|
+
completed_by?: {
|
|
137
134
|
_id: string;
|
|
138
135
|
name: string;
|
|
139
136
|
} | null | undefined;
|
|
140
|
-
|
|
137
|
+
cancelled_by?: {
|
|
141
138
|
_id: string;
|
|
142
139
|
name: string;
|
|
143
140
|
} | null | undefined;
|
|
141
|
+
approved_at?: NativeDate | null | undefined;
|
|
142
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
144
143
|
completed_at?: NativeDate | null | undefined;
|
|
144
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
145
145
|
}>> & import("mongoose").FlatRecord<{
|
|
146
146
|
createdAt: NativeDate;
|
|
147
147
|
updatedAt: NativeDate;
|
|
@@ -181,19 +181,16 @@ export declare const TenantPurchaseOrderVendorReturnsSchema: Schema<any, import(
|
|
|
181
181
|
}>;
|
|
182
182
|
vendor_name: string;
|
|
183
183
|
vendor_id: import("mongoose").Types.ObjectId;
|
|
184
|
-
tenant_purchase_order_id: import("mongoose").Types.ObjectId;
|
|
185
184
|
return_status: TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
186
185
|
inventory_consumed: boolean;
|
|
187
186
|
total_return_amount: number;
|
|
187
|
+
tenant_purchase_order_id: import("mongoose").Types.ObjectId;
|
|
188
188
|
cancel_reason?: string | null | undefined;
|
|
189
189
|
notes?: string | null | undefined;
|
|
190
190
|
created_by?: {
|
|
191
191
|
_id: string;
|
|
192
192
|
name: string;
|
|
193
193
|
} | null | undefined;
|
|
194
|
-
approved_at?: NativeDate | null | undefined;
|
|
195
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
196
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
197
194
|
approved_by?: {
|
|
198
195
|
_id: string;
|
|
199
196
|
name: string;
|
|
@@ -202,15 +199,18 @@ export declare const TenantPurchaseOrderVendorReturnsSchema: Schema<any, import(
|
|
|
202
199
|
_id: string;
|
|
203
200
|
name: string;
|
|
204
201
|
} | null | undefined;
|
|
205
|
-
|
|
202
|
+
completed_by?: {
|
|
206
203
|
_id: string;
|
|
207
204
|
name: string;
|
|
208
205
|
} | null | undefined;
|
|
209
|
-
|
|
206
|
+
cancelled_by?: {
|
|
210
207
|
_id: string;
|
|
211
208
|
name: string;
|
|
212
209
|
} | null | undefined;
|
|
210
|
+
approved_at?: NativeDate | null | undefined;
|
|
211
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
213
212
|
completed_at?: NativeDate | null | undefined;
|
|
213
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
214
214
|
}> & Required<{
|
|
215
215
|
_id: import("mongoose").Types.ObjectId;
|
|
216
216
|
}> & {
|
|
@@ -18,8 +18,8 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
18
18
|
quantity: number;
|
|
19
19
|
item_name: string;
|
|
20
20
|
received_qty: number;
|
|
21
|
-
unit_price?: number | null | undefined;
|
|
22
21
|
notes?: string | null | undefined;
|
|
22
|
+
unit_price?: number | null | undefined;
|
|
23
23
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
24
24
|
_id: import("mongoose").Types.ObjectId;
|
|
25
25
|
inventory_code: string;
|
|
@@ -27,8 +27,8 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
27
27
|
quantity: number;
|
|
28
28
|
item_name: string;
|
|
29
29
|
received_qty: number;
|
|
30
|
-
unit_price?: number | null | undefined;
|
|
31
30
|
notes?: string | null | undefined;
|
|
31
|
+
unit_price?: number | null | undefined;
|
|
32
32
|
}> & {
|
|
33
33
|
_id: import("mongoose").Types.ObjectId;
|
|
34
34
|
inventory_code: string;
|
|
@@ -36,12 +36,16 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
36
36
|
quantity: number;
|
|
37
37
|
item_name: string;
|
|
38
38
|
received_qty: number;
|
|
39
|
-
unit_price?: number | null | undefined;
|
|
40
39
|
notes?: string | null | undefined;
|
|
40
|
+
unit_price?: number | null | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
status: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
43
43
|
ref_id: string;
|
|
44
44
|
is_deleted: boolean;
|
|
45
|
+
created_by: {
|
|
46
|
+
name: string;
|
|
47
|
+
uid: string;
|
|
48
|
+
};
|
|
45
49
|
ref_type: import("../../constants").WAREHOUSE_REF_TYPE_ENUM;
|
|
46
50
|
doc_number: string;
|
|
47
51
|
record_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
@@ -54,35 +58,35 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
54
58
|
destination_name: string;
|
|
55
59
|
total_items: number;
|
|
56
60
|
total_quantity: number;
|
|
57
|
-
|
|
61
|
+
notes?: string | null | undefined;
|
|
62
|
+
approved_by?: {
|
|
58
63
|
name: string;
|
|
59
64
|
uid: string;
|
|
60
|
-
};
|
|
65
|
+
} | null | undefined;
|
|
66
|
+
dispatched_by?: {
|
|
67
|
+
name: string;
|
|
68
|
+
uid: string;
|
|
69
|
+
} | null | undefined;
|
|
70
|
+
cancelled_by?: {
|
|
71
|
+
name: string;
|
|
72
|
+
uid: string;
|
|
73
|
+
} | null | undefined;
|
|
74
|
+
approved_at?: NativeDate | null | undefined;
|
|
75
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
76
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
61
77
|
parent_movement_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
62
|
-
notes?: string | null | undefined;
|
|
63
78
|
updated_by?: {
|
|
64
79
|
name: string;
|
|
65
80
|
uid: string;
|
|
66
81
|
} | null | undefined;
|
|
67
82
|
cancelled_reason?: string | null | undefined;
|
|
68
83
|
requested_at?: NativeDate | null | undefined;
|
|
69
|
-
approved_at?: NativeDate | null | undefined;
|
|
70
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
71
84
|
delivered_at?: NativeDate | null | undefined;
|
|
72
85
|
received_at?: NativeDate | null | undefined;
|
|
73
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
74
86
|
requested_by?: {
|
|
75
87
|
name: string;
|
|
76
88
|
uid: string;
|
|
77
89
|
} | null | undefined;
|
|
78
|
-
approved_by?: {
|
|
79
|
-
name: string;
|
|
80
|
-
uid: string;
|
|
81
|
-
} | null | undefined;
|
|
82
|
-
dispatched_by?: {
|
|
83
|
-
name: string;
|
|
84
|
-
uid: string;
|
|
85
|
-
} | null | undefined;
|
|
86
90
|
delivered_by?: {
|
|
87
91
|
name: string;
|
|
88
92
|
uid: string;
|
|
@@ -91,10 +95,6 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
91
95
|
name: string;
|
|
92
96
|
uid: string;
|
|
93
97
|
} | null | undefined;
|
|
94
|
-
cancelled_by?: {
|
|
95
|
-
name: string;
|
|
96
|
-
uid: string;
|
|
97
|
-
} | null | undefined;
|
|
98
98
|
edit_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
99
99
|
edit_requested_at?: NativeDate | null | undefined;
|
|
100
100
|
edit_requested_by?: {
|
|
@@ -136,8 +136,8 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
136
136
|
quantity: number;
|
|
137
137
|
item_name: string;
|
|
138
138
|
received_qty: number;
|
|
139
|
-
unit_price?: number | null | undefined;
|
|
140
139
|
notes?: string | null | undefined;
|
|
140
|
+
unit_price?: number | null | undefined;
|
|
141
141
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
142
142
|
_id: import("mongoose").Types.ObjectId;
|
|
143
143
|
inventory_code: string;
|
|
@@ -145,8 +145,8 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
145
145
|
quantity: number;
|
|
146
146
|
item_name: string;
|
|
147
147
|
received_qty: number;
|
|
148
|
-
unit_price?: number | null | undefined;
|
|
149
148
|
notes?: string | null | undefined;
|
|
149
|
+
unit_price?: number | null | undefined;
|
|
150
150
|
}> & {
|
|
151
151
|
_id: import("mongoose").Types.ObjectId;
|
|
152
152
|
inventory_code: string;
|
|
@@ -154,12 +154,16 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
154
154
|
quantity: number;
|
|
155
155
|
item_name: string;
|
|
156
156
|
received_qty: number;
|
|
157
|
-
unit_price?: number | null | undefined;
|
|
158
157
|
notes?: string | null | undefined;
|
|
158
|
+
unit_price?: number | null | undefined;
|
|
159
159
|
}>;
|
|
160
160
|
status: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
161
161
|
ref_id: string;
|
|
162
162
|
is_deleted: boolean;
|
|
163
|
+
created_by: {
|
|
164
|
+
name: string;
|
|
165
|
+
uid: string;
|
|
166
|
+
};
|
|
163
167
|
ref_type: import("../../constants").WAREHOUSE_REF_TYPE_ENUM;
|
|
164
168
|
doc_number: string;
|
|
165
169
|
record_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
@@ -172,35 +176,35 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
172
176
|
destination_name: string;
|
|
173
177
|
total_items: number;
|
|
174
178
|
total_quantity: number;
|
|
175
|
-
|
|
179
|
+
notes?: string | null | undefined;
|
|
180
|
+
approved_by?: {
|
|
176
181
|
name: string;
|
|
177
182
|
uid: string;
|
|
178
|
-
};
|
|
183
|
+
} | null | undefined;
|
|
184
|
+
dispatched_by?: {
|
|
185
|
+
name: string;
|
|
186
|
+
uid: string;
|
|
187
|
+
} | null | undefined;
|
|
188
|
+
cancelled_by?: {
|
|
189
|
+
name: string;
|
|
190
|
+
uid: string;
|
|
191
|
+
} | null | undefined;
|
|
192
|
+
approved_at?: NativeDate | null | undefined;
|
|
193
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
194
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
179
195
|
parent_movement_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
180
|
-
notes?: string | null | undefined;
|
|
181
196
|
updated_by?: {
|
|
182
197
|
name: string;
|
|
183
198
|
uid: string;
|
|
184
199
|
} | null | undefined;
|
|
185
200
|
cancelled_reason?: string | null | undefined;
|
|
186
201
|
requested_at?: NativeDate | null | undefined;
|
|
187
|
-
approved_at?: NativeDate | null | undefined;
|
|
188
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
189
202
|
delivered_at?: NativeDate | null | undefined;
|
|
190
203
|
received_at?: NativeDate | null | undefined;
|
|
191
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
192
204
|
requested_by?: {
|
|
193
205
|
name: string;
|
|
194
206
|
uid: string;
|
|
195
207
|
} | null | undefined;
|
|
196
|
-
approved_by?: {
|
|
197
|
-
name: string;
|
|
198
|
-
uid: string;
|
|
199
|
-
} | null | undefined;
|
|
200
|
-
dispatched_by?: {
|
|
201
|
-
name: string;
|
|
202
|
-
uid: string;
|
|
203
|
-
} | null | undefined;
|
|
204
208
|
delivered_by?: {
|
|
205
209
|
name: string;
|
|
206
210
|
uid: string;
|
|
@@ -209,10 +213,6 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
209
213
|
name: string;
|
|
210
214
|
uid: string;
|
|
211
215
|
} | null | undefined;
|
|
212
|
-
cancelled_by?: {
|
|
213
|
-
name: string;
|
|
214
|
-
uid: string;
|
|
215
|
-
} | null | undefined;
|
|
216
216
|
edit_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
217
217
|
edit_requested_at?: NativeDate | null | undefined;
|
|
218
218
|
edit_requested_by?: {
|
|
@@ -254,8 +254,8 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
254
254
|
quantity: number;
|
|
255
255
|
item_name: string;
|
|
256
256
|
received_qty: number;
|
|
257
|
-
unit_price?: number | null | undefined;
|
|
258
257
|
notes?: string | null | undefined;
|
|
258
|
+
unit_price?: number | null | undefined;
|
|
259
259
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
260
260
|
_id: import("mongoose").Types.ObjectId;
|
|
261
261
|
inventory_code: string;
|
|
@@ -263,8 +263,8 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
263
263
|
quantity: number;
|
|
264
264
|
item_name: string;
|
|
265
265
|
received_qty: number;
|
|
266
|
-
unit_price?: number | null | undefined;
|
|
267
266
|
notes?: string | null | undefined;
|
|
267
|
+
unit_price?: number | null | undefined;
|
|
268
268
|
}> & {
|
|
269
269
|
_id: import("mongoose").Types.ObjectId;
|
|
270
270
|
inventory_code: string;
|
|
@@ -272,12 +272,16 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
272
272
|
quantity: number;
|
|
273
273
|
item_name: string;
|
|
274
274
|
received_qty: number;
|
|
275
|
-
unit_price?: number | null | undefined;
|
|
276
275
|
notes?: string | null | undefined;
|
|
276
|
+
unit_price?: number | null | undefined;
|
|
277
277
|
}>;
|
|
278
278
|
status: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
279
279
|
ref_id: string;
|
|
280
280
|
is_deleted: boolean;
|
|
281
|
+
created_by: {
|
|
282
|
+
name: string;
|
|
283
|
+
uid: string;
|
|
284
|
+
};
|
|
281
285
|
ref_type: import("../../constants").WAREHOUSE_REF_TYPE_ENUM;
|
|
282
286
|
doc_number: string;
|
|
283
287
|
record_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
@@ -290,35 +294,35 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
290
294
|
destination_name: string;
|
|
291
295
|
total_items: number;
|
|
292
296
|
total_quantity: number;
|
|
293
|
-
|
|
297
|
+
notes?: string | null | undefined;
|
|
298
|
+
approved_by?: {
|
|
294
299
|
name: string;
|
|
295
300
|
uid: string;
|
|
296
|
-
};
|
|
301
|
+
} | null | undefined;
|
|
302
|
+
dispatched_by?: {
|
|
303
|
+
name: string;
|
|
304
|
+
uid: string;
|
|
305
|
+
} | null | undefined;
|
|
306
|
+
cancelled_by?: {
|
|
307
|
+
name: string;
|
|
308
|
+
uid: string;
|
|
309
|
+
} | null | undefined;
|
|
310
|
+
approved_at?: NativeDate | null | undefined;
|
|
311
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
312
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
297
313
|
parent_movement_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
298
|
-
notes?: string | null | undefined;
|
|
299
314
|
updated_by?: {
|
|
300
315
|
name: string;
|
|
301
316
|
uid: string;
|
|
302
317
|
} | null | undefined;
|
|
303
318
|
cancelled_reason?: string | null | undefined;
|
|
304
319
|
requested_at?: NativeDate | null | undefined;
|
|
305
|
-
approved_at?: NativeDate | null | undefined;
|
|
306
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
307
320
|
delivered_at?: NativeDate | null | undefined;
|
|
308
321
|
received_at?: NativeDate | null | undefined;
|
|
309
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
310
322
|
requested_by?: {
|
|
311
323
|
name: string;
|
|
312
324
|
uid: string;
|
|
313
325
|
} | null | undefined;
|
|
314
|
-
approved_by?: {
|
|
315
|
-
name: string;
|
|
316
|
-
uid: string;
|
|
317
|
-
} | null | undefined;
|
|
318
|
-
dispatched_by?: {
|
|
319
|
-
name: string;
|
|
320
|
-
uid: string;
|
|
321
|
-
} | null | undefined;
|
|
322
326
|
delivered_by?: {
|
|
323
327
|
name: string;
|
|
324
328
|
uid: string;
|
|
@@ -327,10 +331,6 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
327
331
|
name: string;
|
|
328
332
|
uid: string;
|
|
329
333
|
} | null | undefined;
|
|
330
|
-
cancelled_by?: {
|
|
331
|
-
name: string;
|
|
332
|
-
uid: string;
|
|
333
|
-
} | null | undefined;
|
|
334
334
|
edit_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
335
335
|
edit_requested_at?: NativeDate | null | undefined;
|
|
336
336
|
edit_requested_by?: {
|
|
@@ -18,11 +18,11 @@ export declare const WarehouseInventoryLotSerialNumberSchema: Schema<any, import
|
|
|
18
18
|
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM;
|
|
19
19
|
source?: import("../../constants").WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | null | undefined;
|
|
20
20
|
quantity?: number | null | undefined;
|
|
21
|
-
source_id?: string | null | undefined;
|
|
22
21
|
created_by?: {
|
|
23
22
|
name: string;
|
|
24
23
|
uid: string;
|
|
25
24
|
} | null | undefined;
|
|
25
|
+
source_id?: string | null | undefined;
|
|
26
26
|
updated_by?: {
|
|
27
27
|
name: string;
|
|
28
28
|
uid: string;
|
|
@@ -65,11 +65,11 @@ export declare const WarehouseInventoryLotSerialNumberSchema: Schema<any, import
|
|
|
65
65
|
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM;
|
|
66
66
|
source?: import("../../constants").WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | null | undefined;
|
|
67
67
|
quantity?: number | null | undefined;
|
|
68
|
-
source_id?: string | null | undefined;
|
|
69
68
|
created_by?: {
|
|
70
69
|
name: string;
|
|
71
70
|
uid: string;
|
|
72
71
|
} | null | undefined;
|
|
72
|
+
source_id?: string | null | undefined;
|
|
73
73
|
updated_by?: {
|
|
74
74
|
name: string;
|
|
75
75
|
uid: string;
|
|
@@ -112,11 +112,11 @@ export declare const WarehouseInventoryLotSerialNumberSchema: Schema<any, import
|
|
|
112
112
|
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM;
|
|
113
113
|
source?: import("../../constants").WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | null | undefined;
|
|
114
114
|
quantity?: number | null | undefined;
|
|
115
|
-
source_id?: string | null | undefined;
|
|
116
115
|
created_by?: {
|
|
117
116
|
name: string;
|
|
118
117
|
uid: string;
|
|
119
118
|
} | null | undefined;
|
|
119
|
+
source_id?: string | null | undefined;
|
|
120
120
|
updated_by?: {
|
|
121
121
|
name: string;
|
|
122
122
|
uid: string;
|
|
@@ -43,19 +43,16 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
43
43
|
warehouse_id: string;
|
|
44
44
|
vendor_name: string;
|
|
45
45
|
vendor_id: import("mongoose").Types.ObjectId;
|
|
46
|
+
purchase_order_id: import("mongoose").Types.ObjectId;
|
|
46
47
|
return_status: WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
47
48
|
inventory_consumed: boolean;
|
|
48
49
|
total_return_amount: number;
|
|
49
|
-
purchase_order_id: import("mongoose").Types.ObjectId;
|
|
50
50
|
cancel_reason?: string | null | undefined;
|
|
51
51
|
notes?: string | null | undefined;
|
|
52
52
|
created_by?: {
|
|
53
53
|
_id: string;
|
|
54
54
|
name: string;
|
|
55
55
|
} | null | undefined;
|
|
56
|
-
approved_at?: NativeDate | null | undefined;
|
|
57
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
58
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
59
56
|
approved_by?: {
|
|
60
57
|
_id: string;
|
|
61
58
|
name: string;
|
|
@@ -64,7 +61,7 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
64
61
|
_id: string;
|
|
65
62
|
name: string;
|
|
66
63
|
} | null | undefined;
|
|
67
|
-
|
|
64
|
+
vendor_confirmed_by?: {
|
|
68
65
|
_id: string;
|
|
69
66
|
name: string;
|
|
70
67
|
} | null | undefined;
|
|
@@ -72,12 +69,15 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
72
69
|
_id: string;
|
|
73
70
|
name: string;
|
|
74
71
|
} | null | undefined;
|
|
75
|
-
|
|
76
|
-
vendor_confirmed_by?: {
|
|
72
|
+
cancelled_by?: {
|
|
77
73
|
_id: string;
|
|
78
74
|
name: string;
|
|
79
75
|
} | null | undefined;
|
|
76
|
+
approved_at?: NativeDate | null | undefined;
|
|
77
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
80
78
|
vendor_confirmed_at?: NativeDate | null | undefined;
|
|
79
|
+
completed_at?: NativeDate | null | undefined;
|
|
80
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
81
81
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
82
82
|
createdAt: NativeDate;
|
|
83
83
|
updatedAt: NativeDate;
|
|
@@ -117,19 +117,16 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
117
117
|
warehouse_id: string;
|
|
118
118
|
vendor_name: string;
|
|
119
119
|
vendor_id: import("mongoose").Types.ObjectId;
|
|
120
|
+
purchase_order_id: import("mongoose").Types.ObjectId;
|
|
120
121
|
return_status: WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
121
122
|
inventory_consumed: boolean;
|
|
122
123
|
total_return_amount: number;
|
|
123
|
-
purchase_order_id: import("mongoose").Types.ObjectId;
|
|
124
124
|
cancel_reason?: string | null | undefined;
|
|
125
125
|
notes?: string | null | undefined;
|
|
126
126
|
created_by?: {
|
|
127
127
|
_id: string;
|
|
128
128
|
name: string;
|
|
129
129
|
} | null | undefined;
|
|
130
|
-
approved_at?: NativeDate | null | undefined;
|
|
131
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
132
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
133
130
|
approved_by?: {
|
|
134
131
|
_id: string;
|
|
135
132
|
name: string;
|
|
@@ -138,7 +135,7 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
138
135
|
_id: string;
|
|
139
136
|
name: string;
|
|
140
137
|
} | null | undefined;
|
|
141
|
-
|
|
138
|
+
vendor_confirmed_by?: {
|
|
142
139
|
_id: string;
|
|
143
140
|
name: string;
|
|
144
141
|
} | null | undefined;
|
|
@@ -146,12 +143,15 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
146
143
|
_id: string;
|
|
147
144
|
name: string;
|
|
148
145
|
} | null | undefined;
|
|
149
|
-
|
|
150
|
-
vendor_confirmed_by?: {
|
|
146
|
+
cancelled_by?: {
|
|
151
147
|
_id: string;
|
|
152
148
|
name: string;
|
|
153
149
|
} | null | undefined;
|
|
150
|
+
approved_at?: NativeDate | null | undefined;
|
|
151
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
154
152
|
vendor_confirmed_at?: NativeDate | null | undefined;
|
|
153
|
+
completed_at?: NativeDate | null | undefined;
|
|
154
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
155
155
|
}>> & import("mongoose").FlatRecord<{
|
|
156
156
|
createdAt: NativeDate;
|
|
157
157
|
updatedAt: NativeDate;
|
|
@@ -191,19 +191,16 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
191
191
|
warehouse_id: string;
|
|
192
192
|
vendor_name: string;
|
|
193
193
|
vendor_id: import("mongoose").Types.ObjectId;
|
|
194
|
+
purchase_order_id: import("mongoose").Types.ObjectId;
|
|
194
195
|
return_status: WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
195
196
|
inventory_consumed: boolean;
|
|
196
197
|
total_return_amount: number;
|
|
197
|
-
purchase_order_id: import("mongoose").Types.ObjectId;
|
|
198
198
|
cancel_reason?: string | null | undefined;
|
|
199
199
|
notes?: string | null | undefined;
|
|
200
200
|
created_by?: {
|
|
201
201
|
_id: string;
|
|
202
202
|
name: string;
|
|
203
203
|
} | null | undefined;
|
|
204
|
-
approved_at?: NativeDate | null | undefined;
|
|
205
|
-
dispatched_at?: NativeDate | null | undefined;
|
|
206
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
207
204
|
approved_by?: {
|
|
208
205
|
_id: string;
|
|
209
206
|
name: string;
|
|
@@ -212,7 +209,7 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
212
209
|
_id: string;
|
|
213
210
|
name: string;
|
|
214
211
|
} | null | undefined;
|
|
215
|
-
|
|
212
|
+
vendor_confirmed_by?: {
|
|
216
213
|
_id: string;
|
|
217
214
|
name: string;
|
|
218
215
|
} | null | undefined;
|
|
@@ -220,12 +217,15 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
|
|
|
220
217
|
_id: string;
|
|
221
218
|
name: string;
|
|
222
219
|
} | null | undefined;
|
|
223
|
-
|
|
224
|
-
vendor_confirmed_by?: {
|
|
220
|
+
cancelled_by?: {
|
|
225
221
|
_id: string;
|
|
226
222
|
name: string;
|
|
227
223
|
} | null | undefined;
|
|
224
|
+
approved_at?: NativeDate | null | undefined;
|
|
225
|
+
dispatched_at?: NativeDate | null | undefined;
|
|
228
226
|
vendor_confirmed_at?: NativeDate | null | undefined;
|
|
227
|
+
completed_at?: NativeDate | null | undefined;
|
|
228
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
229
229
|
}> & Required<{
|
|
230
230
|
_id: import("mongoose").Types.ObjectId;
|
|
231
231
|
}> & {
|
|
@@ -33,22 +33,22 @@ export declare const SaleOrderDeliveriesSchema: Schema<any, import("mongoose").M
|
|
|
33
33
|
doc_kind: import("../../constants").WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
|
|
34
34
|
sale_order_id: import("mongoose").Types.ObjectId;
|
|
35
35
|
cancel_reason?: string | null | undefined;
|
|
36
|
+
inventory_consumed?: boolean | null | undefined;
|
|
36
37
|
notes?: string | null | undefined;
|
|
37
38
|
created_by?: {
|
|
38
39
|
_id: string;
|
|
39
40
|
name: string;
|
|
40
41
|
} | null | undefined;
|
|
41
|
-
|
|
42
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
43
|
-
delivered_by?: {
|
|
42
|
+
cancelled_by?: {
|
|
44
43
|
_id: string;
|
|
45
44
|
name: string;
|
|
46
45
|
} | null | undefined;
|
|
47
|
-
|
|
46
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
47
|
+
delivered_at?: NativeDate | null | undefined;
|
|
48
|
+
delivered_by?: {
|
|
48
49
|
_id: string;
|
|
49
50
|
name: string;
|
|
50
51
|
} | null | undefined;
|
|
51
|
-
inventory_consumed?: boolean | null | undefined;
|
|
52
52
|
applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
53
53
|
inventory_restocked?: boolean | null | undefined;
|
|
54
54
|
returned_by?: {
|
|
@@ -85,22 +85,22 @@ export declare const SaleOrderDeliveriesSchema: Schema<any, import("mongoose").M
|
|
|
85
85
|
doc_kind: import("../../constants").WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
|
|
86
86
|
sale_order_id: import("mongoose").Types.ObjectId;
|
|
87
87
|
cancel_reason?: string | null | undefined;
|
|
88
|
+
inventory_consumed?: boolean | null | undefined;
|
|
88
89
|
notes?: string | null | undefined;
|
|
89
90
|
created_by?: {
|
|
90
91
|
_id: string;
|
|
91
92
|
name: string;
|
|
92
93
|
} | null | undefined;
|
|
93
|
-
|
|
94
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
95
|
-
delivered_by?: {
|
|
94
|
+
cancelled_by?: {
|
|
96
95
|
_id: string;
|
|
97
96
|
name: string;
|
|
98
97
|
} | null | undefined;
|
|
99
|
-
|
|
98
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
99
|
+
delivered_at?: NativeDate | null | undefined;
|
|
100
|
+
delivered_by?: {
|
|
100
101
|
_id: string;
|
|
101
102
|
name: string;
|
|
102
103
|
} | null | undefined;
|
|
103
|
-
inventory_consumed?: boolean | null | undefined;
|
|
104
104
|
applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
105
105
|
inventory_restocked?: boolean | null | undefined;
|
|
106
106
|
returned_by?: {
|
|
@@ -137,22 +137,22 @@ export declare const SaleOrderDeliveriesSchema: Schema<any, import("mongoose").M
|
|
|
137
137
|
doc_kind: import("../../constants").WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
|
|
138
138
|
sale_order_id: import("mongoose").Types.ObjectId;
|
|
139
139
|
cancel_reason?: string | null | undefined;
|
|
140
|
+
inventory_consumed?: boolean | null | undefined;
|
|
140
141
|
notes?: string | null | undefined;
|
|
141
142
|
created_by?: {
|
|
142
143
|
_id: string;
|
|
143
144
|
name: string;
|
|
144
145
|
} | null | undefined;
|
|
145
|
-
|
|
146
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
147
|
-
delivered_by?: {
|
|
146
|
+
cancelled_by?: {
|
|
148
147
|
_id: string;
|
|
149
148
|
name: string;
|
|
150
149
|
} | null | undefined;
|
|
151
|
-
|
|
150
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
151
|
+
delivered_at?: NativeDate | null | undefined;
|
|
152
|
+
delivered_by?: {
|
|
152
153
|
_id: string;
|
|
153
154
|
name: string;
|
|
154
155
|
} | null | undefined;
|
|
155
|
-
inventory_consumed?: boolean | null | undefined;
|
|
156
156
|
applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
157
157
|
inventory_restocked?: boolean | null | undefined;
|
|
158
158
|
returned_by?: {
|
|
@@ -49,11 +49,11 @@ export declare const SaleOrderInvoicesSchema: Schema<any, import("mongoose").Mod
|
|
|
49
49
|
_id: string;
|
|
50
50
|
name: string;
|
|
51
51
|
} | null | undefined;
|
|
52
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
53
52
|
cancelled_by?: {
|
|
54
53
|
_id: string;
|
|
55
54
|
name: string;
|
|
56
55
|
} | null | undefined;
|
|
56
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
57
57
|
applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
58
58
|
down_payment_value?: number | null | undefined;
|
|
59
59
|
posted_by?: {
|
|
@@ -121,11 +121,11 @@ export declare const SaleOrderInvoicesSchema: Schema<any, import("mongoose").Mod
|
|
|
121
121
|
_id: string;
|
|
122
122
|
name: string;
|
|
123
123
|
} | null | undefined;
|
|
124
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
125
124
|
cancelled_by?: {
|
|
126
125
|
_id: string;
|
|
127
126
|
name: string;
|
|
128
127
|
} | null | undefined;
|
|
128
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
129
129
|
applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
130
130
|
down_payment_value?: number | null | undefined;
|
|
131
131
|
posted_by?: {
|
|
@@ -193,11 +193,11 @@ export declare const SaleOrderInvoicesSchema: Schema<any, import("mongoose").Mod
|
|
|
193
193
|
_id: string;
|
|
194
194
|
name: string;
|
|
195
195
|
} | null | undefined;
|
|
196
|
-
cancelled_at?: NativeDate | null | undefined;
|
|
197
196
|
cancelled_by?: {
|
|
198
197
|
_id: string;
|
|
199
198
|
name: string;
|
|
200
199
|
} | null | undefined;
|
|
200
|
+
cancelled_at?: NativeDate | null | undefined;
|
|
201
201
|
applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
202
202
|
down_payment_value?: number | null | undefined;
|
|
203
203
|
posted_by?: {
|