@managesome/eposmatic-toolkit 0.2.431 → 0.2.432
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/ENUMS.d.ts +0 -289
- package/lib/constants/ENUMS.js +2 -393
- package/lib/constants/PURCHASE_ORDER.d.ts +5 -3
- package/lib/constants/PURCHASE_ORDER.js +58 -20
- package/lib/constants/WAREHOUSE_ANALYTICS.d.ts +41 -41
- package/lib/constants/WAREHOUSE_ANALYTICS.js +28 -28
- package/lib/constants/WAREHOUSE_ENUMS.d.ts +289 -0
- package/lib/constants/WAREHOUSE_ENUMS.js +392 -0
- package/lib/constants/WAREHOUSE_INVOICE.js +10 -10
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +1 -0
- package/lib/helpers/order/generate-purchase-order-rfq.d.ts +3 -3
- package/lib/helpers/order/generate-purchase-order-rfq.js +2 -2
- package/lib/helpers/order/generate-purchase-order.d.ts +8 -8
- package/lib/helpers/order/generate-purchase-order.js +2 -2
- package/lib/helpers/order/generate-warehouse-purchase-order-rfq.d.ts +3 -0
- package/lib/helpers/order/generate-warehouse-purchase-order-rfq.js +64 -0
- package/lib/helpers/order/generate-warehouse-purchase-order.d.ts +11 -0
- package/lib/helpers/order/generate-warehouse-purchase-order.js +196 -0
- package/lib/helpers/order/index.d.ts +2 -2
- package/lib/helpers/order/index.js +2 -2
- package/lib/helpers/store/all-purchase-orders-actions.d.ts +7 -7
- package/lib/helpers/store/all-purchase-orders-actions.js +2 -2
- package/lib/helpers/store/all-sale-orders-actions.d.ts +2 -2
- package/lib/helpers/store/all-warehouse-purchase-orders-actions.d.ts +13 -0
- package/lib/helpers/store/all-warehouse-purchase-orders-actions.js +56 -0
- package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +2 -0
- package/lib/helpers/store/all-warehouse-sale-orders-actions.js +8 -0
- package/lib/helpers/store/common-purchase-order-actions.d.ts +15 -15
- package/lib/helpers/store/common-sale-order-actions.d.ts +5 -5
- package/lib/helpers/store/common-warehouse-purchase-order-actions.d.ts +31 -0
- package/lib/helpers/store/common-warehouse-purchase-order-actions.js +545 -0
- package/lib/helpers/store/common-warehouse-sale-order-actions.d.ts +5 -0
- package/lib/helpers/store/common-warehouse-sale-order-actions.js +65 -0
- package/lib/helpers/store/index.d.ts +6 -6
- package/lib/helpers/store/index.js +6 -6
- package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +11 -11
- package/lib/helpers/store/purchase-order-rfq-cart-actions.js +3 -3
- package/lib/helpers/store/purchase-orders-cart-actions.d.ts +18 -18
- package/lib/helpers/store/purchase-orders-cart-actions.js +1 -1
- package/lib/helpers/store/warehouse-purchase-order-rfq-cart-actions.d.ts +19 -0
- package/lib/helpers/store/warehouse-purchase-order-rfq-cart-actions.js +373 -0
- package/lib/helpers/store/warehouse-purchase-orders-cart-actions.d.ts +57 -0
- package/lib/helpers/store/warehouse-purchase-orders-cart-actions.js +486 -0
- package/lib/helpers/types/index.d.ts +1 -1
- package/lib/helpers/types/index.js +1 -1
- package/lib/helpers/types/purchase-order-cart-actions.d.ts +2 -2
- package/lib/helpers/types/warehouse-purchase-order-cart-actions.d.ts +26 -0
- package/lib/helpers/types/warehouse-purchase-order-cart-actions.js +2 -0
- package/lib/helpers/types/workers.d.ts +18 -18
- package/lib/helpers/utils/index.d.ts +8 -8
- package/lib/helpers/utils/index.js +8 -11
- package/lib/helpers/utils/invoice-x-report-helpers.d.ts +2 -2
- package/lib/helpers/utils/invoice-x-report-helpers.js +14 -14
- package/lib/helpers/utils/purchase-order-engine.d.ts +4 -4
- package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +5 -5
- package/lib/helpers/utils/purchase-order-receipt-engine.js +2 -2
- package/lib/helpers/utils/purchase-order-x-report-helpers.js +2 -2
- package/lib/helpers/utils/sale-x-report-helpers.js +2 -2
- package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +3 -3
- package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +2 -2
- package/lib/helpers/utils/void-warehouse-invoice-items-helpers.d.ts +3 -3
- package/lib/helpers/utils/void-warehouse-invoice-items-helpers.js +2 -2
- package/lib/helpers/utils/void-warehouse-invoice-items-report-helpers.d.ts +5 -5
- package/lib/helpers/utils/warehouse-catalog-conversion.d.ts +3 -3
- package/lib/helpers/utils/warehouse-catalog-conversion.js +9 -7
- package/lib/helpers/utils/warehouse-invoice-order-engine.js +1 -1
- package/lib/helpers/utils/warehouse-invoice-x-report-helpers.d.ts +58 -0
- package/lib/helpers/utils/warehouse-invoice-x-report-helpers.js +1432 -0
- package/lib/helpers/utils/warehouse-purchase-order-engine.d.ts +9 -0
- package/lib/helpers/utils/warehouse-purchase-order-engine.js +34 -0
- package/lib/helpers/utils/warehouse-purchase-order-receipt-engine.d.ts +149 -0
- package/lib/helpers/utils/warehouse-purchase-order-receipt-engine.js +214 -0
- package/lib/helpers/utils/warehouse-purchase-order-x-report-helpers.d.ts +58 -0
- package/lib/helpers/utils/warehouse-purchase-order-x-report-helpers.js +1440 -0
- package/lib/helpers/utils/warehouse-sale-order-x-report-helpers.d.ts +30 -0
- package/lib/helpers/utils/warehouse-sale-order-x-report-helpers.js +2 -0
- package/lib/helpers/utils/warehouse-sale-x-report-helpers.d.ts +58 -0
- package/lib/helpers/utils/warehouse-sale-x-report-helpers.js +1456 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-helpers.d.ts +3 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-helpers.js +38 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-report-helpers.d.ts +13 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-report-helpers.js +22 -0
- package/lib/schemas/models/gift_cards.d.ts +108 -108
- package/lib/schemas/models/halfhalf_setup.d.ts +3 -3
- package/lib/schemas/models/index.d.ts +7 -7
- package/lib/schemas/models/index.js +7 -7
- package/lib/schemas/models/internal_invoices.d.ts +6 -6
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +6 -6
- package/lib/schemas/models/inventory_transactions.d.ts +3 -3
- package/lib/schemas/models/item_transactions.d.ts +6 -6
- package/lib/schemas/models/offers.d.ts +146 -146
- package/lib/schemas/models/orders.d.ts +2573 -2573
- package/lib/schemas/models/printer_settings.d.ts +12 -12
- package/lib/schemas/models/reservations.d.ts +6 -6
- package/lib/schemas/models/rewards_usage.d.ts +6 -6
- package/lib/schemas/models/riders.d.ts +3 -3
- package/lib/schemas/models/tenants.d.ts +135 -135
- package/lib/schemas/models/void_order_items.d.ts +15 -15
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +25 -25
- package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
- package/lib/schemas/models/vouchers.d.ts +9 -9
- package/lib/schemas/models/warehouse-activity-logs.d.ts +13 -13
- package/lib/schemas/models/warehouse-activity-logs.js +4 -4
- package/lib/schemas/models/warehouse_categories.d.ts +4 -4
- package/lib/schemas/models/warehouse_categories.js +2 -2
- package/lib/schemas/models/warehouse_communications.d.ts +21 -21
- package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -33
- package/lib/schemas/models/warehouse_internal_movements.js +8 -8
- package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.d.ts +154 -0
- package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.js +193 -0
- package/lib/schemas/models/warehouse_inventory_transactions.d.ts +6 -6
- package/lib/schemas/models/warehouse_invoices.d.ts +351 -351
- package/lib/schemas/models/warehouse_item_transactions.d.ts +9 -9
- package/lib/schemas/models/warehouse_items.d.ts +13 -13
- package/lib/schemas/models/warehouse_items.js +2 -2
- package/lib/schemas/models/warehouse_operational_roles.d.ts +3 -3
- package/lib/schemas/models/warehouse_purchase_order_receipts.d.ts +165 -0
- package/lib/schemas/models/warehouse_purchase_order_receipts.js +151 -0
- package/lib/schemas/models/warehouse_purchase_order_rfqs.d.ts +1959 -0
- package/lib/schemas/models/warehouse_purchase_order_rfqs.js +328 -0
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.d.ts +234 -0
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.js +188 -0
- package/lib/schemas/models/warehouse_purchase_orders.d.ts +2678 -0
- package/lib/schemas/models/warehouse_purchase_orders.js +336 -0
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +15 -15
- package/lib/schemas/models/warehouse_sale_deliveries.js +7 -4
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +30 -30
- package/lib/schemas/models/warehouse_sale_invoices.js +8 -5
- package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +362 -362
- package/lib/schemas/models/warehouse_sale_order_rfqs.js +5 -5
- package/lib/schemas/models/warehouse_sale_orders.d.ts +367 -367
- package/lib/schemas/models/warehouse_sale_orders.js +5 -5
- package/lib/schemas/models/warehouse_void_invoice_items.d.ts +176 -0
- package/lib/schemas/models/warehouse_void_invoice_items.js +176 -0
- package/lib/schemas/models/warehouse_void_purchase_order_items.d.ts +176 -0
- package/lib/schemas/models/warehouse_void_purchase_order_items.js +177 -0
- package/lib/schemas/models/warehouses.d.ts +52 -52
- package/lib/schemas/models/warehouses.js +2 -2
- package/lib/schemas/types/index.d.ts +9 -9
- package/lib/schemas/types/index.js +9 -9
- package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +5 -5
- package/lib/schemas/types/warehouse-activity-logs.d.ts +7 -7
- package/lib/schemas/types/warehouse_categories.d.ts +2 -2
- package/lib/schemas/types/warehouse_internal_movements.d.ts +9 -9
- package/lib/schemas/types/warehouse_inventory_lot_serial_numbers.d.ts +85 -0
- package/lib/schemas/types/warehouse_inventory_lot_serial_numbers.js +4 -0
- package/lib/schemas/types/warehouse_items.d.ts +2 -2
- package/lib/schemas/types/warehouse_purchase_order_common.d.ts +39 -0
- package/lib/schemas/types/warehouse_purchase_order_common.js +2 -0
- package/lib/schemas/types/warehouse_purchase_order_receipts.d.ts +39 -0
- package/lib/schemas/types/warehouse_purchase_order_receipts.js +21 -0
- package/lib/schemas/types/warehouse_purchase_order_rfqs.d.ts +33 -0
- package/lib/schemas/types/warehouse_purchase_order_rfqs.js +2 -0
- package/lib/schemas/types/warehouse_purchase_order_vendor_returns.d.ts +48 -0
- package/lib/schemas/types/warehouse_purchase_order_vendor_returns.js +2 -0
- package/lib/schemas/types/warehouse_purchase_orders.d.ts +33 -0
- package/lib/schemas/types/warehouse_purchase_orders.js +2 -0
- package/lib/schemas/types/warehouse_sale_deliveries.d.ts +29 -29
- package/lib/schemas/types/warehouse_sale_invoices.d.ts +17 -17
- package/lib/schemas/types/warehouse_sale_order_common.d.ts +39 -0
- package/lib/schemas/types/warehouse_sale_order_common.js +2 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +7 -7
- package/lib/schemas/types/warehouse_sale_orders.d.ts +7 -7
- package/lib/schemas/types/warehouse_void_invoice_items.d.ts +37 -0
- package/lib/schemas/types/warehouse_void_invoice_items.js +2 -0
- package/lib/schemas/types/warehouse_void_purchase_order_items.d.ts +37 -0
- package/lib/schemas/types/warehouse_void_purchase_order_items.js +2 -0
- package/lib/schemas/types/warehouses.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM, WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM, WAREHOUSE_TRACKING_MODE_ENUM, WAREHOUSE_REF_TYPE_ENUM } from '../../constants';
|
|
2
|
+
export type TWarehouseTrackedMode = WAREHOUSE_TRACKING_MODE_ENUM.LOT | WAREHOUSE_TRACKING_MODE_ENUM.SERIAL;
|
|
3
|
+
export type TWarehouseInventoryLotSerialMovementType = 'IN' | 'OUT';
|
|
4
|
+
export interface IWarehouseInventoryLotSerialActorRef {
|
|
5
|
+
uid: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export type IWarehouseInventoryLotSerialNumberCommon = {
|
|
9
|
+
_id: string;
|
|
10
|
+
ref_id: string;
|
|
11
|
+
ref_type: WAREHOUSE_REF_TYPE_ENUM;
|
|
12
|
+
inventory_code: string;
|
|
13
|
+
tracking_mode: TWarehouseTrackedMode;
|
|
14
|
+
lot_number?: string;
|
|
15
|
+
serial_number?: string;
|
|
16
|
+
expiry_date?: Date | null;
|
|
17
|
+
best_before_date?: Date | null;
|
|
18
|
+
removal_date?: Date | null;
|
|
19
|
+
alert_date?: Date | null;
|
|
20
|
+
created_by?: IWarehouseInventoryLotSerialActorRef | null;
|
|
21
|
+
updated_by?: IWarehouseInventoryLotSerialActorRef | null;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
};
|
|
25
|
+
export interface IWarehouseInventoryLotSerialNumberBalance extends IWarehouseInventoryLotSerialNumberCommon {
|
|
26
|
+
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.BALANCE;
|
|
27
|
+
quantity_available: number;
|
|
28
|
+
is_available?: boolean;
|
|
29
|
+
received_at?: Date | null;
|
|
30
|
+
received_by?: IWarehouseInventoryLotSerialActorRef | null;
|
|
31
|
+
last_moved_at?: Date | null;
|
|
32
|
+
last_moved_by?: IWarehouseInventoryLotSerialActorRef | null;
|
|
33
|
+
}
|
|
34
|
+
export interface IWarehouseInventoryLotSerialNumberMovement extends IWarehouseInventoryLotSerialNumberCommon {
|
|
35
|
+
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
|
|
36
|
+
movement_type: TWarehouseInventoryLotSerialMovementType;
|
|
37
|
+
quantity: number;
|
|
38
|
+
occurred_at: Date;
|
|
39
|
+
occurred_by?: IWarehouseInventoryLotSerialActorRef | null;
|
|
40
|
+
source: WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
|
|
41
|
+
source_id?: string;
|
|
42
|
+
}
|
|
43
|
+
export type IWarehouseInventoryLotSerialNumber = IWarehouseInventoryLotSerialNumberBalance | IWarehouseInventoryLotSerialNumberMovement;
|
|
44
|
+
export type TWarehouseInventoryLotSerialMutationAction = 'RECEIVE' | 'CONSUME' | 'RESTOCK';
|
|
45
|
+
export interface IWarehouseInventoryLotSerialMutationItem {
|
|
46
|
+
inventory_code: string;
|
|
47
|
+
tracking_mode: TWarehouseTrackedMode;
|
|
48
|
+
lot_number?: string;
|
|
49
|
+
serial_number?: string;
|
|
50
|
+
quantity: number;
|
|
51
|
+
occurred_at?: Date | string;
|
|
52
|
+
expiry_date?: Date | string | null;
|
|
53
|
+
best_before_date?: Date | string | null;
|
|
54
|
+
removal_date?: Date | string | null;
|
|
55
|
+
alert_date?: Date | string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface IWarehousePostInventoryLotSerialMutationBody {
|
|
58
|
+
ref_id: string;
|
|
59
|
+
ref_type: WAREHOUSE_REF_TYPE_ENUM;
|
|
60
|
+
action: TWarehouseInventoryLotSerialMutationAction;
|
|
61
|
+
source: WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
|
|
62
|
+
source_id?: string;
|
|
63
|
+
items: IWarehouseInventoryLotSerialMutationItem[];
|
|
64
|
+
}
|
|
65
|
+
export interface IWarehousePostInventoryLotSerialMutationResponse {
|
|
66
|
+
message: string;
|
|
67
|
+
action: TWarehouseInventoryLotSerialMutationAction;
|
|
68
|
+
ref_id: string;
|
|
69
|
+
ref_type: WAREHOUSE_REF_TYPE_ENUM;
|
|
70
|
+
source: WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
|
|
71
|
+
source_id: string | null;
|
|
72
|
+
total_items: number;
|
|
73
|
+
}
|
|
74
|
+
export interface IWarehouseGetInventoryLotSerialNumbersQuery {
|
|
75
|
+
ref_id?: string;
|
|
76
|
+
ref_type?: WAREHOUSE_REF_TYPE_ENUM;
|
|
77
|
+
source?: WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | string;
|
|
78
|
+
movement_type?: TWarehouseInventoryLotSerialMovementType | string;
|
|
79
|
+
from_date?: Date | string;
|
|
80
|
+
to_date?: Date | string;
|
|
81
|
+
limit?: number;
|
|
82
|
+
offset?: number;
|
|
83
|
+
}
|
|
84
|
+
export type IWarehouseGetInventoryLotSerialNumbersResponse = IWarehouseInventoryLotSerialNumber[];
|
|
85
|
+
export declare const WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = "warehouse_inventory_lot_serial_numbers";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INVENTORY_ITEM_TYPE_ENUM, INVENTORY_ITEM_UNIT_ENUM,
|
|
1
|
+
import { INVENTORY_ITEM_TYPE_ENUM, INVENTORY_ITEM_UNIT_ENUM, WAREHOUSE_TRACKING_MODE_ENUM } from '../../constants';
|
|
2
2
|
import { IGeneralPrice, IIngredient } from './common';
|
|
3
3
|
export interface IWarehouseItem {
|
|
4
4
|
_id: string;
|
|
@@ -22,7 +22,7 @@ export interface IWarehouseItem {
|
|
|
22
22
|
ingredients?: IIngredient[] | null;
|
|
23
23
|
keywords: string[];
|
|
24
24
|
image_url: string | null;
|
|
25
|
-
tracking_mode:
|
|
25
|
+
tracking_mode: WAREHOUSE_TRACKING_MODE_ENUM;
|
|
26
26
|
expiry_tracked: boolean;
|
|
27
27
|
expiration_days: number | null;
|
|
28
28
|
best_before_days: number | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IStaffDetails } from './orders';
|
|
2
|
+
export interface IWarehousePurchaseOrderCommonItem {
|
|
3
|
+
_id: string;
|
|
4
|
+
item_id: string;
|
|
5
|
+
is_ready?: boolean;
|
|
6
|
+
void_reason?: string | null;
|
|
7
|
+
name: string;
|
|
8
|
+
price: number;
|
|
9
|
+
subtotal: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
_net_amount: number;
|
|
12
|
+
_gross_amount: number;
|
|
13
|
+
_gst_amount: number;
|
|
14
|
+
_discount_amount: number;
|
|
15
|
+
special_instructions: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IWarehousePurchaseOrderCommonCategoryByCategoryId {
|
|
18
|
+
name: string;
|
|
19
|
+
category_id: string;
|
|
20
|
+
items: IWarehousePurchaseOrderCommonItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface IWarehousePurchaseOrderCommonCategoryById {
|
|
23
|
+
_id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
items: IWarehousePurchaseOrderCommonItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface IWarehousePurchaseOrderCommonIterationBase<TCategory, TStatus> {
|
|
28
|
+
categories: TCategory[];
|
|
29
|
+
staff_details: IStaffDetails;
|
|
30
|
+
is_gst_inclusive?: boolean;
|
|
31
|
+
gst?: number | null;
|
|
32
|
+
gst_amount?: number | null;
|
|
33
|
+
special_instructions: string;
|
|
34
|
+
price: number;
|
|
35
|
+
amount_earned: number;
|
|
36
|
+
grand_total: number;
|
|
37
|
+
order_status: TStatus;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM } from '../../constants';
|
|
2
|
+
export interface IWarehousePurchaseOrderReceiptStatusConfig {
|
|
3
|
+
status: WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM;
|
|
4
|
+
color: string;
|
|
5
|
+
contrast_color: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_WAREHOUSE_PO_RECEIPT_STATUSES: IWarehousePurchaseOrderReceiptStatusConfig[];
|
|
8
|
+
export interface IWarehousePurchaseOrderReceiptItem {
|
|
9
|
+
_id: string;
|
|
10
|
+
item_id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
ordered_quantity: number;
|
|
13
|
+
received_quantity: number;
|
|
14
|
+
price: number;
|
|
15
|
+
subtotal: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IWarehousePurchaseOrderReceiptActor {
|
|
18
|
+
_id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IWarehousePurchaseOrderReceipt {
|
|
22
|
+
_id: string;
|
|
23
|
+
warehouse_id: string;
|
|
24
|
+
purchase_order_id: string;
|
|
25
|
+
vendor_id: string;
|
|
26
|
+
vendor_name: string;
|
|
27
|
+
receipt_status: WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM;
|
|
28
|
+
items: IWarehousePurchaseOrderReceiptItem[];
|
|
29
|
+
total_received_amount: number;
|
|
30
|
+
notes?: string | null;
|
|
31
|
+
created_by?: IWarehousePurchaseOrderReceiptActor | null;
|
|
32
|
+
validated_by?: IWarehousePurchaseOrderReceiptActor | null;
|
|
33
|
+
validated_at?: Date | null;
|
|
34
|
+
cancelled_at?: Date | null;
|
|
35
|
+
cancel_reason?: string | null;
|
|
36
|
+
createdAt_mins: number;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_WAREHOUSE_PO_RECEIPT_STATUSES = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.DEFAULT_WAREHOUSE_PO_RECEIPT_STATUSES = [
|
|
6
|
+
{
|
|
7
|
+
status: constants_1.WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM.DRAFT,
|
|
8
|
+
color: '#727472',
|
|
9
|
+
contrast_color: '#FFFFFF',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
status: constants_1.WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM.VALIDATED,
|
|
13
|
+
color: '#4CC417',
|
|
14
|
+
contrast_color: '#FFFFFF',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
status: constants_1.WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM.CANCELLED,
|
|
18
|
+
color: '#FF0000',
|
|
19
|
+
contrast_color: '#FFFFFF',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM, WAREHOUSE_RFQ_VENDOR_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehousePurchaseOrderCommonCategoryByCategoryId, IWarehousePurchaseOrderCommonItem, IWarehousePurchaseOrderCommonIterationBase } from './warehouse_purchase_order_common';
|
|
3
|
+
export type IWarehousePurchaseOrderRFQItem = IWarehousePurchaseOrderCommonItem;
|
|
4
|
+
export type IWarehousePurchaseOrderRFQCategory = IWarehousePurchaseOrderCommonCategoryByCategoryId;
|
|
5
|
+
export interface IWarehousePurchaseOrderRFQIteration extends IWarehousePurchaseOrderCommonIterationBase<IWarehousePurchaseOrderRFQCategory, WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM | string> {
|
|
6
|
+
tax_number: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IWarehouseRFQVendorEntry {
|
|
9
|
+
vendor_id: string;
|
|
10
|
+
vendor_name: string;
|
|
11
|
+
vendor_email?: string | null;
|
|
12
|
+
vendor_price?: number | null;
|
|
13
|
+
status: WAREHOUSE_RFQ_VENDOR_STATUS_ENUM;
|
|
14
|
+
}
|
|
15
|
+
export interface IWarehousePurchaseOrderRFQ extends IWarehousePurchaseOrderRFQIteration {
|
|
16
|
+
_id: string;
|
|
17
|
+
warehouse_id: string;
|
|
18
|
+
vendor_id: string | null;
|
|
19
|
+
vendor_name: string | null;
|
|
20
|
+
requested_vendors?: Record<string, IWarehouseRFQVendorEntry> | null;
|
|
21
|
+
iterations: IWarehousePurchaseOrderRFQIteration[];
|
|
22
|
+
order_number: number | null;
|
|
23
|
+
expected_deadline: string;
|
|
24
|
+
payment_terms: number;
|
|
25
|
+
delete_reason?: string | null;
|
|
26
|
+
cancel_reason?: string | null;
|
|
27
|
+
is_deleted: boolean;
|
|
28
|
+
order_status_updated_at: Date;
|
|
29
|
+
special_instructions: string;
|
|
30
|
+
is_reopened?: boolean;
|
|
31
|
+
createdAt_mins: number;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM } from '../../constants';
|
|
2
|
+
export interface IWarehousePurchaseOrderVendorReturnStatus {
|
|
3
|
+
status: WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
4
|
+
color: string;
|
|
5
|
+
contrast_color: string;
|
|
6
|
+
priority: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IWarehousePurchaseOrderVendorReturnItem {
|
|
9
|
+
_id: string;
|
|
10
|
+
item_id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
ordered_quantity: number;
|
|
13
|
+
return_quantity: number;
|
|
14
|
+
price: number;
|
|
15
|
+
subtotal: number;
|
|
16
|
+
reason?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface IWarehousePurchaseOrderVendorReturnActor {
|
|
19
|
+
_id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IWarehousePurchaseOrderVendorReturn {
|
|
23
|
+
_id: string;
|
|
24
|
+
warehouse_id: string;
|
|
25
|
+
purchase_order_id: string;
|
|
26
|
+
vendor_id: string;
|
|
27
|
+
vendor_name: string;
|
|
28
|
+
return_status: WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
29
|
+
inventory_consumed: boolean;
|
|
30
|
+
items: IWarehousePurchaseOrderVendorReturnItem[];
|
|
31
|
+
total_return_amount: number;
|
|
32
|
+
notes?: string | null;
|
|
33
|
+
created_by?: IWarehousePurchaseOrderVendorReturnActor | null;
|
|
34
|
+
approved_by?: IWarehousePurchaseOrderVendorReturnActor | null;
|
|
35
|
+
dispatched_by?: IWarehousePurchaseOrderVendorReturnActor | null;
|
|
36
|
+
vendor_confirmed_by?: IWarehousePurchaseOrderVendorReturnActor | null;
|
|
37
|
+
completed_by?: IWarehousePurchaseOrderVendorReturnActor | null;
|
|
38
|
+
cancelled_by?: IWarehousePurchaseOrderVendorReturnActor | null;
|
|
39
|
+
approved_at?: Date | null;
|
|
40
|
+
dispatched_at?: Date | null;
|
|
41
|
+
vendor_confirmed_at?: Date | null;
|
|
42
|
+
completed_at?: Date | null;
|
|
43
|
+
cancelled_at?: Date | null;
|
|
44
|
+
cancel_reason?: string | null;
|
|
45
|
+
createdAt_mins: number;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
updatedAt: Date;
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IOrderPayment } from './orders';
|
|
3
|
+
import { IWarehousePurchaseOrderCommonCategoryByCategoryId, IWarehousePurchaseOrderCommonItem, IWarehousePurchaseOrderCommonIterationBase } from './warehouse_purchase_order_common';
|
|
4
|
+
export type IWarehousePurchaseOrderItem = IWarehousePurchaseOrderCommonItem;
|
|
5
|
+
export type IWarehousePurchaseOrderCategory = IWarehousePurchaseOrderCommonCategoryByCategoryId;
|
|
6
|
+
export interface IWarehousePurchaseOrderIteration extends IWarehousePurchaseOrderCommonIterationBase<IWarehousePurchaseOrderCategory, WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM> {
|
|
7
|
+
payments: IOrderPayment[];
|
|
8
|
+
tax_number: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IWarehousePurchaseOrder extends IWarehousePurchaseOrderIteration {
|
|
11
|
+
_id: string;
|
|
12
|
+
warehouse_id: string;
|
|
13
|
+
vendor_id: string;
|
|
14
|
+
vendor_name: string;
|
|
15
|
+
/** Source RFQ reference when this PO is converted from an RFQ. */
|
|
16
|
+
rfq_id?: string | null;
|
|
17
|
+
iterations: IWarehousePurchaseOrderIteration[];
|
|
18
|
+
/**
|
|
19
|
+
* amount_collected is the total amount collected from the consumer
|
|
20
|
+
*/
|
|
21
|
+
amount_collected: number;
|
|
22
|
+
order_number: number | null;
|
|
23
|
+
delete_reason?: string | null;
|
|
24
|
+
cancel_reason?: string | null;
|
|
25
|
+
is_deleted: boolean;
|
|
26
|
+
order_status_updated_at: Date;
|
|
27
|
+
is_reopened?: boolean;
|
|
28
|
+
deferred_settlement?: boolean;
|
|
29
|
+
order_settled_at: Date;
|
|
30
|
+
order_settled_at_mins: number;
|
|
31
|
+
createdAt_mins: number;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM, WAREHOUSE_SALE_ORDER_DELIVERY_STATUS_ENUM, WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM } from '../../constants';
|
|
2
|
+
export interface IWarehouseSaleOrderPhysicalItems {
|
|
3
3
|
item_id: string;
|
|
4
4
|
item_name: string;
|
|
5
5
|
quantity: number;
|
|
6
6
|
reason?: string | null;
|
|
7
7
|
}
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export interface
|
|
8
|
+
export type IWarehouseSaleOrderDeliveryItems = IWarehouseSaleOrderPhysicalItems;
|
|
9
|
+
export type IWarehouseSaleOrderDeliveryReturnItems = IWarehouseSaleOrderPhysicalItems;
|
|
10
|
+
export interface IWarehouseSaleOrderDeliveryActor {
|
|
11
11
|
_id: string;
|
|
12
12
|
name: string;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface IWarehouseSaleOrderDelivery {
|
|
15
15
|
_id: string;
|
|
16
|
-
doc_kind:
|
|
16
|
+
doc_kind: WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
|
|
17
17
|
warehouse_id: string;
|
|
18
18
|
sale_order_id: string;
|
|
19
19
|
applied_to_doc_id?: string | null;
|
|
20
|
-
items:
|
|
21
|
-
status:
|
|
20
|
+
items: IWarehouseSaleOrderDeliveryItems[];
|
|
21
|
+
status: WAREHOUSE_SALE_ORDER_DELIVERY_STATUS_ENUM | WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
|
|
22
22
|
notes?: string | null;
|
|
23
23
|
inventory_consumed?: boolean;
|
|
24
24
|
inventory_restocked?: boolean;
|
|
25
|
-
created_by?:
|
|
26
|
-
delivered_by?:
|
|
27
|
-
returned_by?:
|
|
28
|
-
cancelled_by?:
|
|
25
|
+
created_by?: IWarehouseSaleOrderDeliveryActor | null;
|
|
26
|
+
delivered_by?: IWarehouseSaleOrderDeliveryActor | null;
|
|
27
|
+
returned_by?: IWarehouseSaleOrderDeliveryActor | null;
|
|
28
|
+
cancelled_by?: IWarehouseSaleOrderDeliveryActor | null;
|
|
29
29
|
delivered_at?: Date | null;
|
|
30
30
|
returned_at?: Date | null;
|
|
31
31
|
cancelled_at?: Date | null;
|
|
@@ -34,34 +34,34 @@ export interface ISaleOrderDelivery {
|
|
|
34
34
|
createdAt: Date;
|
|
35
35
|
updatedAt: Date;
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
38
|
-
doc_kind:
|
|
39
|
-
status:
|
|
37
|
+
export interface IWarehouseSaleOrderDeliveryDocument extends IWarehouseSaleOrderDelivery {
|
|
38
|
+
doc_kind: WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY;
|
|
39
|
+
status: WAREHOUSE_SALE_ORDER_DELIVERY_STATUS_ENUM;
|
|
40
40
|
applied_to_doc_id?: null;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
43
|
-
doc_kind:
|
|
42
|
+
export interface IWarehouseSaleOrderDeliveryReturnDocument extends IWarehouseSaleOrderDelivery {
|
|
43
|
+
doc_kind: WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY_RETURN;
|
|
44
44
|
applied_to_doc_id: string;
|
|
45
|
-
status:
|
|
45
|
+
status: WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
|
|
46
46
|
}
|
|
47
|
-
interface
|
|
47
|
+
interface IWarehouseCreateSaleOrderPhysicalDocBodyBase {
|
|
48
48
|
item_id: string;
|
|
49
49
|
quantity: number;
|
|
50
50
|
reason?: string | null;
|
|
51
51
|
}
|
|
52
|
-
interface
|
|
53
|
-
items:
|
|
52
|
+
interface IWarehouseCreateSaleOrderPhysicalDocBase {
|
|
53
|
+
items: IWarehouseCreateSaleOrderPhysicalDocBodyBase[];
|
|
54
54
|
notes?: string;
|
|
55
55
|
sale_order_updatedAt?: Date | string;
|
|
56
56
|
}
|
|
57
|
-
export interface
|
|
58
|
-
doc_kind?:
|
|
59
|
-
status?:
|
|
57
|
+
export interface IWarehouseCreateSaleOrderDeliveryBody extends IWarehouseCreateSaleOrderPhysicalDocBase {
|
|
58
|
+
doc_kind?: WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY;
|
|
59
|
+
status?: WAREHOUSE_SALE_ORDER_DELIVERY_STATUS_ENUM;
|
|
60
60
|
}
|
|
61
|
-
export interface
|
|
62
|
-
doc_kind:
|
|
61
|
+
export interface IWarehouseCreateSaleOrderDeliveryReturnBody extends IWarehouseCreateSaleOrderPhysicalDocBase {
|
|
62
|
+
doc_kind: WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY_RETURN;
|
|
63
63
|
applied_to_doc_id: string;
|
|
64
|
-
status:
|
|
64
|
+
status: WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
|
|
65
65
|
}
|
|
66
|
-
export type
|
|
66
|
+
export type IWarehouseCreateSaleOrderPhysicalDocBody = IWarehouseCreateSaleOrderDeliveryBody | IWarehouseCreateSaleOrderDeliveryReturnBody;
|
|
67
67
|
export {};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WAREHOUSE_SALE_ORDER_CREDIT_NOTE_STATUS_ENUM, WAREHOUSE_SALE_ORDER_FIN_DOC_KIND_ENUM, WAREHOUSE_SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM, WAREHOUSE_SALE_ORDER_INVOICE_TYPE_ENUM } from '../../constants';
|
|
2
2
|
import { IOrderPayment } from './orders';
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
3
|
+
export type IWarehouseSaleOrderFinancialDocStatus = WAREHOUSE_SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM | WAREHOUSE_SALE_ORDER_CREDIT_NOTE_STATUS_ENUM;
|
|
4
|
+
export interface IWarehouseSaleOrderFinancialLine {
|
|
5
5
|
item_id: string;
|
|
6
6
|
item_name: string;
|
|
7
7
|
quantity: number;
|
|
8
8
|
unit_price: number;
|
|
9
9
|
reason?: string | null;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IWarehouseSaleOrderFinancialDocActor {
|
|
12
12
|
_id: string;
|
|
13
13
|
name: string;
|
|
14
14
|
}
|
|
15
|
-
export type
|
|
16
|
-
export interface
|
|
15
|
+
export type IWarehouseSaleOrderInvoicePaymentRecord = IOrderPayment;
|
|
16
|
+
export interface IWarehouseSaleOrderInvoice {
|
|
17
17
|
_id: string;
|
|
18
|
-
doc_kind:
|
|
18
|
+
doc_kind: WAREHOUSE_SALE_ORDER_FIN_DOC_KIND_ENUM;
|
|
19
19
|
warehouse_id: string;
|
|
20
20
|
sale_order_id: string;
|
|
21
21
|
doc_number: number;
|
|
22
22
|
applied_to_doc_id?: string | null;
|
|
23
|
-
items:
|
|
23
|
+
items: IWarehouseSaleOrderFinancialLine[];
|
|
24
24
|
amount: number;
|
|
25
25
|
notes?: string | null;
|
|
26
|
-
status:
|
|
27
|
-
invoice_type:
|
|
26
|
+
status: IWarehouseSaleOrderFinancialDocStatus;
|
|
27
|
+
invoice_type: WAREHOUSE_SALE_ORDER_INVOICE_TYPE_ENUM;
|
|
28
28
|
amount_paid?: number;
|
|
29
29
|
down_payment_value?: number;
|
|
30
|
-
payments?:
|
|
30
|
+
payments?: IWarehouseSaleOrderInvoicePaymentRecord[];
|
|
31
31
|
gst?: number | null;
|
|
32
32
|
gst_amount?: number | null;
|
|
33
33
|
is_gst_inclusive?: boolean | null;
|
|
34
|
-
created_by?:
|
|
35
|
-
posted_by?:
|
|
36
|
-
confirmed_by?:
|
|
37
|
-
refund_pending_by?:
|
|
38
|
-
refunded_by?:
|
|
39
|
-
cancelled_by?:
|
|
34
|
+
created_by?: IWarehouseSaleOrderFinancialDocActor | null;
|
|
35
|
+
posted_by?: IWarehouseSaleOrderFinancialDocActor | null;
|
|
36
|
+
confirmed_by?: IWarehouseSaleOrderFinancialDocActor | null;
|
|
37
|
+
refund_pending_by?: IWarehouseSaleOrderFinancialDocActor | null;
|
|
38
|
+
refunded_by?: IWarehouseSaleOrderFinancialDocActor | null;
|
|
39
|
+
cancelled_by?: IWarehouseSaleOrderFinancialDocActor | null;
|
|
40
40
|
posted_at?: Date | null;
|
|
41
41
|
confirmed_at?: Date | null;
|
|
42
42
|
refund_pending_at?: Date | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IStaffDetails } from './orders';
|
|
2
|
+
export interface IWarehouseSaleOrderCommonItem {
|
|
3
|
+
_id: string;
|
|
4
|
+
item_id: string;
|
|
5
|
+
is_ready?: boolean;
|
|
6
|
+
void_reason?: string | null;
|
|
7
|
+
name: string;
|
|
8
|
+
price: number;
|
|
9
|
+
subtotal: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
_net_amount: number;
|
|
12
|
+
_gross_amount: number;
|
|
13
|
+
_gst_amount: number;
|
|
14
|
+
_discount_amount: number;
|
|
15
|
+
special_instructions: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IWarehouseSaleOrderCommonCategoryByCategoryId {
|
|
18
|
+
name: string;
|
|
19
|
+
category_id: string;
|
|
20
|
+
items: IWarehouseSaleOrderCommonItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface IWarehouseSaleOrderCommonCategoryById {
|
|
23
|
+
_id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
items: IWarehouseSaleOrderCommonItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface IWarehouseSaleOrderCommonIterationBase<TCategory, TStatus> {
|
|
28
|
+
categories: TCategory[];
|
|
29
|
+
staff_details: IStaffDetails;
|
|
30
|
+
is_gst_inclusive?: boolean;
|
|
31
|
+
gst?: number | null;
|
|
32
|
+
gst_amount?: number | null;
|
|
33
|
+
special_instructions: string;
|
|
34
|
+
price: number;
|
|
35
|
+
amount_earned: number;
|
|
36
|
+
grand_total: number;
|
|
37
|
+
order_status: TStatus;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export interface
|
|
1
|
+
import { WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehouseSaleOrderCommonCategoryByCategoryId, IWarehouseSaleOrderCommonItem, IWarehouseSaleOrderCommonIterationBase } from './warehouse_sale_order_common';
|
|
3
|
+
export type IWarehouseSaleOrderRFQItem = IWarehouseSaleOrderCommonItem;
|
|
4
|
+
export type IWarehouseSaleOrderRFQCategory = IWarehouseSaleOrderCommonCategoryByCategoryId;
|
|
5
|
+
export interface IWarehouseSaleOrderRFQIteration extends IWarehouseSaleOrderCommonIterationBase<IWarehouseSaleOrderRFQCategory, WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM | string> {
|
|
6
6
|
tax_number: string;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface IWarehouseSaleOrderRFQ extends IWarehouseSaleOrderRFQIteration {
|
|
9
9
|
_id: string;
|
|
10
10
|
warehouse_id: string;
|
|
11
11
|
client_id: string;
|
|
12
12
|
client_name: string;
|
|
13
|
-
iterations:
|
|
13
|
+
iterations: IWarehouseSaleOrderRFQIteration[];
|
|
14
14
|
order_number: number | null;
|
|
15
15
|
expected_deadline: string;
|
|
16
16
|
payment_terms: number;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export interface
|
|
1
|
+
import { WAREHOUSE_SALES_ORDER_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IWarehouseSaleOrderCommonCategoryByCategoryId, IWarehouseSaleOrderCommonItem, IWarehouseSaleOrderCommonIterationBase } from './warehouse_sale_order_common';
|
|
3
|
+
export type IWarehouseSaleOrderItem = IWarehouseSaleOrderCommonItem;
|
|
4
|
+
export type IWarehouseSaleOrderCategory = IWarehouseSaleOrderCommonCategoryByCategoryId;
|
|
5
|
+
export interface IWarehouseSaleOrderIteration extends IWarehouseSaleOrderCommonIterationBase<IWarehouseSaleOrderCategory, WAREHOUSE_SALES_ORDER_STATUS_ENUM> {
|
|
6
6
|
tax_number: string;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface IWarehouseSaleOrder extends IWarehouseSaleOrderIteration {
|
|
9
9
|
_id: string;
|
|
10
10
|
warehouse_id: string;
|
|
11
11
|
client_id: string;
|
|
12
12
|
client_name: string;
|
|
13
13
|
/** Source RFQ reference when this sales order is confirmed from an RFQ. */
|
|
14
14
|
rfq_id?: string | null;
|
|
15
|
-
iterations:
|
|
15
|
+
iterations: IWarehouseSaleOrderIteration[];
|
|
16
16
|
/**
|
|
17
17
|
* amount_collected is the total amount collected from the consumer
|
|
18
18
|
*/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM } from '../../constants';
|
|
2
|
+
export interface IWarehouseVoidInvoiceItemAdjustment {
|
|
3
|
+
_id: string;
|
|
4
|
+
order_id: string;
|
|
5
|
+
order_number: number | null;
|
|
6
|
+
order_item_id: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
subtotal: number;
|
|
9
|
+
staff_id: string;
|
|
10
|
+
staff_name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IWarehouseVoidInvoiceItem {
|
|
13
|
+
_id: string;
|
|
14
|
+
warehouse_id: string;
|
|
15
|
+
order_id: string;
|
|
16
|
+
order_number: number | null;
|
|
17
|
+
item_id: string;
|
|
18
|
+
order_item_id: string;
|
|
19
|
+
void_type: VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM;
|
|
20
|
+
client_id: string;
|
|
21
|
+
client_name: string;
|
|
22
|
+
staff_id: string;
|
|
23
|
+
staff_name: string;
|
|
24
|
+
void_reason: string;
|
|
25
|
+
iteration: number;
|
|
26
|
+
name: string;
|
|
27
|
+
quantity: number;
|
|
28
|
+
subtotal: number;
|
|
29
|
+
description: string;
|
|
30
|
+
total_adjusted_quantity: number;
|
|
31
|
+
total_adjusted_subtotal: number;
|
|
32
|
+
adjustments?: IWarehouseVoidInvoiceItemAdjustment[] | null;
|
|
33
|
+
order_punched_at: Date;
|
|
34
|
+
createdAt_mins: number;
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
updatedAt: Date;
|
|
37
|
+
}
|