Commit a99b8dd7 by lixinyi

新增拟报业务规则

parent 07be47b1
...@@ -53,7 +53,7 @@ export default [ ...@@ -53,7 +53,7 @@ export default [
name: "Settlement Method", name: "Settlement Method",
label: "Settlement Method", label: "Settlement Method",
tag: "sttlmMtd", tag: "sttlmMtd",
type: "Select#sttlmMtd", type: "Select#sttlmMtd2",
status: "M", status: "M",
}, },
{ {
......
...@@ -94,8 +94,25 @@ export default function validator(obj) { ...@@ -94,8 +94,25 @@ export default function validator(obj) {
if(!CBPR_Original_Instruction_Identification_FormalRule(obj.cxlDtls.txInfAndSts)){ if(!CBPR_Original_Instruction_Identification_FormalRule(obj.cxlDtls.txInfAndSts)){
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true;
}
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true; return true;
} }
......
...@@ -49,6 +49,9 @@ export default function validator(obj) { ...@@ -49,6 +49,9 @@ export default function validator(obj) {
} }
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
...@@ -56,6 +59,19 @@ export default function validator(obj) { ...@@ -56,6 +59,19 @@ export default function validator(obj) {
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 如果在业务应用程序标头中使用了复制副本指示器,则它必须与业务文档中的复制副本指示器相同(如果存在后者)。 //r1 如果在业务应用程序标头中使用了复制副本指示器,则它必须与业务文档中的复制副本指示器相同(如果存在后者)。
function CBPR_Copy_Duplicate_FormalRule(obj) { function CBPR_Copy_Duplicate_FormalRule(obj) {
......
...@@ -61,7 +61,9 @@ export default function validator(obj) { ...@@ -61,7 +61,9 @@ export default function validator(obj) {
} }
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
...@@ -70,6 +72,20 @@ export default function validator(obj) { ...@@ -70,6 +72,20 @@ export default function validator(obj) {
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 如果在业务应用程序标头中使用了复制副本指示器,则它必须与业务文档中的复制副本指示器相同(如果存在后者)。 //r1 如果在业务应用程序标头中使用了复制副本指示器,则它必须与业务文档中的复制副本指示器相同(如果存在后者)。
function CBPR_Copy_Duplicate_FormalRule(obj) { function CBPR_Copy_Duplicate_FormalRule(obj) {
const msg = "If Copy Duplicate indicator is used in the Business Application Header, it must be identical to the Copy Duplicate indicator in the business document (if the latter is present)."; const msg = "If Copy Duplicate indicator is used in the Business Application Header, it must be identical to the Copy Duplicate indicator in the business document (if the latter is present).";
......
...@@ -56,11 +56,27 @@ export default function validator(obj) { ...@@ -56,11 +56,27 @@ export default function validator(obj) {
} }
} }
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 如果在业务应用程序标头中使用了复制副本指示器,则它必须与业务文档中的复制副本指示器相同(如果存在后者)。 //r1 如果在业务应用程序标头中使用了复制副本指示器,则它必须与业务文档中的复制副本指示器相同(如果存在后者)。
function CBPR_Copy_Duplicate_FormalRule(obj){ function CBPR_Copy_Duplicate_FormalRule(obj){
const msg = "If Copy Duplicate indicator is used in the Business Application Header, it must be identical to the Copy Duplicate indicator in the business document (if the latter is present)."; const msg = "If Copy Duplicate indicator is used in the Business Application Header, it must be identical to the Copy Duplicate indicator in the business document (if the latter is present).";
......
...@@ -65,8 +65,25 @@ export default function validator(obj) { ...@@ -65,8 +65,25 @@ export default function validator(obj) {
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
// OriginalRequestedExecutionDate或OriginalRequestedCollectionDate必须存在,但两者不能同时存在。 // OriginalRequestedExecutionDate或OriginalRequestedCollectionDate必须存在,但两者不能同时存在。
function CBPR_OriginalRequestedExecutionDate_OriginalRequestedCollectionDate_FormalRule(obj1,position){ function CBPR_OriginalRequestedExecutionDate_OriginalRequestedCollectionDate_FormalRule(obj1,position){
const msg = "Either OriginalRequestedExecutionDate or OriginalRequestedCollectionDate must be present, but both can't be present."; const msg = "Either OriginalRequestedExecutionDate or OriginalRequestedCollectionDate must be present, but both can't be present.";
......
...@@ -75,10 +75,26 @@ export default function validator(obj) { ...@@ -75,10 +75,26 @@ export default function validator(obj) {
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
// r1 BAH "From" BIC必须匹配"Assigner" BIC,除非BAH CopyDuplicate = COPY或= CODU // r1 BAH "From" BIC必须匹配"Assigner" BIC,除非BAH CopyDuplicate = COPY或= CODU
// BAH "To" BIC必须与"Assignee" BIC匹配,除非BAH CopyDuplicate = COPY或= CODU // BAH "To" BIC必须与"Assignee" BIC匹配,除非BAH CopyDuplicate = COPY或= CODU
function CBPR_From_To_Assigner_Assignee_BIC_1_FormalRule(obj1, obj2, position) { function CBPR_From_To_Assigner_Assignee_BIC_1_FormalRule(obj1, obj2, position) {
......
...@@ -198,10 +198,26 @@ export default function validator(obj) { ...@@ -198,10 +198,26 @@ export default function validator(obj) {
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
function Mandatory_Debtor_Rule(obj){ function Mandatory_Debtor_Rule(obj){
const msg = "Either Debtor must be present or Item/Debtor must be present but not both."; const msg = "Either Debtor must be present or Item/Debtor must be present but not both.";
var position = "Notification/Debtor | Notification/Item/Debtor"; var position = "Notification/Debtor | Notification/Item/Debtor";
......
...@@ -181,9 +181,24 @@ export default function validator(obj) { ...@@ -181,9 +181,24 @@ export default function validator(obj) {
} }
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。 //r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。
function CBPR_Character_Set_Usage_TextualRule() { function CBPR_Character_Set_Usage_TextualRule() {
......
...@@ -91,10 +91,26 @@ export default function validator(obj) { ...@@ -91,10 +91,26 @@ export default function validator(obj) {
if (!CBPR_Co_existence_Postal_Address_TextualRule(obj)){ if (!CBPR_Co_existence_Postal_Address_TextualRule(obj)){
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。 //r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。
function CBPR_Character_Set_Usage_TextualRule() { function CBPR_Character_Set_Usage_TextualRule() {
......
...@@ -42,10 +42,26 @@ export default function validator(obj) { ...@@ -42,10 +42,26 @@ export default function validator(obj) {
if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId.pstlAdr, `Cheque/DrawerAgent/Financial Institution Identification`)) { if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId.pstlAdr, `Cheque/DrawerAgent/Financial Institution Identification`)) {
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。 //r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。
function CBPR_Character_Set_Usage_TextualRule() { function CBPR_Character_Set_Usage_TextualRule() {
......
...@@ -50,10 +50,25 @@ export default function validator(obj) { ...@@ -50,10 +50,25 @@ export default function validator(obj) {
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 //r1
function CBPR_From_To_Instructing_Instructed_Agent_BIC_1_FormalRule() { function CBPR_From_To_Instructing_Instructed_Agent_BIC_1_FormalRule() {
......
...@@ -342,6 +342,10 @@ export default function validator(obj) { ...@@ -342,6 +342,10 @@ export default function validator(obj) {
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
...@@ -921,4 +925,18 @@ function ChargesInformationAndInstructedAmountRule(obj) { ...@@ -921,4 +925,18 @@ function ChargesInformationAndInstructedAmountRule(obj) {
} }
} }
return true; return true;
}
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
} }
\ No newline at end of file
...@@ -289,11 +289,376 @@ export default function validator(obj) { ...@@ -289,11 +289,376 @@ export default function validator(obj) {
if(!SettlementMethod_COVE(obj.grpHdr)){ if(!SettlementMethod_COVE(obj.grpHdr)){
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
if(!GroupHeaderInterbankSettlementDateRule(obj)){
return false;
}
if(!InstructingAgentRule(obj)){
return false;
}
if(!InstructedAgentRule(obj)){
return false;
}
if(!PaymentTypeInformationRule(obj)){
return false;
}
if(!NumberOfTransactionsAndCreditTransfersRule(obj)){
return false;
}
if(!InstructedReimbursementAgentAccountRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!InstructingReimbursementAgentAccountRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!SettlementMethodAgentRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!SettlementMethodClearingRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!SettlementMethodCoverRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!ThirdReimbursementAgentAccountRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!ThirdReimbursementAgentRule(obj.grpHdr.sttlmInf)){
return false;
}
if(!InstructedAmountAndExchangeRateRule(obj.cdtTrfTxInf)){
return false;
}
if(!InstructionForCreditorAgentRule(obj.cdtTrfTxInf)){
return false;
}
if(!AgentAccountRule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
return true;
}
//Cross Element Complex Rule : Group Header Interbank Settlement Date Rule
function GroupHeaderInterbankSettlementDateRule(obj){
const msg = "If GroupHeader/InterbankSettlementDate is present, then CreditTransferTransactionInformation/InterbankSettlementDate is not allowed.";
var gintrBkSttlmDt = obj.grpHdr.intrBkSttlmDt;
var cintrBkSttlmDt = obj.cdtTrfTxInf.intrBkSttlmDt;
if(isNotEmpty(gintrBkSttlmDt)){
if(isNotEmpty(cintrBkSttlmDt)){
message("CreditTransferTransactionInformation/Interbank Settlement Date", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructing Agent Rule
function InstructingAgentRule(obj){
const msg = "If GroupHeader/InstructingAgent is present, then CreditTransferTransactionInformation/InstructingAgent is not allowed.";
var ginstgAgt = obj.grpHdr.instgAgt;
var cinstgAgt = obj.cdtTrfTxInf.instgAgt;
if(isNotEmpty(ginstgAgt)){
if(isNotEmpty(cinstgAgt)){
message("CreditTransferTransactionInformation/Instructing Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructed Agent Rule
function InstructedAgentRule(obj){
const msg = "If GroupHeader/InstructedAgent is present, then CreditTransferTransactionInformation/InstructedAgent is not allowed.";
var ginstdAgt = obj.grpHdr.instdAgt;
var cinstdAgt = obj.cdtTrfTxInf.instdAgt;
if(isNotEmpty(ginstdAgt)){
if(isNotEmpty(cinstdAgt)){
message("CreditTransferTransactionInformation/Instructed Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Payment Type Information Rule
function PaymentTypeInformationRule(obj){
const msg = "If GroupHeader/PaymentTypeInformation is present, then CreditTransferTransactionInformation/PaymentTypeInformation is not allowed.";
var gpmtTpInf = obj.grpHdr.pmtTpInf;
var cpmtTpInf = obj.cdtTrfTxInf.pmtTpInf;
if(isNotEmpty(gpmtTpInf)){
if(isNotEmpty(cpmtTpInf)){
message("CreditTransferTransactionInformation/Payment Type Information", msg);
return false;
}
}
return true;
}
//Number Of Transactions And Credit Transfers Rule
function NumberOfTransactionsAndCreditTransfersRule(obj){
const msg = "GroupHeader/NumberOfTransactions must equal the number of occurrences of CreditTransferTransactionInformation.";
var nbOfTxs = obj.grpHdr.nbOfTxs;
if(nbOfTxs != "1"){
message("GroupHeader/Number Of Transactions", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Instructed Reimbursement Agent Account Rule
function InstructedReimbursementAgentAccountRule(obj){
const msg = "If Instructed Reimbursement Agent Account is present, then Instructed Reimbursement Agent must be present.";
var instdRmbrsmntAgtAcct = obj.instdRmbrsmntAgtAcct;
var instdRmbrsmntAgt = obj.instdRmbrsmntAgt;
if(isNotEmpty(instdRmbrsmntAgtAcct)){
if(isEmpty(instdRmbrsmntAgt)){
message("Instructed Reimbursement Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructing Reimbursement Agent Account Rule
function InstructingReimbursementAgentAccountRule(obj){
const msg = "If Instructing Reimbursement Agent Account is present, then Instructing Reimbursement Agent must be present.";
var instgRmbrsmntAgtAcct = obj.instgRmbrsmntAgtAcct;
var instgRmbrsmntAgt = obj.instgRmbrsmntAgt;
if(isNotEmpty(instgRmbrsmntAgtAcct)){
if(isEmpty(instgRmbrsmntAgt)){
message("Instructing Reimbursement Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Third Reimbursement Agent Account Rule
function ThirdReimbursementAgentAccountRule(obj){
const msg = "If ThirdReimbursementAgentAccount is present, then ThirdReimbursementAgent must be present.";
var thrdRmbrsmntAgtAcct = obj.thrdRmbrsmntAgtAcct;
var thrdRmbrsmntAgt = obj.thrdRmbrsmntAgt;
if(isNotEmpty(thrdRmbrsmntAgtAcct)){
if(isEmpty(thrdRmbrsmntAgt)){
message("Third Reimbursement Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Settlement Method Agent Rule
function SettlementMethodAgentRule(obj){
const msg = "If SettlementMethod is equal to INDA or INGA, then ReimbursementAgent(s) are not allowed.";
var sttlmMtd = obj.sttlmMtd;
var instgRmbrsmntAgt = obj.instgRmbrsmntAgt;
var instdRmbrsmntAgt = obj.instdRmbrsmntAgt;
var thrdRmbrsmntAgt = obj.thrdRmbrsmntAgt;
if(sttlmMtd=="INDA"||sttlmMtd=="INGA"){
if(isNotEmpty(instgRmbrsmntAgt)||isNotEmpty(instdRmbrsmntAgt)||isNotEmpty(thrdRmbrsmntAgt)){
message("Settlement Method", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Settlement Method Clearing Rule
function SettlementMethodClearingRule(obj){
const msg = "If SettlementMethod is equal to CLRG, then SettlementAccount and ReimbursementAgent(s) are not allowed.";
var sttlmMtd = obj.sttlmMtd;
var sttlmAcct = obj.sttlmAcct;
var instgRmbrsmntAgt = obj.instgRmbrsmntAgt;
var instdRmbrsmntAgt = obj.instdRmbrsmntAgt;
var thrdRmbrsmntAgt = obj.thrdRmbrsmntAgt;
if(sttlmMtd=="CLRG"){
if(isNotEmpty(sttlmAcct)||isNotEmpty(instgRmbrsmntAgt)||isNotEmpty(instdRmbrsmntAgt)||isNotEmpty(thrdRmbrsmntAgt)){
message("Settlement Method", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Settlement Method Cover Rule
function SettlementMethodCoverRule(obj){
const msg = "If SettlementMethod is equal to COVE, then SettlementAccount is not allowed.";
var sttlmMtd = obj.sttlmMtd;
var sttlmAcct = obj.sttlmAcct;
if(sttlmMtd=="COVE"){
if(isNotEmpty(sttlmAcct)){
message("Settlement Method", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Third Reimbursement Agent Rule
function ThirdReimbursementAgentRule(obj){
const msg = "If ThirdReimbursementAgent is present, then InstructingReimbursementAgent and InstructedReimbursementAgent must both be present.";
var thrdRmbrsmntAgt = obj.thrdRmbrsmntAgt;
var instdRmbrsmntAgt = obj.instdRmbrsmntAgt;
var instgRmbrsmntAgt = obj.instgRmbrsmntAgt;
if(isNotEmpty(thrdRmbrsmntAgt)){
if(isEmpty(instdRmbrsmntAgt)||isEmpty(instgRmbrsmntAgt)){
message("Third Reimbursement Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructed Amount And Exchange Rate 1Rule
function InstructedAmountAndExchangeRateRule(obj){
const msg1 = "If InstructedAmount is present and the currency is different from the currency in InterbankSettlementAmount, then ExchangeRate must be present.";
const msg2 = "If InstructedAmount is present and the currency is the same as the currency in InterbankSettlementAmount, then ExchangeRate is not allowed.";
const msg3 = "If InstructedAmount is not present, then ExchangeRate is not allowed.";
var instdAmt = obj.instdAmt;
var intrBkSttlmAmt = obj.intrBkSttlmAmt;
var xchgRate = obj.xchgRate;
if(isNotEmpty(instdAmt)){
if(instdAmt.ccy != intrBkSttlmAmt.ccy && isEmpty(xchgRate)){
message("Exchange Rate", msg1);
return false;
}
if(instdAmt.ccy == intrBkSttlmAmt.ccy && isNotEmpty(xchgRate)){
message("Exchange Rate", msg2);
return false;
}
}else{
if(isNotEmpty(xchgRate)){
message("Exchange Rate", msg3);
return false;
}
}
return true; return true;
} }
//Cross Element Complex Rule : Instruction For Creditor Agent Rule
function InstructionForCreditorAgentRule(obj){
const msg = "If InstructionForCreditorAgent/Code contains CHQB (PayCreditorByCheque), then CreditorAccount is not allowed.";
var instrForCdtrAgt = obj.instrForCdtrAgt;
var cdtrAcct = obj.cdtrAcct;
if(isNotEmpty(instrForCdtrAgt)){
if(instrForCdtrAgt.cd == "CHQB" && isNotEmpty(cdtrAcct)){
message("Creditor Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Agent Account Rule
function AgentAccountRule(obj){
const msg = "If Agent Account is present, then Agent must be present.";
var intrmyAgt1Acct = obj.intrmyAgt1Acct;
var intrmyAgt1 = obj.intrmyAgt1;
if(isNotEmpty(intrmyAgt1Acct)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent 1 Account", msg);
return false;
}
var intrmyAgt2Acct = obj.intrmyAgt2Acct;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2Acct)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2 Account", msg);
return false;
}
var intrmyAgt3Acct = obj.intrmyAgt3Acct;
var intrmyAgt3 = obj.intrmyAgt3;
if(isNotEmpty(intrmyAgt3Acct)&&isEmpty(intrmyAgt3)){
message("Intermediary Agent 3 Account", msg);
return false;
}
var prvsInstgAgt1Acct = obj.prvsInstgAgt1Acct;
var prvsInstgAgt1 = obj.prvsInstgAgt1;
if(isNotEmpty(prvsInstgAgt1Acct)&&isEmpty(prvsInstgAgt1)){
message("Previous Instructing Agent 1 Account", msg);
return false;
}
var prvsInstgAgt2Acct = obj.prvsInstgAgt2Acct;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2Acct)&&isEmpty(prvsInstgAgt2)){
message("Previous Instructing Agent 2 Account", msg);
return false;
}
var prvsInstgAgt3Acct = obj.prvsInstgAgt3Acct;
var prvsInstgAgt3 = obj.prvsInstgAgt3;
if(isNotEmpty(prvsInstgAgt3Acct)&&isEmpty(prvsInstgAgt3)){
message("Previous Instructing Agent 3 Account", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 2Rule
function IntermediaryAgent2Rule(obj){
const msg = "If IntermediaryAgent2 is present, then IntermediaryAgent1 must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 3Rule
function IntermediaryAgent3Rule(obj){
const msg = "If IntermediaryAgent3 is present, then IntermediaryAgent2 must be present.";
var intrmyAgt3 = obj.intrmyAgt3;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt3)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 2Rule
function PreviousInstructionAgent2Rule(obj){
const msg = "If PreviousInstructingAgent2 is present, then PreviousInstructingAgent1 must be present.";
var prvsInstgAgt1 = obj.prvsInstgAgt1;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2)&&isEmpty(prvsInstgAgt1)){
message("Previous Instruction Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 3Rule
function PreviousInstructionAgent3Rule(obj){
const msg = "If PreviousInstructingAgent3 is present, then PreviousInstructingAgent2 must be present.";
var prvsInstgAgt3 = obj.prvsInstgAgt3;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt3)&&isEmpty(prvsInstgAgt2)){
message("Previous Instruction Agent 2", msg);
return false;
}
return true;
}
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r12/r21/r24/r27/r45/r48/r51/r54/r57/r60/r77/r81 //r12/r21/r24/r27/r45/r48/r51/r54/r57/r60/r77/r81
function CBPR_Agent_Name_Postal_Address_FormalRule(na, position) { function CBPR_Agent_Name_Postal_Address_FormalRule(na, position) {
...@@ -885,7 +1250,7 @@ function SettlementMethod_COVE(obj){ ...@@ -885,7 +1250,7 @@ function SettlementMethod_COVE(obj){
if('COVE' == obj.sttlmInf.sttlmMtd){ if('COVE' == obj.sttlmInf.sttlmMtd){
if(isEmpty(obj.sttlmInf.instdRmbrsmntAgt)){ if(isEmpty(obj.sttlmInf.instdRmbrsmntAgt)){
if(isEmpty(obj.sttlmInf.instgRmbrsmntAgt)){ if(isEmpty(obj.sttlmInf.instgRmbrsmntAgt)){
message("Charge Bearer", msg); message("Instructed Reimbursement Agent", msg);
return false; return false;
} }
......
...@@ -77,8 +77,222 @@ export default function validator(obj) { ...@@ -77,8 +77,222 @@ export default function validator(obj) {
return false; return false;
} }
if(!SettlementMethod_COVE(obj.grpHdr)){
return false;
}
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
if(!GroupHeaderInterbankSettlementDateRule(obj)){
return false;
}
if(!InstructingAgentRule(obj)){
return false;
}
if(!InstructedAgentRule(obj)){
return false;
}
if(!PaymentTypeInformationRule(obj)){
return false;
}
if(!AgentAccountRule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent1Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
return true;
}
//Cross Element Complex Rule : Agent Account Rule
function AgentAccountRule(obj){
const msg = "If Agent Account is present, then Agent must be present.";
var cdtrAgtAcct = obj.cdtrAgtAcct;
var cdtrAgt = obj.cdtrAgt;
if(isNotEmpty(cdtrAgtAcct)&&isEmpty(cdtrAgt)){
message("Creditor Agent Account", msg);
return false;
}
var dbtrAgtAcct = obj.dbtrAgtAcct;
var dbtrAgt = obj.dbtrAgt;
if(isNotEmpty(dbtrAgtAcct)&&isEmpty(dbtrAgt)){
message("Debtor Agent Account", msg);
return false;
}
var intrmyAgt1Acct = obj.intrmyAgt1Acct;
var intrmyAgt1 = obj.intrmyAgt1;
if(isNotEmpty(intrmyAgt1Acct)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent 1 Account", msg);
return false;
}
var intrmyAgt2Acct = obj.intrmyAgt2Acct;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2Acct)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2 Account", msg);
return false;
}
var intrmyAgt3Acct = obj.intrmyAgt3Acct;
var intrmyAgt3 = obj.intrmyAgt3;
if(isNotEmpty(intrmyAgt3Acct)&&isEmpty(intrmyAgt3)){
message("Intermediary Agent 3 Account", msg);
return false;
}
var prvsInstgAgt1Acct = obj.prvsInstgAgt1Acct;
var prvsInstgAgt1 = obj.prvsInstgAgt1;
if(isNotEmpty(prvsInstgAgt1Acct)&&isEmpty(prvsInstgAgt1)){
message("Previous Instructing Agent 1 Account", msg);
return false;
}
var prvsInstgAgt2Acct = obj.prvsInstgAgt2Acct;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2Acct)&&isEmpty(prvsInstgAgt2)){
message("Previous Instructing Agent 2 Account", msg);
return false;
}
var prvsInstgAgt3Acct = obj.prvsInstgAgt3Acct;
var prvsInstgAgt3 = obj.prvsInstgAgt3;
if(isNotEmpty(prvsInstgAgt3Acct)&&isEmpty(prvsInstgAgt3)){
message("Previous Instructing Agent 3 Account", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 1Rule
function IntermediaryAgent1Rule(obj){
const msg = "If IntermediaryAgent1 is present, then CreditorAgent must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var cdtrAgt = obj.cdtrAgt;
if(isNotEmpty(intrmyAgt1)&&isEmpty(cdtrAgt)){
message("Creditor Agent", msg);
return false;
}
return true; return true;
} }
//Cross Element Complex Rule : Intermediary Agent 2Rule
function IntermediaryAgent2Rule(obj){
const msg = "If IntermediaryAgent2 is present, then IntermediaryAgent1 must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 3Rule
function IntermediaryAgent3Rule(obj){
const msg = "If IntermediaryAgent3 is present, then IntermediaryAgent2 must be present.";
var intrmyAgt3 = obj.intrmyAgt3;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt3)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 2Rule
function PreviousInstructionAgent2Rule(obj){
const msg = "If PreviousInstructingAgent2 is present, then PreviousInstructingAgent1 must be present.";
var prvsInstgAgt1 = obj.prvsInstgAgt1;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2)&&isEmpty(prvsInstgAgt1)){
message("Previous Instruction Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 3Rule
function PreviousInstructionAgent3Rule(obj){
const msg = "If PreviousInstructingAgent3 is present, then PreviousInstructingAgent2 must be present.";
var prvsInstgAgt3 = obj.prvsInstgAgt3;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt3)&&isEmpty(prvsInstgAgt2)){
message("Previous Instruction Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Group Header Interbank Settlement Date Rule
function GroupHeaderInterbankSettlementDateRule(obj){
const msg = "If GroupHeader/InterbankSettlementDate is present, then CreditTransferTransactionInformation/InterbankSettlementDate is not allowed.";
var gintrBkSttlmDt = obj.grpHdr.intrBkSttlmDt;
var cintrBkSttlmDt = obj.cdtTrfTxInf.intrBkSttlmDt;
if(isNotEmpty(gintrBkSttlmDt)){
if(isNotEmpty(cintrBkSttlmDt)){
message("CreditTransferTransactionInformation/Interbank Settlement Date", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructing Agent Rule
function InstructingAgentRule(obj){
const msg = "If GroupHeader/InstructingAgent is present, then CreditTransferTransactionInformation/InstructingAgent is not allowed.";
var ginstgAgt = obj.grpHdr.instgAgt;
var cinstgAgt = obj.cdtTrfTxInf.instgAgt;
if(isNotEmpty(ginstgAgt)){
if(isNotEmpty(cinstgAgt)){
message("CreditTransferTransactionInformation/Instructing Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructed Agent Rule
function InstructedAgentRule(obj){
const msg = "If GroupHeader/InstructedAgent is present, then CreditTransferTransactionInformation/InstructedAgent is not allowed.";
var ginstdAgt = obj.grpHdr.instdAgt;
var cinstdAgt = obj.cdtTrfTxInf.instdAgt;
if(isNotEmpty(ginstdAgt)){
if(isNotEmpty(cinstdAgt)){
message("CreditTransferTransactionInformation/Instructed Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Payment Type Information Rule
function PaymentTypeInformationRule(obj){
const msg = "If GroupHeader/PaymentTypeInformation is present, then CreditTransferTransactionInformation/PaymentTypeInformation is not allowed.";
var gpmtTpInf = obj.grpHdr.pmtTpInf;
var cpmtTpInf = obj.cdtTrfTxInf.pmtTpInf;
if(isNotEmpty(gpmtTpInf)){
if(isNotEmpty(cpmtTpInf)){
message("CreditTransferTransactionInformation/Payment Type Information", msg);
return false;
}
}
return true;
}
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 如果在pacs消息的BAH中使用了“优先级”,则该值应与“付款类型信息/指令优先级”中的值相同(如果存在)。 //r1 如果在pacs消息的BAH中使用了“优先级”,则该值应与“付款类型信息/指令优先级”中的值相同(如果存在)。
function CBPR_Priority_Instruction_Priority_FormalRule() { function CBPR_Priority_Instruction_Priority_FormalRule() {
...@@ -416,3 +630,19 @@ function CBPR_Instruction_Information_TextualRule(){ ...@@ -416,3 +630,19 @@ function CBPR_Instruction_Information_TextualRule(){
const msg = "If the pacs.009 is used to settle a pacs.009 Advice, the last available occurrence (of the element Instruction For Creditor Agent/Instruction Information) preceded by /UDLC/ must be used to capture the /UDLC/ (Underlying Creditor) provided in the pacs.009 Advice."; const msg = "If the pacs.009 is used to settle a pacs.009 Advice, the last available occurrence (of the element Instruction For Creditor Agent/Instruction Information) preceded by /UDLC/ must be used to capture the /UDLC/ (Underlying Creditor) provided in the pacs.009 Advice.";
return true; return true;
} }
//如果结算方式等于COVE,则指示报销代理或指示报销代理必须在场。
function SettlementMethod_COVE(obj){
const msg = "If SettlementMethod is equal to COVE, then InstructedReimbursementAgent or InstructingReimbursementAgent must be present.";
if('COVE' == obj.sttlmInf.sttlmMtd){
if(isEmpty(obj.sttlmInf.instdRmbrsmntAgt)){
if(isEmpty(obj.sttlmInf.instgRmbrsmntAgt)){
message("Instructed Reimbursement Agent", msg);
return false;
}
}
}
return true;
}
...@@ -96,10 +96,223 @@ export default function validator(obj) { ...@@ -96,10 +96,223 @@ export default function validator(obj) {
return false; return false;
} }
if(!SettlementMethod_COVE(obj.grpHdr)){
return false;
}
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
if(!GroupHeaderInterbankSettlementDateRule(obj)){
return false;
}
if(!InstructingAgentRule(obj)){
return false;
}
if(!InstructedAgentRule(obj)){
return false;
}
if(!PaymentTypeInformationRule(obj)){
return false;
}
if(!AgentAccountRule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent1Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
return true; return true;
} }
//Cross Element Complex Rule : Agent Account Rule
function AgentAccountRule(obj){
const msg = "If Agent Account is present, then Agent must be present.";
var cdtrAgtAcct = obj.cdtrAgtAcct;
var cdtrAgt = obj.cdtrAgt;
if(isNotEmpty(cdtrAgtAcct)&&isEmpty(cdtrAgt)){
message("Creditor Agent Account", msg);
return false;
}
var dbtrAgtAcct = obj.dbtrAgtAcct;
var dbtrAgt = obj.dbtrAgt;
if(isNotEmpty(dbtrAgtAcct)&&isEmpty(dbtrAgt)){
message("Debtor Agent Account", msg);
return false;
}
var intrmyAgt1Acct = obj.intrmyAgt1Acct;
var intrmyAgt1 = obj.intrmyAgt1;
if(isNotEmpty(intrmyAgt1Acct)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent 1 Account", msg);
return false;
}
var intrmyAgt2Acct = obj.intrmyAgt2Acct;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2Acct)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2 Account", msg);
return false;
}
var intrmyAgt3Acct = obj.intrmyAgt3Acct;
var intrmyAgt3 = obj.intrmyAgt3;
if(isNotEmpty(intrmyAgt3Acct)&&isEmpty(intrmyAgt3)){
message("Intermediary Agent 3 Account", msg);
return false;
}
var prvsInstgAgt1Acct = obj.prvsInstgAgt1Acct;
var prvsInstgAgt1 = obj.prvsInstgAgt1;
if(isNotEmpty(prvsInstgAgt1Acct)&&isEmpty(prvsInstgAgt1)){
message("Previous Instructing Agent 1 Account", msg);
return false;
}
var prvsInstgAgt2Acct = obj.prvsInstgAgt2Acct;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2Acct)&&isEmpty(prvsInstgAgt2)){
message("Previous Instructing Agent 2 Account", msg);
return false;
}
var prvsInstgAgt3Acct = obj.prvsInstgAgt3Acct;
var prvsInstgAgt3 = obj.prvsInstgAgt3;
if(isNotEmpty(prvsInstgAgt3Acct)&&isEmpty(prvsInstgAgt3)){
message("Previous Instructing Agent 3 Account", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 1Rule
function IntermediaryAgent1Rule(obj){
const msg = "If IntermediaryAgent1 is present, then CreditorAgent must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var cdtrAgt = obj.cdtrAgt;
if(isNotEmpty(intrmyAgt1)&&isEmpty(cdtrAgt)){
message("Creditor Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 2Rule
function IntermediaryAgent2Rule(obj){
const msg = "If IntermediaryAgent2 is present, then IntermediaryAgent1 must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 3Rule
function IntermediaryAgent3Rule(obj){
const msg = "If IntermediaryAgent3 is present, then IntermediaryAgent2 must be present.";
var intrmyAgt3 = obj.intrmyAgt3;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt3)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 2Rule
function PreviousInstructionAgent2Rule(obj){
const msg = "If PreviousInstructingAgent2 is present, then PreviousInstructingAgent1 must be present.";
var prvsInstgAgt1 = obj.prvsInstgAgt1;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2)&&isEmpty(prvsInstgAgt1)){
message("Previous Instruction Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 3Rule
function PreviousInstructionAgent3Rule(obj){
const msg = "If PreviousInstructingAgent3 is present, then PreviousInstructingAgent2 must be present.";
var prvsInstgAgt3 = obj.prvsInstgAgt3;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt3)&&isEmpty(prvsInstgAgt2)){
message("Previous Instruction Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Group Header Interbank Settlement Date Rule
function GroupHeaderInterbankSettlementDateRule(obj){
const msg = "If GroupHeader/InterbankSettlementDate is present, then CreditTransferTransactionInformation/InterbankSettlementDate is not allowed.";
var gintrBkSttlmDt = obj.grpHdr.intrBkSttlmDt;
var cintrBkSttlmDt = obj.cdtTrfTxInf.intrBkSttlmDt;
if(isNotEmpty(gintrBkSttlmDt)){
if(isNotEmpty(cintrBkSttlmDt)){
message("CreditTransferTransactionInformation/Interbank Settlement Date", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructing Agent Rule
function InstructingAgentRule(obj){
const msg = "If GroupHeader/InstructingAgent is present, then CreditTransferTransactionInformation/InstructingAgent is not allowed.";
var ginstgAgt = obj.grpHdr.instgAgt;
var cinstgAgt = obj.cdtTrfTxInf.instgAgt;
if(isNotEmpty(ginstgAgt)){
if(isNotEmpty(cinstgAgt)){
message("CreditTransferTransactionInformation/Instructing Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructed Agent Rule
function InstructedAgentRule(obj){
const msg = "If GroupHeader/InstructedAgent is present, then CreditTransferTransactionInformation/InstructedAgent is not allowed.";
var ginstdAgt = obj.grpHdr.instdAgt;
var cinstdAgt = obj.cdtTrfTxInf.instdAgt;
if(isNotEmpty(ginstdAgt)){
if(isNotEmpty(cinstdAgt)){
message("CreditTransferTransactionInformation/Instructed Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Payment Type Information Rule
function PaymentTypeInformationRule(obj){
const msg = "If GroupHeader/PaymentTypeInformation is present, then CreditTransferTransactionInformation/PaymentTypeInformation is not allowed.";
var gpmtTpInf = obj.grpHdr.pmtTpInf;
var cpmtTpInf = obj.cdtTrfTxInf.pmtTpInf;
if(isNotEmpty(gpmtTpInf)){
if(isNotEmpty(cpmtTpInf)){
message("CreditTransferTransactionInformation/Payment Type Information", msg);
return false;
}
}
return true;
}
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 如果在pacs消息的BAH中使用了“优先级”,则该值应与“付款类型信息/指令优先级”中的值相同(如果存在)。 //r1 如果在pacs消息的BAH中使用了“优先级”,则该值应与“付款类型信息/指令优先级”中的值相同(如果存在)。
function CBPR_Priority_Instruction_Priority_FormalRule() { function CBPR_Priority_Instruction_Priority_FormalRule() {
const msg = "If 'Priority' is used in the BAH for pacs messages, the value should be identical to the one in the “Payment Type Information/InstructionPriority” if present."; const msg = "If 'Priority' is used in the BAH for pacs messages, the value should be identical to the one in the “Payment Type Information/InstructionPriority” if present.";
...@@ -365,5 +578,21 @@ function CBPR_Purpose_Guideline() { ...@@ -365,5 +578,21 @@ function CBPR_Purpose_Guideline() {
return true; return true;
} }
//如果结算方式等于COVE,则指示报销代理或指示报销代理必须在场。
function SettlementMethod_COVE(obj){
const msg = "If SettlementMethod is equal to COVE, then InstructedReimbursementAgent or InstructingReimbursementAgent must be present.";
if('COVE' == obj.sttlmInf.sttlmMtd){
if(isEmpty(obj.sttlmInf.instdRmbrsmntAgt)){
if(isEmpty(obj.sttlmInf.instgRmbrsmntAgt)){
message("Instructed Reimbursement Agent", msg);
return false;
}
}
}
return true;
}
...@@ -136,10 +136,272 @@ export default function validator(obj) { ...@@ -136,10 +136,272 @@ export default function validator(obj) {
return false; return false;
} }
if(!SettlementMethod_COVE(obj.grpHdr)){
return false;
}
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
if(!GroupHeaderInterbankSettlementDateRule(obj)){
return false;
}
if(!InstructingAgentRule(obj)){
return false;
}
if(!InstructedAgentRule(obj)){
return false;
}
if(!PaymentTypeInformationRule(obj)){
return false;
}
if(!AgentAccountRule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent1Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent2Rule(obj.cdtTrfTxInf)){
return false;
}
if(!PreviousInstructionAgent3Rule(obj.cdtTrfTxInf)){
return false;
}
if(!IntermediaryAgent2Rule(obj.cdtTrfTxInf.undrlygCstmrCdtTrf)){
return false;
}
if(!IntermediaryAgent3Rule(obj.cdtTrfTxInf.undrlygCstmrCdtTrf)){
return false;
}
if(!PreviousInstructionAgent2Rule(obj.cdtTrfTxInf.undrlygCstmrCdtTrf)){
return false;
}
if(!PreviousInstructionAgent3Rule(obj.cdtTrfTxInf.undrlygCstmrCdtTrf)){
return false;
}
return true;
}
//Cross Element Complex Rule : Agent Account Rule
function AgentAccountRule(obj){
const msg = "If Agent Account is present, then Agent must be present.";
var cdtrAgtAcct = obj.cdtrAgtAcct;
var cdtrAgt = obj.cdtrAgt;
if(isNotEmpty(cdtrAgtAcct)&&isEmpty(cdtrAgt)){
message("Creditor Agent Account", msg);
return false;
}
var dbtrAgtAcct = obj.dbtrAgtAcct;
var dbtrAgt = obj.dbtrAgt;
if(isNotEmpty(dbtrAgtAcct)&&isEmpty(dbtrAgt)){
message("Debtor Agent Account", msg);
return false;
}
var intrmyAgt1Acct = obj.intrmyAgt1Acct;
var intrmyAgt1 = obj.intrmyAgt1;
if(isNotEmpty(intrmyAgt1Acct)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent 1 Account", msg);
return false;
}
var intrmyAgt2Acct = obj.intrmyAgt2Acct;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2Acct)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2 Account", msg);
return false;
}
var intrmyAgt3Acct = obj.intrmyAgt3Acct;
var intrmyAgt3 = obj.intrmyAgt3;
if(isNotEmpty(intrmyAgt3Acct)&&isEmpty(intrmyAgt3)){
message("Intermediary Agent 3 Account", msg);
return false;
}
var prvsInstgAgt1Acct = obj.prvsInstgAgt1Acct;
var prvsInstgAgt1 = obj.prvsInstgAgt1;
if(isNotEmpty(prvsInstgAgt1Acct)&&isEmpty(prvsInstgAgt1)){
message("Previous Instructing Agent 1 Account", msg);
return false;
}
var prvsInstgAgt2Acct = obj.prvsInstgAgt2Acct;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2Acct)&&isEmpty(prvsInstgAgt2)){
message("Previous Instructing Agent 2 Account", msg);
return false;
}
var prvsInstgAgt3Acct = obj.prvsInstgAgt3Acct;
var prvsInstgAgt3 = obj.prvsInstgAgt3;
if(isNotEmpty(prvsInstgAgt3Acct)&&isEmpty(prvsInstgAgt3)){
message("Previous Instructing Agent 3 Account", msg);
return false;
}
var uintrmyAgt1Acct = obj.undrlygCstmrCdtTrf.intrmyAgt1Acct;
var uintrmyAgt1 = obj.undrlygCstmrCdtTrf.intrmyAgt1;
if(isNotEmpty(uintrmyAgt1Acct)&&isEmpty(uintrmyAgt1)){
message("Underlying Customer Credit Transfer/Intermediary Agent 1 Account", msg);
return false;
}
var uintrmyAgt2Acct = obj.undrlygCstmrCdtTrf.intrmyAgt2Acct;
var uintrmyAgt2 = obj.undrlygCstmrCdtTrf.intrmyAgt2;
if(isNotEmpty(uintrmyAgt2Acct)&&isEmpty(uintrmyAgt2)){
message("Underlying Customer Credit Transfer/Intermediary Agent 2 Account", msg);
return false;
}
var uintrmyAgt3Acct = obj.undrlygCstmrCdtTrf.intrmyAgt3Acct;
var uintrmyAgt3 = obj.undrlygCstmrCdtTrf.intrmyAgt3;
if(isNotEmpty(uintrmyAgt3Acct)&&isEmpty(uintrmyAgt3)){
message("Underlying Customer Credit Transfer/Intermediary Agent 3 Account", msg);
return false;
}
var uprvsInstgAgt1Acct = obj.undrlygCstmrCdtTrf.prvsInstgAgt1Acct;
var uprvsInstgAgt1 = obj.undrlygCstmrCdtTrf.prvsInstgAgt1;
if(isNotEmpty(uprvsInstgAgt1Acct)&&isEmpty(uprvsInstgAgt1)){
message("Underlying Customer Credit Transfer/Previous Instructing Agent 1 Account", msg);
return false;
}
var uprvsInstgAgt2Acct = obj.undrlygCstmrCdtTrf.prvsInstgAgt2Acct;
var uprvsInstgAgt2 = obj.undrlygCstmrCdtTrf.prvsInstgAgt2;
if(isNotEmpty(uprvsInstgAgt2Acct)&&isEmpty(uprvsInstgAgt2)){
message("Underlying Customer Credit Transfer/Previous Instructing Agent 2 Account", msg);
return false;
}
var uprvsInstgAgt3Acct = obj.undrlygCstmrCdtTrf.prvsInstgAgt3Acct;
var uprvsInstgAgt3 = obj.undrlygCstmrCdtTrf.prvsInstgAgt3;
if(isNotEmpty(uprvsInstgAgt3Acct)&&isEmpty(uprvsInstgAgt3)){
message("Underlying Customer Credit Transfer/Previous Instructing Agent 3 Account", msg);
return false;
}
return true; return true;
} }
//Cross Element Complex Rule : Intermediary Agent 1Rule
function IntermediaryAgent1Rule(obj){
const msg = "If IntermediaryAgent1 is present, then CreditorAgent must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var cdtrAgt = obj.cdtrAgt;
if(isNotEmpty(intrmyAgt1)&&isEmpty(cdtrAgt)){
message("Creditor Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 2Rule
function IntermediaryAgent2Rule(obj){
const msg = "If IntermediaryAgent2 is present, then IntermediaryAgent1 must be present.";
var intrmyAgt1 = obj.intrmyAgt1;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt2)&&isEmpty(intrmyAgt1)){
message("Intermediary Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Intermediary Agent 3Rule
function IntermediaryAgent3Rule(obj){
const msg = "If IntermediaryAgent3 is present, then IntermediaryAgent2 must be present.";
var intrmyAgt3 = obj.intrmyAgt3;
var intrmyAgt2 = obj.intrmyAgt2;
if(isNotEmpty(intrmyAgt3)&&isEmpty(intrmyAgt2)){
message("Intermediary Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 2Rule
function PreviousInstructionAgent2Rule(obj){
const msg = "If PreviousInstructingAgent2 is present, then PreviousInstructingAgent1 must be present.";
var prvsInstgAgt1 = obj.prvsInstgAgt1;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt2)&&isEmpty(prvsInstgAgt1)){
message("Previous Instruction Agent", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Previous Instruction Agent 3Rule
function PreviousInstructionAgent3Rule(obj){
const msg = "If PreviousInstructingAgent3 is present, then PreviousInstructingAgent2 must be present.";
var prvsInstgAgt3 = obj.prvsInstgAgt3;
var prvsInstgAgt2 = obj.prvsInstgAgt2;
if(isNotEmpty(prvsInstgAgt3)&&isEmpty(prvsInstgAgt2)){
message("Previous Instruction Agent 2", msg);
return false;
}
return true;
}
//Cross Element Complex Rule : Group Header Interbank Settlement Date Rule
function GroupHeaderInterbankSettlementDateRule(obj){
const msg = "If GroupHeader/InterbankSettlementDate is present, then CreditTransferTransactionInformation/InterbankSettlementDate is not allowed.";
var gintrBkSttlmDt = obj.grpHdr.intrBkSttlmDt;
var cintrBkSttlmDt = obj.cdtTrfTxInf.intrBkSttlmDt;
if(isNotEmpty(gintrBkSttlmDt)){
if(isNotEmpty(cintrBkSttlmDt)){
message("CreditTransferTransactionInformation/Interbank Settlement Date", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructing Agent Rule
function InstructingAgentRule(obj){
const msg = "If GroupHeader/InstructingAgent is present, then CreditTransferTransactionInformation/InstructingAgent is not allowed.";
var ginstgAgt = obj.grpHdr.instgAgt;
var cinstgAgt = obj.cdtTrfTxInf.instgAgt;
if(isNotEmpty(ginstgAgt)){
if(isNotEmpty(cinstgAgt)){
message("CreditTransferTransactionInformation/Instructing Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Instructed Agent Rule
function InstructedAgentRule(obj){
const msg = "If GroupHeader/InstructedAgent is present, then CreditTransferTransactionInformation/InstructedAgent is not allowed.";
var ginstdAgt = obj.grpHdr.instdAgt;
var cinstdAgt = obj.cdtTrfTxInf.instdAgt;
if(isNotEmpty(ginstdAgt)){
if(isNotEmpty(cinstdAgt)){
message("CreditTransferTransactionInformation/Instructed Agent", msg);
return false;
}
}
return true;
}
//Cross Element Complex Rule : Payment Type Information Rule
function PaymentTypeInformationRule(obj){
const msg = "If GroupHeader/PaymentTypeInformation is present, then CreditTransferTransactionInformation/PaymentTypeInformation is not allowed.";
var gpmtTpInf = obj.grpHdr.pmtTpInf;
var cpmtTpInf = obj.cdtTrfTxInf.pmtTpInf;
if(isNotEmpty(gpmtTpInf)){
if(isNotEmpty(cpmtTpInf)){
message("CreditTransferTransactionInformation/Payment Type Information", msg);
return false;
}
}
return true;
}
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 如果在pacs消息的BAH中使用了“优先级”,则该值应与“付款类型信息/指令优先级”中的值相同(如果存在)。 //r1 如果在pacs消息的BAH中使用了“优先级”,则该值应与“付款类型信息/指令优先级”中的值相同(如果存在)。
function CBPR_Priority_Instruction_Priority_FormalRule() { function CBPR_Priority_Instruction_Priority_FormalRule() {
const msg = "If 'Priority' is used in the BAH for pacs messages, the value should be identical to the one in the “Payment Type Information/InstructionPriority” if present."; const msg = "If 'Priority' is used in the BAH for pacs messages, the value should be identical to the one in the “Payment Type Information/InstructionPriority” if present.";
...@@ -643,6 +905,22 @@ function CBPR_RemittanceInformation_TextualRule(){ ...@@ -643,6 +905,22 @@ function CBPR_RemittanceInformation_TextualRule(){
return true; return true;
} }
//如果结算方式等于COVE,则指示报销代理或指示报销代理必须在场。
function SettlementMethod_COVE(obj){
const msg = "If SettlementMethod is equal to COVE, then InstructedReimbursementAgent or InstructingReimbursementAgent must be present.";
if('COVE' == obj.sttlmInf.sttlmMtd){
if(isEmpty(obj.sttlmInf.instdRmbrsmntAgt)){
if(isEmpty(obj.sttlmInf.instgRmbrsmntAgt)){
message("Instructed Reimbursement Agent", msg);
return false;
}
}
}
return true;
}
......
...@@ -48,7 +48,9 @@ export default function validator(obj) { ...@@ -48,7 +48,9 @@ export default function validator(obj) {
!CBPR_Structured_vs_Unstructured_FormalRule(obj.cdtInstr.drctDbtTxInf.dbtrAgt.finInstnId.pstlAdr,"Direct Debit Transaction Information/Debtor Agent/Financial Institution Identification")){ !CBPR_Structured_vs_Unstructured_FormalRule(obj.cdtInstr.drctDbtTxInf.dbtrAgt.finInstnId.pstlAdr,"Direct Debit Transaction Information/Debtor Agent/Financial Institution Identification")){
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
...@@ -56,6 +58,20 @@ export default function validator(obj) { ...@@ -56,6 +58,20 @@ export default function validator(obj) {
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 BAH“From”BIC必须与“Instructioning Agent”BIC匹配,除非BAH CopyDuplicate=COPY或=CODUBAH“To”BIC与“Instructed Agent”BIC匹配,除非BAH CopyDublicate=COPY或=CODU //r1 BAH“From”BIC必须与“Instructioning Agent”BIC匹配,除非BAH CopyDuplicate=COPY或=CODUBAH“To”BIC与“Instructed Agent”BIC匹配,除非BAH CopyDublicate=COPY或=CODU
function CBPR_From_To_Instructing_Instructed_Agent_BIC_1_FormalRule() { function CBPR_From_To_Instructing_Instructed_Agent_BIC_1_FormalRule() {
const msg = "BAH 'From' BIC must match 'Instructing Agent' BIC, except where BAH CopyDuplicate = COPY or = CODUBAH 'To' BIC must match 'Instructed Agent' BIC, except where BAH CopyDuplicate = COPY or = CODU"; const msg = "BAH 'From' BIC must match 'Instructing Agent' BIC, except where BAH CopyDuplicate = COPY or = CODUBAH 'To' BIC must match 'Instructed Agent' BIC, except where BAH CopyDuplicate = COPY or = CODU";
......
...@@ -79,13 +79,29 @@ export default function validator(obj) { ...@@ -79,13 +79,29 @@ export default function validator(obj) {
if (!CBPR_Instruction_for_Creditor_Agent2_TextualRule(obj.pmtInf.cdtTrfTxInf.instrForCdtrAgt)){ if (!CBPR_Instruction_for_Creditor_Agent2_TextualRule(obj.pmtInf.cdtTrfTxInf.instrForCdtrAgt)){
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。 //r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。
function CBPR_Character_Set_Usage_TextualRule() { function CBPR_Character_Set_Usage_TextualRule() {
......
...@@ -32,12 +32,27 @@ export default function validator(obj) { ...@@ -32,12 +32,27 @@ export default function validator(obj) {
if (!CBPR_Town_Name_And_Country_FormalRule(obj.orgnlPmtInfAndSts.txInfAndSts.stsRsnInf.orgtr.pstlAdr)){ if (!CBPR_Town_Name_And_Country_FormalRule(obj.orgnlPmtInfAndSts.txInfAndSts.stsRsnInf.orgtr.pstlAdr)){
return false; return false;
} }
if(!RelatedPresentWhenCopyDupl(obj)){
return false;
}
return true; return true;
} }
// Cross Element Complex Rule : Related Present When Copy Dupl
function RelatedPresentWhenCopyDupl(obj) {
const msg = "If CopyDuplicate is present, then Related MUST be present.";
var cpyDplct = obj.appHdr.cpyDplct;
var rltd = obj.appHdr.rltd;
if(isNotEmpty(cpyDplct)){
if(isEmpty(rltd)){
message("Related", msg);
return false;
}
}
return true;
}
//r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。 //r1 有关该字段用法的进一步说明,请参阅CBPR Plus UHB。
function CBPR_Character_Set_Usage_TextualRule() { function CBPR_Character_Set_Usage_TextualRule() {
......
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="favicon.ico"/><title>ISO手工拟报</title><script defer="defer" src="js/chunk-vendors.23ee7bd5.js"></script><script defer="defer" src="js/app.c9fac77d.js"></script><script defer="defer" src="js/main.59945214.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.d2831041.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but swiftiso-editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="favicon.ico"/><title>ISO手工拟报</title><script defer="defer" src="js/chunk-vendors.23ee7bd5.js"></script><script defer="defer" src="js/app.c92c0280.js"></script><script defer="defer" src="js/main.59945214.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.d2831041.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but swiftiso-editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:head.001.001.02"> <xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<xs:element name="AppHdr" type="BusinessApplicationHeaderV02"/> <xs:element name="AppHdr" type="BusinessApplicationHeaderV02"/>
<xs:complexType name="BusinessApplicationHeaderV02"> <xs:simpleType name="BICFIDec2014Identifier">
<xs:sequence> <xs:annotation>
<xs:element name="Fr" type="Party44Choice"/> <xs:documentation source="Name" xml:lang="EN">BICFIDec2014Identifier</xs:documentation>
<xs:element name="To" type="Party44Choice"/> <xs:documentation source="Definition" xml:lang="EN">Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362: 2014 - "Banking - Banking telecommunication messages - Business identifier code (BIC)".</xs:documentation>
<xs:element name="BizMsgIdr" type="Max35Text"/> </xs:annotation>
<xs:element name="MsgDefIdr" type="Max35Text"/> <xs:restriction base="xs:string">
<xs:element maxOccurs="1" minOccurs="0" name="BizSvc" type="Max35Text"/> <xs:pattern value="[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"/>
<xs:element name="CreDt" type="ISODateTime"/> </xs:restriction>
<xs:element maxOccurs="1" minOccurs="0" name="CpyDplct" type="CopyDuplicate1Code"/> </xs:simpleType>
<xs:element maxOccurs="1" minOccurs="0" name="PssblDplct" type="YesNoIndicator"/> <xs:complexType name="BranchAndFinancialInstitutionIdentification6__2">
<xs:element maxOccurs="1" minOccurs="0" name="Prty" type="Priority2Code"/> <xs:annotation>
<xs:element maxOccurs="1" minOccurs="0" name="Rltd" type="BusinessApplicationHeader5"/> <xs:documentation source="Name" xml:lang="EN">BranchAndFinancialInstitutionIdentification6__2</xs:documentation>
</xs:sequence> <xs:documentation source="Definition" xml:lang="EN">Unique and unambiguous identification of a financial institution or a branch of a financial institution.</xs:documentation>
</xs:complexType> </xs:annotation>
<xs:complexType name="Party44Choice">
<xs:choice>
<xs:element name="OrgId" type="PartyIdentification135"/>
<xs:element name="FIId" type="BranchAndFinancialInstitutionIdentification6"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="BranchAndFinancialInstitutionIdentification6">
<xs:sequence>
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification18"/>
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData3"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartyIdentification135">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress24"/>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party38Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="Contact4"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BusinessApplicationHeader5">
<xs:sequence>
<xs:element name="Fr" type="Party44Choice"/>
<xs:element name="To" type="Party44Choice"/>
<xs:element name="BizMsgIdr" type="Max35Text"/>
<xs:element name="MsgDefIdr" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BizSvc" type="Max35Text"/>
<xs:element name="CreDt" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="CpyDplct" type="CopyDuplicate1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="PssblDplct" type="YesNoIndicator"/>
<xs:element maxOccurs="1" minOccurs="0" name="Prty" type="Priority2Code"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FinancialInstitutionIdentification18">
<xs:sequence>
<xs:element name="BICFI" type="BICFIDec2014Identifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
<xs:element maxOccurs="1" minOccurs="0" name="LEI" type="LEIIdentifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress24"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BranchData3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="LEI" type="LEIIdentifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress24"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Party38Choice">
<xs:choice>
<xs:element name="OrgId" type="OrganisationIdentification29"/>
<xs:element name="PrvtId" type="PersonIdentification13"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Contact4">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="EmailPurp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="JobTitl" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Rspnsblty" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="OtherContact1"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrefrdMtd" type="PreferredContactMethod1Code"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrganisationIdentification29">
<xs:sequence> <xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICDec2014Identifier"/> <xs:element name="FinInstnId" type="FinancialInstitutionIdentification18__2">
<xs:element maxOccurs="1" minOccurs="0" name="LEI" type="LEIIdentifier"/> <xs:annotation>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/> <xs:documentation source="Name" xml:lang="EN">FinancialInstitutionIdentification</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Unique and unambiguous identification of a financial institution, as assigned under an internationally recognised or proprietary identification scheme.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="PersonIdentification13"> <xs:complexType name="BusinessApplicationHeader5__1">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">BusinessApplicationHeader5__1</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies the Business Application Header of the Business Message.&#13;
Can be used when replying to a query; can also be used when canceling or amending.</xs:documentation>
</xs:annotation>
<xs:sequence> <xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth1"/> <xs:element maxOccurs="1" minOccurs="0" name="CharSet" type="UnicodeChartsCode">
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/> <xs:annotation>
<xs:documentation source="Name" xml:lang="EN">CharacterSet</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Contains the character set of the text-based elements used in the Business Message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Fr" type="Party44Choice__1">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">From</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">The sending MessagingEndpoint that has created this Business Message for the receiving MessagingEndpoint that will process this Business Message.&#13;
&#13;
Note the sending MessagingEndpoint might be different from the sending address potentially contained in the transport header (as defined in the transport layer).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="To" type="Party44Choice__1">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">To</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">The MessagingEndpoint designated by the sending MessagingEndpoint to be the recipient who will ultimately process this Business Message.&#13;
&#13;
Note the receiving MessagingEndpoint might be different from the receiving address potentially contained in the transport header (as defined in the transport layer).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BizMsgIdr" type="Max35Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">BusinessMessageIdentifier</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Unambiguously identifies the Business Message to the MessagingEndpoint that has created the Business Message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MsgDefIdr" type="Max35Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">MessageDefinitionIdentifier</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Contains the MessageIdentifier that defines the BusinessMessage.&#13;
It must contain a MessageIdentifier published on the ISO 20022 website.&#13;
&#13;
example camt.001.001.03.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="BizSvc" type="Max35Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">BusinessService</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies the business service agreed between the two MessagingEndpoints under which rules this Business Message is exchanged.&#13;
To be used when there is a choice of processing services or processing service levels.&#13;
Example: E&amp;I.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CreDt" type="CBPR_DateTime---copy">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">CreationDate</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Date and time when this Business Message (header) was created.&#13;
Note Times must be normalized, using the "Z" annotation.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="CpyDplct" type="CopyDuplicate1Code">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">CopyDuplicate</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Indicates whether the message is a Copy, a Duplicate or a copy of a duplicate of a previously sent ISO 20022 Message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="Prty" type="BusinessMessagePriorityCode">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Priority</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Relative indication of the processing precedence of the message over a (set of) Business Messages with assigned priorities.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="ClearingSystemMemberIdentification2"> <xs:complexType name="BusinessApplicationHeaderV02">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">BusinessApplicationHeaderV02</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">The Business Layer deals with Business Messages. The behaviour of the Business Messages is fully described by the Business Transaction and the structure of the Business Messages is fully described by the Message Definitions and related Message Rules, Rules and Market Practices. All of which are registered in the ISO 20022 Repository.&#13;
A single new Business Message (with its accompagnying business application header) is created - by the sending MessagingEndpoint - for each business event; that is each interaction in a Business Transaction. A Business Message adheres to the following principles:&#13;
" A Business Message (and its business application header) must not contain information about the Message Transport System or the mechanics or mechanism of message sending, transportation, or receipt. &#13;
" A Business Message must be comprehensible outside of the context of the Transport Message. That is the Business Message must not require knowledge of the Transport Message to be understood.&#13;
" A Business Message may contain headers, footers, and envelopes that are meaningful for the business. When present, they are treated as any other message content, which means that they are considered part of the Message Definition of the Business Message and as such will be part of the ISO 20022 Repository.&#13;
" A Business Message refers to Business Actors by their Name. Each instance of a Business Actor has one Name. The Business Actor must not be referred to in the Transport Layer.&#13;
Specific usage of this BusinessMessageHeader may be defined by the relevant SEG.</xs:documentation>
</xs:annotation>
<xs:sequence> <xs:sequence>
<xs:element name="ClrSysId" type="ClearingSystemIdentification2Choice"/> <xs:element maxOccurs="1" minOccurs="0" name="CharSet" type="UnicodeChartsCode">
<xs:element name="MmbId" type="Max35Text"/> <xs:annotation>
<xs:documentation source="Name" xml:lang="EN">CharacterSet</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Contains the character set of the text-based elements used in the Business Message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Fr" type="Party44Choice__1">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">From</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">The sending MessagingEndpoint that has created this Business Message for the receiving MessagingEndpoint that will process this Business Message.&#13;
&#13;
Note the sending MessagingEndpoint might be different from the sending address potentially contained in the transport header (as defined in the transport layer).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="To" type="Party44Choice__1">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">To</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">The MessagingEndpoint designated by the sending MessagingEndpoint to be the recipient who will ultimately process this Business Message.&#13;
&#13;
Note the receiving MessagingEndpoint might be different from the receiving address potentially contained in the transport header (as defined in the transport layer).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BizMsgIdr" type="Max35Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">BusinessMessageIdentifier</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Unambiguously identifies the Business Message to the MessagingEndpoint that has created the Business Message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MsgDefIdr" type="Max35Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">MessageDefinitionIdentifier</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Contains the MessageIdentifier that defines the BusinessMessage.&#13;
It must contain a MessageIdentifier published on the ISO 20022 website.&#13;
&#13;
example camt.001.001.03.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BizSvc" type="UsageIdentifierPatternText">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">BusinessService</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies the business service agreed between the two MessagingEndpoints under which rules this Business Message is exchanged.&#13;
To be used when there is a choice of processing services or processing service levels.&#13;
Example: E&amp;I.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="MktPrctc" type="ImplementationSpecification1">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">MarketPractice</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies the market practice to which the message conforms. The market practices are a set of rules agreed between parties that restricts the usage of the messages in order to achieve better STP (Straight Through Processing) rates.&#13;
A market practice specification may also extend the underlying message specification by using extensions or supplementary data of this underlying message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CreDt" type="CBPR_DateTime---copy">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">CreationDate</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Date and time when this Business Message (header) was created.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="CpyDplct" type="CopyDuplicate1Code">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">CopyDuplicate</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Indicates whether the message is a Copy, a Duplicate or a copy of a duplicate of a previously sent ISO 20022 Message.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="PssblDplct" type="YesNoIndicator">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">PossibleDuplicate</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Flag indicating if the Business Message exchanged between the MessagingEndpoints is possibly a duplicate. &#13;
If the receiving MessagingEndpoint did not receive the original, then this Business Message should be processed as if it were the original. &#13;
&#13;
If the receiving MessagingEndpoint did receive the original, then it should perform necessary actions to avoid processing this Business Message again.&#13;
&#13;
This will guarantee business idempotent behaviour.&#13;
&#13;
NOTE: this is named "PossResend" in FIX - this is an application level resend not a network level retransmission.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="Prty" type="Priority2Code">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Priority</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Relative indication of the processing precedence of the message over a (set of) Business Messages with assigned priorities.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="Rltd" type="BusinessApplicationHeader5__1"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:simpleType name="Priority2Code"> <xs:simpleType name="BusinessMessagePriorityCode">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string"/>
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="CopyDuplicate1Code"> <xs:simpleType name="CBPR_DateTime---copy">
<xs:restriction base="xs:string">
<xs:enumeration value="COPY"/>
<xs:enumeration value="CODU"/>
<xs:enumeration value="DUPL"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ISODate">
<xs:restriction base="xs:date"/>
</xs:simpleType>
<xs:simpleType name="ISODateTime">
<xs:restriction base="xs:dateTime"> <xs:restriction base="xs:dateTime">
<xs:pattern value=".*(\+|-)((0[0-9])|(1[0-3])):[0-5][0-9]"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="BICFIDec2014Identifier"> <xs:simpleType name="CBPR_RestrictedFINXMax28Text">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LEIIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value=" [A-Z0-9]{18,18}[0-9]{2,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max4Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max16Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max35Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max70Text">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:pattern value="[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]+"/>
<xs:minLength value="1"/> <xs:minLength value="1"/>
<xs:maxLength value="70"/> <xs:maxLength value="28"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="Max128Text"> <xs:complexType name="ClearingSystemIdentification2Choice__1">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max140Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="140"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ClearingSystemIdentification2Choice">
<xs:choice> <xs:choice>
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/> <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PostalAddress24">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType3Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BldgNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Flr" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstBx" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Room" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TwnLctnNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="DstrctNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AddressType3Choice">
<xs:choice>
<xs:element name="Cd" type="AddressType2Code"/>
<xs:element name="Prtry" type="GenericIdentification30"/>
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
<xs:simpleType name="AddressType2Code"> <xs:complexType name="ClearingSystemMemberIdentification2__1">
<xs:restriction base="xs:string">
<xs:enumeration value="ADDR"/>
<xs:enumeration value="PBOX"/>
<xs:enumeration value="HOME"/>
<xs:enumeration value="BIZZ"/>
<xs:enumeration value="MLTO"/>
<xs:enumeration value="DLVY"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="GenericIdentification30">
<xs:sequence> <xs:sequence>
<xs:element name="Id" type="Exact4AlphaNumericText"/> <xs:element name="ClrSysId" type="ClearingSystemIdentification2Choice__1"/>
<xs:element name="Issr" type="Max35Text"/> <xs:element name="MmbId" type="CBPR_RestrictedFINXMax28Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="Max35Text"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:simpleType name="Exact4AlphaNumericText"> <xs:simpleType name="CopyDuplicate1Code">
<xs:restriction base="xs:string"> <xs:annotation>
<xs:pattern value="[a-zA-Z0-9]{4}"/> <xs:documentation source="Name" xml:lang="EN">CopyDuplicate1Code</xs:documentation>
</xs:restriction> <xs:documentation source="Definition" xml:lang="EN">Specifies if this document is a copy, a duplicate, or a duplicate of a copy.</xs:documentation>
</xs:simpleType> </xs:annotation>
<xs:simpleType name="CountryCode">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}"/> <xs:enumeration value="CODU"/>
<xs:enumeration value="COPY">
</xs:enumeration>
<xs:enumeration value="DUPL">
</xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="AnyBICDec2014Identifier"> <xs:simpleType name="ExternalClearingSystemIdentification1Code">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:pattern value="[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"/> <xs:minLength value="1"/>
<xs:maxLength value="5"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="GenericFinancialIdentification1"> <xs:complexType name="FinancialInstitutionIdentification18__2">
<xs:sequence> <xs:sequence>
<xs:element name="Id" type="Max35Text"/> <xs:element name="BICFI" type="BICFIDec2014Identifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/> <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2__1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> <xs:element maxOccurs="1" minOccurs="0" name="LEI" type="LEIIdentifier">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">LEI</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Legal entity identifier of the financial institution.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="FinancialIdentificationSchemeName1Choice"> <xs:complexType name="ImplementationSpecification1">
<xs:choice> <xs:annotation>
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/> <xs:documentation source="Name" xml:lang="EN">ImplementationSpecification1</xs:documentation>
<xs:element name="Prtry" type="Max35Text"/> <xs:documentation source="Definition" xml:lang="EN">Identifies the implementation specification to which the ISO 20022 message conforms.</xs:documentation>
</xs:choice> </xs:annotation>
<xs:sequence>
<xs:element name="Regy" type="Max350Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Registry</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Name of the implementation specification registry in which the implementation specification of the ISO 20022 message is maintained.&#13;
For example, "MyStandards".</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Id" type="Max2048Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Identification</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Identifier which unambiguously identifies, within the implementation specification registry, the implementation specification to which the ISO 20022 message is compliant. This can be done via a URN. It can also contain a version number or date.&#13;
For instance, "2018-01-01 – Version 2" or "urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66".</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType> </xs:complexType>
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code"> <xs:simpleType name="LEIIdentifier">
<xs:restriction base="xs:string"> <xs:annotation>
<xs:minLength value="1"/> <xs:documentation source="Name" xml:lang="EN">LEIIdentifier</xs:documentation>
<xs:maxLength value="4"/> <xs:documentation source="Definition" xml:lang="EN">Legal Entity Identifier is a code allocated to a party as described in ISO 17442 "Financial Services - Legal Entity Identifier (LEI)".</xs:documentation>
</xs:restriction> </xs:annotation>
</xs:simpleType>
<xs:simpleType name="YesNoIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
<xs:simpleType name="NamePrefix2Code">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="DOCT"/> <xs:pattern value="[A-Z0-9]{18,18}[0-9]{2,2}"/>
<xs:enumeration value="MIKS"/>
<xs:enumeration value="MADM"/>
<xs:enumeration value="MISS"/>
<xs:enumeration value="MIST"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="PhoneNumber"> <xs:simpleType name="Max2048Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Max2048Text</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies a character string with a maximum length of 2048 characters.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/> <xs:minLength value="1"/>
<xs:maxLength value="2048"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="Max2048Text"> <xs:simpleType name="Max350Text">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Max350Text</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies a character string with a maximum length of 350 characters.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="1"/> <xs:minLength value="1"/>
<xs:maxLength value="2048"/> <xs:maxLength value="350"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="OtherContact1"> <xs:simpleType name="Max35Text">
<xs:sequence> <xs:annotation>
<xs:element name="ChanlTp" type="Max4Text"/> <xs:documentation source="Name" xml:lang="EN">Max35Text</xs:documentation>
<xs:element name="Id" type="Max128Text"/> <xs:documentation source="Definition" xml:lang="EN">Specifies a character string with a maximum length of 35 characters.</xs:documentation>
</xs:sequence> </xs:annotation>
</xs:complexType>
<xs:simpleType name="PreferredContactMethod1Code">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="MAIL"/> <xs:minLength value="1"/>
<xs:enumeration value="FAXX"/> <xs:maxLength value="35"/>
<xs:enumeration value="LETT"/>
<xs:enumeration value="CELL"/>
<xs:enumeration value="PHON"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="GenericOrganisationIdentification1"> <xs:complexType name="Party44Choice__1">
<xs:sequence> <xs:annotation>
<xs:element name="Id" type="Max35Text"/> <xs:documentation source="Name" xml:lang="EN">Party44Choice__1</xs:documentation>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/> <xs:documentation source="Definition" xml:lang="EN">Identification of a person, an organisation or a financial institution.</xs:documentation>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> </xs:annotation>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DateAndPlaceOfBirth1">
<xs:sequence>
<xs:element name="BirthDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
<xs:element name="CityOfBirth" type="Max35Text"/>
<xs:element name="CtryOfBirth" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericPersonIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="PersonIdentificationSchemeName1Choice">
<xs:choice> <xs:choice>
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/> <xs:element name="FIId" type="BranchAndFinancialInstitutionIdentification6__2">
<xs:element name="Prtry" type="Max35Text"/> <xs:annotation>
<xs:documentation source="Name" xml:lang="EN">FinancialInstitutionIdentification</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Identification of a financial institution.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
<xs:simpleType name="ExternalOrganisationIdentification1Code"> <xs:simpleType name="Priority2Code">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Priority2Code</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Specifies the priority level of an event.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="1"/> <xs:enumeration value="HIGH">
<xs:maxLength value="4"/> <xs:annotation>
<xs:documentation source="Name" xml:lang="EN">High</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Priority level is high.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NORM">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">Normal</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Priority level is normal.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="ExternalPersonIdentification1Code"> <xs:simpleType name="UnicodeChartsCode">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">UnicodeChartsCode</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">codelist containing the names of the UNICODE code block name as specified on http://unicode.org/Public/UNIDATA/Blocks.txt.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="UsageIdentifierPatternText">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">UsageIdentifierPatternText</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">35 Character Text restricted to the Usage Identifier Pattern. That is, it must be a lower case string of maximum 35 characters containing the following elements separated by period&#13;
&#13;
1. Short issuer organisation (Mandatory)&#13;
2. Business context (Mandatory and Repetitive)&#13;
3. Version (Mandatory)&#13;
&#13;
Each element must be an alphanumeric string of maximum 10 characters except the Version that must be exactly 2 digits.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="1"/> <xs:pattern value="[a-z0-9]{1,10}\.([a-z0-9]{1,10}\.)+\d\d"/>
<xs:maxLength value="4"/> <xs:minLength value="6"/>
<xs:maxLength value="35"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="YesNoIndicator">
<xs:annotation>
<xs:documentation source="Name" xml:lang="EN">YesNoIndicator</xs:documentation>
<xs:documentation source="Definition" xml:lang="EN">Indicates a "Yes" or "No" type of answer for an element.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
</xs:schema> </xs:schema>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment