@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.
Files changed (170) hide show
  1. package/lib/constants/ENUMS.d.ts +0 -289
  2. package/lib/constants/ENUMS.js +2 -393
  3. package/lib/constants/PURCHASE_ORDER.d.ts +5 -3
  4. package/lib/constants/PURCHASE_ORDER.js +58 -20
  5. package/lib/constants/WAREHOUSE_ANALYTICS.d.ts +41 -41
  6. package/lib/constants/WAREHOUSE_ANALYTICS.js +28 -28
  7. package/lib/constants/WAREHOUSE_ENUMS.d.ts +289 -0
  8. package/lib/constants/WAREHOUSE_ENUMS.js +392 -0
  9. package/lib/constants/WAREHOUSE_INVOICE.js +10 -10
  10. package/lib/constants/index.d.ts +1 -0
  11. package/lib/constants/index.js +1 -0
  12. package/lib/helpers/order/generate-purchase-order-rfq.d.ts +3 -3
  13. package/lib/helpers/order/generate-purchase-order-rfq.js +2 -2
  14. package/lib/helpers/order/generate-purchase-order.d.ts +8 -8
  15. package/lib/helpers/order/generate-purchase-order.js +2 -2
  16. package/lib/helpers/order/generate-warehouse-purchase-order-rfq.d.ts +3 -0
  17. package/lib/helpers/order/generate-warehouse-purchase-order-rfq.js +64 -0
  18. package/lib/helpers/order/generate-warehouse-purchase-order.d.ts +11 -0
  19. package/lib/helpers/order/generate-warehouse-purchase-order.js +196 -0
  20. package/lib/helpers/order/index.d.ts +2 -2
  21. package/lib/helpers/order/index.js +2 -2
  22. package/lib/helpers/store/all-purchase-orders-actions.d.ts +7 -7
  23. package/lib/helpers/store/all-purchase-orders-actions.js +2 -2
  24. package/lib/helpers/store/all-sale-orders-actions.d.ts +2 -2
  25. package/lib/helpers/store/all-warehouse-purchase-orders-actions.d.ts +13 -0
  26. package/lib/helpers/store/all-warehouse-purchase-orders-actions.js +56 -0
  27. package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +2 -0
  28. package/lib/helpers/store/all-warehouse-sale-orders-actions.js +8 -0
  29. package/lib/helpers/store/common-purchase-order-actions.d.ts +15 -15
  30. package/lib/helpers/store/common-sale-order-actions.d.ts +5 -5
  31. package/lib/helpers/store/common-warehouse-purchase-order-actions.d.ts +31 -0
  32. package/lib/helpers/store/common-warehouse-purchase-order-actions.js +545 -0
  33. package/lib/helpers/store/common-warehouse-sale-order-actions.d.ts +5 -0
  34. package/lib/helpers/store/common-warehouse-sale-order-actions.js +65 -0
  35. package/lib/helpers/store/index.d.ts +6 -6
  36. package/lib/helpers/store/index.js +6 -6
  37. package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +11 -11
  38. package/lib/helpers/store/purchase-order-rfq-cart-actions.js +3 -3
  39. package/lib/helpers/store/purchase-orders-cart-actions.d.ts +18 -18
  40. package/lib/helpers/store/purchase-orders-cart-actions.js +1 -1
  41. package/lib/helpers/store/warehouse-purchase-order-rfq-cart-actions.d.ts +19 -0
  42. package/lib/helpers/store/warehouse-purchase-order-rfq-cart-actions.js +373 -0
  43. package/lib/helpers/store/warehouse-purchase-orders-cart-actions.d.ts +57 -0
  44. package/lib/helpers/store/warehouse-purchase-orders-cart-actions.js +486 -0
  45. package/lib/helpers/types/index.d.ts +1 -1
  46. package/lib/helpers/types/index.js +1 -1
  47. package/lib/helpers/types/purchase-order-cart-actions.d.ts +2 -2
  48. package/lib/helpers/types/warehouse-purchase-order-cart-actions.d.ts +26 -0
  49. package/lib/helpers/types/warehouse-purchase-order-cart-actions.js +2 -0
  50. package/lib/helpers/types/workers.d.ts +18 -18
  51. package/lib/helpers/utils/index.d.ts +8 -8
  52. package/lib/helpers/utils/index.js +8 -11
  53. package/lib/helpers/utils/invoice-x-report-helpers.d.ts +2 -2
  54. package/lib/helpers/utils/invoice-x-report-helpers.js +14 -14
  55. package/lib/helpers/utils/purchase-order-engine.d.ts +4 -4
  56. package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +5 -5
  57. package/lib/helpers/utils/purchase-order-receipt-engine.js +2 -2
  58. package/lib/helpers/utils/purchase-order-x-report-helpers.js +2 -2
  59. package/lib/helpers/utils/sale-x-report-helpers.js +2 -2
  60. package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +3 -3
  61. package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +2 -2
  62. package/lib/helpers/utils/void-warehouse-invoice-items-helpers.d.ts +3 -3
  63. package/lib/helpers/utils/void-warehouse-invoice-items-helpers.js +2 -2
  64. package/lib/helpers/utils/void-warehouse-invoice-items-report-helpers.d.ts +5 -5
  65. package/lib/helpers/utils/warehouse-catalog-conversion.d.ts +3 -3
  66. package/lib/helpers/utils/warehouse-catalog-conversion.js +9 -7
  67. package/lib/helpers/utils/warehouse-invoice-order-engine.js +1 -1
  68. package/lib/helpers/utils/warehouse-invoice-x-report-helpers.d.ts +58 -0
  69. package/lib/helpers/utils/warehouse-invoice-x-report-helpers.js +1432 -0
  70. package/lib/helpers/utils/warehouse-purchase-order-engine.d.ts +9 -0
  71. package/lib/helpers/utils/warehouse-purchase-order-engine.js +34 -0
  72. package/lib/helpers/utils/warehouse-purchase-order-receipt-engine.d.ts +149 -0
  73. package/lib/helpers/utils/warehouse-purchase-order-receipt-engine.js +214 -0
  74. package/lib/helpers/utils/warehouse-purchase-order-x-report-helpers.d.ts +58 -0
  75. package/lib/helpers/utils/warehouse-purchase-order-x-report-helpers.js +1440 -0
  76. package/lib/helpers/utils/warehouse-sale-order-x-report-helpers.d.ts +30 -0
  77. package/lib/helpers/utils/warehouse-sale-order-x-report-helpers.js +2 -0
  78. package/lib/helpers/utils/warehouse-sale-x-report-helpers.d.ts +58 -0
  79. package/lib/helpers/utils/warehouse-sale-x-report-helpers.js +1456 -0
  80. package/lib/helpers/utils/warehouse-void-purchase-order-items-helpers.d.ts +3 -0
  81. package/lib/helpers/utils/warehouse-void-purchase-order-items-helpers.js +38 -0
  82. package/lib/helpers/utils/warehouse-void-purchase-order-items-report-helpers.d.ts +13 -0
  83. package/lib/helpers/utils/warehouse-void-purchase-order-items-report-helpers.js +22 -0
  84. package/lib/schemas/models/gift_cards.d.ts +108 -108
  85. package/lib/schemas/models/halfhalf_setup.d.ts +3 -3
  86. package/lib/schemas/models/index.d.ts +7 -7
  87. package/lib/schemas/models/index.js +7 -7
  88. package/lib/schemas/models/internal_invoices.d.ts +6 -6
  89. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +6 -6
  90. package/lib/schemas/models/inventory_transactions.d.ts +3 -3
  91. package/lib/schemas/models/item_transactions.d.ts +6 -6
  92. package/lib/schemas/models/offers.d.ts +146 -146
  93. package/lib/schemas/models/orders.d.ts +2573 -2573
  94. package/lib/schemas/models/printer_settings.d.ts +12 -12
  95. package/lib/schemas/models/reservations.d.ts +6 -6
  96. package/lib/schemas/models/rewards_usage.d.ts +6 -6
  97. package/lib/schemas/models/riders.d.ts +3 -3
  98. package/lib/schemas/models/tenants.d.ts +135 -135
  99. package/lib/schemas/models/void_order_items.d.ts +15 -15
  100. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +25 -25
  101. package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
  102. package/lib/schemas/models/vouchers.d.ts +9 -9
  103. package/lib/schemas/models/warehouse-activity-logs.d.ts +13 -13
  104. package/lib/schemas/models/warehouse-activity-logs.js +4 -4
  105. package/lib/schemas/models/warehouse_categories.d.ts +4 -4
  106. package/lib/schemas/models/warehouse_categories.js +2 -2
  107. package/lib/schemas/models/warehouse_communications.d.ts +21 -21
  108. package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -33
  109. package/lib/schemas/models/warehouse_internal_movements.js +8 -8
  110. package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.d.ts +154 -0
  111. package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.js +193 -0
  112. package/lib/schemas/models/warehouse_inventory_transactions.d.ts +6 -6
  113. package/lib/schemas/models/warehouse_invoices.d.ts +351 -351
  114. package/lib/schemas/models/warehouse_item_transactions.d.ts +9 -9
  115. package/lib/schemas/models/warehouse_items.d.ts +13 -13
  116. package/lib/schemas/models/warehouse_items.js +2 -2
  117. package/lib/schemas/models/warehouse_operational_roles.d.ts +3 -3
  118. package/lib/schemas/models/warehouse_purchase_order_receipts.d.ts +165 -0
  119. package/lib/schemas/models/warehouse_purchase_order_receipts.js +151 -0
  120. package/lib/schemas/models/warehouse_purchase_order_rfqs.d.ts +1959 -0
  121. package/lib/schemas/models/warehouse_purchase_order_rfqs.js +328 -0
  122. package/lib/schemas/models/warehouse_purchase_order_vendor_returns.d.ts +234 -0
  123. package/lib/schemas/models/warehouse_purchase_order_vendor_returns.js +188 -0
  124. package/lib/schemas/models/warehouse_purchase_orders.d.ts +2678 -0
  125. package/lib/schemas/models/warehouse_purchase_orders.js +336 -0
  126. package/lib/schemas/models/warehouse_sale_deliveries.d.ts +15 -15
  127. package/lib/schemas/models/warehouse_sale_deliveries.js +7 -4
  128. package/lib/schemas/models/warehouse_sale_invoices.d.ts +30 -30
  129. package/lib/schemas/models/warehouse_sale_invoices.js +8 -5
  130. package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +362 -362
  131. package/lib/schemas/models/warehouse_sale_order_rfqs.js +5 -5
  132. package/lib/schemas/models/warehouse_sale_orders.d.ts +367 -367
  133. package/lib/schemas/models/warehouse_sale_orders.js +5 -5
  134. package/lib/schemas/models/warehouse_void_invoice_items.d.ts +176 -0
  135. package/lib/schemas/models/warehouse_void_invoice_items.js +176 -0
  136. package/lib/schemas/models/warehouse_void_purchase_order_items.d.ts +176 -0
  137. package/lib/schemas/models/warehouse_void_purchase_order_items.js +177 -0
  138. package/lib/schemas/models/warehouses.d.ts +52 -52
  139. package/lib/schemas/models/warehouses.js +2 -2
  140. package/lib/schemas/types/index.d.ts +9 -9
  141. package/lib/schemas/types/index.js +9 -9
  142. package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +5 -5
  143. package/lib/schemas/types/warehouse-activity-logs.d.ts +7 -7
  144. package/lib/schemas/types/warehouse_categories.d.ts +2 -2
  145. package/lib/schemas/types/warehouse_internal_movements.d.ts +9 -9
  146. package/lib/schemas/types/warehouse_inventory_lot_serial_numbers.d.ts +85 -0
  147. package/lib/schemas/types/warehouse_inventory_lot_serial_numbers.js +4 -0
  148. package/lib/schemas/types/warehouse_items.d.ts +2 -2
  149. package/lib/schemas/types/warehouse_purchase_order_common.d.ts +39 -0
  150. package/lib/schemas/types/warehouse_purchase_order_common.js +2 -0
  151. package/lib/schemas/types/warehouse_purchase_order_receipts.d.ts +39 -0
  152. package/lib/schemas/types/warehouse_purchase_order_receipts.js +21 -0
  153. package/lib/schemas/types/warehouse_purchase_order_rfqs.d.ts +33 -0
  154. package/lib/schemas/types/warehouse_purchase_order_rfqs.js +2 -0
  155. package/lib/schemas/types/warehouse_purchase_order_vendor_returns.d.ts +48 -0
  156. package/lib/schemas/types/warehouse_purchase_order_vendor_returns.js +2 -0
  157. package/lib/schemas/types/warehouse_purchase_orders.d.ts +33 -0
  158. package/lib/schemas/types/warehouse_purchase_orders.js +2 -0
  159. package/lib/schemas/types/warehouse_sale_deliveries.d.ts +29 -29
  160. package/lib/schemas/types/warehouse_sale_invoices.d.ts +17 -17
  161. package/lib/schemas/types/warehouse_sale_order_common.d.ts +39 -0
  162. package/lib/schemas/types/warehouse_sale_order_common.js +2 -0
  163. package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +7 -7
  164. package/lib/schemas/types/warehouse_sale_orders.d.ts +7 -7
  165. package/lib/schemas/types/warehouse_void_invoice_items.d.ts +37 -0
  166. package/lib/schemas/types/warehouse_void_invoice_items.js +2 -0
  167. package/lib/schemas/types/warehouse_void_purchase_order_items.d.ts +37 -0
  168. package/lib/schemas/types/warehouse_void_purchase_order_items.js +2 -0
  169. package/lib/schemas/types/warehouses.d.ts +2 -2
  170. 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";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = void 0;
4
+ exports.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, TRACKING_MODE_ENUM } from '../../constants';
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: TRACKING_MODE_ENUM;
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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,31 +1,31 @@
1
- import { SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM, SALE_ORDER_DELIVERY_STATUS_ENUM, SALE_ORDER_PHYSICAL_DOC_KIND_ENUM } from '../../constants';
2
- export interface ISaleOrderPhysicalItems {
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 ISaleOrderDeliveryItems = ISaleOrderPhysicalItems;
9
- export type ISaleOrderDeliveryReturnItems = ISaleOrderPhysicalItems;
10
- export interface ISaleOrderDeliveryActor {
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 ISaleOrderDelivery {
14
+ export interface IWarehouseSaleOrderDelivery {
15
15
  _id: string;
16
- doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
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: ISaleOrderDeliveryItems[];
21
- status: SALE_ORDER_DELIVERY_STATUS_ENUM | SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
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?: ISaleOrderDeliveryActor | null;
26
- delivered_by?: ISaleOrderDeliveryActor | null;
27
- returned_by?: ISaleOrderDeliveryActor | null;
28
- cancelled_by?: ISaleOrderDeliveryActor | null;
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 ISaleOrderDeliveryDocument extends ISaleOrderDelivery {
38
- doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY;
39
- status: SALE_ORDER_DELIVERY_STATUS_ENUM;
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 ISaleOrderDeliveryReturnDocument extends ISaleOrderDelivery {
43
- doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY_RETURN;
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: SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
45
+ status: WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
46
46
  }
47
- interface ICreateSaleOrderPhysicalDocBodyBase {
47
+ interface IWarehouseCreateSaleOrderPhysicalDocBodyBase {
48
48
  item_id: string;
49
49
  quantity: number;
50
50
  reason?: string | null;
51
51
  }
52
- interface ICreateSaleOrderPhysicalDocBase {
53
- items: ICreateSaleOrderPhysicalDocBodyBase[];
52
+ interface IWarehouseCreateSaleOrderPhysicalDocBase {
53
+ items: IWarehouseCreateSaleOrderPhysicalDocBodyBase[];
54
54
  notes?: string;
55
55
  sale_order_updatedAt?: Date | string;
56
56
  }
57
- export interface ICreateSaleOrderDeliveryBody extends ICreateSaleOrderPhysicalDocBase {
58
- doc_kind?: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY;
59
- status?: SALE_ORDER_DELIVERY_STATUS_ENUM;
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 ICreateSaleOrderDeliveryReturnBody extends ICreateSaleOrderPhysicalDocBase {
62
- doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY_RETURN;
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: SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
64
+ status: WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
65
65
  }
66
- export type ICreateSaleOrderPhysicalDocBody = ICreateSaleOrderDeliveryBody | ICreateSaleOrderDeliveryReturnBody;
66
+ export type IWarehouseCreateSaleOrderPhysicalDocBody = IWarehouseCreateSaleOrderDeliveryBody | IWarehouseCreateSaleOrderDeliveryReturnBody;
67
67
  export {};
@@ -1,42 +1,42 @@
1
- import { SALE_ORDER_CREDIT_NOTE_STATUS_ENUM, SALE_ORDER_FIN_DOC_KIND_ENUM, SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM, SALE_ORDER_INVOICE_TYPE_ENUM } from '../../constants';
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 ISaleOrderFinancialDocStatus = SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM | SALE_ORDER_CREDIT_NOTE_STATUS_ENUM;
4
- export interface ISaleOrderFinancialLine {
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 ISaleOrderFinancialDocActor {
11
+ export interface IWarehouseSaleOrderFinancialDocActor {
12
12
  _id: string;
13
13
  name: string;
14
14
  }
15
- export type ISaleOrderInvoicePaymentRecord = IOrderPayment;
16
- export interface ISaleOrderInvoice {
15
+ export type IWarehouseSaleOrderInvoicePaymentRecord = IOrderPayment;
16
+ export interface IWarehouseSaleOrderInvoice {
17
17
  _id: string;
18
- doc_kind: SALE_ORDER_FIN_DOC_KIND_ENUM;
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: ISaleOrderFinancialLine[];
23
+ items: IWarehouseSaleOrderFinancialLine[];
24
24
  amount: number;
25
25
  notes?: string | null;
26
- status: ISaleOrderFinancialDocStatus;
27
- invoice_type: SALE_ORDER_INVOICE_TYPE_ENUM;
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?: ISaleOrderInvoicePaymentRecord[];
30
+ payments?: IWarehouseSaleOrderInvoicePaymentRecord[];
31
31
  gst?: number | null;
32
32
  gst_amount?: number | null;
33
33
  is_gst_inclusive?: boolean | null;
34
- created_by?: ISaleOrderFinancialDocActor | null;
35
- posted_by?: ISaleOrderFinancialDocActor | null;
36
- confirmed_by?: ISaleOrderFinancialDocActor | null;
37
- refund_pending_by?: ISaleOrderFinancialDocActor | null;
38
- refunded_by?: ISaleOrderFinancialDocActor | null;
39
- cancelled_by?: ISaleOrderFinancialDocActor | null;
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +1,16 @@
1
- import { SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
2
- import { ISaleOrderCommonCategoryByCategoryId, ISaleOrderCommonItem, ISaleOrderCommonIterationBase } from './sale_order_common';
3
- export type ISaleOrderRFQItem = ISaleOrderCommonItem;
4
- export type ISaleOrderRFQCategory = ISaleOrderCommonCategoryByCategoryId;
5
- export interface ISaleOrderRFQIteration extends ISaleOrderCommonIterationBase<ISaleOrderRFQCategory, SALE_ORDER_RFQ_STATUS_ENUM | string> {
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 ISaleOrderRFQ extends ISaleOrderRFQIteration {
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: ISaleOrderRFQIteration[];
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 { SALES_ORDER_STATUS_ENUM } from '../../constants';
2
- import { ISaleOrderCommonCategoryByCategoryId, ISaleOrderCommonItem, ISaleOrderCommonIterationBase } from './sale_order_common';
3
- export type ISaleOrderItem = ISaleOrderCommonItem;
4
- export type ISaleOrderCategory = ISaleOrderCommonCategoryByCategoryId;
5
- export interface ISaleOrderIteration extends ISaleOrderCommonIterationBase<ISaleOrderCategory, SALES_ORDER_STATUS_ENUM> {
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 ISaleOrder extends ISaleOrderIteration {
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: ISaleOrderIteration[];
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });