@managesome/eposmatic-toolkit 0.2.598 → 0.2.601

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WarehouseInternalMovementsSchema = exports.WAREHOUSE_INTERNAL_MOVEMENTS_COLLECTION_NAME = void 0;
3
+ exports.WarehouseInternalMovementsSchema = exports.WarehouseInternalMovementIterationSchema = exports.WAREHOUSE_INTERNAL_MOVEMENTS_COLLECTION_NAME = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const constants_1 = require("../../constants");
6
6
  const common_models_1 = require("./common-models");
@@ -69,6 +69,79 @@ const WarehouseInternalMovementItemSchema = new mongoose_1.Schema({
69
69
  _id: false,
70
70
  minimize: false,
71
71
  });
72
+ exports.WarehouseInternalMovementIterationSchema = new mongoose_1.Schema({
73
+ items: {
74
+ type: [WarehouseInternalMovementItemSchema],
75
+ required: true,
76
+ default: [],
77
+ },
78
+ total_items: {
79
+ type: Number,
80
+ min: 0,
81
+ required: true,
82
+ default: 0,
83
+ },
84
+ total_quantity: {
85
+ type: Number,
86
+ min: 0,
87
+ required: true,
88
+ default: 0,
89
+ },
90
+ grand_total: {
91
+ type: Number,
92
+ min: 0,
93
+ required: true,
94
+ default: 0,
95
+ },
96
+ payments: {
97
+ type: [common_models_1.PaymentsSchema],
98
+ required: true,
99
+ default: [],
100
+ },
101
+ amount_collected: {
102
+ type: Number,
103
+ min: 0,
104
+ required: true,
105
+ default: 0,
106
+ },
107
+ amount_earned: {
108
+ type: Number,
109
+ min: 0,
110
+ required: true,
111
+ default: 0,
112
+ },
113
+ is_gst_inclusive: {
114
+ type: Boolean,
115
+ required: false,
116
+ },
117
+ gst: {
118
+ type: Number,
119
+ min: 0,
120
+ required: false,
121
+ },
122
+ gst_amount: {
123
+ type: Number,
124
+ min: 0,
125
+ required: false,
126
+ },
127
+ notes: {
128
+ type: String,
129
+ required: false,
130
+ },
131
+ status: {
132
+ type: String,
133
+ enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_STATUS_NAMES,
134
+ required: true,
135
+ },
136
+ updatedAt: {
137
+ type: mongoose_1.Schema.Types.Date,
138
+ required: true,
139
+ },
140
+ }, {
141
+ _id: false,
142
+ timestamps: false,
143
+ versionKey: false,
144
+ });
72
145
  exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
73
146
  _id: {
74
147
  type: mongoose_1.Schema.Types.ObjectId,
@@ -136,6 +209,10 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
136
209
  required: true,
137
210
  default: [],
138
211
  },
212
+ iterations: {
213
+ type: [exports.WarehouseInternalMovementIterationSchema],
214
+ default: [],
215
+ },
139
216
  total_items: {
140
217
  type: Number,
141
218
  min: 0,
@@ -48,13 +48,27 @@ export interface IWarehouseInternalMovementCancelRequestMeta {
48
48
  cancel_request_reviewed_by?: IWarehouseInternalMovementActorRef | null;
49
49
  cancel_request_decision_note?: string | null;
50
50
  }
51
- export interface IWarehouseInternalMovement extends IWarehouseInternalMovementStatusMeta, IWarehouseInternalMovementEditRequestMeta, IWarehouseInternalMovementCancelRequestMeta {
51
+ export interface IWarehouseInternalMovementIteration {
52
+ items: IWarehouseInternalMovementItem[];
53
+ total_items: number;
54
+ total_quantity: number;
55
+ grand_total: number;
56
+ payments: IOrderPayment[];
57
+ amount_collected: number;
58
+ amount_earned: number;
59
+ is_gst_inclusive?: boolean;
60
+ gst?: number | null;
61
+ gst_amount?: number | null;
62
+ notes?: string | null;
63
+ status: WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
64
+ updatedAt: Date;
65
+ }
66
+ export interface IWarehouseInternalMovement extends IWarehouseInternalMovementStatusMeta, IWarehouseInternalMovementEditRequestMeta, IWarehouseInternalMovementCancelRequestMeta, IWarehouseInternalMovementIteration {
52
67
  _id: string;
53
68
  ref_id: string;
54
69
  ref_type: WAREHOUSE_REF_TYPE_ENUM;
55
70
  doc_number: string;
56
71
  record_type: WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
57
- status: WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
58
72
  flow: WAREHOUSE_INTERNAL_MOVEMENT_FLOW_ENUM;
59
73
  source_id: string;
60
74
  source_type: WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
@@ -62,22 +76,12 @@ export interface IWarehouseInternalMovement extends IWarehouseInternalMovementSt
62
76
  destination_id: string;
63
77
  destination_type: WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
64
78
  destination_name: string;
65
- items: IWarehouseInternalMovementItem[];
66
- total_items: number;
67
- total_quantity: number;
68
- grand_total: number;
69
- payments: IOrderPayment[];
70
- amount_collected: number;
71
- amount_earned: number;
72
- is_gst_inclusive?: boolean;
73
- gst?: number | null;
74
- gst_amount?: number | null;
75
79
  parent_movement_id?: string | null;
76
- notes?: string | null;
77
80
  created_by: IWarehouseInternalMovementActorRef;
78
81
  updated_by?: IWarehouseInternalMovementActorRef | null;
79
82
  cancelled_reason?: string | null;
80
83
  is_deleted: boolean;
84
+ iterations: IWarehouseInternalMovementIteration[];
81
85
  createdAt: Date;
82
86
  updatedAt: Date;
83
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.598",
3
+ "version": "0.2.601",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",