// DO NOT CHANGE THIS DOCUMENT BECAUSE IT CAN GET OVERWRITTEN BY ONLINE-UPDATE!
//
// Usage in MLXML Document:
// Use this functions as tag or node content: @{GetXXXX@$APP$mlxml\scripts\utils1.pas}
//
// Example for GetDefaultValueIfEmpty: <address name="Peter" surname="Muster" acomment="@{GetDefaultValueIfEmpty('acomment', 'no comment :)')@$APP$mlxml\scripts\utils1.pas}" />
// Example for GetFirstOrSecondValue: <address name="Peter" surname="Muster" acomment="@{GetFirstOrSecondValue('acomment', 'acomment2')@$APP$mlxml\scripts\utils1.pas}" />

// CH05 0900 0000 9016 8285 9
// @{FormatIBAN('fieldname')@$APP$mlxml\scripts\accounting.pas}
function FormatIBAN(const Data: TXMLDataWrapper; AFieldName: String): Variant;
var
  s: String;
begin
  s := Data.ValueByName(AFieldName, wctString);
  
  if Pos(' ', s) = 0 then
  begin
	Insert(' ', s, 5);
	Insert(' ', s, 10);
	Insert(' ', s, 15);
	Insert(' ', s, 20);
	Insert(' ', s, 25);	
  end;
  
  Result := s;
end;

begin
end.


