26. September 2007 15:10
26. September 2007 18:22
Sales Invoice Header - OnAfterGetRecord()
// > Bank Account depending on Currency Code >>>
BankAcc.SETRANGE("Currency Code","Currency Code");
BankAcc.SETRANGE(Blocked,FALSE);
BankAcc.SETFILTER("Bank Account No.",'<>%1','');
BankAcc.SETFILTER("Bank Branch No.",'<>%1','');
IF BankAcc.FINDFIRST THEN BEGIN
CompanyInfo."Bank Name" := BankAcc.Name;
CompanyInfo."Bank Account No." := BankAcc."Bank Account No.";
CompanyInfo."Bank Branch No." := BankAcc."Bank Branch No.";
CompanyInfo.IBAN := BankAcc.IBAN;
CompanyInfo."SWIFT Code" := BankAcc."SWIFT Code";
END;
// < Bank Account depending on Currency Code <<<
CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");
[i][...][/i]