...
VendorBankAccount.TABLECAPTION,VendorBankAccount.FIELDCAPTION("Use For Electronic Payments"),
Vendor.TABLECAPTION,Vendor."No.");
VendorBankAccount.FIND('-');
// Delete the following lines.
VendorBankAccount.TESTFIELD("CCC Bank No.");
VendorBankAccount.TESTFIELD("CCC Bank Branch No.");
VendorBankAccount.TESTFIELD("CCC Bank Account No.");
VendorBankAccount.TESTFIELD("CCC Control Digits");
PayeeCCCAccNo := VendorBankAccount."CCC Bank Account No.";
PayeeCCCControlDigits := VendorBankAccount."CCC Control Digits";
PayeeCCCBankNo := VendorBankAccount."CCC Bank No.";
PayeeCCCBankBranchNo := VendorBankAccount."CCC Bank Branch No.";
IF (PayeeCCCBankNo = '') OR (PayeeCCCBankBranchNo = '') OR
(PayeeCCCControlDigits = '') OR (PayeeCCCAccNo = '')
THEN
ERROR(Text1100002,VendorBankAccount."Vendor No.");
PayeeCCCAccNo := PADSTR('',MAXSTRLEN(PayeeCCCAccNo) - STRLEN(PayeeCCCAccNo),'0') + PayeeCCCAccNo;
PayeeCCCControlDigits := PADSTR('',MAXSTRLEN(PayeeCCCControlDigits) - STRLEN(PayeeCCCControlDigits),'0')
+ PayeeCCCControlDigits;
PayeeCCC := CONVERTSTR(PADSTR(PayeeCCCBankNo,4,' '),' ','0') + CONVERTSTR(PADSTR(PayeeCCCBankBranchNo,4,' '),' ','0') +
PADSTR(PayeeCCCControlDigits,2,' ') + CONVERTSTR(PADSTR(PayeeCCCAccNo,10,' '),' ','0');
IBAN := CONVERTSTR(PADSTR(VendorBankAccount.IBAN,34,' '),' ','0');
SwiftCode := CONVERTSTR(PADSTR(VendorBankAccount."SWIFT Code",11,' '),' ','0');
// End of the lines.
...
...
VendorBankAccount.TABLECAPTION,VendorBankAccount.FIELDCAPTION("Use For Electronic Payments"),
Vendor.TABLECAPTION,Vendor."No.");
VendorBankAccount.FIND('-');
// Add the following lines.
IF TransferType = TransferType::National THEN BEGIN
VendorBankAccount.TESTFIELD("CCC Bank No.");
VendorBankAccount.TESTFIELD("CCC Bank Branch No.");
VendorBankAccount.TESTFIELD("CCC Bank Account No.");
VendorBankAccount.TESTFIELD("CCC Control Digits");
PayeeCCCAccNo := VendorBankAccount."CCC Bank Account No.";
PayeeCCCControlDigits := VendorBankAccount."CCC Control Digits";
PayeeCCCBankNo := VendorBankAccount."CCC Bank No.";
PayeeCCCBankBranchNo := VendorBankAccount."CCC Bank Branch No.";
IF (PayeeCCCBankNo = '') OR (PayeeCCCBankBranchNo = '') OR
(PayeeCCCControlDigits = '') OR (PayeeCCCAccNo = '')
THEN
ERROR(Text1100002,VendorBankAccount."Vendor No.");
PayeeCCCAccNo := PADSTR('',MAXSTRLEN(PayeeCCCAccNo) - STRLEN(PayeeCCCAccNo),'0') + PayeeCCCAccNo;
PayeeCCCControlDigits := PADSTR('',MAXSTRLEN(PayeeCCCControlDigits) - STRLEN(PayeeCCCControlDigits),'0')
+ PayeeCCCControlDigits;
PayeeCCC := CONVERTSTR(PADSTR(PayeeCCCBankNo,4,' '),' ','0') + CONVERTSTR(PADSTR(PayeeCCCBankBranchNo,4,' '),' ','0') +
PADSTR(PayeeCCCControlDigits,2,' ') + CONVERTSTR(PADSTR(PayeeCCCAccNo,10,' '),' ','0');
END ELSE BEGIN
VendorBankAccount.TESTFIELD(IBAN);
IBAN := CONVERTSTR(PADSTR(VendorBankAccount.IBAN,34,' '),' ','0');
SwiftCode := CONVERTSTR(PADSTR(VendorBankAccount."SWIFT Code",11,' '),' ','0');
END;
// End of the lines.
...