@bharatbxhipment/xhipment-models-v2 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/attendance-session/attendance-session.interface.d.ts +35 -0
- package/dist/schemas/attendance-session/attendance-session.interface.d.ts.map +1 -0
- package/dist/schemas/attendance-session/attendance-session.interface.js +3 -0
- package/dist/schemas/attendance-session/attendance-session.interface.js.map +1 -0
- package/dist/schemas/attendance-session/attendance-session.model.d.ts +4 -0
- package/dist/schemas/attendance-session/attendance-session.model.d.ts.map +1 -0
- package/dist/schemas/attendance-session/attendance-session.model.js +99 -0
- package/dist/schemas/attendance-session/attendance-session.model.js.map +1 -0
- package/dist/schemas/credit-note-master/credit-note-master.interface.d.ts +28 -0
- package/dist/schemas/credit-note-master/credit-note-master.interface.d.ts.map +1 -0
- package/dist/schemas/credit-note-master/credit-note-master.interface.js +3 -0
- package/dist/schemas/credit-note-master/credit-note-master.interface.js.map +1 -0
- package/dist/schemas/credit-note-master/credit-note-master.model.d.ts +4 -0
- package/dist/schemas/credit-note-master/credit-note-master.model.d.ts.map +1 -0
- package/dist/schemas/credit-note-master/credit-note-master.model.js +32 -0
- package/dist/schemas/credit-note-master/credit-note-master.model.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export * from "./schemas/cogs-gm/cogs-reconciliation.model";
|
|
|
13
13
|
export * from "./schemas/exchangeRate/exchange-rate.model";
|
|
14
14
|
export * from "./schemas/vendors/vendor.model";
|
|
15
15
|
export * from "./schemas/vendor-payables/vendor-payable.model";
|
|
16
|
+
export * from "./schemas/credit-note-master/credit-note-master.model";
|
|
17
|
+
export * from "./schemas/attendance-session/attendance-session.model";
|
|
16
18
|
export * from "./schemas/container-meta-data/container-meta-data.type";
|
|
17
19
|
export * from "./schemas/countries/countries.interface";
|
|
18
20
|
export * from "./schemas/billing-entities/billing-entities.interface";
|
|
@@ -28,4 +30,6 @@ export * from "./schemas/cogs-gm/cogs-reconciliation.interface";
|
|
|
28
30
|
export * from "./schemas/exchangeRate/exchange-rate.interface";
|
|
29
31
|
export * from "./schemas/vendors/vendor.interface";
|
|
30
32
|
export * from "./schemas/vendor-payables/vendor-payable.interface";
|
|
33
|
+
export * from "./schemas/credit-note-master/credit-note-master.interface";
|
|
34
|
+
export * from "./schemas/attendance-session/attendance-session.interface";
|
|
31
35
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,yDAAyD,CAAC;AACxE,cAAc,mDAAmD,CAAC;AAClE,cAAc,qCAAqC,CAAC;AACpD,cAAc,wDAAwD,CAAC;AACvE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,yDAAyD,CAAC;AACxE,cAAc,mDAAmD,CAAC;AAClE,cAAc,qCAAqC,CAAC;AACpD,cAAc,wDAAwD,CAAC;AACvE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AAEtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,uDAAuD,CAAC;AACtE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,0DAA0D,CAAC;AACzE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iDAAiD,CAAC;AAChE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,2DAA2D,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,8 @@ __exportStar(require("./schemas/cogs-gm/cogs-reconciliation.model"), exports);
|
|
|
30
30
|
__exportStar(require("./schemas/exchangeRate/exchange-rate.model"), exports);
|
|
31
31
|
__exportStar(require("./schemas/vendors/vendor.model"), exports);
|
|
32
32
|
__exportStar(require("./schemas/vendor-payables/vendor-payable.model"), exports);
|
|
33
|
+
__exportStar(require("./schemas/credit-note-master/credit-note-master.model"), exports);
|
|
34
|
+
__exportStar(require("./schemas/attendance-session/attendance-session.model"), exports);
|
|
33
35
|
// Types
|
|
34
36
|
__exportStar(require("./schemas/container-meta-data/container-meta-data.type"), exports);
|
|
35
37
|
__exportStar(require("./schemas/countries/countries.interface"), exports);
|
|
@@ -46,4 +48,6 @@ __exportStar(require("./schemas/cogs-gm/cogs-reconciliation.interface"), exports
|
|
|
46
48
|
__exportStar(require("./schemas/exchangeRate/exchange-rate.interface"), exports);
|
|
47
49
|
__exportStar(require("./schemas/vendors/vendor.interface"), exports);
|
|
48
50
|
__exportStar(require("./schemas/vendor-payables/vendor-payable.interface"), exports);
|
|
51
|
+
__exportStar(require("./schemas/credit-note-master/credit-note-master.interface"), exports);
|
|
52
|
+
__exportStar(require("./schemas/attendance-session/attendance-session.interface"), exports);
|
|
49
53
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,0FAAwE;AACxE,oFAAkE;AAClE,sEAAoD;AACpD,yFAAuE;AACvE,8EAA4D;AAC5D,8DAA4C;AAC5C,uFAAqE;AACrE,0EAAwD;AACxD,sEAAoD;AACpD,kEAAgD;AAChD,uEAAqD;AACrD,8EAA4D;AAC5D,6EAA2D;AAC3D,iEAA+C;AAC/C,iFAA+D;AAC/D,QAAQ;AACR,yFAAuE;AACvE,0EAAwD;AACxD,wFAAsE;AACtE,6FAA2E;AAC3E,kFAAgE;AAChE,kEAAgD;AAChD,2FAAyE;AACzE,8EAA4D;AAC5D,0EAAwD;AACxD,sEAAoD;AACpD,2EAAyD;AACzD,kFAAgE;AAChE,iFAA+D;AAC/D,qEAAmD;AACnD,qFAAmE"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,0FAAwE;AACxE,oFAAkE;AAClE,sEAAoD;AACpD,yFAAuE;AACvE,8EAA4D;AAC5D,8DAA4C;AAC5C,uFAAqE;AACrE,0EAAwD;AACxD,sEAAoD;AACpD,kEAAgD;AAChD,uEAAqD;AACrD,8EAA4D;AAC5D,6EAA2D;AAC3D,iEAA+C;AAC/C,iFAA+D;AAC/D,wFAAsE;AACtE,wFAAsE;AACtE,QAAQ;AACR,yFAAuE;AACvE,0EAAwD;AACxD,wFAAsE;AACtE,6FAA2E;AAC3E,kFAAgE;AAChE,kEAAgD;AAChD,2FAAyE;AACzE,8EAA4D;AAC5D,0EAAwD;AACxD,sEAAoD;AACpD,2EAAyD;AACzD,kFAAgE;AAChE,iFAA+D;AAC/D,qEAAmD;AACnD,qFAAmE;AACnE,4FAA0E;AAC1E,4FAA0E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
export interface IAttendanceLocation {
|
|
3
|
+
lat: number;
|
|
4
|
+
lng: number;
|
|
5
|
+
accuracy: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IAttendanceDevice {
|
|
8
|
+
userAgent: string;
|
|
9
|
+
platform: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IAttendanceSession {
|
|
12
|
+
_id?: mongoose.Types.ObjectId;
|
|
13
|
+
employeeId: mongoose.Types.ObjectId;
|
|
14
|
+
date: Date;
|
|
15
|
+
expectedStartTime: string;
|
|
16
|
+
expectedEndTime: string;
|
|
17
|
+
checkinTime: Date;
|
|
18
|
+
checkoutTime?: Date;
|
|
19
|
+
checkinLocation: IAttendanceLocation;
|
|
20
|
+
checkoutLocation?: IAttendanceLocation;
|
|
21
|
+
checkinDevice: IAttendanceDevice;
|
|
22
|
+
checkoutDevice?: IAttendanceDevice;
|
|
23
|
+
checkinIp: string;
|
|
24
|
+
checkoutIp?: string;
|
|
25
|
+
workMode: "WFO" | "WFH";
|
|
26
|
+
isLate: boolean;
|
|
27
|
+
lateByMinutes: number;
|
|
28
|
+
isEarlyCheckout: boolean;
|
|
29
|
+
earlyByMinutes: number;
|
|
30
|
+
effectiveMinutes: number;
|
|
31
|
+
status: "checked_in" | "checked_out";
|
|
32
|
+
createdAt?: Date;
|
|
33
|
+
updatedAt?: Date;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=attendance-session.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance-session.interface.d.ts","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.interface.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC9B,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACpC,IAAI,EAAE,IAAI,CAAC;IACX,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,eAAe,EAAE,mBAAmB,CAAC;IACrC,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,aAAa,EAAE,iBAAiB,CAAC;IACjC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,YAAY,GAAG,aAAa,CAAC;IACrC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance-session.interface.js","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
import { IAttendanceSession } from "./attendance-session.interface";
|
|
3
|
+
export declare const attendanceSessionSchema: Schema<IAttendanceSession, import("mongoose").Model<IAttendanceSession, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAttendanceSession>;
|
|
4
|
+
//# sourceMappingURL=attendance-session.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance-session.model.d.ts","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAA0C,MAAM,gCAAgC,CAAC;AAmB5G,eAAO,MAAM,uBAAuB,2KAqFnC,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.attendanceSessionSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const locationSchema = new mongoose_1.Schema({
|
|
6
|
+
lat: { type: Number, required: true },
|
|
7
|
+
lng: { type: Number, required: true },
|
|
8
|
+
accuracy: { type: Number, required: true },
|
|
9
|
+
}, { _id: false });
|
|
10
|
+
const deviceSchema = new mongoose_1.Schema({
|
|
11
|
+
userAgent: { type: String, required: true },
|
|
12
|
+
platform: { type: String, required: true },
|
|
13
|
+
}, { _id: false });
|
|
14
|
+
exports.attendanceSessionSchema = new mongoose_1.Schema({
|
|
15
|
+
employeeId: {
|
|
16
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
17
|
+
ref: "Employee",
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
date: {
|
|
21
|
+
type: Date,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
expectedStartTime: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
expectedEndTime: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
checkinTime: {
|
|
33
|
+
type: Date,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
checkoutTime: {
|
|
37
|
+
type: Date,
|
|
38
|
+
default: null,
|
|
39
|
+
},
|
|
40
|
+
checkinLocation: {
|
|
41
|
+
type: locationSchema,
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
checkoutLocation: {
|
|
45
|
+
type: locationSchema,
|
|
46
|
+
default: null,
|
|
47
|
+
},
|
|
48
|
+
checkinDevice: {
|
|
49
|
+
type: deviceSchema,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
checkoutDevice: {
|
|
53
|
+
type: deviceSchema,
|
|
54
|
+
default: null,
|
|
55
|
+
},
|
|
56
|
+
checkinIp: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
checkoutIp: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: null,
|
|
63
|
+
},
|
|
64
|
+
workMode: {
|
|
65
|
+
type: String,
|
|
66
|
+
enum: ["WFO", "WFH"],
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
isLate: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
lateByMinutes: {
|
|
74
|
+
type: Number,
|
|
75
|
+
default: 0,
|
|
76
|
+
},
|
|
77
|
+
isEarlyCheckout: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false,
|
|
80
|
+
},
|
|
81
|
+
earlyByMinutes: {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: 0,
|
|
84
|
+
},
|
|
85
|
+
effectiveMinutes: {
|
|
86
|
+
type: Number,
|
|
87
|
+
default: 0,
|
|
88
|
+
},
|
|
89
|
+
status: {
|
|
90
|
+
type: String,
|
|
91
|
+
enum: ["checked_in", "checked_out"],
|
|
92
|
+
required: true,
|
|
93
|
+
},
|
|
94
|
+
}, {
|
|
95
|
+
timestamps: true,
|
|
96
|
+
});
|
|
97
|
+
exports.attendanceSessionSchema.index({ employeeId: 1, date: 1 });
|
|
98
|
+
exports.attendanceSessionSchema.index({ employeeId: 1, status: 1 });
|
|
99
|
+
//# sourceMappingURL=attendance-session.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance-session.model.js","sourceRoot":"","sources":["../../../src/schemas/attendance-session/attendance-session.model.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAGlC,MAAM,cAAc,GAAG,IAAI,iBAAM,CAC/B;IACE,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACrC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACrC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;CAC3C,EACD,EAAE,GAAG,EAAE,KAAK,EAAE,CACf,CAAC;AAEF,MAAM,YAAY,GAAG,IAAI,iBAAM,CAC7B;IACE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;CAC3C,EACD,EAAE,GAAG,EAAE,KAAK,EAAE,CACf,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAI,iBAAM,CAC/C;IACE,UAAU,EAAE;QACV,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ;QAC3B,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,IAAI,E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AE,MAAM;QACZ,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;QACnC,QAAQ,EAAE,IAAI;KACf;CACF,EACD;IACE,UAAU,EAAE,IAAI;CACjB,CACF,CAAC;AAEF,+BAAuB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1D,+BAAuB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
2
|
+
import { IValueWithCurrency } from "../../shared-interface/common-interface";
|
|
3
|
+
export interface ICreditNoteAllocation {
|
|
4
|
+
invoiceId: Types.ObjectId;
|
|
5
|
+
invoiceNumber: string;
|
|
6
|
+
allocatedAmount: number;
|
|
7
|
+
currency: string;
|
|
8
|
+
allocatedAt?: Date;
|
|
9
|
+
allocatedBy?: Types.ObjectId;
|
|
10
|
+
_id?: Types.ObjectId;
|
|
11
|
+
}
|
|
12
|
+
export interface ICreditNoteMaster {
|
|
13
|
+
creditNoteNumber: string;
|
|
14
|
+
vendorId: Types.ObjectId;
|
|
15
|
+
vendorName: string;
|
|
16
|
+
totalAmount: IValueWithCurrency;
|
|
17
|
+
allocatedAmount: number;
|
|
18
|
+
remainingAmount: number;
|
|
19
|
+
documentUrl?: string;
|
|
20
|
+
allocations: ICreditNoteAllocation[];
|
|
21
|
+
addedBy?: Types.ObjectId;
|
|
22
|
+
addedAt: Date;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
createdAt?: Date;
|
|
25
|
+
updatedAt?: Date;
|
|
26
|
+
_id?: Types.ObjectId;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=credit-note-master.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-note-master.interface.d.ts","sourceRoot":"","sources":["../../../src/schemas/credit-note-master/credit-note-master.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,kBAAkB,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,OAAO,EAAE,IAAI,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-note-master.interface.js","sourceRoot":"","sources":["../../../src/schemas/credit-note-master/credit-note-master.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
import { ICreditNoteMaster } from "./credit-note-master.interface";
|
|
3
|
+
export declare const creditNoteMasterSchema: Schema<ICreditNoteMaster, import("mongoose").Model<ICreditNoteMaster, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ICreditNoteMaster>;
|
|
4
|
+
//# sourceMappingURL=credit-note-master.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-note-master.model.d.ts","sourceRoot":"","sources":["../../../src/schemas/credit-note-master/credit-note-master.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAyB,MAAM,gCAAgC,CAAC;AAW1F,eAAO,MAAM,sBAAsB,wKAesB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.creditNoteMasterSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const creditNoteAllocationSchema = new mongoose_1.Schema({
|
|
6
|
+
invoiceId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'VendorPayable', required: true },
|
|
7
|
+
invoiceNumber: { type: String, required: true },
|
|
8
|
+
allocatedAmount: { type: Number, required: true },
|
|
9
|
+
currency: { type: String, required: true },
|
|
10
|
+
allocatedAt: { type: Date, default: Date.now },
|
|
11
|
+
allocatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }
|
|
12
|
+
}, { _id: true });
|
|
13
|
+
exports.creditNoteMasterSchema = new mongoose_1.Schema({
|
|
14
|
+
creditNoteNumber: { type: String, required: true },
|
|
15
|
+
vendorId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Vendor', required: true },
|
|
16
|
+
vendorName: { type: String, required: true },
|
|
17
|
+
totalAmount: {
|
|
18
|
+
value: { type: Number, required: true },
|
|
19
|
+
currency: { type: String, required: true }
|
|
20
|
+
},
|
|
21
|
+
allocatedAmount: { type: Number, default: 0 },
|
|
22
|
+
remainingAmount: { type: Number, default: 0 },
|
|
23
|
+
documentUrl: { type: String },
|
|
24
|
+
allocations: [creditNoteAllocationSchema],
|
|
25
|
+
addedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
26
|
+
addedAt: { type: Date, default: Date.now },
|
|
27
|
+
isActive: { type: Boolean, default: true }
|
|
28
|
+
}, { timestamps: true, collection: 'creditnotemasters' });
|
|
29
|
+
exports.creditNoteMasterSchema.index({ vendorId: 1 });
|
|
30
|
+
exports.creditNoteMasterSchema.index({ creditNoteNumber: 1, vendorId: 1 }, { unique: true });
|
|
31
|
+
exports.creditNoteMasterSchema.index({ 'allocations.invoiceId': 1 });
|
|
32
|
+
//# sourceMappingURL=credit-note-master.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-note-master.model.js","sourceRoot":"","sources":["../../../src/schemas/credit-note-master/credit-note-master.model.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAGlC,MAAM,0BAA0B,GAAG,IAAI,iBAAM,CAAwB;IACnE,SAAS,EAAE,EAAE,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE;IAChF,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC/C,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACjD,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1C,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;IAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE;CAC1D,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAA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