swift_mt_message/messages/
mt290.rs

1use crate::fields::*;
2use serde::{Deserialize, Serialize};
3use swift_mt_message_macros::{SwiftMessage, serde_swift_fields};
4
5/// MT290: Advice of Charges, Interest and Other Adjustments Cancellation
6///
7/// ## Purpose
8/// Used to cancel or reverse a previously sent MT190 advice. This message notifies the account
9/// holder that a previous adjustment advice needs to be cancelled or reversed, ensuring accurate
10/// account records and proper handling of erroneous or superseded adjustments.
11///
12/// ## Scope
13/// This message is:
14/// - Sent by the account servicing institution to the account holder
15/// - Used to cancel previously advised charges, interest, or adjustments
16/// - Applied when errors are discovered or adjustments need reversal
17/// - Essential for maintaining accurate account records
18/// - Part of the error correction and adjustment management process
19///
20/// ## Key Features
21/// - **Cancellation Notification**: Official cancellation of previous MT190 advice
22/// - **Reference Linking**: Clear reference to the original MT190 being cancelled
23/// - **Reversal Details**: Complete information about the adjustment being reversed
24/// - **Account Identification**: Clear identification of the affected account
25/// - **Charge Details**: Detailed explanation of the cancellation reason
26/// - **Audit Trail**: Maintains complete documentation of adjustments and cancellations
27///
28/// ## Common Use Cases
29/// - Cancelling erroneously posted interest calculations
30/// - Reversing incorrect fee charges
31/// - Correcting misapplied account adjustments
32/// - Cancelling duplicate charge advisories
33/// - Reversing provisional adjustments
34/// - Correcting calculation errors in fees
35/// - Cancelling adjustments due to system errors
36/// - Reversing adjustments per customer dispute resolution
37///
38/// ## Message Structure
39/// - **Field 20**: Transaction Reference Number (mandatory) - Unique reference for this cancellation
40/// - **Field 21**: Related Reference (mandatory) - Reference to original MT190 being cancelled
41/// - **Field 25**: Account Identification (mandatory) - Account affected by cancellation
42/// - **Field 32a**: Value Date, Currency Code, Amount (mandatory) - Original adjustment amount (C or D)
43/// - **Field 52a**: Ordering Institution (optional) - Institution initiating cancellation (A or D)
44/// - **Field 71B**: Details of Charges (mandatory) - Explanation of cancellation/reversal
45/// - **Field 72**: Sender to Receiver Information (optional) - Additional cancellation details
46///
47/// ## Network Validation Rules
48/// - **Reference Matching**: Field 21 must reference a valid MT190 transaction
49/// - **Amount Consistency**: Amount should match the original MT190 adjustment
50/// - **Account Validation**: Account must match the original MT190 account
51/// - **Cancellation Details**: Field 71B must explain the cancellation reason
52/// - **Timing Rules**: Cancellation typically within reasonable timeframe of original
53///
54/// ## Processing Context
55/// ### Cancellation Processing Workflow
56/// 1. Error or reversal requirement identified
57/// 2. Original MT190 adjustment reversed in system
58/// 3. MT290 sent to advise cancellation
59/// 4. Account holder reverses original entry
60/// 5. Reconciliation updated accordingly
61///
62/// ### Reversal Management
63/// - Automatic reversal posting
64/// - Audit trail maintenance
65/// - Balance correction
66/// - Statement adjustment
67///
68/// ## SRG2025 Status
69/// - **No Structural Changes**: MT290 format remains stable
70/// - **Enhanced Processing**: Improved cancellation workflow support
71/// - **Validation Updates**: Stricter reference matching validation
72/// - **Real-time Capability**: Support for immediate cancellation notifications
73///
74/// ## Integration Considerations
75/// - **Banking Systems**: Integrated with core banking reversal processes
76/// - **Audit Systems**: Complete audit trail for compliance
77/// - **Reconciliation**: Automatic reconciliation adjustment
78/// - **Reporting**: Reflected in account statements and reports
79///
80/// ## Relationship to Other Messages
81/// - **Cancels**: MT190 advice messages
82/// - **May trigger**: New MT190 with corrected information
83/// - **Related to**: MT192/292 for payment cancellations
84/// - **Supports**: Error correction and adjustment management processes
85///
86/// ## Best Practices
87/// - Send MT290 promptly upon discovering errors
88/// - Provide clear cancellation reasons in Field 71B
89/// - Ensure amount and account details match original MT190
90/// - Consider sending corrected MT190 if adjustment still valid
91/// - Maintain complete audit trail of adjustments and cancellations
92
93#[serde_swift_fields]
94#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftMessage)]
95pub struct MT290 {
96    #[field("20")]
97    pub field_20: Field20,
98
99    #[field("21")]
100    pub field_21: Field21NoOption,
101
102    #[field("25")]
103    pub field_25: Field25AccountIdentification,
104
105    #[field("32")]
106    pub field_32: Field32,
107
108    #[field("52")]
109    pub field_52: Option<Field52OrderingInstitution>,
110
111    #[field("71B")]
112    pub field_71b: Field71B,
113
114    #[field("72")]
115    pub field_72: Option<Field72>,
116}