@managesome/eposmatic-toolkit 0.2.438 → 0.2.439
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helpers/store/common-warehouse-purchase-order-actions.d.ts +2 -2
- package/lib/helpers/store/warehouse-purchase-orders-cart-actions.d.ts +4 -4
- package/lib/schemas/models/warehouse_purchase_orders.d.ts +13 -12
- package/lib/schemas/models/warehouse_purchase_orders.js +2 -2
- package/lib/schemas/types/index.d.ts +0 -1
- package/lib/schemas/types/index.js +0 -1
- package/lib/schemas/types/warehouse_purchase_order_rfqs.d.ts +33 -4
- package/lib/schemas/types/warehouse_purchase_orders.d.ts +33 -5
- package/package.json +1 -1
|
@@ -24,8 +24,8 @@ interface IGetVoidItemsWithReasonPurchaseOrder {
|
|
|
24
24
|
previousCategories: IWarehousePurchaseOrderCategory[];
|
|
25
25
|
}
|
|
26
26
|
export declare function getVoidItemsWithReasonWarehousePurchaseOrder({ currentCategories, iterationsFromFrontend, previousCategories, }: IGetVoidItemsWithReasonPurchaseOrder): {
|
|
27
|
-
newIterationCategories:
|
|
28
|
-
voidOrderItems:
|
|
27
|
+
newIterationCategories: IWarehousePurchaseOrderCategory[];
|
|
28
|
+
voidOrderItems: IWarehousePurchaseOrderItem[];
|
|
29
29
|
hasNewItems: boolean;
|
|
30
30
|
};
|
|
31
31
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM } from '../../constants';
|
|
2
|
-
import { IWarehousePurchaseOrder, IWarehousePurchaseOrderItem, IWarehousePurchaseOrderIteration } from '../../schemas';
|
|
2
|
+
import { IWarehousePurchaseOrder, IWarehousePurchaseOrderCategory, IWarehousePurchaseOrderItem, IWarehousePurchaseOrderIteration } from '../../schemas';
|
|
3
3
|
export declare function calculateCartWarehousePurchaseOrderInfoAndSyncData<T extends IWarehousePurchaseOrder | Partial<IWarehousePurchaseOrder>>(data: T, calculateItemMetadata?: boolean): T;
|
|
4
4
|
export declare const getWarehousePurchaseOrderItemComaparableData: (item: IWarehousePurchaseOrderItem) => Partial<IWarehousePurchaseOrderItem>;
|
|
5
5
|
export declare function getUpdatedWarehousePurchaseOrderCartInfoOnInit(data: Partial<IWarehousePurchaseOrder>, order: Partial<IWarehousePurchaseOrder>): {
|
|
@@ -21,9 +21,7 @@ export declare function getUpdatedWarehousePurchaseOrderCartInfoOnInit(data: Par
|
|
|
21
21
|
order_settled_at_mins?: number | undefined;
|
|
22
22
|
createdAt_mins?: number | undefined;
|
|
23
23
|
createdAt?: Date | undefined;
|
|
24
|
-
|
|
25
|
-
tax_number?: string | undefined;
|
|
26
|
-
categories?: import("../../schemas").IWarehousePurchaseOrderCommonCategoryByCategoryId[] | undefined;
|
|
24
|
+
categories?: IWarehousePurchaseOrderCategory[] | undefined;
|
|
27
25
|
staff_details?: import("../../schemas").IStaffDetails | undefined;
|
|
28
26
|
is_gst_inclusive?: boolean;
|
|
29
27
|
gst?: number | null;
|
|
@@ -34,6 +32,8 @@ export declare function getUpdatedWarehousePurchaseOrderCartInfoOnInit(data: Par
|
|
|
34
32
|
grand_total?: number | undefined;
|
|
35
33
|
order_status?: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM | undefined;
|
|
36
34
|
updatedAt?: Date | undefined;
|
|
35
|
+
payments?: import("../../schemas").IOrderPayment[] | undefined;
|
|
36
|
+
tax_number?: string | undefined;
|
|
37
37
|
};
|
|
38
38
|
export declare function getRemoveItemFromWarehousePurchaseOrderCartData(data: Partial<IWarehousePurchaseOrder>, payload: {
|
|
39
39
|
_id: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
|
+
import { WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM } from '../../constants';
|
|
2
3
|
export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
4
|
timestamps: true;
|
|
4
5
|
versionKey: false;
|
|
@@ -214,7 +215,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
214
215
|
note?: string | null | undefined;
|
|
215
216
|
}>;
|
|
216
217
|
special_instructions: string;
|
|
217
|
-
order_status:
|
|
218
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
218
219
|
tax_number: string;
|
|
219
220
|
amount_earned: number;
|
|
220
221
|
grand_total: number;
|
|
@@ -422,7 +423,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
422
423
|
note?: string | null | undefined;
|
|
423
424
|
}>;
|
|
424
425
|
special_instructions: string;
|
|
425
|
-
order_status:
|
|
426
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
426
427
|
tax_number: string;
|
|
427
428
|
amount_earned: number;
|
|
428
429
|
grand_total: number;
|
|
@@ -639,7 +640,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
639
640
|
note?: string | null | undefined;
|
|
640
641
|
}>;
|
|
641
642
|
special_instructions: string;
|
|
642
|
-
order_status:
|
|
643
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
643
644
|
tax_number: string;
|
|
644
645
|
amount_earned: number;
|
|
645
646
|
grand_total: number;
|
|
@@ -856,7 +857,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
856
857
|
note?: string | null | undefined;
|
|
857
858
|
}>;
|
|
858
859
|
special_instructions: string;
|
|
859
|
-
order_status:
|
|
860
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
860
861
|
tax_number: string;
|
|
861
862
|
amount_earned: number;
|
|
862
863
|
grand_total: number;
|
|
@@ -1103,7 +1104,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
1103
1104
|
note?: string | null | undefined;
|
|
1104
1105
|
}>;
|
|
1105
1106
|
special_instructions: string;
|
|
1106
|
-
order_status:
|
|
1107
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
1107
1108
|
tax_number: string;
|
|
1108
1109
|
amount_earned: number;
|
|
1109
1110
|
grand_total: number;
|
|
@@ -1311,7 +1312,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
1311
1312
|
note?: string | null | undefined;
|
|
1312
1313
|
}>;
|
|
1313
1314
|
special_instructions: string;
|
|
1314
|
-
order_status:
|
|
1315
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
1315
1316
|
tax_number: string;
|
|
1316
1317
|
amount_earned: number;
|
|
1317
1318
|
grand_total: number;
|
|
@@ -1528,7 +1529,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
1528
1529
|
note?: string | null | undefined;
|
|
1529
1530
|
}>;
|
|
1530
1531
|
special_instructions: string;
|
|
1531
|
-
order_status:
|
|
1532
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
1532
1533
|
tax_number: string;
|
|
1533
1534
|
amount_earned: number;
|
|
1534
1535
|
grand_total: number;
|
|
@@ -1745,7 +1746,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
1745
1746
|
note?: string | null | undefined;
|
|
1746
1747
|
}>;
|
|
1747
1748
|
special_instructions: string;
|
|
1748
|
-
order_status:
|
|
1749
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
1749
1750
|
tax_number: string;
|
|
1750
1751
|
amount_earned: number;
|
|
1751
1752
|
grand_total: number;
|
|
@@ -1992,7 +1993,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
1992
1993
|
note?: string | null | undefined;
|
|
1993
1994
|
}>;
|
|
1994
1995
|
special_instructions: string;
|
|
1995
|
-
order_status:
|
|
1996
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
1996
1997
|
tax_number: string;
|
|
1997
1998
|
amount_earned: number;
|
|
1998
1999
|
grand_total: number;
|
|
@@ -2200,7 +2201,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
2200
2201
|
note?: string | null | undefined;
|
|
2201
2202
|
}>;
|
|
2202
2203
|
special_instructions: string;
|
|
2203
|
-
order_status:
|
|
2204
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
2204
2205
|
tax_number: string;
|
|
2205
2206
|
amount_earned: number;
|
|
2206
2207
|
grand_total: number;
|
|
@@ -2417,7 +2418,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
2417
2418
|
note?: string | null | undefined;
|
|
2418
2419
|
}>;
|
|
2419
2420
|
special_instructions: string;
|
|
2420
|
-
order_status:
|
|
2421
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
2421
2422
|
tax_number: string;
|
|
2422
2423
|
amount_earned: number;
|
|
2423
2424
|
grand_total: number;
|
|
@@ -2634,7 +2635,7 @@ export declare const PurchaseOrderSchema: Schema<any, import("mongoose").Model<a
|
|
|
2634
2635
|
note?: string | null | undefined;
|
|
2635
2636
|
}>;
|
|
2636
2637
|
special_instructions: string;
|
|
2637
|
-
order_status:
|
|
2638
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
2638
2639
|
tax_number: string;
|
|
2639
2640
|
amount_earned: number;
|
|
2640
2641
|
grand_total: number;
|
|
@@ -4,9 +4,9 @@ exports.WAREHOUSE_PURCHASE_ORDER_COLLECTION_NAME = exports.PurchaseOrderSchema =
|
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
const common_models_1 = require("./common-models");
|
|
7
|
-
const warehouse_purchase_order_rfqs_1 = require("./warehouse_purchase_order_rfqs");
|
|
8
7
|
const warehouse_categories_1 = require("./warehouse_categories");
|
|
9
8
|
const warehouse_items_1 = require("./warehouse_items");
|
|
9
|
+
const warehouse_purchase_order_rfqs_1 = require("./warehouse_purchase_order_rfqs");
|
|
10
10
|
const warehouse_vendors_1 = require("./warehouse_vendors");
|
|
11
11
|
const warehouses_1 = require("./warehouses");
|
|
12
12
|
const StaffDetailsSchema = new mongoose_1.Schema({
|
|
@@ -218,7 +218,7 @@ exports.PurchaseOrderSchema = new mongoose_1.Schema({
|
|
|
218
218
|
order_status: {
|
|
219
219
|
type: String,
|
|
220
220
|
enum: constants_1.ALL_WAREHOUSE_PURCHASE_ORDER_STATUS_NAMES,
|
|
221
|
-
|
|
221
|
+
default: constants_1.WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM.DRAFT,
|
|
222
222
|
},
|
|
223
223
|
tax_number: {
|
|
224
224
|
type: String,
|
|
@@ -73,7 +73,6 @@ export * from './warehouse_invoices';
|
|
|
73
73
|
export * from './warehouse_item_transactions';
|
|
74
74
|
export * from './warehouse_items';
|
|
75
75
|
export * from './warehouse_operational_roles';
|
|
76
|
-
export * from './warehouse_purchase_order_common';
|
|
77
76
|
export * from './warehouse_purchase_order_receipts';
|
|
78
77
|
export * from './warehouse_purchase_order_rfqs';
|
|
79
78
|
export * from './warehouse_purchase_order_vendor_returns';
|
|
@@ -89,7 +89,6 @@ __exportStar(require("./warehouse_invoices"), exports);
|
|
|
89
89
|
__exportStar(require("./warehouse_item_transactions"), exports);
|
|
90
90
|
__exportStar(require("./warehouse_items"), exports);
|
|
91
91
|
__exportStar(require("./warehouse_operational_roles"), exports);
|
|
92
|
-
__exportStar(require("./warehouse_purchase_order_common"), exports);
|
|
93
92
|
__exportStar(require("./warehouse_purchase_order_receipts"), exports);
|
|
94
93
|
__exportStar(require("./warehouse_purchase_order_rfqs"), exports);
|
|
95
94
|
__exportStar(require("./warehouse_purchase_order_vendor_returns"), exports);
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import { WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM, WAREHOUSE_RFQ_VENDOR_STATUS_ENUM } from '../../constants';
|
|
2
|
-
import {
|
|
3
|
-
export type IWarehousePurchaseOrderRFQItem =
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { IStaffDetails } from './orders';
|
|
3
|
+
export type IWarehousePurchaseOrderRFQItem = {
|
|
4
|
+
_id: string;
|
|
5
|
+
item_id: string;
|
|
6
|
+
is_ready?: boolean;
|
|
7
|
+
void_reason?: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
price: number;
|
|
10
|
+
subtotal: number;
|
|
11
|
+
quantity: number;
|
|
12
|
+
_net_amount: number;
|
|
13
|
+
_gross_amount: number;
|
|
14
|
+
_gst_amount: number;
|
|
15
|
+
_discount_amount: number;
|
|
16
|
+
special_instructions: string;
|
|
17
|
+
};
|
|
18
|
+
export type IWarehousePurchaseOrderRFQCategory = {
|
|
19
|
+
name: string;
|
|
20
|
+
category_id: string;
|
|
21
|
+
items: IWarehousePurchaseOrderRFQItem[];
|
|
22
|
+
};
|
|
23
|
+
export interface IWarehousePurchaseOrderRFQIteration {
|
|
24
|
+
categories: IWarehousePurchaseOrderRFQCategory[];
|
|
25
|
+
staff_details: IStaffDetails;
|
|
26
|
+
is_gst_inclusive?: boolean;
|
|
27
|
+
gst?: number | null;
|
|
28
|
+
gst_amount?: number | null;
|
|
29
|
+
special_instructions: string;
|
|
30
|
+
price: number;
|
|
31
|
+
amount_earned: number;
|
|
32
|
+
grand_total: number;
|
|
33
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM;
|
|
34
|
+
updatedAt: Date;
|
|
6
35
|
tax_number: string;
|
|
7
36
|
}
|
|
8
37
|
export interface IWarehouseRFQVendorEntry {
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import { WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM } from '../../constants';
|
|
2
|
-
import { IOrderPayment } from './orders';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { IOrderPayment, IStaffDetails } from './orders';
|
|
3
|
+
export type IWarehousePurchaseOrderItem = {
|
|
4
|
+
_id: string;
|
|
5
|
+
item_id: string;
|
|
6
|
+
is_ready?: boolean;
|
|
7
|
+
void_reason?: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
price: number;
|
|
10
|
+
subtotal: number;
|
|
11
|
+
quantity: number;
|
|
12
|
+
_net_amount: number;
|
|
13
|
+
_gross_amount: number;
|
|
14
|
+
_gst_amount: number;
|
|
15
|
+
_discount_amount: number;
|
|
16
|
+
special_instructions: string;
|
|
17
|
+
};
|
|
18
|
+
export type IWarehousePurchaseOrderCategory = {
|
|
19
|
+
name: string;
|
|
20
|
+
category_id: string;
|
|
21
|
+
items: IWarehousePurchaseOrderItem[];
|
|
22
|
+
};
|
|
23
|
+
export interface IWarehousePurchaseOrderIteration {
|
|
24
|
+
categories: IWarehousePurchaseOrderCategory[];
|
|
25
|
+
staff_details: IStaffDetails;
|
|
26
|
+
is_gst_inclusive?: boolean;
|
|
27
|
+
gst?: number | null;
|
|
28
|
+
gst_amount?: number | null;
|
|
29
|
+
special_instructions: string;
|
|
30
|
+
price: number;
|
|
31
|
+
amount_earned: number;
|
|
32
|
+
grand_total: number;
|
|
33
|
+
order_status: WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM;
|
|
34
|
+
updatedAt: Date;
|
|
7
35
|
payments: IOrderPayment[];
|
|
8
36
|
tax_number: string;
|
|
9
37
|
}
|