@managesome/eposmatic-toolkit 0.2.250 → 0.2.252

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 (29) hide show
  1. package/lib/constants/ENUMS.d.ts +10 -0
  2. package/lib/constants/ENUMS.js +16 -2
  3. package/lib/constants/SOCKET.d.ts +6 -0
  4. package/lib/constants/SOCKET.js +11 -2
  5. package/lib/helpers/utils/index.d.ts +4 -0
  6. package/lib/helpers/utils/index.js +4 -0
  7. package/lib/helpers/utils/void-items-report-helpers.d.ts +15 -2
  8. package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +3 -0
  9. package/lib/helpers/utils/void-purchase-order-items-helpers.js +38 -0
  10. package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +13 -0
  11. package/lib/helpers/utils/void-purchase-order-items-report-helpers.js +22 -0
  12. package/lib/helpers/utils/void-warehouse-invoice-items-helpers.d.ts +3 -0
  13. package/lib/helpers/utils/void-warehouse-invoice-items-helpers.js +38 -0
  14. package/lib/helpers/utils/void-warehouse-invoice-items-report-helpers.d.ts +13 -0
  15. package/lib/helpers/utils/void-warehouse-invoice-items-report-helpers.js +22 -0
  16. package/lib/schemas/models/index.d.ts +2 -0
  17. package/lib/schemas/models/index.js +2 -0
  18. package/lib/schemas/models/void_purchase_order_items.d.ts +173 -0
  19. package/lib/schemas/models/void_purchase_order_items.js +172 -0
  20. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +173 -0
  21. package/lib/schemas/models/void_warehouse_invoice_items.js +172 -0
  22. package/lib/schemas/types/index.d.ts +2 -0
  23. package/lib/schemas/types/index.js +2 -0
  24. package/lib/schemas/types/multi_tenants.d.ts +1 -0
  25. package/lib/schemas/types/void_purchase_order_items.d.ts +36 -0
  26. package/lib/schemas/types/void_purchase_order_items.js +2 -0
  27. package/lib/schemas/types/void_warehouse_invoice_items.d.ts +36 -0
  28. package/lib/schemas/types/void_warehouse_invoice_items.js +2 -0
  29. package/package.json +1 -1
@@ -813,6 +813,16 @@ export declare enum VOID_ORDER_ITEM_TYPE_ENUM {
813
813
  ORDER_VOID = "ORDER_VOID"
814
814
  }
815
815
  export declare const ALL_VOID_ORDER_ITEM_TYPES: VOID_ORDER_ITEM_TYPE_ENUM[];
816
+ export declare enum VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM {
817
+ ITEM_VOID = "ITEM_VOID",
818
+ ORDER_VOID = "ORDER_VOID"
819
+ }
820
+ export declare const ALL_VOID_PURCHASE_ORDER_ITEM_TYPES: VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM[];
821
+ export declare enum VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM {
822
+ ITEM_VOID = "ITEM_VOID",
823
+ ORDER_VOID = "ORDER_VOID"
824
+ }
825
+ export declare const ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPES: VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM[];
816
826
  export declare enum SUBSCRIPTION_STATUS_ENUM {
817
827
  ACTIVE = "ACTIVE",
818
828
  PENDING = "PENDING",
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ALL_CATEGORY_DISPLAY_TYPES = exports.CATEGORY_DISPLAY_TYPE_ENUM = exports.ALL_PAYMENT_METHOD_EXPECTED = exports.PAYMENT_METHOD_EXPECTED_ENUM = exports.ALL_WEB_UNPAID_PAYMENT_TYPES = exports.WEB_UNPAID_PAYMENT_TYPE_ENUM = exports.ALL_COUNTRY_FLAG_TYPES = exports.COUNTRY_FLAG_ENUM = exports.ALL_COUNTRY_NAME_TYPES = exports.COUNTRY_NAME_ENUM = exports.ALL_COUNTRY_ALPHA_3_TYPES = exports.COUNTRY_ALPHA_3_ENUM = exports.ALL_COUNTRY_ALPHA_2_TYPES = exports.COUNTRY_ALPHA_2_ENUM = exports.ALL_COUNTRY_CODES = exports.COUNTRY_CODE_ENUM = exports.ALL_CURRENCY_SYMBOLS = exports.CURRENCY_SYMBOL_ENUM = exports.ALL_CURRENCY_NAMES = exports.CURRENCY_NAME_ENUM = exports.ALL_CURRENCY_CODES = exports.CURRENCY_CODE_ENUM = exports.ALL_DAY_INDEX = exports.DAY_INDEX_ENUM = exports.ALL_INVENTORY_UNIT_TYPES = exports.INVENTORY_ITEM_UNIT_ENUM = exports.ALL_DIETARY_PREFERENCES = exports.ITEM_DIETARY_PREFERENCE_ENUM = exports.ALL_CAVEATS = exports.ITEM_CAVEATS_ENUM = exports.ALL_PAYMENT_STATUS = exports.PAYMENT_STATUS_ENUM = exports.ALL_ORDER_STATUS_NAMES = exports.ORDER_STATUS_ENUM = exports.ALL_PAYMENT_TYPE_NAMES = exports.PaymentTypeDescriptions = exports.PAYMENT_TYPE_ENUM = exports.ALL_API_STATUS_NAMES = exports.API_STATUS_ENUM = exports.ALL_INTEGRATIONS = exports.INTEGRATIONS_ENUM = exports.PLATFORM_NAMES = exports.PLATFORMS_BY_ORDER_FROM = exports.PLATFORMS_BY_ORDER_TYPE = exports.ALL_PLATFORMS = exports.PLATFORMS_ENUM = exports.ALL_ORDER_TYPE_NAMES = exports.ORDER_TYPE_ENUM = exports.ALL_ORDER_FROM_NAMES = exports.ORDER_FROM_ENUM = void 0;
4
4
  exports.ORDER_ITEM_TYPE_ENUM = exports.ALL_PLATFORM_PROVIDER_IDS = exports.PLATFORM_PROVIDER_IDS_ENUM = exports.ALL_MARKETING_RECEIPIENT_TYPES = exports.MARKETING_RECEIPIENT_ENUM = exports.ALL_MARKETING_TYPES = exports.MARKETING_TYPE_ENUM = exports.ALL_TOKEN_TYPES = exports.TOKEN_TYPE_ENUM = exports.ALL_EMAIL_PROCESSING_PROVIDERS = exports.EMAIL_PROCESSING_PROVIDERS_ENUM = exports.ALL_SMS_PROCESSING_PROVIDERS = exports.SMS_PROCESSING_PROVIDERS_ENUM = exports.ALL_TERMINAL_TYPES = exports.TERMINAL_TYPE_ENUM = exports.ALL_TERMINAL_PROCESSING_PROVIDERS = exports.TERMINAL_PROCESSING_PROVIDERS_ENUM = exports.TRANSACTION_TYPE_ENUM = exports.ALL_CARD_PROCESSING_PROVIDERS = exports.CARD_PROCESSING_PROVIDERS_ENUM = exports.ALL_PAYMENT_PROVIDERS = exports.PAYMENT_PROVIDERS_ENUM = exports.ALL_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_MODERATOR_PERMISSIONS = exports.ALL_USER_PERMISSIONS = exports.USER_PERMISSIONS_ENUM = exports.ALL_REWARDS_USAGE_REF_TYPES = exports.REWARDS_USAGE_REF_TYPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPES = exports.PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPES = exports.PATHWAY_TO_UNLOCK_TYPE_ENUM = exports.ALL_MYSTERY_GIFT_POPUP_TYPES = exports.MYSTERY_GIFT_POPUP_TYPE_ENUM = exports.ALL_MYSTERY_GIFT_TYPES = exports.MYSTERY_GIFT_TYPE_ENUM = exports.ALL_GIFT_CARD_REWARD_TYPES = exports.GIFT_CARD_REWARD_TYPE_ENUM = exports.ALL_OFFER_REWARD_TYPES = exports.OFFER_REWARD_TYPE_ENUM = exports.ALL_USER_ROLES = exports.USER_ROLES_ENUM = exports.ALL_PLATFORM_TYPES = exports.PLATFORM_TYPE_ENUM = exports.ALL_ORDER_NUMBER_GROUPING_TYPES = exports.ORDER_NUMBER_GROUPING_TYPE_ENUM = exports.ALL_TRACK_ORDER_NUMBER_TYPES = exports.TRACK_ORDER_NUMBER_ENUM = exports.ALL_TABLE_TYPES = exports.TABLE_TYPE_ENUM = void 0;
5
5
  exports.ALL_ITEM_TRANSACTION_TYPES = exports.ITEM_TRANSACTION_TYPE_ENUM = exports.INVENTORY_OUTBOUND_TRANSACTIONS = exports.INVENTORY_INBOUND_TRANSACTIONS = exports.ALL_INVENTORY_TRANSACTION_CATEGORIES = exports.INVENTORY_TRANSACTION_CATEGORY_ENUM = exports.ALL_INVENTORY_TRANSACTION_TYPES = exports.INVENTORY_TRANSACTION_TYPE_ENUM = exports.ALL_GST_TYPES = exports.GST_TYPE_ENUM = exports.ALL_EXPENSE_REACCURING_TYPES = exports.EXPENSE_REACCURING_TYPE_ENUM = exports.PAYMENT_EXTENSION_ENUM = exports.ALL_PRINTER_INTERFACES = exports.PRINTER_INTERFACE_ENUM = exports.RECEIPT_WIDTHS = exports.ALL_NUM_OF_COLUMNS = exports.NUM_OF_COLUMNS_ENUM = exports.SPLIT_SYNC_SOURCE_ENUM = exports.ALL_SPLIT_BILL_TYPES = exports.SPLIT_BILL_TYPE_ENUM = exports.ALL_RIDER_FEE_TYPES = exports.RIDER_FEE_TYPE_ENUM = exports.ALL_DELIVERY_AREAS_SEARCH_TYPES = exports.DELIVERY_AREAS_SEARCH_TYPE_ENUM = exports.ALL_WEB_AUTH_TYPES = exports.WEB_AUTH_TYPE_ENUM = exports.KITCHEN_RECEIPT_TYPE_ENUM = exports.PRINTER_EVENT_TYPE_ENUM = exports.SORT_TYPE_ENUM = exports.BLACKLISTED_SMS_COUNTRY_CODES = exports.ALL_OTP_TYPES = exports.OTP_TYPE_ENUM = exports.ALL_TAX_INVOICE_PROVIDERS = exports.TAX_INVOICE_PROVIDER_ENUM = exports.ALL_RESERVATION_STATUS_TYPES = exports.RESERVATION_STATUS_ENUM = exports.TENANT_AMOUNT_DUE_TYPE_ENUM = exports.ALL_KITCHEN_DOCKET_FONT_TYPES = exports.KITCHEN_DOCKET_FONT_TYPE_ENUM = exports.ALL_SORT_ORDER_BY_TYPES = exports.SORT_ORDER_BY_ENUM = exports.RECEIPT_IMAGE_TYPE_ENUM = exports.ALL_RECEIPT_TYPES = exports.RECEIPT_TYPE_ENUM = exports.ALL_PRINTING_PREFERENCES = exports.PRINTING_PREFERENCE_ENUM = exports.ALL_PRINTER_BRAND_TYPES = exports.PRINTER_BRAND_TYPE_ENUM = exports.ALL_ORDER_ITEM_TYPES = void 0;
6
- exports.ALL_POS_DAY_STATUS = exports.POS_DAY_STATUS_ENUM = exports.ALL_MODIFIER_OPTION_REF_TYPES = exports.MODIFIER_OPTION_REF_TYPE_ENUM = exports.ALL_WAREHOUSE_CLIENT_TYPES = exports.WAREHOUSE_CLIENT_TYPE_ENUM = exports.ALL_ONLINE_ORDERING_DESIGN_TYPES = exports.ONLINE_ORDERING_DESIGN_TYPE_ENUM = exports.ALL_NOTIFICATION_PROVIDERS = exports.NOTIFICATION_PROVIDER_ENUM = exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ITEM_COMPARISON_FIELD_ENUM = exports.VOID_ITEM_STAFF_REPORT_ENUM = exports.ALL_DISCOUNT_APPLICABILITY_TYPES = exports.DISCOUNT_APPLICABILITY_ENUM = exports.ALL_DISCOUNT_TYPES = exports.DISCOUNT_TYPE_ENUM = exports.EMAIL_TEMPLATES_TYPE_ENUM = exports.ALL_ALERT_NOTIFICATIONS_TYPES = exports.ALERT_NOTIFICATIONS_TYPE_ENUM = exports.ALL_WALLET_TRANSACTION_STATUS = exports.WALLET_TRANSACTION_STATUS_ENUM = exports.ALL_WALLET_TRANSACTION_CATEGORIES = exports.WALLET_TRANSACTION_CATEGORY_ENUM = exports.ALL_WALLET_TRANSACTION_TYPES = exports.WALLET_TRANSACTION_TYPE_ENUM = exports.ALL_WAREHOUSE_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_WAREHOUSE_MODERATOR_PERMISSIONS = exports.ALL_WAREHOUSE_USER_PERMISSIONS = exports.WAREHOUSE_USER_PERMISSIONS_ENUM = exports.ALL_WAREHOUSE_INVOICE_STATUS_NAMES = exports.WAREHOUSE_INVOICE_STATUS_ENUM = exports.ALL_PURCHASE_ORDER_STATUS_NAMES = exports.PURCHASE_ORDER_STATUS_ENUM = exports.ALL_DELIVERY_STATUS = exports.DELIVERY_STATUS_ENUM = exports.ALL_INVENTORY_ITEM_TYPES = exports.INVENTORY_ITEM_TYPE_ENUM = exports.ALL_RATING_TYPES = exports.RATING_TYPE_ENUM = exports.ALL_SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.COMPARISON_REPORT_TYPE_ENUM = exports.ALL_MULTI_TENANT_WEBSITE_TYPES = exports.MULTI_TENANT_WEBSITE_TYPE_ENUM = exports.ALL_TIME_RANGE_ENUMS = exports.TIME_RANGE_ENUM = void 0;
7
- exports.ALL_RECEIPT_QR_CODE_TYPES = exports.RECEIPT_QR_CODE_TYPE_ENUM = exports.ALL_INTERNAL_LEAD_STATUS = exports.INTERNAL_LEAD_STATUS_ENUM = exports.ALL_INTERNAL_LEAD_SOURCES = exports.INTERNAL_LEAD_SOURCE_ENUM = exports.ALL_CASH_DRAWER_STATUS = exports.CASH_DRAWER_STATUS_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_CATEGORIES = exports.CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_TYPES = exports.CASH_IN_HAND_TRANSACTION_TYPE_ENUM = exports.ALL_CASH_IN_OUT_TYPES = exports.CASH_IN_OUT_TYPE_ENUM = exports.ALL_POS_SHIFT_STATUS = exports.POS_SHIFT_STATUS_ENUM = void 0;
6
+ exports.ALL_WAREHOUSE_CLIENT_TYPES = exports.WAREHOUSE_CLIENT_TYPE_ENUM = exports.ALL_ONLINE_ORDERING_DESIGN_TYPES = exports.ONLINE_ORDERING_DESIGN_TYPE_ENUM = exports.ALL_NOTIFICATION_PROVIDERS = exports.NOTIFICATION_PROVIDER_ENUM = exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ITEM_COMPARISON_FIELD_ENUM = exports.VOID_ITEM_STAFF_REPORT_ENUM = exports.ALL_DISCOUNT_APPLICABILITY_TYPES = exports.DISCOUNT_APPLICABILITY_ENUM = exports.ALL_DISCOUNT_TYPES = exports.DISCOUNT_TYPE_ENUM = exports.EMAIL_TEMPLATES_TYPE_ENUM = exports.ALL_ALERT_NOTIFICATIONS_TYPES = exports.ALERT_NOTIFICATIONS_TYPE_ENUM = exports.ALL_WALLET_TRANSACTION_STATUS = exports.WALLET_TRANSACTION_STATUS_ENUM = exports.ALL_WALLET_TRANSACTION_CATEGORIES = exports.WALLET_TRANSACTION_CATEGORY_ENUM = exports.ALL_WALLET_TRANSACTION_TYPES = exports.WALLET_TRANSACTION_TYPE_ENUM = exports.ALL_WAREHOUSE_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_WAREHOUSE_MODERATOR_PERMISSIONS = exports.ALL_WAREHOUSE_USER_PERMISSIONS = exports.WAREHOUSE_USER_PERMISSIONS_ENUM = exports.ALL_WAREHOUSE_INVOICE_STATUS_NAMES = exports.WAREHOUSE_INVOICE_STATUS_ENUM = exports.ALL_PURCHASE_ORDER_STATUS_NAMES = exports.PURCHASE_ORDER_STATUS_ENUM = exports.ALL_DELIVERY_STATUS = exports.DELIVERY_STATUS_ENUM = exports.ALL_INVENTORY_ITEM_TYPES = exports.INVENTORY_ITEM_TYPE_ENUM = exports.ALL_RATING_TYPES = exports.RATING_TYPE_ENUM = exports.ALL_SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS_ENUM = exports.ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPES = exports.VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM = exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.COMPARISON_REPORT_TYPE_ENUM = exports.ALL_MULTI_TENANT_WEBSITE_TYPES = exports.MULTI_TENANT_WEBSITE_TYPE_ENUM = exports.ALL_TIME_RANGE_ENUMS = exports.TIME_RANGE_ENUM = void 0;
7
+ exports.ALL_RECEIPT_QR_CODE_TYPES = exports.RECEIPT_QR_CODE_TYPE_ENUM = exports.ALL_INTERNAL_LEAD_STATUS = exports.INTERNAL_LEAD_STATUS_ENUM = exports.ALL_INTERNAL_LEAD_SOURCES = exports.INTERNAL_LEAD_SOURCE_ENUM = exports.ALL_CASH_DRAWER_STATUS = exports.CASH_DRAWER_STATUS_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_CATEGORIES = exports.CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_TYPES = exports.CASH_IN_HAND_TRANSACTION_TYPE_ENUM = exports.ALL_CASH_IN_OUT_TYPES = exports.CASH_IN_OUT_TYPE_ENUM = exports.ALL_POS_SHIFT_STATUS = exports.POS_SHIFT_STATUS_ENUM = exports.ALL_POS_DAY_STATUS = exports.POS_DAY_STATUS_ENUM = exports.ALL_MODIFIER_OPTION_REF_TYPES = exports.MODIFIER_OPTION_REF_TYPE_ENUM = void 0;
8
8
  var ORDER_FROM_ENUM;
9
9
  (function (ORDER_FROM_ENUM) {
10
10
  ORDER_FROM_ENUM["WEB"] = "WEB";
@@ -1411,6 +1411,20 @@ var VOID_ORDER_ITEM_TYPE_ENUM;
1411
1411
  })(VOID_ORDER_ITEM_TYPE_ENUM || (exports.VOID_ORDER_ITEM_TYPE_ENUM = VOID_ORDER_ITEM_TYPE_ENUM = {}));
1412
1412
  exports.ALL_VOID_ORDER_ITEM_TYPES = Object.values(VOID_ORDER_ITEM_TYPE_ENUM);
1413
1413
  // ======================>> <<====================== //
1414
+ var VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM;
1415
+ (function (VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM) {
1416
+ VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM["ITEM_VOID"] = "ITEM_VOID";
1417
+ VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM["ORDER_VOID"] = "ORDER_VOID";
1418
+ })(VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM || (exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = {}));
1419
+ exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = Object.values(VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM);
1420
+ // ======================>> <<====================== //
1421
+ var VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM;
1422
+ (function (VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM) {
1423
+ VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM["ITEM_VOID"] = "ITEM_VOID";
1424
+ VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM["ORDER_VOID"] = "ORDER_VOID";
1425
+ })(VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM || (exports.VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM = VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM = {}));
1426
+ exports.ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPES = Object.values(VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM);
1427
+ // ======================>> <<====================== //
1414
1428
  var SUBSCRIPTION_STATUS_ENUM;
1415
1429
  (function (SUBSCRIPTION_STATUS_ENUM) {
1416
1430
  SUBSCRIPTION_STATUS_ENUM["ACTIVE"] = "ACTIVE";
@@ -8,6 +8,12 @@ export declare const SOCKET_EMIT_CREATED_OFFER = "SOCKET_EMIT_CREATED_OFFER";
8
8
  export declare const SOCKET_EMIT_UPDATED_OFFER = "SOCKET_EMIT_UPDATED_OFFER";
9
9
  export declare const SOCKET_EMIT_BULK_UPDATE_OFFER = "SOCKET_EMIT_BULK_UPDATE_OFFER";
10
10
  export declare const SOCKET_EMIT_DELETED_OFFER = "SOCKET_EMIT_DELETED_OFFER";
11
+ export declare const SOCKET_EMIT_CREATED_VOUCHER = "SOCKET_EMIT_CREATED_VOUCHER";
12
+ export declare const SOCKET_EMIT_UPDATED_VOUCHER = "SOCKET_EMIT_UPDATED_VOUCHER";
13
+ export declare const SOCKET_EMIT_DELETED_VOUCHER = "SOCKET_EMIT_DELETED_VOUCHER";
14
+ export declare const SOCKET_EMIT_CREATED_GIFT_CARD = "SOCKET_EMIT_CREATED_GIFT_CARD";
15
+ export declare const SOCKET_EMIT_UPDATED_GIFT_CARD = "SOCKET_EMIT_UPDATED_GIFT_CARD";
16
+ export declare const SOCKET_EMIT_DELETED_GIFT_CARD = "SOCKET_EMIT_DELETED_GIFT_CARD";
11
17
  export declare const SOCKET_EMIT_CREATED_HALFHALF_ITEM = "SOCKET_EMIT_CREATED_HALFHALF_ITEM";
12
18
  export declare const SOCKET_EMIT_UPDATED_HALFHALF_ITEM = "SOCKET_EMIT_UPDATED_HALFHALF_ITEM";
13
19
  export declare const SOCKET_EMIT_DELETED_HALFHALF_ITEM = "SOCKET_EMIT_DELETED_HALFHALF_ITEM";
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SOCKET_EMIT_UPDATED_CASH_DRAWER = exports.SOCKET_EMIT_CREATED_CASH_DRAWER = exports.SOCKET_EMIT_DELETED_COURSE = exports.SOCKET_EMIT_BULK_UPDATE_COURSES = exports.SOCKET_EMIT_UPDATED_COURSE = exports.SOCKET_EMIT_CREATED_COURSE = exports.SOCKET_EMIT_UPDATED_CONFIG_V1 = exports.SOCKET_EMIT_UPDATED_OPERATIONAL_ROLES = exports.SOCKET_EMIT_DELETED_INSTORE_SHIFT = exports.SOCKET_EMIT_UPDATED_INSTORE_SHIFT = exports.SOCKET_EMIT_CREATED_INSTORE_SHIFT = exports.SOCKET_EMIT_UPDATED_STAFF = exports.SOCKET_EMIT_UPDATED_DINEIN_TABLE = exports.SOCKET_EMIT_UPDATED_DINEIN_LAYOUT = exports.SOCKET_EMIT_UPDATED_TENANT = exports.SOCKET_EMIT_UPDATED_BRAND = exports.SOCKET_EMIT_DELETED_RESERVATION = exports.SOCKET_EMIT_UPDATED_RESERVATION = exports.SOCKET_EMIT_CREATED_RESERVATION = exports.SOCKET_SEND_ORDER_TO_CONNECTED_PEERS = exports.SOCKET_EMIT_SYNC_OFFLINE_ORDERS_SUCCESS = exports.SOCKET_EMIT_CREATED_MULTIPLE_OFFLINE_ORDERS = exports.SOCKET_EMIT_UPDATED_OFFLINE_ORDER = exports.SOCKET_EMIT_CREATED_OFFLINE_ORDER = exports.SOCKET_EMIT_CREATED_MULTIPLE_ORDERS = exports.SOCKET_EMIT_DELETED_ORDER = exports.SOCKET_EMIT_UPDATED_ORDER = exports.SOCKET_EMIT_CREATED_ORDER = exports.SOCKET_EMIT_SOLD_OUT_MODIFIERS = exports.SOCKET_EMIT_DELETED_CATEGORY = exports.SOCKET_EMIT_UPDATED_CATEGORY = exports.SOCKET_EMIT_CREATED_CATEGORY = exports.SOCKET_EMIT_BULK_UPDATE_CATEGORIES = exports.SOCKET_EMIT_BULK_UPDATE_SPECIAL_ITEMS = exports.SOCKET_EMIT_DELETED_SPECIAL_ITEM = exports.SOCKET_EMIT_UPDATED_SPECIAL_ITEM = exports.SOCKET_EMIT_CREATED_SPECIAL_ITEM = exports.SOCKET_EMIT_DELETED_HALFHALF_ITEM = exports.SOCKET_EMIT_UPDATED_HALFHALF_ITEM = exports.SOCKET_EMIT_CREATED_HALFHALF_ITEM = exports.SOCKET_EMIT_DELETED_OFFER = exports.SOCKET_EMIT_BULK_UPDATE_OFFER = exports.SOCKET_EMIT_UPDATED_OFFER = exports.SOCKET_EMIT_CREATED_OFFER = exports.SOCKET_EMIT_DELETED_ITEM = exports.SOCKET_EMIT_BULK_UPDATE_ITEMS = exports.SOCKET_EMIT_UPDATED_ITEM = exports.SOCKET_EMIT_CREATED_ITEM = exports.SOCKET_INITIATE_ON_CONNECTION = exports.SOCKET_ON_CONNECTION = void 0;
4
- exports.SOCKET_EMIT_RIDER_ON_MOVE = exports.SOCKET_EMIT_RIDER_RECEIVED_ORDER_ASSIGN_REQUEST = exports.SOCKET_EMIT_UPDATED_DELIVERY_ORDER = exports.SOCKET_EMIT_RECEIVED_ASSIGN_ORDER_REQUEST = exports.SOCKET_EMIT_ACTIVE_PLATFORM_SESSIONS = exports.SOCKET_EMIT_SEND_CUSTOMER_INFO = exports.SOCKET_EMIT_PRINT_TEXT = exports.SOCKET_EMIT_COMMIT_SYNC_PRINTERS_SETTINGS = exports.SOCKET_EMIT_SYNC_PRINTERS_SETTINGS = exports.SOCKET_EMIT_SET_PRINTER_SETTINGS = exports.SOCKET_EMIT_SET_ALL_PRINTER_SETTINGS = exports.SOCKET_EMIT_PRINTER_EVENT = exports.SOCKET_EMIT_ATTACH_PRINTERS_TO_ACCOUNT = exports.SOCKET_EMIT_DISCONNECT_DRAWER = exports.SOCKET_EMIT_CONNECT_DRAWER = exports.SOCKET_EMIT_OPEN_DRAWER = exports.SOCKET_EMIT_PRINT_IMAGE = exports.SOCKET_EMIT_PRINT_ORDER = exports.SOCKET_EMIT_PATCH_PRINTERS = exports.SOCKET_EMIT_CONNECT_PRINTERS = exports.SOCKET_EMIT_POSTED_REVIEW = exports.SOCKET_EMIT_BULK_UPDATE_DISCOUNTS = exports.SOCKET_EMIT_DELETED_DISCOUNT = exports.SOCKET_EMIT_UPDATED_DISCOUNT = exports.SOCKET_EMIT_CREATED_DISCOUNT = exports.SOCKET_EMIT_DELETED_PUBLIC_HOLIDAY = exports.SOCKET_EMIT_UPDATED_PUBLIC_HOLIDAY = exports.SOCKET_EMIT_CREATED_PUBLIC_HOLIDAY = exports.SOCKET_EMIT_DELETED_CLOSED_DATE = exports.SOCKET_EMIT_UPDATED_CLOSED_DATE = exports.SOCKET_EMIT_CREATED_CLOSED_DATE = exports.SOCKET_EMIT_DELETED_DELIVERY_AREA = exports.SOCKET_EMIT_UPDATED_DELIVERY_AREA = exports.SOCKET_EMIT_CREATED_DELIVERY_AREA = exports.SOCKET_EMIT_DELETED_MENU = exports.SOCKET_EMIT_BULK_UPDATE_MENU = exports.SOCKET_EMIT_UPDATED_MENU = exports.SOCKET_EMIT_CREATED_MENU = exports.SOCKET_EMIT_UPDATED_INSTORE_SHIFT_SESSION = exports.SOCKET_EMIT_CREATED_INSTORE_SHIFT_SESSION = exports.SOCKET_EMIT_UPDATED_TENANT_DAY = exports.SOCKET_EMIT_CREATED_TENANT_DAY = exports.SOCKET_EMIT_UPDATED_CASH_DRAWER_SESSION = exports.SOCKET_EMIT_CREATED_CASH_DRAWER_SESSION = exports.SOCKET_EMIT_DELETED_CASH_DRAWER = void 0;
3
+ exports.SOCKET_EMIT_UPDATED_CONFIG_V1 = exports.SOCKET_EMIT_UPDATED_OPERATIONAL_ROLES = exports.SOCKET_EMIT_DELETED_INSTORE_SHIFT = exports.SOCKET_EMIT_UPDATED_INSTORE_SHIFT = exports.SOCKET_EMIT_CREATED_INSTORE_SHIFT = exports.SOCKET_EMIT_UPDATED_STAFF = exports.SOCKET_EMIT_UPDATED_DINEIN_TABLE = exports.SOCKET_EMIT_UPDATED_DINEIN_LAYOUT = exports.SOCKET_EMIT_UPDATED_TENANT = exports.SOCKET_EMIT_UPDATED_BRAND = exports.SOCKET_EMIT_DELETED_RESERVATION = exports.SOCKET_EMIT_UPDATED_RESERVATION = exports.SOCKET_EMIT_CREATED_RESERVATION = exports.SOCKET_SEND_ORDER_TO_CONNECTED_PEERS = exports.SOCKET_EMIT_SYNC_OFFLINE_ORDERS_SUCCESS = exports.SOCKET_EMIT_CREATED_MULTIPLE_OFFLINE_ORDERS = exports.SOCKET_EMIT_UPDATED_OFFLINE_ORDER = exports.SOCKET_EMIT_CREATED_OFFLINE_ORDER = exports.SOCKET_EMIT_CREATED_MULTIPLE_ORDERS = exports.SOCKET_EMIT_DELETED_ORDER = exports.SOCKET_EMIT_UPDATED_ORDER = exports.SOCKET_EMIT_CREATED_ORDER = exports.SOCKET_EMIT_SOLD_OUT_MODIFIERS = exports.SOCKET_EMIT_DELETED_CATEGORY = exports.SOCKET_EMIT_UPDATED_CATEGORY = exports.SOCKET_EMIT_CREATED_CATEGORY = exports.SOCKET_EMIT_BULK_UPDATE_CATEGORIES = exports.SOCKET_EMIT_BULK_UPDATE_SPECIAL_ITEMS = exports.SOCKET_EMIT_DELETED_SPECIAL_ITEM = exports.SOCKET_EMIT_UPDATED_SPECIAL_ITEM = exports.SOCKET_EMIT_CREATED_SPECIAL_ITEM = exports.SOCKET_EMIT_DELETED_HALFHALF_ITEM = exports.SOCKET_EMIT_UPDATED_HALFHALF_ITEM = exports.SOCKET_EMIT_CREATED_HALFHALF_ITEM = exports.SOCKET_EMIT_DELETED_GIFT_CARD = exports.SOCKET_EMIT_UPDATED_GIFT_CARD = exports.SOCKET_EMIT_CREATED_GIFT_CARD = exports.SOCKET_EMIT_DELETED_VOUCHER = exports.SOCKET_EMIT_UPDATED_VOUCHER = exports.SOCKET_EMIT_CREATED_VOUCHER = exports.SOCKET_EMIT_DELETED_OFFER = exports.SOCKET_EMIT_BULK_UPDATE_OFFER = exports.SOCKET_EMIT_UPDATED_OFFER = exports.SOCKET_EMIT_CREATED_OFFER = exports.SOCKET_EMIT_DELETED_ITEM = exports.SOCKET_EMIT_BULK_UPDATE_ITEMS = exports.SOCKET_EMIT_UPDATED_ITEM = exports.SOCKET_EMIT_CREATED_ITEM = exports.SOCKET_INITIATE_ON_CONNECTION = exports.SOCKET_ON_CONNECTION = void 0;
4
+ exports.SOCKET_EMIT_RIDER_RECEIVED_ORDER_ASSIGN_REQUEST = exports.SOCKET_EMIT_UPDATED_DELIVERY_ORDER = exports.SOCKET_EMIT_RECEIVED_ASSIGN_ORDER_REQUEST = exports.SOCKET_EMIT_ACTIVE_PLATFORM_SESSIONS = exports.SOCKET_EMIT_SEND_CUSTOMER_INFO = exports.SOCKET_EMIT_PRINT_TEXT = exports.SOCKET_EMIT_COMMIT_SYNC_PRINTERS_SETTINGS = exports.SOCKET_EMIT_SYNC_PRINTERS_SETTINGS = exports.SOCKET_EMIT_SET_PRINTER_SETTINGS = exports.SOCKET_EMIT_SET_ALL_PRINTER_SETTINGS = exports.SOCKET_EMIT_PRINTER_EVENT = exports.SOCKET_EMIT_ATTACH_PRINTERS_TO_ACCOUNT = exports.SOCKET_EMIT_DISCONNECT_DRAWER = exports.SOCKET_EMIT_CONNECT_DRAWER = exports.SOCKET_EMIT_OPEN_DRAWER = exports.SOCKET_EMIT_PRINT_IMAGE = exports.SOCKET_EMIT_PRINT_ORDER = exports.SOCKET_EMIT_PATCH_PRINTERS = exports.SOCKET_EMIT_CONNECT_PRINTERS = exports.SOCKET_EMIT_POSTED_REVIEW = exports.SOCKET_EMIT_BULK_UPDATE_DISCOUNTS = exports.SOCKET_EMIT_DELETED_DISCOUNT = exports.SOCKET_EMIT_UPDATED_DISCOUNT = exports.SOCKET_EMIT_CREATED_DISCOUNT = exports.SOCKET_EMIT_DELETED_PUBLIC_HOLIDAY = exports.SOCKET_EMIT_UPDATED_PUBLIC_HOLIDAY = exports.SOCKET_EMIT_CREATED_PUBLIC_HOLIDAY = exports.SOCKET_EMIT_DELETED_CLOSED_DATE = exports.SOCKET_EMIT_UPDATED_CLOSED_DATE = exports.SOCKET_EMIT_CREATED_CLOSED_DATE = exports.SOCKET_EMIT_DELETED_DELIVERY_AREA = exports.SOCKET_EMIT_UPDATED_DELIVERY_AREA = exports.SOCKET_EMIT_CREATED_DELIVERY_AREA = exports.SOCKET_EMIT_DELETED_MENU = exports.SOCKET_EMIT_BULK_UPDATE_MENU = exports.SOCKET_EMIT_UPDATED_MENU = exports.SOCKET_EMIT_CREATED_MENU = exports.SOCKET_EMIT_UPDATED_INSTORE_SHIFT_SESSION = exports.SOCKET_EMIT_CREATED_INSTORE_SHIFT_SESSION = exports.SOCKET_EMIT_UPDATED_TENANT_DAY = exports.SOCKET_EMIT_CREATED_TENANT_DAY = exports.SOCKET_EMIT_UPDATED_CASH_DRAWER_SESSION = exports.SOCKET_EMIT_CREATED_CASH_DRAWER_SESSION = exports.SOCKET_EMIT_DELETED_CASH_DRAWER = exports.SOCKET_EMIT_UPDATED_CASH_DRAWER = exports.SOCKET_EMIT_CREATED_CASH_DRAWER = exports.SOCKET_EMIT_DELETED_COURSE = exports.SOCKET_EMIT_BULK_UPDATE_COURSES = exports.SOCKET_EMIT_UPDATED_COURSE = exports.SOCKET_EMIT_CREATED_COURSE = void 0;
5
+ exports.SOCKET_EMIT_RIDER_ON_MOVE = void 0;
5
6
  exports.SOCKET_ON_CONNECTION = 'connection';
6
7
  exports.SOCKET_INITIATE_ON_CONNECTION = 'SOCKET_INITIATE_ON_CONNECTION';
7
8
  /* ===================================>Items<=================================== */
@@ -14,6 +15,14 @@ exports.SOCKET_EMIT_CREATED_OFFER = 'SOCKET_EMIT_CREATED_OFFER';
14
15
  exports.SOCKET_EMIT_UPDATED_OFFER = 'SOCKET_EMIT_UPDATED_OFFER';
15
16
  exports.SOCKET_EMIT_BULK_UPDATE_OFFER = 'SOCKET_EMIT_BULK_UPDATE_OFFER';
16
17
  exports.SOCKET_EMIT_DELETED_OFFER = 'SOCKET_EMIT_DELETED_OFFER';
18
+ /* ===================================>Vouchers<=================================== */
19
+ exports.SOCKET_EMIT_CREATED_VOUCHER = 'SOCKET_EMIT_CREATED_VOUCHER';
20
+ exports.SOCKET_EMIT_UPDATED_VOUCHER = 'SOCKET_EMIT_UPDATED_VOUCHER';
21
+ exports.SOCKET_EMIT_DELETED_VOUCHER = 'SOCKET_EMIT_DELETED_VOUCHER';
22
+ /* ==================================>Gift Cards<================================== */
23
+ exports.SOCKET_EMIT_CREATED_GIFT_CARD = 'SOCKET_EMIT_CREATED_GIFT_CARD';
24
+ exports.SOCKET_EMIT_UPDATED_GIFT_CARD = 'SOCKET_EMIT_UPDATED_GIFT_CARD';
25
+ exports.SOCKET_EMIT_DELETED_GIFT_CARD = 'SOCKET_EMIT_DELETED_GIFT_CARD';
17
26
  /* ================================>Halfhalf Items<================================ */
18
27
  exports.SOCKET_EMIT_CREATED_HALFHALF_ITEM = 'SOCKET_EMIT_CREATED_HALFHALF_ITEM';
19
28
  exports.SOCKET_EMIT_UPDATED_HALFHALF_ITEM = 'SOCKET_EMIT_UPDATED_HALFHALF_ITEM';
@@ -60,6 +60,10 @@ export * from './terminal-devices-helpers';
60
60
  export * from './time-helpers';
61
61
  export * from './void-items-report-helpers';
62
62
  export * from './void-order-items-helpers';
63
+ export * from './void-purchase-order-items-helpers';
64
+ export * from './void-purchase-order-items-report-helpers';
65
+ export * from './void-warehouse-invoice-items-helpers';
66
+ export * from './void-warehouse-invoice-items-report-helpers';
63
67
  export * from './voidations-summary-report-helpers';
64
68
  export * from './wallet-helpers';
65
69
  export * from './warehouse-catalog-conversion';
@@ -76,6 +76,10 @@ __exportStar(require("./terminal-devices-helpers"), exports);
76
76
  __exportStar(require("./time-helpers"), exports);
77
77
  __exportStar(require("./void-items-report-helpers"), exports);
78
78
  __exportStar(require("./void-order-items-helpers"), exports);
79
+ __exportStar(require("./void-purchase-order-items-helpers"), exports);
80
+ __exportStar(require("./void-purchase-order-items-report-helpers"), exports);
81
+ __exportStar(require("./void-warehouse-invoice-items-helpers"), exports);
82
+ __exportStar(require("./void-warehouse-invoice-items-report-helpers"), exports);
79
83
  __exportStar(require("./voidations-summary-report-helpers"), exports);
80
84
  __exportStar(require("./wallet-helpers"), exports);
81
85
  __exportStar(require("./warehouse-catalog-conversion"), exports);
@@ -1,7 +1,20 @@
1
1
  import { CURRENCY_SYMBOL_ENUM } from '../../constants';
2
- import { IVoidOrderItem } from '../../schemas';
2
+ export interface IVoidItemsReportRow {
3
+ platform?: string;
4
+ order_number: number | null;
5
+ quantity: number;
6
+ subtotal: number;
7
+ total_adjusted_subtotal: number;
8
+ total_adjusted_quantity: number;
9
+ name: string;
10
+ void_reason: string;
11
+ staff_name: string;
12
+ order_punched_at: Date;
13
+ updatedAt: Date;
14
+ createdAt: Date;
15
+ }
3
16
  export interface IVoidItemsReportProps {
4
- data: IVoidOrderItem[];
17
+ data: IVoidItemsReportRow[];
5
18
  tenantName: string | undefined;
6
19
  from: Date | null;
7
20
  to: Date | null;
@@ -0,0 +1,3 @@
1
+ import { IVoidPurchaseOrderItem } from '../../schemas';
2
+ export declare function getVoidPurchaseOrderItemFromCents<T extends Partial<IVoidPurchaseOrderItem> | IVoidPurchaseOrderItem>(voidPurchaseOrderItem: T): T;
3
+ export declare function getFetchedVoidPurchaseOrderItems(voidItems: IVoidPurchaseOrderItem[]): IVoidPurchaseOrderItem[];
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVoidPurchaseOrderItemFromCents = getVoidPurchaseOrderItemFromCents;
4
+ exports.getFetchedVoidPurchaseOrderItems = getFetchedVoidPurchaseOrderItems;
5
+ const common_order_actions_1 = require("../store/common-order-actions");
6
+ const price_conversion_1 = require("./price-conversion");
7
+ function getVoidPurchaseOrderItemFromCents(voidPurchaseOrderItem) {
8
+ return {
9
+ ...voidPurchaseOrderItem,
10
+ ...(typeof voidPurchaseOrderItem.subtotal === 'number'
11
+ ? {
12
+ subtotal: (0, price_conversion_1.convertPriceFromCents)(voidPurchaseOrderItem.subtotal),
13
+ }
14
+ : {}),
15
+ ...(typeof voidPurchaseOrderItem.total_adjusted_subtotal === 'number'
16
+ ? {
17
+ total_adjusted_subtotal: (0, price_conversion_1.convertPriceFromCents)(voidPurchaseOrderItem.total_adjusted_subtotal),
18
+ }
19
+ : {}),
20
+ ...(voidPurchaseOrderItem.adjustments != null
21
+ ? {
22
+ adjustments: voidPurchaseOrderItem.adjustments.map((adjustment) => ({
23
+ ...adjustment,
24
+ ...(typeof adjustment.subtotal === 'number'
25
+ ? {
26
+ subtotal: (0, price_conversion_1.convertPriceFromCents)(adjustment.subtotal),
27
+ }
28
+ : {}),
29
+ })),
30
+ }
31
+ : {}),
32
+ };
33
+ }
34
+ function getFetchedVoidPurchaseOrderItems(voidItems) {
35
+ return voidItems
36
+ .map((voidPurchaseOrderItem) => getVoidPurchaseOrderItemFromCents(voidPurchaseOrderItem))
37
+ .sort(common_order_actions_1.sortByCreatedAt);
38
+ }
@@ -0,0 +1,13 @@
1
+ import { CURRENCY_SYMBOL_ENUM } from '../../constants';
2
+ import { IVoidPurchaseOrderItem } from '../../schemas';
3
+ export interface IVoidPurchaseOrderItemsReportProps {
4
+ data: IVoidPurchaseOrderItem[];
5
+ warehouseName: string | undefined;
6
+ from: Date | null;
7
+ to: Date | null;
8
+ width?: number;
9
+ monochrome?: boolean;
10
+ currency_symbol: CURRENCY_SYMBOL_ENUM | undefined;
11
+ }
12
+ export declare function getVoidPurchaseOrderItemsReportHtml(props: IVoidPurchaseOrderItemsReportProps): string;
13
+ export declare function getVoidPurchaseOrderItemsReportReceiptHtml(props: IVoidPurchaseOrderItemsReportProps): string;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVoidPurchaseOrderItemsReportHtml = getVoidPurchaseOrderItemsReportHtml;
4
+ exports.getVoidPurchaseOrderItemsReportReceiptHtml = getVoidPurchaseOrderItemsReportReceiptHtml;
5
+ const void_items_report_helpers_1 = require("./void-items-report-helpers");
6
+ function toCommonProps(props) {
7
+ return {
8
+ data: props.data,
9
+ tenantName: props.warehouseName,
10
+ from: props.from,
11
+ to: props.to,
12
+ width: props.width,
13
+ monochrome: props.monochrome,
14
+ currency_symbol: props.currency_symbol,
15
+ };
16
+ }
17
+ function getVoidPurchaseOrderItemsReportHtml(props) {
18
+ return (0, void_items_report_helpers_1.getVoidItemsReportHtml)(toCommonProps(props));
19
+ }
20
+ function getVoidPurchaseOrderItemsReportReceiptHtml(props) {
21
+ return (0, void_items_report_helpers_1.getVoidItemsReportReceiptHtml)(toCommonProps(props));
22
+ }
@@ -0,0 +1,3 @@
1
+ import { IVoidWarehouseInvoiceItem } from '../../schemas';
2
+ export declare function getVoidWarehouseInvoiceItemFromCents<T extends Partial<IVoidWarehouseInvoiceItem> | IVoidWarehouseInvoiceItem>(voidWarehouseInvoiceItem: T): T;
3
+ export declare function getFetchedVoidWarehouseInvoiceItems(voidItems: IVoidWarehouseInvoiceItem[]): IVoidWarehouseInvoiceItem[];
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVoidWarehouseInvoiceItemFromCents = getVoidWarehouseInvoiceItemFromCents;
4
+ exports.getFetchedVoidWarehouseInvoiceItems = getFetchedVoidWarehouseInvoiceItems;
5
+ const common_order_actions_1 = require("../store/common-order-actions");
6
+ const price_conversion_1 = require("./price-conversion");
7
+ function getVoidWarehouseInvoiceItemFromCents(voidWarehouseInvoiceItem) {
8
+ return {
9
+ ...voidWarehouseInvoiceItem,
10
+ ...(typeof voidWarehouseInvoiceItem.subtotal === 'number'
11
+ ? {
12
+ subtotal: (0, price_conversion_1.convertPriceFromCents)(voidWarehouseInvoiceItem.subtotal),
13
+ }
14
+ : {}),
15
+ ...(typeof voidWarehouseInvoiceItem.total_adjusted_subtotal === 'number'
16
+ ? {
17
+ total_adjusted_subtotal: (0, price_conversion_1.convertPriceFromCents)(voidWarehouseInvoiceItem.total_adjusted_subtotal),
18
+ }
19
+ : {}),
20
+ ...(voidWarehouseInvoiceItem.adjustments != null
21
+ ? {
22
+ adjustments: voidWarehouseInvoiceItem.adjustments.map((adjustment) => ({
23
+ ...adjustment,
24
+ ...(typeof adjustment.subtotal === 'number'
25
+ ? {
26
+ subtotal: (0, price_conversion_1.convertPriceFromCents)(adjustment.subtotal),
27
+ }
28
+ : {}),
29
+ })),
30
+ }
31
+ : {}),
32
+ };
33
+ }
34
+ function getFetchedVoidWarehouseInvoiceItems(voidItems) {
35
+ return voidItems
36
+ .map((voidWarehouseInvoiceItem) => getVoidWarehouseInvoiceItemFromCents(voidWarehouseInvoiceItem))
37
+ .sort(common_order_actions_1.sortByCreatedAt);
38
+ }
@@ -0,0 +1,13 @@
1
+ import { CURRENCY_SYMBOL_ENUM } from '../../constants';
2
+ import { IVoidWarehouseInvoiceItem } from '../../schemas';
3
+ export interface IVoidWarehouseInvoiceItemsReportProps {
4
+ data: IVoidWarehouseInvoiceItem[];
5
+ warehouseName: string | undefined;
6
+ from: Date | null;
7
+ to: Date | null;
8
+ width?: number;
9
+ monochrome?: boolean;
10
+ currency_symbol: CURRENCY_SYMBOL_ENUM | undefined;
11
+ }
12
+ export declare function getVoidWarehouseInvoiceItemsReportHtml(props: IVoidWarehouseInvoiceItemsReportProps): string;
13
+ export declare function getVoidWarehouseInvoiceItemsReportReceiptHtml(props: IVoidWarehouseInvoiceItemsReportProps): string;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVoidWarehouseInvoiceItemsReportHtml = getVoidWarehouseInvoiceItemsReportHtml;
4
+ exports.getVoidWarehouseInvoiceItemsReportReceiptHtml = getVoidWarehouseInvoiceItemsReportReceiptHtml;
5
+ const void_items_report_helpers_1 = require("./void-items-report-helpers");
6
+ function toCommonProps(props) {
7
+ return {
8
+ data: props.data,
9
+ tenantName: props.warehouseName,
10
+ from: props.from,
11
+ to: props.to,
12
+ width: props.width,
13
+ monochrome: props.monochrome,
14
+ currency_symbol: props.currency_symbol,
15
+ };
16
+ }
17
+ function getVoidWarehouseInvoiceItemsReportHtml(props) {
18
+ return (0, void_items_report_helpers_1.getVoidItemsReportHtml)(toCommonProps(props));
19
+ }
20
+ function getVoidWarehouseInvoiceItemsReportReceiptHtml(props) {
21
+ return (0, void_items_report_helpers_1.getVoidItemsReportReceiptHtml)(toCommonProps(props));
22
+ }
@@ -52,6 +52,8 @@ export * from './tokens';
52
52
  export * from './track_order_number';
53
53
  export * from './vouchers';
54
54
  export * from './void_order_items';
55
+ export * from './void_purchase_order_items';
56
+ export * from './void_warehouse_invoice_items';
55
57
  export * from './wallet';
56
58
  export * from './wallet_transactions';
57
59
  export * from './warehouse';
@@ -68,6 +68,8 @@ __exportStar(require("./tokens"), exports);
68
68
  __exportStar(require("./track_order_number"), exports);
69
69
  __exportStar(require("./vouchers"), exports);
70
70
  __exportStar(require("./void_order_items"), exports);
71
+ __exportStar(require("./void_purchase_order_items"), exports);
72
+ __exportStar(require("./void_warehouse_invoice_items"), exports);
71
73
  __exportStar(require("./wallet"), exports);
72
74
  __exportStar(require("./wallet_transactions"), exports);
73
75
  __exportStar(require("./warehouse"), exports);
@@ -0,0 +1,173 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const VoidPurchaseOrderItemSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
+ timestamps: true;
4
+ versionKey: false;
5
+ minimize: false;
6
+ }, {
7
+ createdAt: NativeDate;
8
+ updatedAt: NativeDate;
9
+ } & {
10
+ _id: import("mongoose").Types.ObjectId;
11
+ name: string;
12
+ order_id: import("mongoose").Types.ObjectId;
13
+ staff_id: string;
14
+ staff_name: string;
15
+ createdAt_mins: number;
16
+ createdAt: NativeDate;
17
+ updatedAt: NativeDate;
18
+ description: string;
19
+ order_number: number;
20
+ item_id: import("mongoose").Types.ObjectId;
21
+ quantity: number;
22
+ void_reason: string;
23
+ subtotal: number;
24
+ warehouse_id: string;
25
+ vendor_id: import("mongoose").Types.ObjectId;
26
+ order_item_id: import("mongoose").Types.ObjectId;
27
+ void_type: import("../../constants").VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM;
28
+ iteration: number;
29
+ total_adjusted_quantity: number;
30
+ total_adjusted_subtotal: number;
31
+ order_punched_at: NativeDate;
32
+ adjustments?: import("mongoose").Types.DocumentArray<{
33
+ _id: import("mongoose").Types.ObjectId;
34
+ order_id: import("mongoose").Types.ObjectId;
35
+ staff_id: string;
36
+ staff_name: string;
37
+ order_number: number;
38
+ quantity: number;
39
+ subtotal: number;
40
+ order_item_id: import("mongoose").Types.ObjectId;
41
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ order_id: import("mongoose").Types.ObjectId;
44
+ staff_id: string;
45
+ staff_name: string;
46
+ order_number: number;
47
+ quantity: number;
48
+ subtotal: number;
49
+ order_item_id: import("mongoose").Types.ObjectId;
50
+ }> & {
51
+ _id: import("mongoose").Types.ObjectId;
52
+ order_id: import("mongoose").Types.ObjectId;
53
+ staff_id: string;
54
+ staff_name: string;
55
+ order_number: number;
56
+ quantity: number;
57
+ subtotal: number;
58
+ order_item_id: import("mongoose").Types.ObjectId;
59
+ }> | null | undefined;
60
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
61
+ createdAt: NativeDate;
62
+ updatedAt: NativeDate;
63
+ } & {
64
+ _id: import("mongoose").Types.ObjectId;
65
+ name: string;
66
+ order_id: import("mongoose").Types.ObjectId;
67
+ staff_id: string;
68
+ staff_name: string;
69
+ createdAt_mins: number;
70
+ createdAt: NativeDate;
71
+ updatedAt: NativeDate;
72
+ description: string;
73
+ order_number: number;
74
+ item_id: import("mongoose").Types.ObjectId;
75
+ quantity: number;
76
+ void_reason: string;
77
+ subtotal: number;
78
+ warehouse_id: string;
79
+ vendor_id: import("mongoose").Types.ObjectId;
80
+ order_item_id: import("mongoose").Types.ObjectId;
81
+ void_type: import("../../constants").VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM;
82
+ iteration: number;
83
+ total_adjusted_quantity: number;
84
+ total_adjusted_subtotal: number;
85
+ order_punched_at: NativeDate;
86
+ adjustments?: import("mongoose").Types.DocumentArray<{
87
+ _id: import("mongoose").Types.ObjectId;
88
+ order_id: import("mongoose").Types.ObjectId;
89
+ staff_id: string;
90
+ staff_name: string;
91
+ order_number: number;
92
+ quantity: number;
93
+ subtotal: number;
94
+ order_item_id: import("mongoose").Types.ObjectId;
95
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
96
+ _id: import("mongoose").Types.ObjectId;
97
+ order_id: import("mongoose").Types.ObjectId;
98
+ staff_id: string;
99
+ staff_name: string;
100
+ order_number: number;
101
+ quantity: number;
102
+ subtotal: number;
103
+ order_item_id: import("mongoose").Types.ObjectId;
104
+ }> & {
105
+ _id: import("mongoose").Types.ObjectId;
106
+ order_id: import("mongoose").Types.ObjectId;
107
+ staff_id: string;
108
+ staff_name: string;
109
+ order_number: number;
110
+ quantity: number;
111
+ subtotal: number;
112
+ order_item_id: import("mongoose").Types.ObjectId;
113
+ }> | null | undefined;
114
+ }>> & import("mongoose").FlatRecord<{
115
+ createdAt: NativeDate;
116
+ updatedAt: NativeDate;
117
+ } & {
118
+ _id: import("mongoose").Types.ObjectId;
119
+ name: string;
120
+ order_id: import("mongoose").Types.ObjectId;
121
+ staff_id: string;
122
+ staff_name: string;
123
+ createdAt_mins: number;
124
+ createdAt: NativeDate;
125
+ updatedAt: NativeDate;
126
+ description: string;
127
+ order_number: number;
128
+ item_id: import("mongoose").Types.ObjectId;
129
+ quantity: number;
130
+ void_reason: string;
131
+ subtotal: number;
132
+ warehouse_id: string;
133
+ vendor_id: import("mongoose").Types.ObjectId;
134
+ order_item_id: import("mongoose").Types.ObjectId;
135
+ void_type: import("../../constants").VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM;
136
+ iteration: number;
137
+ total_adjusted_quantity: number;
138
+ total_adjusted_subtotal: number;
139
+ order_punched_at: NativeDate;
140
+ adjustments?: import("mongoose").Types.DocumentArray<{
141
+ _id: import("mongoose").Types.ObjectId;
142
+ order_id: import("mongoose").Types.ObjectId;
143
+ staff_id: string;
144
+ staff_name: string;
145
+ order_number: number;
146
+ quantity: number;
147
+ subtotal: number;
148
+ order_item_id: import("mongoose").Types.ObjectId;
149
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
150
+ _id: import("mongoose").Types.ObjectId;
151
+ order_id: import("mongoose").Types.ObjectId;
152
+ staff_id: string;
153
+ staff_name: string;
154
+ order_number: number;
155
+ quantity: number;
156
+ subtotal: number;
157
+ order_item_id: import("mongoose").Types.ObjectId;
158
+ }> & {
159
+ _id: import("mongoose").Types.ObjectId;
160
+ order_id: import("mongoose").Types.ObjectId;
161
+ staff_id: string;
162
+ staff_name: string;
163
+ order_number: number;
164
+ quantity: number;
165
+ subtotal: number;
166
+ order_item_id: import("mongoose").Types.ObjectId;
167
+ }> | null | undefined;
168
+ }> & Required<{
169
+ _id: import("mongoose").Types.ObjectId;
170
+ }> & {
171
+ __v: number;
172
+ }>;
173
+ export declare const VOID_PURCHASE_ORDER_ITEMS_COLLECTION_NAME = "void_purchase_order_items";
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VOID_PURCHASE_ORDER_ITEMS_COLLECTION_NAME = exports.VoidPurchaseOrderItemSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const purchase_orders_1 = require("./purchase_orders");
7
+ const warehouse_1 = require("./warehouse");
8
+ const warehouse_vendors_1 = require("./warehouse_vendors");
9
+ const VoidPurchaseOrderItemAdjustmentSchema = new mongoose_1.Schema({
10
+ _id: {
11
+ type: mongoose_1.Schema.Types.ObjectId,
12
+ required: true,
13
+ immutable: true,
14
+ },
15
+ order_id: {
16
+ type: mongoose_1.Schema.Types.ObjectId,
17
+ required: true,
18
+ immutable: true,
19
+ ref: purchase_orders_1.PURCHASE_ORDER_COLLECTION_NAME,
20
+ },
21
+ order_number: {
22
+ type: Number,
23
+ min: 0,
24
+ default: null,
25
+ },
26
+ order_item_id: {
27
+ type: mongoose_1.Schema.Types.ObjectId,
28
+ required: true,
29
+ immutable: true,
30
+ },
31
+ quantity: {
32
+ type: Number,
33
+ required: true,
34
+ },
35
+ subtotal: {
36
+ type: Number,
37
+ min: 0,
38
+ required: true,
39
+ },
40
+ staff_id: {
41
+ type: String,
42
+ required: true,
43
+ },
44
+ staff_name: {
45
+ type: String,
46
+ required: true,
47
+ },
48
+ }, {
49
+ minimize: false,
50
+ });
51
+ exports.VoidPurchaseOrderItemSchema = new mongoose_1.Schema({
52
+ _id: {
53
+ type: mongoose_1.Schema.Types.ObjectId,
54
+ required: true,
55
+ immutable: true,
56
+ },
57
+ warehouse_id: {
58
+ type: String,
59
+ required: true,
60
+ ref: warehouse_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
61
+ immutable: true,
62
+ },
63
+ order_id: {
64
+ type: mongoose_1.Schema.Types.ObjectId,
65
+ required: true,
66
+ immutable: true,
67
+ ref: purchase_orders_1.PURCHASE_ORDER_COLLECTION_NAME,
68
+ },
69
+ order_number: {
70
+ type: Number,
71
+ min: 0,
72
+ default: null,
73
+ },
74
+ item_id: {
75
+ type: mongoose_1.Schema.Types.ObjectId,
76
+ required: true,
77
+ immutable: true,
78
+ ref: 'items',
79
+ },
80
+ order_item_id: {
81
+ type: mongoose_1.Schema.Types.ObjectId,
82
+ required: true,
83
+ immutable: true,
84
+ },
85
+ void_type: {
86
+ type: String,
87
+ required: true,
88
+ enum: constants_1.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES,
89
+ },
90
+ vendor_id: {
91
+ type: mongoose_1.Schema.Types.ObjectId,
92
+ required: true,
93
+ ref: warehouse_vendors_1.WAREHOUSE_VENDORS_COLLECTION_NAME,
94
+ },
95
+ staff_id: {
96
+ type: String,
97
+ required: true,
98
+ },
99
+ staff_name: {
100
+ type: String,
101
+ required: true,
102
+ },
103
+ void_reason: {
104
+ type: String,
105
+ required: true,
106
+ },
107
+ iteration: {
108
+ type: Number,
109
+ required: true,
110
+ },
111
+ name: {
112
+ type: String,
113
+ required: true,
114
+ },
115
+ quantity: {
116
+ type: Number,
117
+ required: true,
118
+ },
119
+ subtotal: {
120
+ type: Number,
121
+ min: 0,
122
+ required: true,
123
+ },
124
+ description: {
125
+ type: String,
126
+ required: true,
127
+ },
128
+ total_adjusted_quantity: {
129
+ type: Number,
130
+ required: true,
131
+ default: 0,
132
+ },
133
+ total_adjusted_subtotal: {
134
+ type: Number,
135
+ required: true,
136
+ default: 0,
137
+ },
138
+ adjustments: {
139
+ type: [VoidPurchaseOrderItemAdjustmentSchema],
140
+ required: false,
141
+ },
142
+ order_punched_at: {
143
+ type: mongoose_1.Schema.Types.Date,
144
+ required: true,
145
+ default: () => new Date(),
146
+ },
147
+ createdAt_mins: {
148
+ type: Number,
149
+ required: true,
150
+ immutable: true,
151
+ default: () => {
152
+ const date = new Date();
153
+ return Math.floor(date.getHours() * 60 + date.getMinutes());
154
+ },
155
+ },
156
+ createdAt: {
157
+ type: mongoose_1.Schema.Types.Date,
158
+ required: true,
159
+ default: () => new Date(),
160
+ immutable: true,
161
+ },
162
+ updatedAt: {
163
+ type: mongoose_1.Schema.Types.Date,
164
+ required: true,
165
+ default: () => new Date(),
166
+ },
167
+ }, {
168
+ timestamps: true,
169
+ versionKey: false,
170
+ minimize: false,
171
+ });
172
+ exports.VOID_PURCHASE_ORDER_ITEMS_COLLECTION_NAME = 'void_purchase_order_items';
@@ -0,0 +1,173 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const VoidWarehouseInvoiceItemSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
+ timestamps: true;
4
+ versionKey: false;
5
+ minimize: false;
6
+ }, {
7
+ createdAt: NativeDate;
8
+ updatedAt: NativeDate;
9
+ } & {
10
+ _id: import("mongoose").Types.ObjectId;
11
+ name: string;
12
+ order_id: import("mongoose").Types.ObjectId;
13
+ staff_id: string;
14
+ staff_name: string;
15
+ createdAt_mins: number;
16
+ createdAt: NativeDate;
17
+ updatedAt: NativeDate;
18
+ description: string;
19
+ order_number: number;
20
+ item_id: import("mongoose").Types.ObjectId;
21
+ quantity: number;
22
+ void_reason: string;
23
+ subtotal: number;
24
+ warehouse_id: string;
25
+ order_item_id: import("mongoose").Types.ObjectId;
26
+ void_type: import("../../constants").VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM;
27
+ iteration: number;
28
+ total_adjusted_quantity: number;
29
+ total_adjusted_subtotal: number;
30
+ order_punched_at: NativeDate;
31
+ client_id: import("mongoose").Types.ObjectId;
32
+ adjustments?: import("mongoose").Types.DocumentArray<{
33
+ _id: import("mongoose").Types.ObjectId;
34
+ order_id: import("mongoose").Types.ObjectId;
35
+ staff_id: string;
36
+ staff_name: string;
37
+ order_number: number;
38
+ quantity: number;
39
+ subtotal: number;
40
+ order_item_id: import("mongoose").Types.ObjectId;
41
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ order_id: import("mongoose").Types.ObjectId;
44
+ staff_id: string;
45
+ staff_name: string;
46
+ order_number: number;
47
+ quantity: number;
48
+ subtotal: number;
49
+ order_item_id: import("mongoose").Types.ObjectId;
50
+ }> & {
51
+ _id: import("mongoose").Types.ObjectId;
52
+ order_id: import("mongoose").Types.ObjectId;
53
+ staff_id: string;
54
+ staff_name: string;
55
+ order_number: number;
56
+ quantity: number;
57
+ subtotal: number;
58
+ order_item_id: import("mongoose").Types.ObjectId;
59
+ }> | null | undefined;
60
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
61
+ createdAt: NativeDate;
62
+ updatedAt: NativeDate;
63
+ } & {
64
+ _id: import("mongoose").Types.ObjectId;
65
+ name: string;
66
+ order_id: import("mongoose").Types.ObjectId;
67
+ staff_id: string;
68
+ staff_name: string;
69
+ createdAt_mins: number;
70
+ createdAt: NativeDate;
71
+ updatedAt: NativeDate;
72
+ description: string;
73
+ order_number: number;
74
+ item_id: import("mongoose").Types.ObjectId;
75
+ quantity: number;
76
+ void_reason: string;
77
+ subtotal: number;
78
+ warehouse_id: string;
79
+ order_item_id: import("mongoose").Types.ObjectId;
80
+ void_type: import("../../constants").VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM;
81
+ iteration: number;
82
+ total_adjusted_quantity: number;
83
+ total_adjusted_subtotal: number;
84
+ order_punched_at: NativeDate;
85
+ client_id: import("mongoose").Types.ObjectId;
86
+ adjustments?: import("mongoose").Types.DocumentArray<{
87
+ _id: import("mongoose").Types.ObjectId;
88
+ order_id: import("mongoose").Types.ObjectId;
89
+ staff_id: string;
90
+ staff_name: string;
91
+ order_number: number;
92
+ quantity: number;
93
+ subtotal: number;
94
+ order_item_id: import("mongoose").Types.ObjectId;
95
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
96
+ _id: import("mongoose").Types.ObjectId;
97
+ order_id: import("mongoose").Types.ObjectId;
98
+ staff_id: string;
99
+ staff_name: string;
100
+ order_number: number;
101
+ quantity: number;
102
+ subtotal: number;
103
+ order_item_id: import("mongoose").Types.ObjectId;
104
+ }> & {
105
+ _id: import("mongoose").Types.ObjectId;
106
+ order_id: import("mongoose").Types.ObjectId;
107
+ staff_id: string;
108
+ staff_name: string;
109
+ order_number: number;
110
+ quantity: number;
111
+ subtotal: number;
112
+ order_item_id: import("mongoose").Types.ObjectId;
113
+ }> | null | undefined;
114
+ }>> & import("mongoose").FlatRecord<{
115
+ createdAt: NativeDate;
116
+ updatedAt: NativeDate;
117
+ } & {
118
+ _id: import("mongoose").Types.ObjectId;
119
+ name: string;
120
+ order_id: import("mongoose").Types.ObjectId;
121
+ staff_id: string;
122
+ staff_name: string;
123
+ createdAt_mins: number;
124
+ createdAt: NativeDate;
125
+ updatedAt: NativeDate;
126
+ description: string;
127
+ order_number: number;
128
+ item_id: import("mongoose").Types.ObjectId;
129
+ quantity: number;
130
+ void_reason: string;
131
+ subtotal: number;
132
+ warehouse_id: string;
133
+ order_item_id: import("mongoose").Types.ObjectId;
134
+ void_type: import("../../constants").VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM;
135
+ iteration: number;
136
+ total_adjusted_quantity: number;
137
+ total_adjusted_subtotal: number;
138
+ order_punched_at: NativeDate;
139
+ client_id: import("mongoose").Types.ObjectId;
140
+ adjustments?: import("mongoose").Types.DocumentArray<{
141
+ _id: import("mongoose").Types.ObjectId;
142
+ order_id: import("mongoose").Types.ObjectId;
143
+ staff_id: string;
144
+ staff_name: string;
145
+ order_number: number;
146
+ quantity: number;
147
+ subtotal: number;
148
+ order_item_id: import("mongoose").Types.ObjectId;
149
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
150
+ _id: import("mongoose").Types.ObjectId;
151
+ order_id: import("mongoose").Types.ObjectId;
152
+ staff_id: string;
153
+ staff_name: string;
154
+ order_number: number;
155
+ quantity: number;
156
+ subtotal: number;
157
+ order_item_id: import("mongoose").Types.ObjectId;
158
+ }> & {
159
+ _id: import("mongoose").Types.ObjectId;
160
+ order_id: import("mongoose").Types.ObjectId;
161
+ staff_id: string;
162
+ staff_name: string;
163
+ order_number: number;
164
+ quantity: number;
165
+ subtotal: number;
166
+ order_item_id: import("mongoose").Types.ObjectId;
167
+ }> | null | undefined;
168
+ }> & Required<{
169
+ _id: import("mongoose").Types.ObjectId;
170
+ }> & {
171
+ __v: number;
172
+ }>;
173
+ export declare const VOID_WAREHOUSE_INVOICE_ITEMS_COLLECTION_NAME = "void_warehouse_invoice_items";
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VOID_WAREHOUSE_INVOICE_ITEMS_COLLECTION_NAME = exports.VoidWarehouseInvoiceItemSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const warehouse_1 = require("./warehouse");
7
+ const warehouse_clients_1 = require("./warehouse_clients");
8
+ const warehouse_invoices_1 = require("./warehouse_invoices");
9
+ const VoidWarehouseInvoiceItemAdjustmentSchema = new mongoose_1.Schema({
10
+ _id: {
11
+ type: mongoose_1.Schema.Types.ObjectId,
12
+ required: true,
13
+ immutable: true,
14
+ },
15
+ order_id: {
16
+ type: mongoose_1.Schema.Types.ObjectId,
17
+ required: true,
18
+ immutable: true,
19
+ ref: warehouse_invoices_1.WAREHOUSE_INVOICES_COLLECTION_NAME,
20
+ },
21
+ order_number: {
22
+ type: Number,
23
+ min: 0,
24
+ default: null,
25
+ },
26
+ order_item_id: {
27
+ type: mongoose_1.Schema.Types.ObjectId,
28
+ required: true,
29
+ immutable: true,
30
+ },
31
+ quantity: {
32
+ type: Number,
33
+ required: true,
34
+ },
35
+ subtotal: {
36
+ type: Number,
37
+ min: 0,
38
+ required: true,
39
+ },
40
+ staff_id: {
41
+ type: String,
42
+ required: true,
43
+ },
44
+ staff_name: {
45
+ type: String,
46
+ required: true,
47
+ },
48
+ }, {
49
+ minimize: false,
50
+ });
51
+ exports.VoidWarehouseInvoiceItemSchema = new mongoose_1.Schema({
52
+ _id: {
53
+ type: mongoose_1.Schema.Types.ObjectId,
54
+ required: true,
55
+ immutable: true,
56
+ },
57
+ warehouse_id: {
58
+ type: String,
59
+ required: true,
60
+ ref: warehouse_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
61
+ immutable: true,
62
+ },
63
+ order_id: {
64
+ type: mongoose_1.Schema.Types.ObjectId,
65
+ required: true,
66
+ immutable: true,
67
+ ref: warehouse_invoices_1.WAREHOUSE_INVOICES_COLLECTION_NAME,
68
+ },
69
+ order_number: {
70
+ type: Number,
71
+ min: 0,
72
+ default: null,
73
+ },
74
+ item_id: {
75
+ type: mongoose_1.Schema.Types.ObjectId,
76
+ required: true,
77
+ immutable: true,
78
+ ref: 'items',
79
+ },
80
+ order_item_id: {
81
+ type: mongoose_1.Schema.Types.ObjectId,
82
+ required: true,
83
+ immutable: true,
84
+ },
85
+ void_type: {
86
+ type: String,
87
+ required: true,
88
+ enum: constants_1.ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPES,
89
+ },
90
+ client_id: {
91
+ type: mongoose_1.Schema.Types.ObjectId,
92
+ required: true,
93
+ ref: warehouse_clients_1.WAREHOUSE_CLIENTS_COLLECTION_NAME,
94
+ },
95
+ staff_id: {
96
+ type: String,
97
+ required: true,
98
+ },
99
+ staff_name: {
100
+ type: String,
101
+ required: true,
102
+ },
103
+ void_reason: {
104
+ type: String,
105
+ required: true,
106
+ },
107
+ iteration: {
108
+ type: Number,
109
+ required: true,
110
+ },
111
+ name: {
112
+ type: String,
113
+ required: true,
114
+ },
115
+ quantity: {
116
+ type: Number,
117
+ required: true,
118
+ },
119
+ subtotal: {
120
+ type: Number,
121
+ min: 0,
122
+ required: true,
123
+ },
124
+ description: {
125
+ type: String,
126
+ required: true,
127
+ },
128
+ total_adjusted_quantity: {
129
+ type: Number,
130
+ required: true,
131
+ default: 0,
132
+ },
133
+ total_adjusted_subtotal: {
134
+ type: Number,
135
+ required: true,
136
+ default: 0,
137
+ },
138
+ adjustments: {
139
+ type: [VoidWarehouseInvoiceItemAdjustmentSchema],
140
+ required: false,
141
+ },
142
+ order_punched_at: {
143
+ type: mongoose_1.Schema.Types.Date,
144
+ required: true,
145
+ default: () => new Date(),
146
+ },
147
+ createdAt_mins: {
148
+ type: Number,
149
+ required: true,
150
+ immutable: true,
151
+ default: () => {
152
+ const date = new Date();
153
+ return Math.floor(date.getHours() * 60 + date.getMinutes());
154
+ },
155
+ },
156
+ createdAt: {
157
+ type: mongoose_1.Schema.Types.Date,
158
+ required: true,
159
+ default: () => new Date(),
160
+ immutable: true,
161
+ },
162
+ updatedAt: {
163
+ type: mongoose_1.Schema.Types.Date,
164
+ required: true,
165
+ default: () => new Date(),
166
+ },
167
+ }, {
168
+ timestamps: true,
169
+ versionKey: false,
170
+ minimize: false,
171
+ });
172
+ exports.VOID_WAREHOUSE_INVOICE_ITEMS_COLLECTION_NAME = 'void_warehouse_invoice_items';
@@ -54,6 +54,8 @@ export * from './tokens';
54
54
  export * from './track_order_number';
55
55
  export * from './vouchers';
56
56
  export * from './void_order_items';
57
+ export * from './void_purchase_order_items';
58
+ export * from './void_warehouse_invoice_items';
57
59
  export * from './wallet';
58
60
  export * from './wallet_transactions';
59
61
  export * from './warehouse';
@@ -70,6 +70,8 @@ __exportStar(require("./tokens"), exports);
70
70
  __exportStar(require("./track_order_number"), exports);
71
71
  __exportStar(require("./vouchers"), exports);
72
72
  __exportStar(require("./void_order_items"), exports);
73
+ __exportStar(require("./void_purchase_order_items"), exports);
74
+ __exportStar(require("./void_warehouse_invoice_items"), exports);
73
75
  __exportStar(require("./wallet"), exports);
74
76
  __exportStar(require("./wallet_transactions"), exports);
75
77
  __exportStar(require("./warehouse"), exports);
@@ -20,5 +20,6 @@ export interface IBrandMultiTenantsInfo {
20
20
  name: IBrand['name'];
21
21
  image_url: IBrand['image_url'];
22
22
  website_display_type: IBrand['website_display_type'];
23
+ web_cover_image: ITenant['web_cover_image'];
23
24
  tenants: IBrandTenantInfo[];
24
25
  }
@@ -0,0 +1,36 @@
1
+ import { VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM } from '../../constants';
2
+ export interface IVoidPurchaseOrderItemAdjustment {
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 IVoidPurchaseOrderItem {
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_PURCHASE_ORDER_ITEM_TYPE_ENUM;
20
+ vendor_id: string;
21
+ staff_id: string;
22
+ staff_name: string;
23
+ void_reason: string;
24
+ iteration: number;
25
+ name: string;
26
+ quantity: number;
27
+ subtotal: number;
28
+ description: string;
29
+ total_adjusted_quantity: number;
30
+ total_adjusted_subtotal: number;
31
+ adjustments?: IVoidPurchaseOrderItemAdjustment[] | null;
32
+ order_punched_at: Date;
33
+ createdAt_mins: number;
34
+ createdAt: Date;
35
+ updatedAt: Date;
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,36 @@
1
+ import { VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM } from '../../constants';
2
+ export interface IVoidWarehouseInvoiceItemAdjustment {
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 IVoidWarehouseInvoiceItem {
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
+ staff_id: string;
22
+ staff_name: string;
23
+ void_reason: string;
24
+ iteration: number;
25
+ name: string;
26
+ quantity: number;
27
+ subtotal: number;
28
+ description: string;
29
+ total_adjusted_quantity: number;
30
+ total_adjusted_subtotal: number;
31
+ adjustments?: IVoidWarehouseInvoiceItemAdjustment[] | null;
32
+ order_punched_at: Date;
33
+ createdAt_mins: number;
34
+ createdAt: Date;
35
+ updatedAt: Date;
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.250",
3
+ "version": "0.2.252",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",