@managesome/eposmatic-toolkit 0.2.772 → 0.2.774

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.
@@ -1201,3 +1201,20 @@ export declare enum HR_EMPLOYEE_DOCUMENT_TYPE_ENUM {
1201
1201
  OTHER = "OTHER"
1202
1202
  }
1203
1203
  export declare const ALL_HR_EMPLOYEE_DOCUMENT_TYPES: HR_EMPLOYEE_DOCUMENT_TYPE_ENUM[];
1204
+ export declare enum HR_PAY_TYPE_ENUM {
1205
+ HOURLY = "HOURLY",
1206
+ MONTHLY = "MONTHLY"
1207
+ }
1208
+ export declare const ALL_HR_PAY_TYPE_NAMES: HR_PAY_TYPE_ENUM[];
1209
+ export declare enum HR_PAYROLL_STATUS_ENUM {
1210
+ PENDING = "PENDING",
1211
+ PROCESSED = "PROCESSED",
1212
+ PAID = "PAID"
1213
+ }
1214
+ export declare const ALL_HR_PAYROLL_STATUS_NAMES: HR_PAYROLL_STATUS_ENUM[];
1215
+ export declare enum HR_PAYMENT_METHOD_ENUM {
1216
+ BANK_TRANSFER = "BANK_TRANSFER",
1217
+ CASH = "CASH",
1218
+ CHEQUE = "CHEQUE"
1219
+ }
1220
+ export declare const ALL_HR_PAYMENT_METHOD_NAMES: HR_PAYMENT_METHOD_ENUM[];
@@ -5,7 +5,7 @@ exports.ALL_EMAIL_DOCUMENT_KINDS = exports.EMAIL_DOCUMENT_KIND_ENUM = exports.AL
5
5
  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.WHITELISTED_API_SMS_COUNTRY_CODES = 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 = 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_STATUS = exports.EMAIL_STATUS_ENUM = exports.ALL_COMMUNICATION_CHANNELS = exports.COMMUNICATION_CHANNEL_ENUM = void 0;
6
6
  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_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_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_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 = void 0;
7
7
  exports.ALL_HR_CHECK_IN_METHOD_NAMES = exports.HR_CHECK_IN_METHOD_ENUM = exports.ALL_HR_ATTENDANCE_STATUS_NAMES = exports.HR_ATTENDANCE_STATUS_ENUM = exports.ALL_HR_EMPLOYMENT_STATUS_NAMES = exports.HR_EMPLOYMENT_STATUS_ENUM = exports.ALL_INTERNAL_CUSTOMER_PAYMENT_METHOD_NAMES = exports.INTERNAL_CUSTOMER_PAYMENT_METHOD_ENUM = exports.ALL_INTERNAL_CUSTOMER_SUBSCRIPTION_SERVICE_NAMES = exports.INTERNAL_CUSTOMER_SUBSCRIPTION_SERVICE_ENUM = exports.ALL_INTERNAL_CUSTOMER_SUBSCRIPTION_PLAN_NAMES = exports.INTERNAL_CUSTOMER_SUBSCRIPTION_PLAN_ENUM = exports.ALL_INTERNAL_CUSTOMER_BILLING_CYCLE_NAMES = exports.INTERNAL_CUSTOMER_BILLING_CYCLE_ENUM = exports.ALL_INTERNAL_CUSTOMER_TYPE_NAMES = exports.INTERNAL_CUSTOMER_TYPE_ENUM = exports.ALL_INTERNAL_INVOICE_TYPE_NAMES = exports.INTERNAL_INVOICE_TYPE_ENUM = exports.ALL_INTERNAL_INVOICE_STATUS_NAMES = exports.INTERNAL_INVOICE_STATUS_ENUM = exports.ALL_SUBSCRIPTION_HARDWARE_NAMES = exports.SUBSCRIPTION_HARDWARE_ENUM = exports.ALL_CUSTOMER_TARGET_MODES = exports.CUSTOMER_TARGET_MODE_ENUM = exports.ALL_WALLET_ASSIGNMENT_BEHAVIORS = exports.WALLET_ASSIGNMENT_BEHAVIOR_ENUM = exports.ALL_WALLET_ASSET_TYPES = exports.WALLET_ASSET_TYPE_ENUM = 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_REFS = exports.CASH_IN_OUT_REF_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
- exports.ALL_HR_EMPLOYEE_DOCUMENT_TYPES = exports.HR_EMPLOYEE_DOCUMENT_TYPE_ENUM = exports.ALL_HR_SHIFT_STATUS_NAMES = exports.HR_SHIFT_STATUS_ENUM = exports.ALL_HR_SHIFT_TYPE_NAMES = exports.HR_SHIFT_TYPE_ENUM = exports.ALL_HR_BIOMETRIC_ENROLLMENT_TYPE_NAMES = exports.HR_BIOMETRIC_ENROLLMENT_TYPE_ENUM = void 0;
8
+ exports.ALL_HR_PAYMENT_METHOD_NAMES = exports.HR_PAYMENT_METHOD_ENUM = exports.ALL_HR_PAYROLL_STATUS_NAMES = exports.HR_PAYROLL_STATUS_ENUM = exports.ALL_HR_PAY_TYPE_NAMES = exports.HR_PAY_TYPE_ENUM = exports.ALL_HR_EMPLOYEE_DOCUMENT_TYPES = exports.HR_EMPLOYEE_DOCUMENT_TYPE_ENUM = exports.ALL_HR_SHIFT_STATUS_NAMES = exports.HR_SHIFT_STATUS_ENUM = exports.ALL_HR_SHIFT_TYPE_NAMES = exports.HR_SHIFT_TYPE_ENUM = exports.ALL_HR_BIOMETRIC_ENROLLMENT_TYPE_NAMES = exports.HR_BIOMETRIC_ENROLLMENT_TYPE_ENUM = void 0;
9
9
  var ORDER_FROM_ENUM;
10
10
  (function (ORDER_FROM_ENUM) {
11
11
  ORDER_FROM_ENUM["WEB"] = "WEB";
@@ -1898,3 +1898,23 @@ var HR_EMPLOYEE_DOCUMENT_TYPE_ENUM;
1898
1898
  HR_EMPLOYEE_DOCUMENT_TYPE_ENUM["OTHER"] = "OTHER";
1899
1899
  })(HR_EMPLOYEE_DOCUMENT_TYPE_ENUM || (exports.HR_EMPLOYEE_DOCUMENT_TYPE_ENUM = HR_EMPLOYEE_DOCUMENT_TYPE_ENUM = {}));
1900
1900
  exports.ALL_HR_EMPLOYEE_DOCUMENT_TYPES = Object.values(HR_EMPLOYEE_DOCUMENT_TYPE_ENUM);
1901
+ var HR_PAY_TYPE_ENUM;
1902
+ (function (HR_PAY_TYPE_ENUM) {
1903
+ HR_PAY_TYPE_ENUM["HOURLY"] = "HOURLY";
1904
+ HR_PAY_TYPE_ENUM["MONTHLY"] = "MONTHLY";
1905
+ })(HR_PAY_TYPE_ENUM || (exports.HR_PAY_TYPE_ENUM = HR_PAY_TYPE_ENUM = {}));
1906
+ exports.ALL_HR_PAY_TYPE_NAMES = Object.values(HR_PAY_TYPE_ENUM);
1907
+ var HR_PAYROLL_STATUS_ENUM;
1908
+ (function (HR_PAYROLL_STATUS_ENUM) {
1909
+ HR_PAYROLL_STATUS_ENUM["PENDING"] = "PENDING";
1910
+ HR_PAYROLL_STATUS_ENUM["PROCESSED"] = "PROCESSED";
1911
+ HR_PAYROLL_STATUS_ENUM["PAID"] = "PAID";
1912
+ })(HR_PAYROLL_STATUS_ENUM || (exports.HR_PAYROLL_STATUS_ENUM = HR_PAYROLL_STATUS_ENUM = {}));
1913
+ exports.ALL_HR_PAYROLL_STATUS_NAMES = Object.values(HR_PAYROLL_STATUS_ENUM);
1914
+ var HR_PAYMENT_METHOD_ENUM;
1915
+ (function (HR_PAYMENT_METHOD_ENUM) {
1916
+ HR_PAYMENT_METHOD_ENUM["BANK_TRANSFER"] = "BANK_TRANSFER";
1917
+ HR_PAYMENT_METHOD_ENUM["CASH"] = "CASH";
1918
+ HR_PAYMENT_METHOD_ENUM["CHEQUE"] = "CHEQUE";
1919
+ })(HR_PAYMENT_METHOD_ENUM || (exports.HR_PAYMENT_METHOD_ENUM = HR_PAYMENT_METHOD_ENUM = {}));
1920
+ exports.ALL_HR_PAYMENT_METHOD_NAMES = Object.values(HR_PAYMENT_METHOD_ENUM);
@@ -55,6 +55,7 @@ export * from './tenant_hr_attendance_records';
55
55
  export * from './tenant_hr_biometric_enrollments';
56
56
  export * from './tenant_hr_departments';
57
57
  export * from './tenant_hr_employees';
58
+ export * from './tenant_hr_payrolls';
58
59
  export * from './tenant_hr_positions';
59
60
  export * from './tenant_hr_shift_schedules';
60
61
  export * from './tenant_hr_shifts';
@@ -71,6 +71,7 @@ __exportStar(require("./tenant_hr_attendance_records"), exports);
71
71
  __exportStar(require("./tenant_hr_biometric_enrollments"), exports);
72
72
  __exportStar(require("./tenant_hr_departments"), exports);
73
73
  __exportStar(require("./tenant_hr_employees"), exports);
74
+ __exportStar(require("./tenant_hr_payrolls"), exports);
74
75
  __exportStar(require("./tenant_hr_positions"), exports);
75
76
  __exportStar(require("./tenant_hr_shift_schedules"), exports);
76
77
  __exportStar(require("./tenant_hr_shifts"), exports);
@@ -1,5 +1,5 @@
1
1
  import { Schema } from 'mongoose';
2
- import { HR_EMPLOYMENT_STATUS_ENUM } from '../../constants';
2
+ import { HR_EMPLOYMENT_STATUS_ENUM, HR_PAY_TYPE_ENUM } from '../../constants';
3
3
  export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
4
  timestamps: true;
5
5
  versionKey: false;
@@ -32,7 +32,12 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
32
32
  position_id: string;
33
33
  join_date: NativeDate;
34
34
  employment_status: HR_EMPLOYMENT_STATUS_ENUM;
35
+ pay_type: HR_PAY_TYPE_ENUM;
35
36
  salary_per_hour: number;
37
+ monthly_salary: number;
38
+ hr_working_days_per_month: number;
39
+ hr_hours_per_working_day: number;
40
+ hr_overtime_multiplier: number;
36
41
  docs: Map<string, {
37
42
  doc_url: string;
38
43
  doc_name: string;
@@ -352,7 +357,12 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
352
357
  position_id: string;
353
358
  join_date: NativeDate;
354
359
  employment_status: HR_EMPLOYMENT_STATUS_ENUM;
360
+ pay_type: HR_PAY_TYPE_ENUM;
355
361
  salary_per_hour: number;
362
+ monthly_salary: number;
363
+ hr_working_days_per_month: number;
364
+ hr_hours_per_working_day: number;
365
+ hr_overtime_multiplier: number;
356
366
  docs: Map<string, {
357
367
  doc_url: string;
358
368
  doc_name: string;
@@ -672,7 +682,12 @@ export declare const TenantHrEmployeeSchema: Schema<any, import("mongoose").Mode
672
682
  position_id: string;
673
683
  join_date: NativeDate;
674
684
  employment_status: HR_EMPLOYMENT_STATUS_ENUM;
685
+ pay_type: HR_PAY_TYPE_ENUM;
675
686
  salary_per_hour: number;
687
+ monthly_salary: number;
688
+ hr_working_days_per_month: number;
689
+ hr_hours_per_working_day: number;
690
+ hr_overtime_multiplier: number;
676
691
  docs: Map<string, {
677
692
  doc_url: string;
678
693
  doc_name: string;
@@ -113,10 +113,34 @@ exports.TenantHrEmployeeSchema = new mongoose_1.Schema({
113
113
  enum: constants_1.ALL_HR_EMPLOYMENT_STATUS_NAMES,
114
114
  default: constants_1.HR_EMPLOYMENT_STATUS_ENUM.ACTIVE,
115
115
  },
116
+ pay_type: {
117
+ type: String,
118
+ required: true,
119
+ enum: constants_1.ALL_HR_PAY_TYPE_NAMES,
120
+ default: constants_1.HR_PAY_TYPE_ENUM.MONTHLY,
121
+ },
116
122
  salary_per_hour: {
123
+ type: Number,
124
+ default: null,
125
+ },
126
+ monthly_salary: {
127
+ type: Number,
128
+ default: null,
129
+ },
130
+ hr_working_days_per_month: {
131
+ type: Number,
132
+ required: true,
133
+ default: 30,
134
+ },
135
+ hr_hours_per_working_day: {
136
+ type: Number,
137
+ required: true,
138
+ default: 8,
139
+ },
140
+ hr_overtime_multiplier: {
117
141
  type: Number,
118
142
  required: true,
119
- default: 0,
143
+ default: 1.5,
120
144
  },
121
145
  docs: {
122
146
  type: Map,
@@ -0,0 +1,105 @@
1
+ import { Schema } from 'mongoose';
2
+ import { HR_PAYMENT_METHOD_ENUM, HR_PAYROLL_STATUS_ENUM, HR_PAY_TYPE_ENUM } from '../../constants';
3
+ export declare const TenantHrPayrollSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ timestamps: true;
5
+ versionKey: false;
6
+ minimize: false;
7
+ }, {
8
+ createdAt: NativeDate;
9
+ updatedAt: NativeDate;
10
+ } & {
11
+ _id: import("mongoose").Types.ObjectId;
12
+ tenant_id: string;
13
+ createdAt: NativeDate;
14
+ updatedAt: NativeDate;
15
+ status: HR_PAYROLL_STATUS_ENUM;
16
+ payment_method: HR_PAYMENT_METHOD_ENUM;
17
+ notes: string;
18
+ employee_id: string;
19
+ pay_type: HR_PAY_TYPE_ENUM;
20
+ salary_per_hour: number;
21
+ monthly_salary: number;
22
+ pay_period_start: NativeDate;
23
+ pay_period_end: NativeDate;
24
+ working_days_per_month: number;
25
+ hours_per_working_day: number;
26
+ overtime_multiplier: number;
27
+ regular_hours: number;
28
+ overtime_hours: number;
29
+ unpaid_leave_days: number;
30
+ regular_pay: number;
31
+ overtime_pay: number;
32
+ gross_salary: number;
33
+ unpaid_leave_deduction: number;
34
+ other_deductions: number;
35
+ total_deductions: number;
36
+ net_salary: number;
37
+ payment_date: NativeDate;
38
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
39
+ createdAt: NativeDate;
40
+ updatedAt: NativeDate;
41
+ } & {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ tenant_id: string;
44
+ createdAt: NativeDate;
45
+ updatedAt: NativeDate;
46
+ status: HR_PAYROLL_STATUS_ENUM;
47
+ payment_method: HR_PAYMENT_METHOD_ENUM;
48
+ notes: string;
49
+ employee_id: string;
50
+ pay_type: HR_PAY_TYPE_ENUM;
51
+ salary_per_hour: number;
52
+ monthly_salary: number;
53
+ pay_period_start: NativeDate;
54
+ pay_period_end: NativeDate;
55
+ working_days_per_month: number;
56
+ hours_per_working_day: number;
57
+ overtime_multiplier: number;
58
+ regular_hours: number;
59
+ overtime_hours: number;
60
+ unpaid_leave_days: number;
61
+ regular_pay: number;
62
+ overtime_pay: number;
63
+ gross_salary: number;
64
+ unpaid_leave_deduction: number;
65
+ other_deductions: number;
66
+ total_deductions: number;
67
+ net_salary: number;
68
+ payment_date: NativeDate;
69
+ }>> & import("mongoose").FlatRecord<{
70
+ createdAt: NativeDate;
71
+ updatedAt: NativeDate;
72
+ } & {
73
+ _id: import("mongoose").Types.ObjectId;
74
+ tenant_id: string;
75
+ createdAt: NativeDate;
76
+ updatedAt: NativeDate;
77
+ status: HR_PAYROLL_STATUS_ENUM;
78
+ payment_method: HR_PAYMENT_METHOD_ENUM;
79
+ notes: string;
80
+ employee_id: string;
81
+ pay_type: HR_PAY_TYPE_ENUM;
82
+ salary_per_hour: number;
83
+ monthly_salary: number;
84
+ pay_period_start: NativeDate;
85
+ pay_period_end: NativeDate;
86
+ working_days_per_month: number;
87
+ hours_per_working_day: number;
88
+ overtime_multiplier: number;
89
+ regular_hours: number;
90
+ overtime_hours: number;
91
+ unpaid_leave_days: number;
92
+ regular_pay: number;
93
+ overtime_pay: number;
94
+ gross_salary: number;
95
+ unpaid_leave_deduction: number;
96
+ other_deductions: number;
97
+ total_deductions: number;
98
+ net_salary: number;
99
+ payment_date: NativeDate;
100
+ }> & Required<{
101
+ _id: import("mongoose").Types.ObjectId;
102
+ }> & {
103
+ __v: number;
104
+ }>;
105
+ export declare const TENANT_HR_PAYROLLS_COLLECTION_NAME = "tenant_hr_payrolls";
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TENANT_HR_PAYROLLS_COLLECTION_NAME = exports.TenantHrPayrollSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ exports.TenantHrPayrollSchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: mongoose_1.Schema.Types.ObjectId,
9
+ required: true,
10
+ immutable: true,
11
+ },
12
+ tenant_id: {
13
+ type: String,
14
+ required: true,
15
+ immutable: true,
16
+ ref: 'tenants',
17
+ },
18
+ employee_id: {
19
+ type: String,
20
+ required: true,
21
+ immutable: true,
22
+ ref: 'tenant_hr_employees',
23
+ },
24
+ pay_type: {
25
+ type: String,
26
+ required: true,
27
+ enum: constants_1.ALL_HR_PAY_TYPE_NAMES,
28
+ default: constants_1.HR_PAY_TYPE_ENUM.MONTHLY,
29
+ },
30
+ salary_per_hour: {
31
+ type: Number,
32
+ default: null,
33
+ },
34
+ monthly_salary: {
35
+ type: Number,
36
+ default: null,
37
+ },
38
+ pay_period_start: {
39
+ type: mongoose_1.Schema.Types.Date,
40
+ required: true,
41
+ },
42
+ pay_period_end: {
43
+ type: mongoose_1.Schema.Types.Date,
44
+ required: true,
45
+ },
46
+ working_days_per_month: {
47
+ type: Number,
48
+ default: 30,
49
+ },
50
+ hours_per_working_day: {
51
+ type: Number,
52
+ default: 8,
53
+ },
54
+ overtime_multiplier: {
55
+ type: Number,
56
+ default: 1.5,
57
+ },
58
+ regular_hours: {
59
+ type: Number,
60
+ default: null,
61
+ },
62
+ overtime_hours: {
63
+ type: Number,
64
+ default: null,
65
+ },
66
+ unpaid_leave_days: {
67
+ type: Number,
68
+ default: null,
69
+ },
70
+ regular_pay: {
71
+ type: Number,
72
+ default: 0,
73
+ },
74
+ overtime_pay: {
75
+ type: Number,
76
+ default: 0,
77
+ },
78
+ gross_salary: {
79
+ type: Number,
80
+ default: 0,
81
+ },
82
+ unpaid_leave_deduction: {
83
+ type: Number,
84
+ default: 0,
85
+ },
86
+ other_deductions: {
87
+ type: Number,
88
+ default: 0,
89
+ },
90
+ total_deductions: {
91
+ type: Number,
92
+ default: 0,
93
+ },
94
+ net_salary: {
95
+ type: Number,
96
+ default: 0,
97
+ },
98
+ status: {
99
+ type: String,
100
+ required: true,
101
+ enum: constants_1.ALL_HR_PAYROLL_STATUS_NAMES,
102
+ default: constants_1.HR_PAYROLL_STATUS_ENUM.PENDING,
103
+ },
104
+ payment_method: {
105
+ type: String,
106
+ required: true,
107
+ enum: constants_1.ALL_HR_PAYMENT_METHOD_NAMES,
108
+ default: constants_1.HR_PAYMENT_METHOD_ENUM.BANK_TRANSFER,
109
+ },
110
+ payment_date: {
111
+ type: Date,
112
+ default: null,
113
+ },
114
+ notes: {
115
+ type: String,
116
+ default: null,
117
+ },
118
+ createdAt: {
119
+ type: mongoose_1.Schema.Types.Date,
120
+ required: true,
121
+ default: () => new Date(),
122
+ immutable: true,
123
+ },
124
+ updatedAt: {
125
+ type: mongoose_1.Schema.Types.Date,
126
+ required: true,
127
+ default: () => new Date(),
128
+ },
129
+ }, {
130
+ timestamps: true,
131
+ versionKey: false,
132
+ minimize: false,
133
+ });
134
+ exports.TENANT_HR_PAYROLLS_COLLECTION_NAME = 'tenant_hr_payrolls';
@@ -62,6 +62,7 @@ export * from './tenant_hr_attendance_records';
62
62
  export * from './tenant_hr_biometric_enrollments';
63
63
  export * from './tenant_hr_departments';
64
64
  export * from './tenant_hr_employees';
65
+ export * from './tenant_hr_payrolls';
65
66
  export * from './tenant_hr_positions';
66
67
  export * from './tenant_hr_shift_schedules';
67
68
  export * from './tenant_hr_shifts';
@@ -78,6 +78,7 @@ __exportStar(require("./tenant_hr_attendance_records"), exports);
78
78
  __exportStar(require("./tenant_hr_biometric_enrollments"), exports);
79
79
  __exportStar(require("./tenant_hr_departments"), exports);
80
80
  __exportStar(require("./tenant_hr_employees"), exports);
81
+ __exportStar(require("./tenant_hr_payrolls"), exports);
81
82
  __exportStar(require("./tenant_hr_positions"), exports);
82
83
  __exportStar(require("./tenant_hr_shift_schedules"), exports);
83
84
  __exportStar(require("./tenant_hr_shifts"), exports);
@@ -1,4 +1,4 @@
1
- import { HR_EMPLOYEE_DOCUMENT_TYPE_ENUM, HR_EMPLOYMENT_STATUS_ENUM } from '../../constants';
1
+ import { HR_EMPLOYEE_DOCUMENT_TYPE_ENUM, HR_EMPLOYMENT_STATUS_ENUM, HR_PAY_TYPE_ENUM } from '../../constants';
2
2
  import { IItemSpecialHour } from './common';
3
3
  export interface ITenantHrEmergencyContact {
4
4
  name: string;
@@ -29,7 +29,12 @@ export interface ITenantHrEmployee {
29
29
  position_id: string | null;
30
30
  join_date: Date;
31
31
  employment_status: HR_EMPLOYMENT_STATUS_ENUM;
32
- salary_per_hour: number;
32
+ pay_type: HR_PAY_TYPE_ENUM;
33
+ salary_per_hour?: number | null;
34
+ monthly_salary?: number | null;
35
+ hr_working_days_per_month: number;
36
+ hr_hours_per_working_day: number;
37
+ hr_overtime_multiplier: number;
33
38
  docs: Record<HR_EMPLOYEE_DOCUMENT_TYPE_ENUM, ITenantHrEmployeeDocument>;
34
39
  notes?: string | null;
35
40
  createdAt: Date;
@@ -0,0 +1,30 @@
1
+ import { HR_PAYMENT_METHOD_ENUM, HR_PAYROLL_STATUS_ENUM, HR_PAY_TYPE_ENUM } from '../../constants';
2
+ export interface ITenantHrPayroll {
3
+ _id: string;
4
+ tenant_id: string;
5
+ employee_id: string;
6
+ pay_type: HR_PAY_TYPE_ENUM;
7
+ salary_per_hour?: number | null;
8
+ monthly_salary?: number | null;
9
+ pay_period_start: Date;
10
+ pay_period_end: Date;
11
+ working_days_per_month: number;
12
+ hours_per_working_day: number;
13
+ overtime_multiplier: number;
14
+ regular_hours?: number | null;
15
+ overtime_hours?: number | null;
16
+ unpaid_leave_days?: number | null;
17
+ regular_pay: number;
18
+ overtime_pay: number;
19
+ gross_salary: number;
20
+ unpaid_leave_deduction: number;
21
+ other_deductions: number;
22
+ total_deductions: number;
23
+ net_salary: number;
24
+ status: HR_PAYROLL_STATUS_ENUM;
25
+ payment_method: HR_PAYMENT_METHOD_ENUM;
26
+ payment_date?: Date | null;
27
+ notes?: string | null;
28
+ createdAt: Date;
29
+ updatedAt: Date | null;
30
+ }
@@ -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.772",
3
+ "version": "0.2.774",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",