cloud-ide-model-schema 1.1.127 → 1.1.129
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.
|
@@ -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);
|
package/package.json
CHANGED