swift_mt_message/messages/mt190.rs
1use crate::fields::*;
2use serde::{Deserialize, Serialize};
3use swift_mt_message_macros::{SwiftMessage, serde_swift_fields};
4
5/// MT190: Advice of Charges, Interest and Other Adjustments
6///
7/// ## Purpose
8/// Used to advise charges, interest and other adjustments that have been debited or credited
9/// to an account. This message provides detailed information about adjustments made to accounts,
10/// enabling proper reconciliation and transparency of fees, interest, and other financial adjustments.
11///
12/// ## Scope
13/// This message is:
14/// - Sent by the account servicing institution to the account holder
15/// - Used to advise charges, interest calculations, and account adjustments
16/// - Applied to various types of adjustments including fees, interest, and corrections
17/// - Essential for account reconciliation and financial transparency
18/// - Part of the comprehensive account management and reporting process
19///
20/// ## Key Features
21/// - **Adjustment Notification**: Official notification of account adjustments
22/// - **Detailed Charges**: Comprehensive breakdown of charges and fees
23/// - **Interest Information**: Details of interest calculations and postings
24/// - **Reference Tracking**: Links to related transactions or periods
25/// - **Account Identification**: Clear identification of the affected account
26/// - **Flexible Amount Fields**: Supports both debit and credit adjustments
27///
28/// ## Common Use Cases
29/// - Periodic interest posting notifications
30/// - Bank fee and charge advisories
31/// - Account maintenance charge notifications
32/// - Overdraft interest calculations
33/// - Investment management fee notifications
34/// - Foreign exchange adjustment advisories
35/// - Error corrections and adjustments
36/// - Service charge notifications
37///
38/// ## Message Structure
39/// - **Field 20**: Transaction Reference Number (mandatory) - Unique reference for this advice
40/// - **Field 21**: Related Reference (mandatory) - Reference to related transaction or period
41/// - **Field 25**: Account Identification (mandatory) - Account being adjusted
42/// - **Field 32a**: Value Date, Currency Code, Amount (mandatory) - Adjustment details (C or D)
43/// - **Field 52a**: Ordering Institution (optional) - Institution initiating adjustment (A or D)
44/// - **Field 71B**: Details of Charges (mandatory) - Detailed breakdown of charges/adjustments
45/// - **Field 72**: Sender to Receiver Information (optional) - Additional information
46///
47/// ## Network Validation Rules
48/// - **Reference Format**: Transaction references must follow SWIFT standards
49/// - **Amount Validation**: Adjustment amounts must be properly formatted
50/// - **Account Validation**: Account identification must be valid and properly formatted
51/// - **Charge Details**: Field 71B must contain meaningful adjustment information
52/// - **Currency Validation**: Currency codes must be valid ISO 4217 codes
53///
54/// ## Processing Context
55/// ### Adjustment Processing Workflow
56/// 1. Adjustment calculation or determination
57/// 2. Account posting (debit or credit)
58/// 3. MT190 sent to advise adjustment
59/// 4. Account holder updates records
60///
61/// ### Account Management
62/// - Periodic adjustment processing
63/// - Fee calculation and posting
64/// - Interest computation
65/// - Account reconciliation support
66///
67/// ## SRG2025 Status
68/// - **No Structural Changes**: MT190 format remains stable
69/// - **Enhanced Processing**: Improved integration with digital banking
70/// - **Validation Updates**: Enhanced validation rules for better accuracy
71/// - **Real-time Capability**: Support for immediate adjustment notifications
72///
73/// ## Integration Considerations
74/// - **Banking Systems**: Direct integration with core banking systems
75/// - **Account Management**: Part of comprehensive account servicing
76/// - **Reconciliation**: Essential for automated reconciliation processes
77/// - **Reporting**: Key component of account reporting and statements
78///
79/// ## Relationship to Other Messages
80/// - **Related to**: MT900/910 for transaction confirmations
81/// - **Complements**: MT940/950 statement messages
82/// - **Supports**: Account reconciliation and management processes
83/// - **Alternative**: MT290 for cancellation of adjustments
84
85#[serde_swift_fields]
86#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftMessage)]
87pub struct MT190 {
88 #[field("20")]
89 pub field_20: Field20,
90
91 #[field("21")]
92 pub field_21: Field21NoOption,
93
94 #[field("25")]
95 pub field_25: Field25AccountIdentification,
96
97 #[field("32")]
98 pub field_32: Field32,
99
100 #[field("52")]
101 pub field_52: Option<Field52OrderingInstitution>,
102
103 #[field("71B")]
104 pub field_71b: Field71B,
105
106 #[field("72")]
107 pub field_72: Option<Field72>,
108}