cloud-ide-model-schema 1.1.126 → 1.1.128
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/lib/schema/accounts/acc_financial_config.d.ts +23 -0
- package/lib/schema/accounts/acc_financial_config.js +310 -0
- package/lib/schema/accounts/index.d.ts +1 -0
- package/lib/schema/accounts/index.js +1 -0
- package/lib/schema/admission/admission_application_main.js +21 -0
- package/lib/schema/admission/admission_contact_addresses.js +6 -6
- package/lib/schema/core/core_financial_config.d.ts +23 -0
- package/lib/schema/core/core_financial_config.js +310 -0
- package/lib/schema/core/index.d.ts +2 -1
- package/lib/schema/core/index.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
declare const CAccFinancialConfig: mongoose.Model<{
|
|
3
|
+
[x: string]: unknown;
|
|
4
|
+
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
} & Required<{
|
|
9
|
+
_id: unknown;
|
|
10
|
+
}> & {
|
|
11
|
+
__v: number;
|
|
12
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
}>, {}> & mongoose.FlatRecord<{
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
}> & Required<{
|
|
19
|
+
_id: unknown;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}>>;
|
|
23
|
+
export { CAccFinancialConfig };
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CAccFinancialConfig = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
/* SCHEMA START */
|
|
6
|
+
var acc_financial_config = new mongoose_1.Schema({
|
|
7
|
+
// Entity reference - each entity can have its own financial configuration
|
|
8
|
+
accfincfg_entity_id_syen: {
|
|
9
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
10
|
+
ref: "core_system_entity",
|
|
11
|
+
required: true,
|
|
12
|
+
comment: "Entity/Organization this configuration belongs to"
|
|
13
|
+
},
|
|
14
|
+
// CURRENCY CONFIGURATION
|
|
15
|
+
accfincfg_default_currency_id_sycr: {
|
|
16
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
17
|
+
ref: "core_iso_currency",
|
|
18
|
+
comment: "Default currency for the entity"
|
|
19
|
+
},
|
|
20
|
+
accfincfg_currency_display_format: {
|
|
21
|
+
type: String,
|
|
22
|
+
enum: ["symbol_before", "symbol_after", "code_before", "code_after"],
|
|
23
|
+
default: "symbol_before",
|
|
24
|
+
comment: "How currency should be displayed (e.g., $100, 100$, USD 100, 100 USD)"
|
|
25
|
+
},
|
|
26
|
+
accfincfg_currency_decimal_places: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 2,
|
|
29
|
+
min: 0,
|
|
30
|
+
max: 4,
|
|
31
|
+
comment: "Number of decimal places for currency display"
|
|
32
|
+
},
|
|
33
|
+
accfincfg_currency_thousand_separator: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ",",
|
|
36
|
+
maxlength: 1,
|
|
37
|
+
comment: "Thousand separator (e.g., comma, period, space)"
|
|
38
|
+
},
|
|
39
|
+
accfincfg_currency_decimal_separator: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ".",
|
|
42
|
+
maxlength: 1,
|
|
43
|
+
comment: "Decimal separator (e.g., period, comma)"
|
|
44
|
+
},
|
|
45
|
+
accfincfg_show_currency_symbol: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true,
|
|
48
|
+
comment: "Whether to show currency symbol in displays"
|
|
49
|
+
},
|
|
50
|
+
accfincfg_show_currency_code: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
comment: "Whether to show currency code (USD, EUR, etc.)"
|
|
54
|
+
},
|
|
55
|
+
// FINANCIAL YEAR CONFIGURATION
|
|
56
|
+
accfincfg_financial_year_start_month: {
|
|
57
|
+
type: Number,
|
|
58
|
+
min: 1,
|
|
59
|
+
max: 12,
|
|
60
|
+
default: 4,
|
|
61
|
+
comment: "Month when financial year starts (1=January, 4=April, etc.)"
|
|
62
|
+
},
|
|
63
|
+
accfincfg_financial_year_start_day: {
|
|
64
|
+
type: Number,
|
|
65
|
+
min: 1,
|
|
66
|
+
max: 31,
|
|
67
|
+
default: 1,
|
|
68
|
+
comment: "Day of month when financial year starts"
|
|
69
|
+
},
|
|
70
|
+
accfincfg_financial_year_naming: {
|
|
71
|
+
type: String,
|
|
72
|
+
enum: ["calendar_year", "fiscal_year", "academic_year"],
|
|
73
|
+
default: "fiscal_year",
|
|
74
|
+
comment: "How financial year is named"
|
|
75
|
+
},
|
|
76
|
+
// TAX CONFIGURATION
|
|
77
|
+
accfincfg_default_tax_percentage: {
|
|
78
|
+
type: Number,
|
|
79
|
+
default: 0,
|
|
80
|
+
min: 0,
|
|
81
|
+
max: 100,
|
|
82
|
+
comment: "Default tax percentage applied to transactions"
|
|
83
|
+
},
|
|
84
|
+
accfincfg_tax_inclusive_pricing: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false,
|
|
87
|
+
comment: "Whether prices include tax by default"
|
|
88
|
+
},
|
|
89
|
+
accfincfg_show_tax_breakdown: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: true,
|
|
92
|
+
comment: "Whether to show tax breakdown in invoices/receipts"
|
|
93
|
+
},
|
|
94
|
+
accfincfg_tax_calculation_method: {
|
|
95
|
+
type: String,
|
|
96
|
+
enum: ["percentage", "fixed_amount", "tiered"],
|
|
97
|
+
default: "percentage",
|
|
98
|
+
comment: "Method for calculating tax"
|
|
99
|
+
},
|
|
100
|
+
// PAYMENT CONFIGURATION
|
|
101
|
+
accfincfg_allowed_payment_methods: {
|
|
102
|
+
type: [String],
|
|
103
|
+
default: ["cash", "bank_transfer", "cheque", "online"],
|
|
104
|
+
comment: "List of allowed payment methods"
|
|
105
|
+
},
|
|
106
|
+
accfincfg_default_payment_method: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "cash",
|
|
109
|
+
comment: "Default payment method"
|
|
110
|
+
},
|
|
111
|
+
accfincfg_require_payment_reference: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: false,
|
|
114
|
+
comment: "Whether payment reference is required"
|
|
115
|
+
},
|
|
116
|
+
accfincfg_auto_generate_receipt: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: true,
|
|
119
|
+
comment: "Automatically generate receipt after payment"
|
|
120
|
+
},
|
|
121
|
+
// INVOICE/RECEIPT CONFIGURATION
|
|
122
|
+
accfincfg_invoice_prefix: {
|
|
123
|
+
type: String,
|
|
124
|
+
maxlength: 10,
|
|
125
|
+
default: "INV",
|
|
126
|
+
comment: "Prefix for invoice numbers (e.g., INV, BILL)"
|
|
127
|
+
},
|
|
128
|
+
accfincfg_receipt_prefix: {
|
|
129
|
+
type: String,
|
|
130
|
+
maxlength: 10,
|
|
131
|
+
default: "RCP",
|
|
132
|
+
comment: "Prefix for receipt numbers (e.g., RCP, REC)"
|
|
133
|
+
},
|
|
134
|
+
accfincfg_invoice_number_format: {
|
|
135
|
+
type: String,
|
|
136
|
+
enum: ["sequential", "year_sequential", "date_sequential"],
|
|
137
|
+
default: "year_sequential",
|
|
138
|
+
comment: "Format for invoice numbering"
|
|
139
|
+
},
|
|
140
|
+
accfincfg_receipt_number_format: {
|
|
141
|
+
type: String,
|
|
142
|
+
enum: ["sequential", "year_sequential", "date_sequential"],
|
|
143
|
+
default: "year_sequential",
|
|
144
|
+
comment: "Format for receipt numbering"
|
|
145
|
+
},
|
|
146
|
+
accfincfg_invoice_footer_text: {
|
|
147
|
+
type: String,
|
|
148
|
+
maxlength: 500,
|
|
149
|
+
comment: "Footer text to display on invoices"
|
|
150
|
+
},
|
|
151
|
+
accfincfg_receipt_footer_text: {
|
|
152
|
+
type: String,
|
|
153
|
+
maxlength: 500,
|
|
154
|
+
comment: "Footer text to display on receipts"
|
|
155
|
+
},
|
|
156
|
+
accfincfg_show_terms_conditions: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
default: true,
|
|
159
|
+
comment: "Whether to show terms and conditions on invoices"
|
|
160
|
+
},
|
|
161
|
+
accfincfg_terms_conditions_text: {
|
|
162
|
+
type: String,
|
|
163
|
+
maxlength: 1000,
|
|
164
|
+
comment: "Terms and conditions text for invoices"
|
|
165
|
+
},
|
|
166
|
+
// ROUNDING CONFIGURATION
|
|
167
|
+
accfincfg_rounding_method: {
|
|
168
|
+
type: String,
|
|
169
|
+
enum: ["round", "floor", "ceiling", "none"],
|
|
170
|
+
default: "round",
|
|
171
|
+
comment: "Method for rounding amounts"
|
|
172
|
+
},
|
|
173
|
+
accfincfg_rounding_precision: {
|
|
174
|
+
type: Number,
|
|
175
|
+
default: 2,
|
|
176
|
+
min: 0,
|
|
177
|
+
max: 4,
|
|
178
|
+
comment: "Precision for rounding (decimal places)"
|
|
179
|
+
},
|
|
180
|
+
// DISCOUNT CONFIGURATION
|
|
181
|
+
accfincfg_allow_discounts: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: true,
|
|
184
|
+
comment: "Whether discounts are allowed"
|
|
185
|
+
},
|
|
186
|
+
accfincfg_max_discount_percentage: {
|
|
187
|
+
type: Number,
|
|
188
|
+
default: 100,
|
|
189
|
+
min: 0,
|
|
190
|
+
max: 100,
|
|
191
|
+
comment: "Maximum discount percentage allowed"
|
|
192
|
+
},
|
|
193
|
+
accfincfg_require_discount_approval: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
default: false,
|
|
196
|
+
comment: "Whether discount requires approval"
|
|
197
|
+
},
|
|
198
|
+
accfincfg_discount_approval_threshold: {
|
|
199
|
+
type: Number,
|
|
200
|
+
default: 0,
|
|
201
|
+
comment: "Discount percentage threshold requiring approval"
|
|
202
|
+
},
|
|
203
|
+
// LATE FEE CONFIGURATION
|
|
204
|
+
accfincfg_late_fee_enabled: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: false,
|
|
207
|
+
comment: "Whether late fees are enabled"
|
|
208
|
+
},
|
|
209
|
+
accfincfg_late_fee_calculation_method: {
|
|
210
|
+
type: String,
|
|
211
|
+
enum: ["fixed_amount", "percentage", "daily_rate"],
|
|
212
|
+
default: "percentage",
|
|
213
|
+
comment: "Method for calculating late fees"
|
|
214
|
+
},
|
|
215
|
+
accfincfg_late_fee_percentage: {
|
|
216
|
+
type: Number,
|
|
217
|
+
default: 0,
|
|
218
|
+
min: 0,
|
|
219
|
+
max: 100,
|
|
220
|
+
comment: "Late fee percentage (if percentage method)"
|
|
221
|
+
},
|
|
222
|
+
accfincfg_late_fee_fixed_amount: {
|
|
223
|
+
type: Number,
|
|
224
|
+
default: 0,
|
|
225
|
+
min: 0,
|
|
226
|
+
comment: "Fixed late fee amount (if fixed method)"
|
|
227
|
+
},
|
|
228
|
+
accfincfg_late_fee_grace_period_days: {
|
|
229
|
+
type: Number,
|
|
230
|
+
default: 0,
|
|
231
|
+
min: 0,
|
|
232
|
+
comment: "Grace period in days before late fee applies"
|
|
233
|
+
},
|
|
234
|
+
// REFUND CONFIGURATION
|
|
235
|
+
accfincfg_allow_refunds: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
default: true,
|
|
238
|
+
comment: "Whether refunds are allowed"
|
|
239
|
+
},
|
|
240
|
+
accfincfg_refund_approval_required: {
|
|
241
|
+
type: Boolean,
|
|
242
|
+
default: true,
|
|
243
|
+
comment: "Whether refunds require approval"
|
|
244
|
+
},
|
|
245
|
+
accfincfg_max_refund_percentage: {
|
|
246
|
+
type: Number,
|
|
247
|
+
default: 100,
|
|
248
|
+
min: 0,
|
|
249
|
+
max: 100,
|
|
250
|
+
comment: "Maximum refund percentage allowed"
|
|
251
|
+
},
|
|
252
|
+
// BANKING CONFIGURATION
|
|
253
|
+
accfincfg_bank_account_number: {
|
|
254
|
+
type: String,
|
|
255
|
+
maxlength: 50,
|
|
256
|
+
comment: "Default bank account number for payments"
|
|
257
|
+
},
|
|
258
|
+
accfincfg_bank_name: {
|
|
259
|
+
type: String,
|
|
260
|
+
maxlength: 100,
|
|
261
|
+
comment: "Default bank name"
|
|
262
|
+
},
|
|
263
|
+
accfincfg_bank_ifsc_code: {
|
|
264
|
+
type: String,
|
|
265
|
+
maxlength: 20,
|
|
266
|
+
comment: "Bank IFSC/SWIFT code"
|
|
267
|
+
},
|
|
268
|
+
accfincfg_bank_branch: {
|
|
269
|
+
type: String,
|
|
270
|
+
maxlength: 100,
|
|
271
|
+
comment: "Bank branch name"
|
|
272
|
+
},
|
|
273
|
+
// ADDITIONAL CONFIGURATION (Flexible JSON)
|
|
274
|
+
accfincfg_additional_config: {
|
|
275
|
+
type: Object,
|
|
276
|
+
default: {},
|
|
277
|
+
comment: "Additional flexible configuration (JSON structure)"
|
|
278
|
+
},
|
|
279
|
+
// METADATA
|
|
280
|
+
accfincfg_created_by_user: {
|
|
281
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
282
|
+
ref: "auth_user_mst",
|
|
283
|
+
comment: "User who created this configuration"
|
|
284
|
+
},
|
|
285
|
+
accfincfg_updated_by_user: {
|
|
286
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
287
|
+
ref: "auth_user_mst",
|
|
288
|
+
comment: "User who last updated this configuration"
|
|
289
|
+
},
|
|
290
|
+
accfincfg_isactive: {
|
|
291
|
+
type: Boolean,
|
|
292
|
+
default: true,
|
|
293
|
+
required: true,
|
|
294
|
+
comment: "Configuration active status"
|
|
295
|
+
},
|
|
296
|
+
accfincfg_notes: {
|
|
297
|
+
type: String,
|
|
298
|
+
maxlength: 1000,
|
|
299
|
+
trim: true,
|
|
300
|
+
comment: "Additional notes about this configuration"
|
|
301
|
+
}
|
|
302
|
+
}, {
|
|
303
|
+
collection: 'acc_financial_config',
|
|
304
|
+
timestamps: true
|
|
305
|
+
});
|
|
306
|
+
// Indexes for performance
|
|
307
|
+
acc_financial_config.index({ accfincfg_entity_id_syen: 1 }, { unique: true });
|
|
308
|
+
acc_financial_config.index({ accfincfg_isactive: 1 });
|
|
309
|
+
var CAccFinancialConfig = mongoose_1.default.model("acc_financial_config", acc_financial_config);
|
|
310
|
+
exports.CAccFinancialConfig = CAccFinancialConfig;
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./acc_financial_year"), exports);
|
|
18
18
|
__exportStar(require("./acc_financial_year_mapping"), exports);
|
|
19
|
+
__exportStar(require("./acc_financial_config"), exports);
|
|
@@ -944,6 +944,21 @@ var admission_application_main = new mongoose_1.Schema({
|
|
|
944
944
|
type: Date,
|
|
945
945
|
comment: "Date when enrollment was completed"
|
|
946
946
|
},
|
|
947
|
+
admap_confirmed_at: {
|
|
948
|
+
type: Date,
|
|
949
|
+
comment: "Date when admission was confirmed"
|
|
950
|
+
},
|
|
951
|
+
admap_confirmed_by_user: {
|
|
952
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
953
|
+
ref: "auth_user_mst",
|
|
954
|
+
comment: "User who confirmed the admission"
|
|
955
|
+
},
|
|
956
|
+
admap_confirmation_remarks: {
|
|
957
|
+
type: String,
|
|
958
|
+
maxlength: 1000,
|
|
959
|
+
trim: true,
|
|
960
|
+
comment: "Remarks or notes about the admission confirmation"
|
|
961
|
+
},
|
|
947
962
|
// FOREIGN KEYS & REFERENCES
|
|
948
963
|
admap_entity_id_syen: {
|
|
949
964
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
@@ -970,6 +985,11 @@ var admission_application_main = new mongoose_1.Schema({
|
|
|
970
985
|
ref: "auth_user_mst",
|
|
971
986
|
comment: "Assigned counselor/admissions officer"
|
|
972
987
|
},
|
|
988
|
+
admap_user_id_auth: {
|
|
989
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
990
|
+
ref: "auth_user_mst",
|
|
991
|
+
comment: "User account ID created when admission is confirmed - Reference to auth_user_mst"
|
|
992
|
+
},
|
|
973
993
|
// METADATA
|
|
974
994
|
admap_created_date: {
|
|
975
995
|
type: Date,
|
|
@@ -996,6 +1016,7 @@ var admission_application_main = new mongoose_1.Schema({
|
|
|
996
1016
|
admission_application_main.index({ admap_entity_id_syen: 1 });
|
|
997
1017
|
admission_application_main.index({ admap_application_status_id_sygms: 1 });
|
|
998
1018
|
admission_application_main.index({ admap_status_id_sygms: 1 });
|
|
1019
|
+
admission_application_main.index({ admap_user_id_auth: 1 });
|
|
999
1020
|
admission_application_main.index({ admap_program_category_id_sygms: 1 });
|
|
1000
1021
|
admission_application_main.index({ admap_class_program_id_acacpm: 1 });
|
|
1001
1022
|
admission_application_main.index({ admap_class_program_branch_id_acabrn: 1 });
|
|
@@ -36,12 +36,11 @@ var admission_contact_addresses = new mongoose_1.Schema({
|
|
|
36
36
|
trim: true,
|
|
37
37
|
comment: "Name of contact person at this address"
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
comment: "Relation to student (Parent, Guardian, etc.)"
|
|
39
|
+
admca_contact_person_relation_id_sygms: {
|
|
40
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
41
|
+
ref: 'core_general_master',
|
|
42
|
+
default: null,
|
|
43
|
+
comment: "Relation to student from general master (Parent, Guardian, etc.) - type code: family_relationship"
|
|
45
44
|
},
|
|
46
45
|
admca_contact_address: {
|
|
47
46
|
type: String,
|
|
@@ -142,6 +141,7 @@ var admission_contact_addresses = new mongoose_1.Schema({
|
|
|
142
141
|
// Indexes for better performance
|
|
143
142
|
admission_contact_addresses.index({ admca_admission_id_admap: 1 });
|
|
144
143
|
admission_contact_addresses.index({ admca_address_type_id_sygms: 1 });
|
|
144
|
+
admission_contact_addresses.index({ admca_contact_person_relation_id_sygms: 1 });
|
|
145
145
|
admission_contact_addresses.index({ admca_is_primary: 1 });
|
|
146
146
|
admission_contact_addresses.index({ admca_isactive: 1 });
|
|
147
147
|
var CAdmissionContactAddresses = mongoose_1.default.model("admission_contact_addresses", admission_contact_addresses);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
declare const CCoreFinancialConfig: mongoose.Model<{
|
|
3
|
+
[x: string]: unknown;
|
|
4
|
+
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
} & Required<{
|
|
9
|
+
_id: unknown;
|
|
10
|
+
}> & {
|
|
11
|
+
__v: number;
|
|
12
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
}>, {}> & mongoose.FlatRecord<{
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
}> & Required<{
|
|
19
|
+
_id: unknown;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}>>;
|
|
23
|
+
export { CCoreFinancialConfig };
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CCoreFinancialConfig = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
/* SCHEMA START */
|
|
6
|
+
var core_financial_config = new mongoose_1.Schema({
|
|
7
|
+
// Entity reference - each entity can have its own financial configuration
|
|
8
|
+
fincfg_entity_id_syen: {
|
|
9
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
10
|
+
ref: "core_system_entity",
|
|
11
|
+
required: true,
|
|
12
|
+
comment: "Entity/Organization this configuration belongs to"
|
|
13
|
+
},
|
|
14
|
+
// CURRENCY CONFIGURATION
|
|
15
|
+
fincfg_default_currency_id_sycr: {
|
|
16
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
17
|
+
ref: "core_iso_currency",
|
|
18
|
+
comment: "Default currency for the entity"
|
|
19
|
+
},
|
|
20
|
+
fincfg_currency_display_format: {
|
|
21
|
+
type: String,
|
|
22
|
+
enum: ["symbol_before", "symbol_after", "code_before", "code_after"],
|
|
23
|
+
default: "symbol_before",
|
|
24
|
+
comment: "How currency should be displayed (e.g., $100, 100$, USD 100, 100 USD)"
|
|
25
|
+
},
|
|
26
|
+
fincfg_currency_decimal_places: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 2,
|
|
29
|
+
min: 0,
|
|
30
|
+
max: 4,
|
|
31
|
+
comment: "Number of decimal places for currency display"
|
|
32
|
+
},
|
|
33
|
+
fincfg_currency_thousand_separator: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ",",
|
|
36
|
+
maxlength: 1,
|
|
37
|
+
comment: "Thousand separator (e.g., comma, period, space)"
|
|
38
|
+
},
|
|
39
|
+
fincfg_currency_decimal_separator: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ".",
|
|
42
|
+
maxlength: 1,
|
|
43
|
+
comment: "Decimal separator (e.g., period, comma)"
|
|
44
|
+
},
|
|
45
|
+
fincfg_show_currency_symbol: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true,
|
|
48
|
+
comment: "Whether to show currency symbol in displays"
|
|
49
|
+
},
|
|
50
|
+
fincfg_show_currency_code: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
comment: "Whether to show currency code (USD, EUR, etc.)"
|
|
54
|
+
},
|
|
55
|
+
// FINANCIAL YEAR CONFIGURATION
|
|
56
|
+
fincfg_financial_year_start_month: {
|
|
57
|
+
type: Number,
|
|
58
|
+
min: 1,
|
|
59
|
+
max: 12,
|
|
60
|
+
default: 4,
|
|
61
|
+
comment: "Month when financial year starts (1=January, 4=April, etc.)"
|
|
62
|
+
},
|
|
63
|
+
fincfg_financial_year_start_day: {
|
|
64
|
+
type: Number,
|
|
65
|
+
min: 1,
|
|
66
|
+
max: 31,
|
|
67
|
+
default: 1,
|
|
68
|
+
comment: "Day of month when financial year starts"
|
|
69
|
+
},
|
|
70
|
+
fincfg_financial_year_naming: {
|
|
71
|
+
type: String,
|
|
72
|
+
enum: ["calendar_year", "fiscal_year", "academic_year"],
|
|
73
|
+
default: "fiscal_year",
|
|
74
|
+
comment: "How financial year is named"
|
|
75
|
+
},
|
|
76
|
+
// TAX CONFIGURATION
|
|
77
|
+
fincfg_default_tax_percentage: {
|
|
78
|
+
type: Number,
|
|
79
|
+
default: 0,
|
|
80
|
+
min: 0,
|
|
81
|
+
max: 100,
|
|
82
|
+
comment: "Default tax percentage applied to transactions"
|
|
83
|
+
},
|
|
84
|
+
fincfg_tax_inclusive_pricing: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false,
|
|
87
|
+
comment: "Whether prices include tax by default"
|
|
88
|
+
},
|
|
89
|
+
fincfg_show_tax_breakdown: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: true,
|
|
92
|
+
comment: "Whether to show tax breakdown in invoices/receipts"
|
|
93
|
+
},
|
|
94
|
+
fincfg_tax_calculation_method: {
|
|
95
|
+
type: String,
|
|
96
|
+
enum: ["percentage", "fixed_amount", "tiered"],
|
|
97
|
+
default: "percentage",
|
|
98
|
+
comment: "Method for calculating tax"
|
|
99
|
+
},
|
|
100
|
+
// PAYMENT CONFIGURATION
|
|
101
|
+
fincfg_allowed_payment_methods: {
|
|
102
|
+
type: [String],
|
|
103
|
+
default: ["cash", "bank_transfer", "cheque", "online"],
|
|
104
|
+
comment: "List of allowed payment methods"
|
|
105
|
+
},
|
|
106
|
+
fincfg_default_payment_method: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "cash",
|
|
109
|
+
comment: "Default payment method"
|
|
110
|
+
},
|
|
111
|
+
fincfg_require_payment_reference: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: false,
|
|
114
|
+
comment: "Whether payment reference is required"
|
|
115
|
+
},
|
|
116
|
+
fincfg_auto_generate_receipt: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: true,
|
|
119
|
+
comment: "Automatically generate receipt after payment"
|
|
120
|
+
},
|
|
121
|
+
// INVOICE/RECEIPT CONFIGURATION
|
|
122
|
+
fincfg_invoice_prefix: {
|
|
123
|
+
type: String,
|
|
124
|
+
maxlength: 10,
|
|
125
|
+
default: "INV",
|
|
126
|
+
comment: "Prefix for invoice numbers (e.g., INV, BILL)"
|
|
127
|
+
},
|
|
128
|
+
fincfg_receipt_prefix: {
|
|
129
|
+
type: String,
|
|
130
|
+
maxlength: 10,
|
|
131
|
+
default: "RCP",
|
|
132
|
+
comment: "Prefix for receipt numbers (e.g., RCP, REC)"
|
|
133
|
+
},
|
|
134
|
+
fincfg_invoice_number_format: {
|
|
135
|
+
type: String,
|
|
136
|
+
enum: ["sequential", "year_sequential", "date_sequential"],
|
|
137
|
+
default: "year_sequential",
|
|
138
|
+
comment: "Format for invoice numbering"
|
|
139
|
+
},
|
|
140
|
+
fincfg_receipt_number_format: {
|
|
141
|
+
type: String,
|
|
142
|
+
enum: ["sequential", "year_sequential", "date_sequential"],
|
|
143
|
+
default: "year_sequential",
|
|
144
|
+
comment: "Format for receipt numbering"
|
|
145
|
+
},
|
|
146
|
+
fincfg_invoice_footer_text: {
|
|
147
|
+
type: String,
|
|
148
|
+
maxlength: 500,
|
|
149
|
+
comment: "Footer text to display on invoices"
|
|
150
|
+
},
|
|
151
|
+
fincfg_receipt_footer_text: {
|
|
152
|
+
type: String,
|
|
153
|
+
maxlength: 500,
|
|
154
|
+
comment: "Footer text to display on receipts"
|
|
155
|
+
},
|
|
156
|
+
fincfg_show_terms_conditions: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
default: true,
|
|
159
|
+
comment: "Whether to show terms and conditions on invoices"
|
|
160
|
+
},
|
|
161
|
+
fincfg_terms_conditions_text: {
|
|
162
|
+
type: String,
|
|
163
|
+
maxlength: 1000,
|
|
164
|
+
comment: "Terms and conditions text for invoices"
|
|
165
|
+
},
|
|
166
|
+
// ROUNDING CONFIGURATION
|
|
167
|
+
fincfg_rounding_method: {
|
|
168
|
+
type: String,
|
|
169
|
+
enum: ["round", "floor", "ceiling", "none"],
|
|
170
|
+
default: "round",
|
|
171
|
+
comment: "Method for rounding amounts"
|
|
172
|
+
},
|
|
173
|
+
fincfg_rounding_precision: {
|
|
174
|
+
type: Number,
|
|
175
|
+
default: 2,
|
|
176
|
+
min: 0,
|
|
177
|
+
max: 4,
|
|
178
|
+
comment: "Precision for rounding (decimal places)"
|
|
179
|
+
},
|
|
180
|
+
// DISCOUNT CONFIGURATION
|
|
181
|
+
fincfg_allow_discounts: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: true,
|
|
184
|
+
comment: "Whether discounts are allowed"
|
|
185
|
+
},
|
|
186
|
+
fincfg_max_discount_percentage: {
|
|
187
|
+
type: Number,
|
|
188
|
+
default: 100,
|
|
189
|
+
min: 0,
|
|
190
|
+
max: 100,
|
|
191
|
+
comment: "Maximum discount percentage allowed"
|
|
192
|
+
},
|
|
193
|
+
fincfg_require_discount_approval: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
default: false,
|
|
196
|
+
comment: "Whether discount requires approval"
|
|
197
|
+
},
|
|
198
|
+
fincfg_discount_approval_threshold: {
|
|
199
|
+
type: Number,
|
|
200
|
+
default: 0,
|
|
201
|
+
comment: "Discount percentage threshold requiring approval"
|
|
202
|
+
},
|
|
203
|
+
// LATE FEE CONFIGURATION
|
|
204
|
+
fincfg_late_fee_enabled: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: false,
|
|
207
|
+
comment: "Whether late fees are enabled"
|
|
208
|
+
},
|
|
209
|
+
fincfg_late_fee_calculation_method: {
|
|
210
|
+
type: String,
|
|
211
|
+
enum: ["fixed_amount", "percentage", "daily_rate"],
|
|
212
|
+
default: "percentage",
|
|
213
|
+
comment: "Method for calculating late fees"
|
|
214
|
+
},
|
|
215
|
+
fincfg_late_fee_percentage: {
|
|
216
|
+
type: Number,
|
|
217
|
+
default: 0,
|
|
218
|
+
min: 0,
|
|
219
|
+
max: 100,
|
|
220
|
+
comment: "Late fee percentage (if percentage method)"
|
|
221
|
+
},
|
|
222
|
+
fincfg_late_fee_fixed_amount: {
|
|
223
|
+
type: Number,
|
|
224
|
+
default: 0,
|
|
225
|
+
min: 0,
|
|
226
|
+
comment: "Fixed late fee amount (if fixed method)"
|
|
227
|
+
},
|
|
228
|
+
fincfg_late_fee_grace_period_days: {
|
|
229
|
+
type: Number,
|
|
230
|
+
default: 0,
|
|
231
|
+
min: 0,
|
|
232
|
+
comment: "Grace period in days before late fee applies"
|
|
233
|
+
},
|
|
234
|
+
// REFUND CONFIGURATION
|
|
235
|
+
fincfg_allow_refunds: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
default: true,
|
|
238
|
+
comment: "Whether refunds are allowed"
|
|
239
|
+
},
|
|
240
|
+
fincfg_refund_approval_required: {
|
|
241
|
+
type: Boolean,
|
|
242
|
+
default: true,
|
|
243
|
+
comment: "Whether refunds require approval"
|
|
244
|
+
},
|
|
245
|
+
fincfg_max_refund_percentage: {
|
|
246
|
+
type: Number,
|
|
247
|
+
default: 100,
|
|
248
|
+
min: 0,
|
|
249
|
+
max: 100,
|
|
250
|
+
comment: "Maximum refund percentage allowed"
|
|
251
|
+
},
|
|
252
|
+
// BANKING CONFIGURATION
|
|
253
|
+
fincfg_bank_account_number: {
|
|
254
|
+
type: String,
|
|
255
|
+
maxlength: 50,
|
|
256
|
+
comment: "Default bank account number for payments"
|
|
257
|
+
},
|
|
258
|
+
fincfg_bank_name: {
|
|
259
|
+
type: String,
|
|
260
|
+
maxlength: 100,
|
|
261
|
+
comment: "Default bank name"
|
|
262
|
+
},
|
|
263
|
+
fincfg_bank_ifsc_code: {
|
|
264
|
+
type: String,
|
|
265
|
+
maxlength: 20,
|
|
266
|
+
comment: "Bank IFSC/SWIFT code"
|
|
267
|
+
},
|
|
268
|
+
fincfg_bank_branch: {
|
|
269
|
+
type: String,
|
|
270
|
+
maxlength: 100,
|
|
271
|
+
comment: "Bank branch name"
|
|
272
|
+
},
|
|
273
|
+
// ADDITIONAL CONFIGURATION (Flexible JSON)
|
|
274
|
+
fincfg_additional_config: {
|
|
275
|
+
type: Object,
|
|
276
|
+
default: {},
|
|
277
|
+
comment: "Additional flexible configuration (JSON structure)"
|
|
278
|
+
},
|
|
279
|
+
// METADATA
|
|
280
|
+
fincfg_created_by_user: {
|
|
281
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
282
|
+
ref: "auth_user_mst",
|
|
283
|
+
comment: "User who created this configuration"
|
|
284
|
+
},
|
|
285
|
+
fincfg_updated_by_user: {
|
|
286
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
287
|
+
ref: "auth_user_mst",
|
|
288
|
+
comment: "User who last updated this configuration"
|
|
289
|
+
},
|
|
290
|
+
fincfg_isactive: {
|
|
291
|
+
type: Boolean,
|
|
292
|
+
default: true,
|
|
293
|
+
required: true,
|
|
294
|
+
comment: "Configuration active status"
|
|
295
|
+
},
|
|
296
|
+
fincfg_notes: {
|
|
297
|
+
type: String,
|
|
298
|
+
maxlength: 1000,
|
|
299
|
+
trim: true,
|
|
300
|
+
comment: "Additional notes about this configuration"
|
|
301
|
+
}
|
|
302
|
+
}, {
|
|
303
|
+
collection: 'core_financial_config',
|
|
304
|
+
timestamps: true
|
|
305
|
+
});
|
|
306
|
+
// Indexes for performance
|
|
307
|
+
core_financial_config.index({ fincfg_entity_id_syen: 1 }, { unique: true });
|
|
308
|
+
core_financial_config.index({ fincfg_isactive: 1 });
|
|
309
|
+
var CCoreFinancialConfig = mongoose_1.default.model("core_financial_config", core_financial_config);
|
|
310
|
+
exports.CCoreFinancialConfig = CCoreFinancialConfig;
|
|
@@ -4,6 +4,7 @@ import { CCoreSyme } from './core_system_menu';
|
|
|
4
4
|
import { CCoreSylog } from './core_system_logs';
|
|
5
5
|
import { CCoreSyen } from './core_system_entity';
|
|
6
6
|
import { CCoreSyco } from './core_system_config';
|
|
7
|
+
import { CCoreFinancialConfig } from './core_financial_config';
|
|
7
8
|
import { CCoreSypin } from './core_pin_code';
|
|
8
9
|
import { CCoreSyptb } from './core_page_tab';
|
|
9
10
|
import { CCoreSypgr } from './core_page_grid';
|
|
@@ -35,7 +36,7 @@ import { CCoreBoardExamPattern } from './core_board_exam_pattern';
|
|
|
35
36
|
import { CCoreBoardGradeSystem } from './core_board_grade_system';
|
|
36
37
|
export * from './core_user_contact_addresses';
|
|
37
38
|
export * from './core_entity_access_pass_management';
|
|
38
|
-
export { CCoreSypg, CCoreSytm, CCoreSyme, CCoreSylog, CCoreSyen, CCoreSyco, CCoreSypin, CCoreSyptb, CCoreSypgr, CCoreSype, CCoreSygms, CCoreSygmt, CCoreSyenm, CCoreCyfm, CCoreSyctr, CCoreSynat,
|
|
39
|
+
export { CCoreSypg, CCoreSytm, CCoreSyme, CCoreSylog, CCoreSyen, CCoreSyco, CCoreFinancialConfig, CCoreSypin, CCoreSyptb, CCoreSypgr, CCoreSype, CCoreSygms, CCoreSygmt, CCoreSyenm, CCoreCyfm, CCoreSyctr, CCoreSynat,
|
|
39
40
|
/** system language schemas */
|
|
40
41
|
CCoreSylang,
|
|
41
42
|
/** System theme Variables */
|
package/lib/schema/core/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CCoreBoardGradeSystem = exports.CCoreBoardExamPattern = exports.CCoreEntityUdise = exports.CCoreSchoolBoardAffiliation = exports.CCoreEducationBoard = exports.CCoreUserRoleExceptions = exports.CCoreUserRoleRights = exports.CCoreUserRole = exports.CCoreUserFamilyDetails = exports.CCoreUserDocuments = exports.CCoreSydept = exports.CCoreSydsgl = exports.CCoreSydsg = exports.CCoreSycr = exports.CCoreSypn = exports.CCoreSyoth = exports.CCoreSyupth = exports.CCoreSyth = exports.CCoreSylang = exports.CCoreSynat = exports.CCoreSyctr = exports.CCoreCyfm = exports.CCoreSyenm = exports.CCoreSygmt = exports.CCoreSygms = exports.CCoreSype = exports.CCoreSypgr = exports.CCoreSyptb = exports.CCoreSypin = exports.CCoreSyco = exports.CCoreSyen = exports.CCoreSylog = exports.CCoreSyme = exports.CCoreSytm = exports.CCoreSypg = void 0;
|
|
17
|
+
exports.CCoreBoardGradeSystem = exports.CCoreBoardExamPattern = exports.CCoreEntityUdise = exports.CCoreSchoolBoardAffiliation = exports.CCoreEducationBoard = exports.CCoreUserRoleExceptions = exports.CCoreUserRoleRights = exports.CCoreUserRole = exports.CCoreUserFamilyDetails = exports.CCoreUserDocuments = exports.CCoreSydept = exports.CCoreSydsgl = exports.CCoreSydsg = exports.CCoreSycr = exports.CCoreSypn = exports.CCoreSyoth = exports.CCoreSyupth = exports.CCoreSyth = exports.CCoreSylang = exports.CCoreSynat = exports.CCoreSyctr = exports.CCoreCyfm = exports.CCoreSyenm = exports.CCoreSygmt = exports.CCoreSygms = exports.CCoreSype = exports.CCoreSypgr = exports.CCoreSyptb = exports.CCoreSypin = exports.CCoreFinancialConfig = exports.CCoreSyco = exports.CCoreSyen = exports.CCoreSylog = exports.CCoreSyme = exports.CCoreSytm = exports.CCoreSypg = void 0;
|
|
18
18
|
var core_system_pages_1 = require("./core_system_pages");
|
|
19
19
|
Object.defineProperty(exports, "CCoreSypg", { enumerable: true, get: function () { return core_system_pages_1.CCoreSypg; } });
|
|
20
20
|
var core_system_pages_theme_1 = require("./core_system_pages_theme");
|
|
@@ -27,6 +27,8 @@ var core_system_entity_1 = require("./core_system_entity");
|
|
|
27
27
|
Object.defineProperty(exports, "CCoreSyen", { enumerable: true, get: function () { return core_system_entity_1.CCoreSyen; } });
|
|
28
28
|
var core_system_config_1 = require("./core_system_config");
|
|
29
29
|
Object.defineProperty(exports, "CCoreSyco", { enumerable: true, get: function () { return core_system_config_1.CCoreSyco; } });
|
|
30
|
+
var core_financial_config_1 = require("./core_financial_config");
|
|
31
|
+
Object.defineProperty(exports, "CCoreFinancialConfig", { enumerable: true, get: function () { return core_financial_config_1.CCoreFinancialConfig; } });
|
|
30
32
|
var core_pin_code_1 = require("./core_pin_code");
|
|
31
33
|
Object.defineProperty(exports, "CCoreSypin", { enumerable: true, get: function () { return core_pin_code_1.CCoreSypin; } });
|
|
32
34
|
var core_page_tab_1 = require("./core_page_tab");
|
package/package.json
CHANGED